<!-- 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 accounts, posts, and policy.

- [`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 social 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

### Posts

Create, schedule, publish, and inspect posts.

- [`GET /v1/posts`](https://cutedyno.com/docs/api/list-posts) — List posts
- [`POST /v1/posts`](https://cutedyno.com/docs/api/create-post) — Create a post
- [`POST /v1/posts/validate`](https://cutedyno.com/docs/api/validate-post) — Validate a post
- [`GET /v1/posts/{id}`](https://cutedyno.com/docs/api/get-post) — Get a post
- [`PUT /v1/posts/{id}`](https://cutedyno.com/docs/api/update-post) — Update a post
- [`DELETE /v1/posts/{id}`](https://cutedyno.com/docs/api/cancel-post) — Cancel a post
- [`POST /v1/posts/{id}/publish`](https://cutedyno.com/docs/api/publish-post) — Publish a post
- [`POST /v1/posts/{id}/retry`](https://cutedyno.com/docs/api/retry-post) — Retry a failed post
- [`GET /v1/posts/{id}/history`](https://cutedyno.com/docs/api/get-post-history) — Get post state history

### Comments

Read comments on published content.

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

### Media

Upload images and video for use in posts.

- [`POST /v1/media/upload`](https://cutedyno.com/docs/api/create-media-upload) — Create a media upload URL
- [`POST /v1/media/upload-sessions`](https://cutedyno.com/docs/api/create-media-upload-session) — Create a browser upload session
- [`GET /v1/media/upload-sessions/{id}`](https://cutedyno.com/docs/api/get-media-upload-session) — Get an upload session

### Analytics

Read account performance, timeseries history, and top content.

- [`GET /v1/analytics`](https://cutedyno.com/docs/api/get-analytics) — Get live analytics
- [`GET /v1/analytics/history`](https://cutedyno.com/docs/api/get-analytics-history) — Get analytics history

### Webhooks

Receive 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

### Policy

Guardrails applied to everything in a profile.

- [`GET /v1/policy`](https://cutedyno.com/docs/api/get-policy) — Get profile policy
- [`PUT /v1/policy`](https://cutedyno.com/docs/api/update-policy) — Update profile policy

### Observability

Audit events and API request logs for debugging and compliance.

- [`GET /v1/events`](https://cutedyno.com/docs/api/list-events) — List audit events
- [`GET /v1/logs`](https://cutedyno.com/docs/api/list-api-logs) — List API request logs
