Skip to main content
This quickstart takes about five minutes. You will create an API key, confirm it works, find a creator and a conversation, and send one message with delivery tracking. Before you start
  • You are an owner or admin of an OnlyX workspace. Other roles cannot create keys.
  • At least one creator in the workspace is connected. If none is, follow Add a creator first.
  • You have curl, Python 3 with requests (pip install requests), or Node.js 18 or newer. The JavaScript examples use the built-in fetch and top-level await: save them in a file ending in .mjs and run it with node file.mjs.
1

Create an API key

  1. Open app.onlyx.ai and go to Settings → API & MCP.
  2. Under API keys, click Create API key.
  3. Name it after what will use it, for example Reporting script.
  4. Choose an access preset. For this quickstart pick Full access, because step 5 sends a message. For a real integration pick the smallest set of scopes it needs (see Authentication).
  5. Leave Creators on All creators and Expires on Never, or restrict them.
  6. Click Create and copy the key. It starts with onx_sk_ and is shown only once. OnlyX stores only a hash of it.
Store the key in an environment variable, never in code:
2

Check the key: GET /v1/me

GET /v1/me tells you which workspace the key belongs to, which scopes it has, and your rate limit. Every key can call it.
Response 200
A 401 with INVALID_API_KEY means the key was mistyped, revoked or expired. See Errors.
3

List your creators

Response 200
Copy a creator id (cre_...) whose connection.status is connected.
4

Read the inbox

List that creator’s unread conversations, then read the newest messages of one of them.
Response 200 (messages)
The conversation’s status tells you who is answering it: ai (the AI chatter), team (a human took over), handoff (the AI asked for a human) or ai_off. See Conversations.
5

Send a first message

This reaches a real fan on OnlyFans. Try it in a chat with a test subscriber account you own, or skip this step.
Sending needs the messages:send scope and an Idempotency-Key header. Generate a new key (a UUID works) for each new message, and reuse the same key if you retry the same message.
Response 202
202 means OnlyX accepted the message and queued it for delivery. Poll GET /v1/conversations/{conversationId}/messages/{messageId} every 5–10 seconds until delivery.status is sent, failed, unconfirmed or not_sent. Never resend on unconfirmed: the fan almost always got it.Sending also moves the chat to team for 12 hours, so the AI does not talk over you. Details in Read and send messages.

Prefer your AI assistant?

You do not need code to use OnlyX from Claude, ChatGPT, Cursor or VS Code. Connect the OnlyX MCP server in one click, sign in, and ask in plain language: “Which fans are waiting for a reply on Mia’s account?”

Add OnlyX to Claude

Opens Claude with the OnlyX connector filled in. Click Add, then sign in.

All AI clients

ChatGPT, Cursor, VS Code, Claude Code and others.

Next steps