Create Webhook Endpoint

Register an HTTPS URL that receives outreach events. The signing secret is returned once.

curl --request POST \
  --url https://api.aiclicks.io/api/v1/outreach/webhooks \
  --header 'Authorization: Bearer ak_live_xxx' \
  --header 'Content-Type: application/json' \
  --data '{
    "url": "https://hooks.your-platform.com/aiclicks/outreach",
    "events": ["opportunity.status_changed", "opportunity.action_needed", "opportunity.completed", "campaign.balance_low"],
    "description": "Production outreach sync"
  }'
{
  "data": {
    "id": "3c4d5e6f-7a8b-4c9d-8e0f-1a2b3c4d5e6f",
    "url": "https://hooks.your-platform.com/aiclicks/outreach",
    "events": ["opportunity.status_changed", "opportunity.action_needed", "opportunity.completed", "campaign.balance_low"],
    "campaign_id": null,
    "description": "Production outreach sync",
    "status": "enabled",
    "last_delivery_at": "2026-12-04T10:30:00.000Z",
    "last_delivery_status": 200,
    "team_id": "2b1f8c3d-4a5e-4f10-9c21-3d8e5a6b7c90",
    "secret": "whsec_4f9b2c1e8d7a6b5c4d3e2f1a0b9c8d7e2a1b3c4d5e6f7a8b",
    "created_at": "2026-12-04T10:30:00.000Z"
  },
  "generated_at": "2026-12-04T10:30:00.080Z"
}

Registers a URL that receives outreach events. AIclicks sends a ping event to the URL first. The endpoint is created only if your server answers the ping with a 2xx status within 10 seconds. A team can have up to 10 endpoints. Each endpoint can listen to all events or to a list of event types, and to all campaigns or to one campaign.

The response has the signing secret only once. Store it in your secret manager at once. If you lose it, delete the endpoint and create a new one.

Body parameters

body
urlstring
Required

The HTTPS URL that receives the events. Private and internal addresses are refused. It must answer the ping event with a 2xx status.

body
eventsarray

The event types to send, or ["*"] for all. Default ["*"].

body
campaign_idstring

Send only the events of this campaign. Default: all campaigns of the team.

body
team_idstring

The team that owns the endpoint. Required only for a master key (a key for all your teams) when you do not send campaign_id.

body
descriptionstring

A label for the endpoint.

Errors

400 Bad Requesterror

The URL is not HTTPS, an event type is unknown, the ping event failed, or the team already has 10 endpoints.