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"
}
Create a new webhook for your Team
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"
}
You can retrieve your token by visiting the OnlyFansAPI Console and clicking API Keys -> Create API Key.
The response is of type object
.