OnlyFans API Documentation
The ofapis documentation is machine-readable first. Every endpoint — messaging, mailings, scheduling, fan segments, subscribers, vault media, notifications, and webhooks — is described by a single OpenAPI 3.0 specification, and a live playground lets you send authenticated calls straight from the browser. Because ofapis is an independent, unofficial provider (OnlyFans publishes no first-party API), this spec is the contract.
Where the docs live
| Resource | URL |
|---|---|
| Live playground | /docs |
| OpenAPI 3.0 spec (JSON) | https://api.ofapis.com/v3/api-docs/public |
| Base URL | https://api.ofapis.com/api/public/v1 |
| Guides | /guides |
The spec at /v3/api-docs/public is the source of truth — request/response schemas, status codes, and every path. The /docs page renders it interactively.
Using the playground
Open /docs, paste your Bearer token (ofapis_sk_...), and you can execute real requests against your own linked accounts. Each operation shows the parameters, an example body, the exact curl command, and the live JSON response. It's the fastest way to confirm a payload shape before you write any code. Calls from the playground are metered like any other — one successful call is one credit, and failures aren't charged.
curl https://api.ofapis.com/api/public/v1/me \
-H "Authorization: Bearer ofapis_sk_..."
Generate a client from the spec
Because the documentation is a standard OpenAPI 3.0 document, you don't hand-write an SDK — you generate one. Point any OpenAPI generator at the spec URL:
# TypeScript / Node
npx @openapitools/openapi-generator-cli generate \
-i https://api.ofapis.com/v3/api-docs/public \
-g typescript-axios \
-o ./ofapis-client
# Python
openapi-generator-cli generate \
-i https://api.ofapis.com/v3/api-docs/public \
-g python \
-o ./ofapis_client
Swap the -g target for go, java, csharp, php, ruby, rust, and more. The generated client gives you typed models and methods that stay in sync with the API — regenerate whenever the spec updates. Prefer a hand-tuned quickstart? See the Python, Node, and PHP guides.
Import into your tools
The same spec URL imports directly into Postman, Insomnia, or an IDE HTTP client to scaffold a full request collection. AI coding assistants can also consume it: point ChatGPT, Claude, or an MCP server at the OpenAPI document and it can draft correct calls against real schemas.
Webhooks and events
Endpoint docs cover synchronous calls; asynchronous events are documented alongside them. Each webhook payload is signed so you can verify authenticity, and the event catalog is explained in OnlyFans webhook events explained. Prefer push over polling to keep both rate-limit pressure and credit spend low.
FAQ
Where is the OnlyFans API documentation?
The interactive docs are at /docs, backed by an OpenAPI 3.0 spec served at https://api.ofapis.com/v3/api-docs/public. The spec is the authoritative contract for every endpoint and schema.
Can I generate an SDK from the OpenAPI spec?
Yes. Feed the spec URL to any OpenAPI generator (openapi-generator, Swagger Codegen) with your target language and it produces a typed client for TypeScript, Python, Go, Java, C#, PHP, Ruby, Rust, and others.
Is this official OnlyFans documentation?
No. OnlyFans publishes no official public API. ofapis is an independent provider, and this documentation describes the ofapis REST layer that wraps the integration.
Can I try the endpoints without writing code?
Yes. The /docs playground executes authenticated requests in the browser against your own linked accounts, showing the curl command and live JSON response for every operation.
Open the docs · Start free · Browse guides
Related: Postman collection