Skip to main content
POST
/
webhooks
/
{webhook_id}
/
agents
Python
import requests

webhook_id = "your-webhook-id"
response = requests.post(
    f"https://api.roe-ai.com/webhooks/{webhook_id}/agents/",
    headers={
        "Authorization": "Bearer YOUR_API_KEY",
        "Content-Type": "application/json"
    },
    json={"agent_ids": ["agent-id-1", "agent-id-2"]}
)
linked = response.json()
print(f"Linked {len(linked)} agents")
{
  "agent_ids": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

webhook_id
string<uuid>
required

Body

Serializer for batch linking multiple agents to a webhook.

agent_ids
string<uuid>[]
required

List of agent IDs to link to this webhook

Minimum array length: 1

Response

201 - application/json

Serializer for batch linking multiple agents to a webhook.

agent_ids
string<uuid>[]
required

List of agent IDs to link to this webhook

Minimum array length: 1