OnlyFans API
Webhooks

Create Webhook

Create a new webhook for your Team

POST
/api/webhooks
AuthorizationBearer <token>

Get your API Key from OnlyFansAPI Console - https://app.onlyfansapi.com/api-keys

In: header

endpoint_urlstring

The URL of your webhook endpoint.

signing_secret?string | null

Optionally, add a signing secret to protect your webhook.

eventsarray<string>

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

Response Body

curl -X POST "https://app.onlyfansapi.com/api/webhooks" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoint_url": "https://example.com",
    "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"
}