---
title: "Connect an agent"
method: POST
path: "/v1/agent-endpoints"
---

# Connect an agent

`POST /v1/agent-endpoints`

## Request

- Base URL: `https://api.skysay.ai`
- URL: `https://api.skysay.ai/v1/agent-endpoints`
- Auth: none declared

## Request body

- AgentEndpoint
  - `audio_stream_url` string, required
  - `events` string[]: Subscribed event types. Omitted or empty at creation defaults to call.created, call.answered, media.started, call.ended, call.completed, call.failed, call.canceled. Change it later with PATCH /v1/agent-endpoints/{agent_endpoint_id}. Subscribing to sms.received requires sms:read; call.extraction.ready requires recordings:read. Changing any endpoint destination requires both sms:read and recordings:read, including for queued deliveries and concurrent subscription changes.
  - `name` string
  - `organization_id` string, required
  - `project_id` string, required
  - `webhook_url` string, required

## Response `201`

Agent endpoint

## Other responses

- `400`: organization_id, project_id, webhook_url or audio_stream_url is missing or blank, or events is supplied as something other than an array of known webhook event names (omit it, or send an empty array, to take the defaults)

---

[API](https://skmtc.dev/skysay/apis/skysay-api.md) · [All operations](https://skmtc.dev/skysay/apis/skysay-api/llms.txt) · [OpenAPI document](https://skmtc.dev/skysay/apis/skysay-api/revisions/95b8c66f99aa?raw)
