Test connection details before saving
POST
/credentials/test
const url = 'https://api.somebodyai.co/api/v1/credentials/test';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"provider":"openai","secretPayload":"example","endpoint":"https://my-resource.openai.azure.com","deployment":"realtime-prod"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Media typeapplication/json
object
provider
required
string
secretPayload
required
string
endpoint
Resource origin; required for azure-openai, ignored otherwise.
string format: uri
deployment
string
Responses
Section titled “Responses”Probe outcome; ok is false when the provider refused
Media typeapplication/json
object
ok
required
boolean
code
required
string
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" ]}