Skip to main content
POST
/
webhooks
Create webhook endpoint
curl --request POST \
  --url https://api.social-api.ai/v1/webhooks \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "events": [
    "comment.received",
    "dm.received"
  ],
  "url": "https://example.com/webhooks/socialapi"
}
'
{
  "events": [
    "comment.received",
    "dm.received"
  ],
  "id": "wh_01HZ9X3Q4R5M6N7P8V2K0W1J",
  "message": "Store the secret securely. It will not be shown again.",
  "secret": "whsec_a1b2c3d4e5f6...",
  "url": "https://example.com/webhooks/socialapi"
}

Authorizations

Authorization
string
header
required

Prefix your API key with "Bearer ". Example: Authorization: Bearer sapi_key_...

Body

application/json

Endpoint config

events
enum<string>[]

Events is the list of event types to subscribe to.

Available options:
comment.received,
dm.received,
review.received,
mention.received
Example:
["comment.received", "dm.received"]
url
string

URL is the HTTPS endpoint that will receive webhook POST requests.

Example:

"https://example.com/webhooks/socialapi"

Response

Endpoint created

events
string[]
Example:
["comment.received", "dm.received"]
id
string
Example:

"wh_01HZ9X3Q4R5M6N7P8V2K0W1J"

message
string
Example:

"Store the secret securely. It will not be shown again."

secret
string
Example:

"whsec_a1b2c3d4e5f6..."

url
string
Example:

"https://example.com/webhooks/socialapi"