Configure (create or update) an SSO integration in Gable - Gable Docs
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
SSO Integration Configuration
PUT
URL:/v0/settings/sso
Description:
Configure (create or update) an SSO integration in Gable
cURL Example
curl --request PUT \
--url https://demo-api.gable.ai/v0/settings/sso \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '\n{\n "type": "SAML",\n "identityProvider": "<string>",\n "metadataDocumentEndpointUrl": "https://company.okta.com/app/123456789/sso/saml/metadata"\n}'
Python Example
import requests
url = "https://demo-api.gable.ai/v0/settings/sso"
payload = {
"type": "SAML",
"identityProvider": "<string>",
"metadataDocumentEndpointUrl": "https://company.okta.com/app/123456789/sso/saml/metadata"
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)
JavaScript Fetch Example
const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'SAML',
identityProvider: '<string>',
metadataDocumentEndpointUrl: 'https://company.okta.com/app/123456789/sso/saml/metadata'
})
};
fetch('https://demo-api.gable.ai/v0/settings/sso', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
PHP Example
$curl = curl_init();
curl_setopt_array($curl, [\
CURLOPT_URL => "https://demo-api.gable.ai/v0/settings/sso",\
CURLOPT_RETURNTRANSFER => true,\
CURLOPT_ENCODING => "",\
CURLOPT_MAXREDIRS => 10,\
CURLOPT_TIMEOUT => 30,\
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\
CURLOPT_CUSTOMREQUEST => "PUT",\
CURLOPT_POSTFIELDS => json_encode([\
'type' => 'SAML',\
'identityProvider' => '<string>',\
'metadataDocumentEndpointUrl' => 'https://company.okta.com/app/123456789/sso/saml/metadata'\
]),\
CURLOPT_HTTPHEADER => [\
"Content-Type: application/json",\
"X-API-KEY: <api-key>"\
],\
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Go Example
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://demo-api.gable.ai/v0/settings/sso"
payload := strings.NewReader("{\n \"type\": \"SAML\",\n \"identityProvider\": \"<string>\",\n \"metadataDocumentEndpointUrl\": \"https://company.okta.com/app/123456789/sso/saml/metadata\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
200
{
"type": "SAML",
"identityProvider": "<string>",
"metadataDocumentEndpointUrl": "https://company.okta.com/app/123456789/sso/saml/metadata"
}
Error Messages
{
"message": "<string>",
"id": 123,
"title": "<string>"
}
Required Fields
Authorizations
- X-API-KEY (header, required)
Body
- type (enum
, required): The type of SSO integration, currently only SAML is supported. - identityProvider (string, required): The name of your identity provider.
- metadataDocumentEndpointUrl (string, required): The URL of the SAML metadata document.