Webhooks

Create a new webhook for your Team

post/api/webhooks

Request

  • Base URL
    https://app.onlyfansapi.com
  • URL
    https://app.onlyfansapi.com/api/webhooks
  • Auth
    HTTP bearer

Request body

endpoint_urlstring required

The URL of your webhook endpoint.

signing_secretstring nullable

Optionally, add a signing secret to protect your webhook.

eventsstring[] required

An array of webhook events to subscribe to. For all options, refer to our List Available Events endpoint. A webhook is single-platform: subscribe to either OnlyFans events or Fansly (fansly.*) events, never both in one webhook.

account_scopestring required

The account scope for the webhook (OnlyFans and Fansly webhooks alike). Use "global" for all accounts, "inclusive" for only selected accounts, or "exclusive" for all except selected accounts.

account_idsstring[]

An array of account IDs to apply the scope to. Use OnlyFans account IDs (acct_...) for OnlyFans webhooks and Fansly account IDs (fansly_acct_...) for Fansly webhooks. Required unless account_scope is "global".

Example request

{
  "endpoint_url": "https://example.com",
  "events": [
    "accounts.connected",
    "subscriptions.new"
  ],
  "account_scope": "global",
  "account_ids": [
    "ac_abc123"
  ]
}

Response

Example response

{
  "data": {
    "id": "wh_abc123",
    "url": "https://example.com",
    "events": [
      "accounts.connected",
      "subscriptions.new"
    ],
    "has_signing_secret": true,
    "enabled": false,
    "created_at": "2025-01-01T00:00:00.000000Z"
  },
  "_meta": {
    "_credits": {
      "used": 0,
      "balance": 1000000016,
      "note": "Always"
    },
    "_cache": {
      "is_cached": false,
      "note": "Cache disabled for this endpoint"
    },
    "_rate_limits": {
      "limit_minute": 1000,
      "limit_day": 50000,
      "remaining_minute": 998,
      "remaining_day": 49998
    }
  }
}

Changes

    • breaking

      added the new required request property

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status