POST
/
v1
/
webhooks
curl --request POST \
  --url https://api.aicaller.io/v1/webhooks \
  --header 'Content-Type: application/json' \
  --header 'aicaller-api-key: <api-key>' \
  --data '{
  "teamId": "363573667364666473667332",
  "url": "https://hooks.abc.com/",
  "subscribedEvents": [
    "phoneCall.completed"
  ],
  "method": "GET"
}'
{
  "data": {
    "teamId": "363573667364666473667332",
    "url": "https://hooks.abc.com/",
    "subscribedEvents": [
      "phoneCall.completed"
    ],
    "method": "GET",
    "_id": "363573667364666473667332",
    "createAt": "2023-10-12T09:08:00.387Z",
    "updatedAt": "2023-10-12T09:08:00.387Z",
    "secret": "NjUyOTgwMjkpJU0NmY25yzWkJFWDBE12"
  }
}

Authorizations

aicaller-api-key
string
header
required

Body

application/json
teamId
string
required

The ID of the team to which the webhook belongs.

Example:

"363573667364666473667332"

url
string
required
Example:

"https://hooks.abc.com/"

subscribedEvents
string[]
required
Example:
["phoneCall.completed"]
method
enum<string>
required
Available options:
GET,
POST
Example:

"GET"

Response

200
application/json
Webhook Successfully Created.
data
object
required