Send Message
Changed onSend a new message to a chat.
Idempotency. Pass an Idempotency-Key header to make retries safe. The first request with a given key is executed normally and its response is stored for 24 hours; any later request with the same key returns that stored response, plus an Idempotent-Replayed: true header, without contacting OnlyFans and without consuming credits. The replayed body is the original response with its _meta._credits block rewritten to show used: 0 and your current balance.
Keys are scoped to your team, this endpoint and the account in the URL, so the same value can be reused safely against a different account. Use a fresh, unique value (a UUID works well) for each message you send; it must be 1-255 printable ASCII characters.
- 400 IDEMPOTENCY_KEY_INVALID — the header value is empty, too long, or contains non-ASCII characters.
- 409 IDEMPOTENCY_CONFLICT — an earlier request with this key is still running. Retry once it finishes.
- 422 IDEMPOTENCY_KEY_MISMATCH — this key was already used with a different request body or chat.
Responses with a 5xx status (and 408/429) are never stored, so a failed send can be retried with the same key. The header is optional: omit it and the endpoint behaves exactly as before.
Request
- Base URLhttps://app.onlyfansapi.com
- URLhttps://app.onlyfansapi.com/api/{account}/chats/{chat_id}/messages
- AuthHTTP bearer
Headers
Request body
Example request
{
"text": "Hello!",
"replyToMessageId": 123456789,
"lockedText": true,
"price": 6.97,
"mediaFiles": [
"ofapi_media_abc123",
1234567890
],
"previews": [
"ofapi_media_abc123",
1234567890
],
"giphyId": "WAGC3LeqJvXglm5H7a",
"blockBannedWords": "strict_ban"
}Response
Success
Example response
{
"data": {
"responseType": "message",
"text": "<p>Message text</p>",
"giphyId": null,
"lockedText": true,
"isFree": true,
"price": 0,
"isMediaReady": true,
"mediaCount": 0,
"media": [],
"previews": [],
"isTip": false,
"isReportedByMe": false,
"isCouplePeopleMedia": false,
"queueId": 123,
"isMarkdownDisabled": true,
"releaseForms": [],
"fromUser": {
"id": 339543013,
"_view": "s"
},
"isFromQueue": false,
"id": 123,
"isOpened": false,
"isNew": true,
"createdAt": "2025-02-03T23:29:53+00:00",
"changedAt": "2025-02-03T23:29:53+00:00",
"cancelSeconds": 119,
"isLiked": false,
"canPurchase": false,
"canPurchaseReason": "free",
"canReport": false,
"canBePinned": true,
"isPinned": false
},
"_pagination": {
"next_page": "https://app.onlyfansapi.com/api/acct_XXXXXXXXXXX/chats/XXXXXXXXX/messages?limit=10&id=XXXXXXXXX"
},
"_meta": {
"_credits": {
"used": 1,
"balance": 1,
"note": "Always"
},
"_cache": {
"is_cached": false,
"note": "Cache disabled for this endpoint"
},
"_rate_limits": {
"limit_minute": 1000,
"limit_day": 50000,
"remaining_minute": 999,
"remaining_day": 49999
}
}
}Changes
- info
added the new optional
headerrequest parameterIdempotency-Key - info
added the new optional request property
- info
the
request property type was generalized fromintegertonumber - info
added the non-success response with the status
- info
- breaking
the
/request property type changed fromstringtofile[]|string - breaking
the
/request property type changed fromstringtofile[]|string[]|int - breaking
the response property
/became nullable for the status - info
api tag
Chat Messagesadded - info
api tag
Chatsremoved - info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
request body became optional
- info
the request property
became optional
- breaking