curl --request POST \
--url https://api-next.ofauth.com/v2/access/chats/:userId/messages \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'x-connection-id: <api-key>' \
--data '
{
"isForwardedMessage": false,
"text": "",
"mediaItems": [],
"isLockedText": false,
"price": 0,
"previewMediaCount": 0,
"releaseForms": {
"users": [],
"partners": [],
"guests": []
},
"userTags": [],
"isMarkdown": true
}
'{
"id": 123,
"text": "<string>",
"fromUser": {
"id": 123,
"name": "<string>"
},
"media": [
{
"id": 123,
"type": "photo",
"convertedToVideo": true,
"canView": true,
"hasError": true,
"createdAt": "<string>",
"isReady": true,
"releaseForms": [
{
"id": 123,
"name": "<string>",
"partnerSource": "<string>",
"type": "<string>",
"user": {
"view": "<string>",
"id": 123,
"name": "<string>",
"username": "<string>",
"isVerified": true,
"avatar": "<string>",
"avatarThumbs": {
"c50": "<string>",
"c144": "<string>"
},
"ivStatus": "<string>",
"isFromGuest": true
}
}
],
"duration": 123,
"hasCustomPreview": true,
"videoSources": {
"240": "<string>",
"720": "<string>"
},
"files": {
"full": {
"url": "<string>",
"sources": [
{
"url": "<string>",
"width": 123,
"height": 123,
"type": "<string>"
}
],
"width": 123,
"height": 123,
"size": 123
},
"thumb": {
"url": "<string>",
"width": 123,
"height": 123,
"size": 123
},
"preview": {
"url": "<string>",
"options": [
{
"url": "<string>",
"width": 123,
"height": 123,
"type": "<string>"
}
],
"width": 123,
"height": 123,
"size": 123
},
"squarePreview": {
"url": "<string>",
"width": 123,
"height": 123,
"size": 123
}
}
}
],
"previews": [
123
],
"isMediaReady": true,
"mediaCount": 123,
"lockedText": true,
"responseType": "<string>",
"giphyId": "<string>",
"isFree": true,
"isTip": true,
"isReportedByMe": true,
"isCouplePeopleMedia": true,
"queueId": 123,
"isMarkdownDisabled": true,
"releaseForms": null,
"isFromQueue": true,
"canUnsendQueue": true,
"unsendSecondsQueue": 123,
"isOpened": true,
"isNew": true,
"createdAt": "<string>",
"changedAt": "<string>",
"cancelSeconds": 123,
"isLiked": true,
"canPurchase": true,
"canPurchaseReason": "<string>",
"canReport": true,
"canBePinned": true,
"isPinned": true
}Send chat message
Permission Required: messages:write
curl --request POST \
--url https://api-next.ofauth.com/v2/access/chats/:userId/messages \
--header 'Content-Type: application/json' \
--header 'apiKey: <api-key>' \
--header 'x-connection-id: <api-key>' \
--data '
{
"isForwardedMessage": false,
"text": "",
"mediaItems": [],
"isLockedText": false,
"price": 0,
"previewMediaCount": 0,
"releaseForms": {
"users": [],
"partners": [],
"guests": []
},
"userTags": [],
"isMarkdown": true
}
'{
"id": 123,
"text": "<string>",
"fromUser": {
"id": 123,
"name": "<string>"
},
"media": [
{
"id": 123,
"type": "photo",
"convertedToVideo": true,
"canView": true,
"hasError": true,
"createdAt": "<string>",
"isReady": true,
"releaseForms": [
{
"id": 123,
"name": "<string>",
"partnerSource": "<string>",
"type": "<string>",
"user": {
"view": "<string>",
"id": 123,
"name": "<string>",
"username": "<string>",
"isVerified": true,
"avatar": "<string>",
"avatarThumbs": {
"c50": "<string>",
"c144": "<string>"
},
"ivStatus": "<string>",
"isFromGuest": true
}
}
],
"duration": 123,
"hasCustomPreview": true,
"videoSources": {
"240": "<string>",
"720": "<string>"
},
"files": {
"full": {
"url": "<string>",
"sources": [
{
"url": "<string>",
"width": 123,
"height": 123,
"type": "<string>"
}
],
"width": 123,
"height": 123,
"size": 123
},
"thumb": {
"url": "<string>",
"width": 123,
"height": 123,
"size": 123
},
"preview": {
"url": "<string>",
"options": [
{
"url": "<string>",
"width": 123,
"height": 123,
"type": "<string>"
}
],
"width": 123,
"height": 123,
"size": 123
},
"squarePreview": {
"url": "<string>",
"width": 123,
"height": 123,
"size": 123
}
}
}
],
"previews": [
123
],
"isMediaReady": true,
"mediaCount": 123,
"lockedText": true,
"responseType": "<string>",
"giphyId": "<string>",
"isFree": true,
"isTip": true,
"isReportedByMe": true,
"isCouplePeopleMedia": true,
"queueId": 123,
"isMarkdownDisabled": true,
"releaseForms": null,
"isFromQueue": true,
"canUnsendQueue": true,
"unsendSecondsQueue": 123,
"isOpened": true,
"isNew": true,
"createdAt": "<string>",
"changedAt": "<string>",
"cancelSeconds": 123,
"isLiked": true,
"canPurchase": true,
"canPurchaseReason": "<string>",
"canReport": true,
"canBePinned": true,
"isPinned": true
}Requires a connection via the x-connection-id header.
^\d+$Whether this is a forwarded message
Text content. Supports markdown by default. See Text Formatting Guide.
10000Media references to attach. Accepts vault media IDs, upload references (mediaUploadId), or http(s) URLs. See mediaItems reference.
OnlyFans media ID
x > 0Whether text is locked behind paywall (defaults to false).
Price to unlock message content (0 for free)
0 <= x <= 200How many items in mediaItems should be previews. Uses the first N items from left to right.
x >= 0Release form participants
Show child attributes
Users to tag
OnlyFans user ID
x > 0Whether to parse text as markdown (default: true). See Text Formatting Guide.
Successful response
Show child attributes
Show child attributes
Was this page helpful?