Skip to content

Test connection details before saving

POST
/credentials/test
curl --request POST \
--url https://api.somebodyai.co/api/v1/credentials/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "provider": "openai", "secretPayload": "example", "endpoint": "https://my-resource.openai.azure.com", "deployment": "realtime-prod" }'

Opens the realtime connection an agent would use with these details and reports whether the provider accepted it. Nothing is stored.

Media typeapplication/json
object
provider
required
string
Allowed values: openai azure-openai
secretPayload
required
string
>= 1 characters
endpoint

Resource origin; required for azure-openai, ignored otherwise.

string format: uri
deployment
string
>= 1 characters

Probe outcome; ok is false when the provider refused

Media typeapplication/json
object
ok
required
boolean
code
required
string
Allowed values: ok unauthorized forbidden not_found unreachable timeout provider_error unsupported_host
status

HTTP status when the provider refused the handshake

integer
message
required

The provider's own message when it gave one

string
target

Where the probe connected; absent for unsupported_host

object
host
required
string
deployment
required
string
Example
{
"code": "ok",
"message": "Access denied due to invalid subscription key."
}

Bad request - validation failed

Media typeapplication/json
object
error
required
string
details
Array<string>
Example
{
"error": "Resource not found",
"details": [
"Field is required"
]
}

Unauthorized - missing or invalid auth

Media typeapplication/json
object
error
required
string
details
Array<string>
Example
{
"error": "Resource not found",
"details": [
"Field is required"
]
}