# Endpoints

Configure webhook and AI agent endpoints (Vapi, Retell, ElevenLabs, LiveKit, Vogent, Custom SIP)

## List endpoints

> Retrieves all configured endpoints (webhooks and AI agents)

```json
{"openapi":"3.0.3","info":{"title":"KrosAI Cockpit API","version":"1.3.0"},"tags":[{"name":"Endpoints","description":"Configure webhook and AI agent endpoints (Vapi, Retell, ElevenLabs, LiveKit, Vogent, Custom SIP)"}],"servers":[{"url":"https://api.krosai.com/v1","description":"Production API"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key in format `kros_live_xxxx` for production or `kros_test_xxxx` for testing.\nAlso accepts JWT tokens from Supabase Auth for dashboard sessions.\n\n**Alternative:** You can also use the `x-api-key` header instead of Authorization Bearer.\n"}},"parameters":{"OrganizationId":{"name":"x-organization-id","in":"header","required":false,"description":"Organization UUID for multi-tenant context. Falls back to user's first organization if not provided.","schema":{"type":"string","format":"uuid"}}},"schemas":{"Endpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string","enum":["webhook","vapi","retell","livekit","elevenlabs","vogent","custom_sip"],"description":"Endpoint type: AI agent provider or custom routing"},"url":{"type":"string","format":"uri","description":"Endpoint URL or auto-generated SIP URI"},"status":{"type":"string","enum":["active","inactive","error"]},"provider_config":{"$ref":"#/components/schemas/ProviderConfig"},"organization_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ProviderConfig":{"type":"object","description":"Provider-specific configuration. Schema varies by endpoint type.","oneOf":[{"$ref":"#/components/schemas/VapiConfig"},{"$ref":"#/components/schemas/RetellConfig"},{"$ref":"#/components/schemas/ElevenLabsConfig"},{"$ref":"#/components/schemas/LiveKitConfig"},{"$ref":"#/components/schemas/VogentConfig"},{"$ref":"#/components/schemas/CustomSipConfig"}]},"VapiConfig":{"type":"object","description":"Configuration for Vapi AI voice agent","properties":{"assistant_id":{"type":"string","description":"Vapi Assistant ID (required)"},"credential_id":{"type":"string","description":"BYO SIP Trunk Credential ID (optional)"},"vapi_phone_number_id":{"type":"string","description":"Vapi phone number ID for outbound calls (optional)"}},"required":["assistant_id"]},"RetellConfig":{"type":"object","description":"Configuration for Retell AI voice agent","properties":{"agent_id":{"type":"string","description":"Retell Agent ID (required)"},"retell_phone_number":{"type":"string","description":"Retell phone number for outbound calls (optional)"}},"required":["agent_id"]},"ElevenLabsConfig":{"type":"object","description":"Configuration for ElevenLabs Conversational AI agent","properties":{"elevenlabs_agent_id":{"type":"string","description":"ElevenLabs Conversational AI Agent ID (required)"}},"required":["elevenlabs_agent_id"]},"LiveKitConfig":{"type":"object","description":"Configuration for LiveKit real-time voice agent","properties":{"livekit_agent_name":{"type":"string","description":"LiveKit Agent ID/name"},"livekit_sip_trunk_id":{"type":"string","description":"LiveKit SIP Trunk ID (required)"},"livekit_sip_uri":{"type":"string","format":"uri","description":"Full SIP URI from LiveKit dashboard (required), e.g., sip:xxxx.sip.livekit.cloud"}},"required":["livekit_sip_trunk_id","livekit_sip_uri"]},"VogentConfig":{"type":"object","description":"Configuration for Vogent AI voice agent with SIP authentication","properties":{"vogent_agent_id":{"type":"string","description":"Vogent Agent ID (optional, for reference)"},"vogent_sip_prefix":{"type":"string","description":"SIP prefix from Vogent Call Settings (required)"},"vogent_sip_username":{"type":"string","description":"SIP authentication username (required)"},"vogent_sip_password":{"type":"string","description":"SIP authentication password (required)"}},"required":["vogent_sip_prefix","vogent_sip_username","vogent_sip_password"]},"CustomSipConfig":{"type":"object","description":"Configuration for custom SIP endpoint","properties":{"sip_uri":{"type":"string","format":"uri","description":"Custom SIP URI (required)"},"username":{"type":"string","description":"SIP authentication username (optional)"},"password":{"type":"string","description":"SIP authentication password (optional)"}},"required":["sip_uri"]},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable error message"},"code":{"type":"string","description":"Machine-readable error code"},"details":{"type":"object","additionalProperties":true,"description":"Additional error details"}}}},"responses":{"Unauthorized":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/endpoints":{"get":{"tags":["Endpoints"],"summary":"List endpoints","description":"Retrieves all configured endpoints (webhooks and AI agents)","operationId":"listEndpoints","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"List of endpoints","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Endpoint"}}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## Create endpoint

> Creates a new endpoint for call routing. Supports multiple provider types:\
> \- \`webhook\`: Custom HTTP endpoint receiving call events\
> \- \`vapi\`: Vapi AI voice agent\
> \- \`retell\`: Retell AI voice agent\
> \- \`livekit\`: LiveKit real-time communication\
> \- \`custom\_sip\`: Custom SIP endpoint\
> \
> For AI providers (vapi, retell, livekit), the SIP URI is auto-generated.<br>

```json
{"openapi":"3.0.3","info":{"title":"KrosAI Cockpit API","version":"1.3.0"},"tags":[{"name":"Endpoints","description":"Configure webhook and AI agent endpoints (Vapi, Retell, ElevenLabs, LiveKit, Vogent, Custom SIP)"}],"servers":[{"url":"https://api.krosai.com/v1","description":"Production API"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key in format `kros_live_xxxx` for production or `kros_test_xxxx` for testing.\nAlso accepts JWT tokens from Supabase Auth for dashboard sessions.\n\n**Alternative:** You can also use the `x-api-key` header instead of Authorization Bearer.\n"}},"parameters":{"OrganizationId":{"name":"x-organization-id","in":"header","required":false,"description":"Organization UUID for multi-tenant context. Falls back to user's first organization if not provided.","schema":{"type":"string","format":"uuid"}}},"schemas":{"EndpointCreate":{"type":"object","required":["name","type"],"properties":{"name":{"type":"string","maxLength":100},"type":{"type":"string","enum":["webhook","vapi","retell","livekit","elevenlabs","vogent","custom_sip"]},"url":{"type":"string","format":"uri","description":"Required for webhook and custom_sip types"},"provider_config":{"$ref":"#/components/schemas/ProviderConfig"},"phone_number_id":{"type":"string","format":"uuid","description":"Optional phone number to attach during creation"}}},"ProviderConfig":{"type":"object","description":"Provider-specific configuration. Schema varies by endpoint type.","oneOf":[{"$ref":"#/components/schemas/VapiConfig"},{"$ref":"#/components/schemas/RetellConfig"},{"$ref":"#/components/schemas/ElevenLabsConfig"},{"$ref":"#/components/schemas/LiveKitConfig"},{"$ref":"#/components/schemas/VogentConfig"},{"$ref":"#/components/schemas/CustomSipConfig"}]},"VapiConfig":{"type":"object","description":"Configuration for Vapi AI voice agent","properties":{"assistant_id":{"type":"string","description":"Vapi Assistant ID (required)"},"credential_id":{"type":"string","description":"BYO SIP Trunk Credential ID (optional)"},"vapi_phone_number_id":{"type":"string","description":"Vapi phone number ID for outbound calls (optional)"}},"required":["assistant_id"]},"RetellConfig":{"type":"object","description":"Configuration for Retell AI voice agent","properties":{"agent_id":{"type":"string","description":"Retell Agent ID (required)"},"retell_phone_number":{"type":"string","description":"Retell phone number for outbound calls (optional)"}},"required":["agent_id"]},"ElevenLabsConfig":{"type":"object","description":"Configuration for ElevenLabs Conversational AI agent","properties":{"elevenlabs_agent_id":{"type":"string","description":"ElevenLabs Conversational AI Agent ID (required)"}},"required":["elevenlabs_agent_id"]},"LiveKitConfig":{"type":"object","description":"Configuration for LiveKit real-time voice agent","properties":{"livekit_agent_name":{"type":"string","description":"LiveKit Agent ID/name"},"livekit_sip_trunk_id":{"type":"string","description":"LiveKit SIP Trunk ID (required)"},"livekit_sip_uri":{"type":"string","format":"uri","description":"Full SIP URI from LiveKit dashboard (required), e.g., sip:xxxx.sip.livekit.cloud"}},"required":["livekit_sip_trunk_id","livekit_sip_uri"]},"VogentConfig":{"type":"object","description":"Configuration for Vogent AI voice agent with SIP authentication","properties":{"vogent_agent_id":{"type":"string","description":"Vogent Agent ID (optional, for reference)"},"vogent_sip_prefix":{"type":"string","description":"SIP prefix from Vogent Call Settings (required)"},"vogent_sip_username":{"type":"string","description":"SIP authentication username (required)"},"vogent_sip_password":{"type":"string","description":"SIP authentication password (required)"}},"required":["vogent_sip_prefix","vogent_sip_username","vogent_sip_password"]},"CustomSipConfig":{"type":"object","description":"Configuration for custom SIP endpoint","properties":{"sip_uri":{"type":"string","format":"uri","description":"Custom SIP URI (required)"},"username":{"type":"string","description":"SIP authentication username (optional)"},"password":{"type":"string","description":"SIP authentication password (optional)"}},"required":["sip_uri"]},"Endpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string","enum":["webhook","vapi","retell","livekit","elevenlabs","vogent","custom_sip"],"description":"Endpoint type: AI agent provider or custom routing"},"url":{"type":"string","format":"uri","description":"Endpoint URL or auto-generated SIP URI"},"status":{"type":"string","enum":["active","inactive","error"]},"provider_config":{"$ref":"#/components/schemas/ProviderConfig"},"organization_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable error message"},"code":{"type":"string","description":"Machine-readable error code"},"details":{"type":"object","additionalProperties":true,"description":"Additional error details"}}}},"responses":{"BadRequest":{"description":"Bad request - Invalid parameters or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"Unauthorized - Invalid or missing API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/endpoints":{"post":{"tags":["Endpoints"],"summary":"Create endpoint","description":"Creates a new endpoint for call routing. Supports multiple provider types:\n- `webhook`: Custom HTTP endpoint receiving call events\n- `vapi`: Vapi AI voice agent\n- `retell`: Retell AI voice agent\n- `livekit`: LiveKit real-time communication\n- `custom_sip`: Custom SIP endpoint\n\nFor AI providers (vapi, retell, livekit), the SIP URI is auto-generated.\n","operationId":"createEndpoint","parameters":[{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointCreate"}}}},"responses":{"201":{"description":"Endpoint created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```

## GET /endpoints/{id}

> Get endpoint details

```json
{"openapi":"3.0.3","info":{"title":"KrosAI Cockpit API","version":"1.3.0"},"tags":[{"name":"Endpoints","description":"Configure webhook and AI agent endpoints (Vapi, Retell, ElevenLabs, LiveKit, Vogent, Custom SIP)"}],"servers":[{"url":"https://api.krosai.com/v1","description":"Production API"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key in format `kros_live_xxxx` for production or `kros_test_xxxx` for testing.\nAlso accepts JWT tokens from Supabase Auth for dashboard sessions.\n\n**Alternative:** You can also use the `x-api-key` header instead of Authorization Bearer.\n"}},"parameters":{"EndpointId":{"name":"id","in":"path","required":true,"description":"Endpoint UUID","schema":{"type":"string","format":"uuid"}},"OrganizationId":{"name":"x-organization-id","in":"header","required":false,"description":"Organization UUID for multi-tenant context. Falls back to user's first organization if not provided.","schema":{"type":"string","format":"uuid"}}},"schemas":{"Endpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string","enum":["webhook","vapi","retell","livekit","elevenlabs","vogent","custom_sip"],"description":"Endpoint type: AI agent provider or custom routing"},"url":{"type":"string","format":"uri","description":"Endpoint URL or auto-generated SIP URI"},"status":{"type":"string","enum":["active","inactive","error"]},"provider_config":{"$ref":"#/components/schemas/ProviderConfig"},"organization_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"ProviderConfig":{"type":"object","description":"Provider-specific configuration. Schema varies by endpoint type.","oneOf":[{"$ref":"#/components/schemas/VapiConfig"},{"$ref":"#/components/schemas/RetellConfig"},{"$ref":"#/components/schemas/ElevenLabsConfig"},{"$ref":"#/components/schemas/LiveKitConfig"},{"$ref":"#/components/schemas/VogentConfig"},{"$ref":"#/components/schemas/CustomSipConfig"}]},"VapiConfig":{"type":"object","description":"Configuration for Vapi AI voice agent","properties":{"assistant_id":{"type":"string","description":"Vapi Assistant ID (required)"},"credential_id":{"type":"string","description":"BYO SIP Trunk Credential ID (optional)"},"vapi_phone_number_id":{"type":"string","description":"Vapi phone number ID for outbound calls (optional)"}},"required":["assistant_id"]},"RetellConfig":{"type":"object","description":"Configuration for Retell AI voice agent","properties":{"agent_id":{"type":"string","description":"Retell Agent ID (required)"},"retell_phone_number":{"type":"string","description":"Retell phone number for outbound calls (optional)"}},"required":["agent_id"]},"ElevenLabsConfig":{"type":"object","description":"Configuration for ElevenLabs Conversational AI agent","properties":{"elevenlabs_agent_id":{"type":"string","description":"ElevenLabs Conversational AI Agent ID (required)"}},"required":["elevenlabs_agent_id"]},"LiveKitConfig":{"type":"object","description":"Configuration for LiveKit real-time voice agent","properties":{"livekit_agent_name":{"type":"string","description":"LiveKit Agent ID/name"},"livekit_sip_trunk_id":{"type":"string","description":"LiveKit SIP Trunk ID (required)"},"livekit_sip_uri":{"type":"string","format":"uri","description":"Full SIP URI from LiveKit dashboard (required), e.g., sip:xxxx.sip.livekit.cloud"}},"required":["livekit_sip_trunk_id","livekit_sip_uri"]},"VogentConfig":{"type":"object","description":"Configuration for Vogent AI voice agent with SIP authentication","properties":{"vogent_agent_id":{"type":"string","description":"Vogent Agent ID (optional, for reference)"},"vogent_sip_prefix":{"type":"string","description":"SIP prefix from Vogent Call Settings (required)"},"vogent_sip_username":{"type":"string","description":"SIP authentication username (required)"},"vogent_sip_password":{"type":"string","description":"SIP authentication password (required)"}},"required":["vogent_sip_prefix","vogent_sip_username","vogent_sip_password"]},"CustomSipConfig":{"type":"object","description":"Configuration for custom SIP endpoint","properties":{"sip_uri":{"type":"string","format":"uri","description":"Custom SIP URI (required)"},"username":{"type":"string","description":"SIP authentication username (optional)"},"password":{"type":"string","description":"SIP authentication password (optional)"}},"required":["sip_uri"]},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable error message"},"code":{"type":"string","description":"Machine-readable error code"},"details":{"type":"object","additionalProperties":true,"description":"Additional error details"}}}},"responses":{"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/endpoints/{id}":{"get":{"tags":["Endpoints"],"summary":"Get endpoint details","operationId":"getEndpoint","parameters":[{"$ref":"#/components/parameters/EndpointId"},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"200":{"description":"Endpoint details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```

## DELETE /endpoints/{id}

> Delete endpoint

```json
{"openapi":"3.0.3","info":{"title":"KrosAI Cockpit API","version":"1.3.0"},"tags":[{"name":"Endpoints","description":"Configure webhook and AI agent endpoints (Vapi, Retell, ElevenLabs, LiveKit, Vogent, Custom SIP)"}],"servers":[{"url":"https://api.krosai.com/v1","description":"Production API"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key in format `kros_live_xxxx` for production or `kros_test_xxxx` for testing.\nAlso accepts JWT tokens from Supabase Auth for dashboard sessions.\n\n**Alternative:** You can also use the `x-api-key` header instead of Authorization Bearer.\n"}},"parameters":{"EndpointId":{"name":"id","in":"path","required":true,"description":"Endpoint UUID","schema":{"type":"string","format":"uuid"}},"OrganizationId":{"name":"x-organization-id","in":"header","required":false,"description":"Organization UUID for multi-tenant context. Falls back to user's first organization if not provided.","schema":{"type":"string","format":"uuid"}}},"responses":{"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable error message"},"code":{"type":"string","description":"Machine-readable error code"},"details":{"type":"object","additionalProperties":true,"description":"Additional error details"}}}}},"paths":{"/endpoints/{id}":{"delete":{"tags":["Endpoints"],"summary":"Delete endpoint","operationId":"deleteEndpoint","parameters":[{"$ref":"#/components/parameters/EndpointId"},{"$ref":"#/components/parameters/OrganizationId"}],"responses":{"204":{"description":"Endpoint deleted"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```

## PATCH /endpoints/{id}

> Update endpoint

```json
{"openapi":"3.0.3","info":{"title":"KrosAI Cockpit API","version":"1.3.0"},"tags":[{"name":"Endpoints","description":"Configure webhook and AI agent endpoints (Vapi, Retell, ElevenLabs, LiveKit, Vogent, Custom SIP)"}],"servers":[{"url":"https://api.krosai.com/v1","description":"Production API"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"API Key","description":"API key in format `kros_live_xxxx` for production or `kros_test_xxxx` for testing.\nAlso accepts JWT tokens from Supabase Auth for dashboard sessions.\n\n**Alternative:** You can also use the `x-api-key` header instead of Authorization Bearer.\n"}},"parameters":{"EndpointId":{"name":"id","in":"path","required":true,"description":"Endpoint UUID","schema":{"type":"string","format":"uuid"}},"OrganizationId":{"name":"x-organization-id","in":"header","required":false,"description":"Organization UUID for multi-tenant context. Falls back to user's first organization if not provided.","schema":{"type":"string","format":"uuid"}}},"schemas":{"ProviderConfig":{"type":"object","description":"Provider-specific configuration. Schema varies by endpoint type.","oneOf":[{"$ref":"#/components/schemas/VapiConfig"},{"$ref":"#/components/schemas/RetellConfig"},{"$ref":"#/components/schemas/ElevenLabsConfig"},{"$ref":"#/components/schemas/LiveKitConfig"},{"$ref":"#/components/schemas/VogentConfig"},{"$ref":"#/components/schemas/CustomSipConfig"}]},"VapiConfig":{"type":"object","description":"Configuration for Vapi AI voice agent","properties":{"assistant_id":{"type":"string","description":"Vapi Assistant ID (required)"},"credential_id":{"type":"string","description":"BYO SIP Trunk Credential ID (optional)"},"vapi_phone_number_id":{"type":"string","description":"Vapi phone number ID for outbound calls (optional)"}},"required":["assistant_id"]},"RetellConfig":{"type":"object","description":"Configuration for Retell AI voice agent","properties":{"agent_id":{"type":"string","description":"Retell Agent ID (required)"},"retell_phone_number":{"type":"string","description":"Retell phone number for outbound calls (optional)"}},"required":["agent_id"]},"ElevenLabsConfig":{"type":"object","description":"Configuration for ElevenLabs Conversational AI agent","properties":{"elevenlabs_agent_id":{"type":"string","description":"ElevenLabs Conversational AI Agent ID (required)"}},"required":["elevenlabs_agent_id"]},"LiveKitConfig":{"type":"object","description":"Configuration for LiveKit real-time voice agent","properties":{"livekit_agent_name":{"type":"string","description":"LiveKit Agent ID/name"},"livekit_sip_trunk_id":{"type":"string","description":"LiveKit SIP Trunk ID (required)"},"livekit_sip_uri":{"type":"string","format":"uri","description":"Full SIP URI from LiveKit dashboard (required), e.g., sip:xxxx.sip.livekit.cloud"}},"required":["livekit_sip_trunk_id","livekit_sip_uri"]},"VogentConfig":{"type":"object","description":"Configuration for Vogent AI voice agent with SIP authentication","properties":{"vogent_agent_id":{"type":"string","description":"Vogent Agent ID (optional, for reference)"},"vogent_sip_prefix":{"type":"string","description":"SIP prefix from Vogent Call Settings (required)"},"vogent_sip_username":{"type":"string","description":"SIP authentication username (required)"},"vogent_sip_password":{"type":"string","description":"SIP authentication password (required)"}},"required":["vogent_sip_prefix","vogent_sip_username","vogent_sip_password"]},"CustomSipConfig":{"type":"object","description":"Configuration for custom SIP endpoint","properties":{"sip_uri":{"type":"string","format":"uri","description":"Custom SIP URI (required)"},"username":{"type":"string","description":"SIP authentication username (optional)"},"password":{"type":"string","description":"SIP authentication password (optional)"}},"required":["sip_uri"]},"Endpoint":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"type":{"type":"string","enum":["webhook","vapi","retell","livekit","elevenlabs","vogent","custom_sip"],"description":"Endpoint type: AI agent provider or custom routing"},"url":{"type":"string","format":"uri","description":"Endpoint URL or auto-generated SIP URI"},"status":{"type":"string","enum":["active","inactive","error"]},"provider_config":{"$ref":"#/components/schemas/ProviderConfig"},"organization_id":{"type":"string","format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Human-readable error message"},"code":{"type":"string","description":"Machine-readable error code"},"details":{"type":"object","additionalProperties":true,"description":"Additional error details"}}}},"responses":{"BadRequest":{"description":"Bad request - Invalid parameters or request body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/endpoints/{id}":{"patch":{"tags":["Endpoints"],"summary":"Update endpoint","operationId":"updateEndpoint","parameters":[{"$ref":"#/components/parameters/EndpointId"},{"$ref":"#/components/parameters/OrganizationId"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"url":{"type":"string","format":"uri"},"status":{"type":"string","enum":["active","inactive"]},"provider_config":{"$ref":"#/components/schemas/ProviderConfig"}}}}}},"responses":{"200":{"description":"Endpoint updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Endpoint"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.krosai.com/api-reference/reference/endpoints.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
