> Connect a custom integration to a free Revdoku account through REST API credentials, or use OAuth for hosted MCP and local agents.

# Connect to the Revdoku API

Connect your own app, script, CI job, or backend worker to Revdoku over the REST
API. Revdoku requires authentication before storing files or creating a preview.
AI clients should normally use hosted MCP with OAuth, and local coding agents
should use the Revdoku CLI device flow. For every endpoint, see the complete
[Revdoku API documentation](/api/).

## 1. Create a free account for reusable access

Create an account at [app.revdoku.com/users/sign_up](https://app.revdoku.com/users/sign_up?utm_source=revdoku.com&utm_medium=api-guide&utm_campaign=connect_ai_first), then sign in. Revdoku does not create accounts through an agent or API call.

## 2. Choose the right authentication path

- **Hosted MCP:** connect `https://app.revdoku.com/mcp` with Streamable HTTP and Revdoku OAuth. No API key is copied into chat.
- **Local agent or CLI:** run `revdoku login` and approve the browser device flow. The CLI stores its credential locally.
- **Custom REST integration:** create a reusable API key under **Account → Access** when that capability is available to the account. Store it in a secret manager or private environment variable.

Clients can discover supported agent authentication methods at `GET /api/v1/agent_auth/capabilities`. The preferred local flow is OAuth device authorization, which keeps account credentials and verification codes out of AI chat.

## 3. Authenticate REST requests

Point requests at the Revdoku base URL and send the API key as a bearer token:

```sh
export REVDOKU_URL=https://app.revdoku.com
export REVDOKU_API_KEY=revdoku_...
```

```http
Authorization: Bearer $REVDOKU_API_KEY
Content-Type: application/json
Accept: application/json
```

## 4. Check the connection status

Confirm the key works and the connection is live with the status endpoint:

```sh
curl -fsS "$REVDOKU_URL/api/v1/status" \
  -H "Authorization: Bearer $REVDOKU_API_KEY"
```

A healthy connection returns your connection payload plus `server_version` and `client_version`; compare `client_version` against your installed connector to detect updates. Agents can call `GET /api/v1/agent_auth/status`, which returns the same connection payload. A missing or invalid key returns an authentication error with an `error.code`; reconnect through OAuth or create a replacement key in **Account → Access**.

## Verify the connection from ChatGPT

If you are connecting an AI agent, use ChatGPT with Revdoku as a quick live check: ask it to create files, publish a bucket, and summarize the resulting workflow before you build deeper API automation.

![ChatGPT outlines a Revdoku publishing workflow for an AI-generated site](/assets/chatgpt/chatgpt-revdoku-publish-workflow-magic-stories.webp)

## More details

This page covers connecting and verifying the connection. For every endpoint, creating buckets, uploading files, publish sessions, custom domains, analytics, error codes, and hosted MCP, see the complete [Revdoku API reference](/api/).

---

[View the canonical page](https://revdoku.com/api-connect/) · [Browse llms.txt](https://revdoku.com/llms.txt)
