Skip to main content
POST
/
api
/
webhooks
Create Webhook
curl --request POST \
  --url https://app.onlyfansapi.com/api/webhooks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "endpoint_url": "https://example.com",
  "signing_secret": 7,
  "events": [
    "accounts.connected",
    "subscriptions.new"
  ]
}'
{
  "id": "wh_abc123",
  "url": "https://example.com",
  "has_signing_secret": true,
  "events": [
    "accounts.connected",
    "subscriptions.new"
  ],
  "created_at": "2025-01-01T00:00:00.000000Z"
}

Authorizations

Authorization
string
header
required

You can retrieve your token by visiting the OnlyFansAPI Console and clicking API Keys -> Create API Key.

Body

application/json
endpoint_url
string
required

The URL of your webhook endpoint.

Example:

"https://example.com"

events
string[]
required

An array of webhook events to subscribe to. Options: messages.received, messages.sent, messages.ppv.unlocked, subscriptions.new, users.typing, posts.liked, accounts.connected, accounts.reconnected, accounts.session_expired, accounts.authentication_failed, accounts.otp_code_required, accounts.face_otp_required

Example:
["accounts.connected", "subscriptions.new"]
signing_secret
string | null

Optionally, add a signing secret to protect your webhook.

Example:

7

Response

200 - application/json
id
string
Example:

"wh_abc123"

url
string
Example:

"https://example.com"

has_signing_secret
boolean
Example:

true

events
string[]
Example:
["accounts.connected", "subscriptions.new"]
created_at
string
Example:

"2025-01-01T00:00:00.000000Z"