Create a custom API integration
Save a call to your own HTTP endpoint as an integration. Attach it to an agent with `attachAgentIntegration`, and the agent calls the endpoint during a call when the conversation needs it, then uses the response in its reply. Parameters marked `isLLMGenerated` are filled in by the agent from the conversation.
Reseller keys only: act as one of your clients by its user id. Omit it to act on your own account. [How acting for a client works](/docs/reseller/your-clients/acting-as-clients).
A name for the integration.
What the endpoint does. The agent reads this to decide when to call it, so say what it returns and when it is useful.
curl -X POST 'https://omnidim.io/api/v1/integrations/custom-api' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "name": "Order status", "description": "Look up an order'\''s delivery status by order number.", "url": "https://api.acme-corp.io/orders/status", "method": "GET", "headers": [ { "key": "Authorization", "value": "Bearer YOUR_TOKEN" } ], "query_params": [ { "key": "order_number", "description": "The order number the caller reads out", "type": "string", "required": true, "isLLMGenerated": true } ] }'
{ "success": false, "message": "string", "integration_id": 0, "integration": { "id": 0, "name": "string", "integration_type": "google_sheets", "user_id": 0, "user_name": "string", "organization_id": 0, "organization_name": "string" } }
BearerAuthAuthorizationBearer <token>Bearer token authentication. Obtain your API key from the OmniDimension dashboard.
application/jsonuser_id?ClientUserIdReseller keys only: act as one of your clients by its user id. Omit it to act on your own account. How acting for a client works.
name*stringA name for the integration.
description?stringWhat the endpoint does. The agent reads this to decide when to call it, so say what it returns and when it is useful.
url*stringurimethod*string"GET""POST""PUT""PATCH""DELETE"headers?Fixed headers sent on every request.
query_params?Query string parameters.
body_params?Request body fields, sent as JSON. A GET request sends no
body. Every request with a body also carries the call's
from_number, to_number and call_sid.
request_timeout?integerSeconds to wait for your endpoint before the agent moves on.
10Response body
application/jsonThe integration was created.
application/jsonsuccess?booleanmessage?stringintegration_id?integerUse it as integration_id to attach the integration to an agent.
integration?The new integration. Stored credentials read ********.
