<!-- https://cutedyno.com/docs/api -->

# API reference

Conventions shared by every endpoint, and the full endpoint index.

A REST API over JSON. One base URL, bearer auth, predictable resources.

```text
https://api.cutedyno.com
```

OpenAPI (always in sync with the server): [`/docs/api/openapi.json`](/docs/api/openapi.json).

## Conventions

| Topic | Rule |
| --- | --- |
| Auth | `Authorization: Bearer cdyn_live_...` |
| Bodies | JSON, `Content-Type: application/json` |
| Fields | `camelCase`; timestamps ISO 8601 UTC |
| Profiles | Pass `profileId` or use the key's home profile |
| Idempotency | `Idempotency-Key` on writes |
| Errors | `{ error: { code, message, requestId } }` |
| Rate limits | `RateLimit-*` headers; `429` includes `Retry-After` |

See [Authentication](/docs/authentication), [Idempotency](/docs/guides/idempotency), [Errors](/docs/errors), [Rate limits](/docs/guides/rate-limits).
## Pagination

Two styles, depending on the resource:

**Offset pagination** — posts, events, logs. Send `page` and `limit`, read `total` and `hasMore`:

```typescript
const { posts, hasMore } = await cutedyno.posts.list({ page: 2, limit: 50 });
```

Or let the SDK walk it for you:

```typescript
for await (const post of cutedyno.posts.iterate({ status: 'failed' })) {
  console.log(post.id);
}
```

**Cursor pagination** — comments, which change while you read them. Send `cursor` from the previous response's `nextCursor`, and stop when it is `null`.

`limit` is capped at 100 everywhere. Requesting more is not an error; you get 100.

## Status values

A post moves through these:

| Status | Meaning |
| --- | --- |
| `draft` | Saved, no schedule. Nothing will happen until you schedule or publish it. |
| `pending_approval` | Waiting on an approver. |
| `approved` | Approved and about to continue. |
| `rejected` | An approver declined it. It stays unpublished. |
| `scheduled` | Queued for a future time. |
| `queued` | Handed to a worker, about to be published. |
| `processing` | Currently uploading to platforms. |
| `published` | Succeeded on every target account. |
| `partially_published` | Succeeded on some accounts, failed on others. |
| `failed` | Failed on every target account. |
| `cancelled` | Cancelled before publishing. |

`partially_published` is the one people forget. Posting one video to five platforms means five independent uploads with five sets of rules, and a duration that TikTok accepts may exceed what another allows. Treat it as an expected outcome: read `results`, and [retry](/docs/api/retry-post) only what failed.

## Endpoints

### Profiles

A profile is one customer of your platform. It owns connected Facebook and Instagram accounts and comments.

- [`GET /v1/profiles`](https://cutedyno.com/docs/api/list-profiles) — List profiles
- [`POST /v1/profiles`](https://cutedyno.com/docs/api/create-profile) — Create a profile
- [`GET /v1/profiles/{id}`](https://cutedyno.com/docs/api/get-profile) — Get a profile
- [`PATCH /v1/profiles/{id}`](https://cutedyno.com/docs/api/update-profile) — Update a profile
- [`DELETE /v1/profiles/{id}`](https://cutedyno.com/docs/api/delete-profile) — Delete a profile
- [`GET /v1/profile`](https://cutedyno.com/docs/api/get-current-profile) — Get the current profile

### API keys

Mint and revoke keys, optionally scoped to specific profiles.

- [`GET /v1/api-keys`](https://cutedyno.com/docs/api/list-api-keys) — List API keys
- [`POST /v1/api-keys`](https://cutedyno.com/docs/api/create-api-key) — Create an API key
- [`DELETE /v1/api-keys/{id}`](https://cutedyno.com/docs/api/revoke-api-key) — Revoke an API key

### Accounts

Connect Facebook and Instagram accounts to a profile and list what is connected.

- [`GET /v1/accounts`](https://cutedyno.com/docs/api/list-accounts) — List connected accounts
- [`GET /v1/connect/{platform}`](https://cutedyno.com/docs/api/start-connect) — Start a connect flow
- [`POST /v1/connect/sessions`](https://cutedyno.com/docs/api/create-connect-session) — Create a connect session
- [`GET /v1/connect/sessions/{id}`](https://cutedyno.com/docs/api/get-connect-session) — Get a connect session

### Comments

Read Facebook and Instagram comments.

- [`GET /v1/comments`](https://cutedyno.com/docs/api/list-comments) — List comments

### Webhooks

Receive comment and connection events instead of polling. Includes delivery logs and tests.

- [`GET /v1/webhooks`](https://cutedyno.com/docs/api/list-webhooks) — List webhook subscriptions
- [`POST /v1/webhooks`](https://cutedyno.com/docs/api/create-webhook) — Create a webhook subscription
- [`POST /v1/webhooks/{id}/test`](https://cutedyno.com/docs/api/test-webhook) — Send a test event
- [`GET /v1/webhooks/{id}/deliveries`](https://cutedyno.com/docs/api/list-webhook-deliveries) — List webhook deliveries
- [`PATCH /v1/webhooks/{id}`](https://cutedyno.com/docs/api/update-webhook) — Update a webhook subscription
- [`DELETE /v1/webhooks/{id}`](https://cutedyno.com/docs/api/delete-webhook) — Delete a webhook subscription
- [`POST /v1/webhooks/{id}/rotate-secret`](https://cutedyno.com/docs/api/rotate-webhook-secret) — Rotate the signing secret
