# Quickstart: order your first video

> Order a UGC video with the Besday API in 7 steps: create a key, find a creator, create an order, pay from credits, track it, download and approve.

Source: https://besday.com/docs/api/quickstart · Updated 2026-12-03 · OpenAPI: https://besday.com/api/v1/openapi.json

This guide takes one order from start to finish with plain HTTP calls. Every step is a single request; the examples use cURL, and each reference page has the same call in Node.js and Python.

## Before you start

- A Besday brand account (sign up at [besday.com/brands/join](https://besday.com/brands/join)) with a verified email.
- Credits on the account. Buy them at **Credits** on besday.com; 1 credit = US$1.
- An API key with **Read and write** access (Settings → API keys; owner or admin).

1. **Save your API key.** Copy the key when you create it (it is shown once) and keep it in an environment variable on your server: `export BESDAY_API_KEY="bsd_live_…"`. Check it with `GET /v1/me`.
2. **Find a creator.** Call `GET /v1/creators` with filters such as `kind=real`, `delivery=3d` or `price=under-100`. Each creator lists `prices` per video length, `add_ons`, `delivery_days` and whether it is `accepting_orders`.
3. **Create the order.** Call `POST /v1/orders` with the creator’s `slug`, a `duration_seconds` the creator sells, your `product_url` and a `brief`. You get back an order in status `draft` with its `price_credits`.
4. **Pay from your credits.** Call `POST /v1/orders/{id}/pay`. A real creator now has 48 hours to accept (`awaiting_acceptance`); an AI creator starts at once (`active`). A short balance answers 402 `insufficient_credits`.
5. **Track progress.** Register a webhook (`POST /v1/webhook_endpoints`) for `order.delivered`, or poll `GET /v1/orders/{id}`. Use `POST /v1/orders/{id}/messages` to talk to the creator.
6. **Review and download.** When the order is `delivered`, call `GET /v1/orders/{id}/deliveries`. Watch `preview_url`; on a real creator’s order, originals unlock after approval.
7. **Approve or ask for changes.** Call `POST /v1/orders/{id}/approve` to complete the order, or `POST /v1/orders/{id}/revisions` with what to change (2 rounds included). Without either, the order is approved automatically 5 days after delivery.

## Step 1: check your key

### Retrieve the account

`GET /api/v1/me`

Check a key: returns the brand, the key’s scope, the team member it acts as, and the credit balance.

- Scope: `read`
- Returns: 200 `account`

cURL:

```bash
curl "https://besday.com/api/v1/me" \
  -H "Authorization: Bearer $BESDAY_API_KEY"
```

Node.js:

```javascript
const res = await fetch("https://besday.com/api/v1/me", {
  headers: {
    Authorization: `Bearer ${process.env.BESDAY_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

Python:

```python
import os, uuid, requests

res = requests.get(
    "https://besday.com/api/v1/me",
    headers={
        "Authorization": f"Bearer {os.environ['BESDAY_API_KEY']}",
    },
    timeout=30,
)
res.raise_for_status()
print(res.json())
```

Response (200):

```json
{
  "object": "account",
  "brand": {
    "id": "ba_2d61f0",
    "name": "Glow Lab",
    "website": "https://glowlab.example"
  },
  "api_key": {
    "id": "key_8b2e44c1",
    "scope": "read_write"
  },
  "acting_as": {
    "user_id": "usr_51c9aa",
    "email": "ops@glowlab.example",
    "role": "admin"
  },
  "credits": {
    "balance_credits": 500,
    "spending_paused": false
  }
}
```

Errors: `api_key_missing`, `api_key_invalid`, `rate_limited`.


## Step 2: find a creator

### List creators

`GET /api/v1/creators`

Search the marketplace with the same filters and sorts as besday.com. Returns creators with prices, add-ons and delivery time.

- Scope: `read`
- Returns: 200 a list of `creator` objects

Query parameters:

| Name | Type | Required | Description |
|---|---|---|---|
| `kind` | string | no | Real creators or AI creators. Omit for both. One of: `real`, `ai`. |
| `search` | string | no | Free text over name, headline and bio (up to 120 characters). |
| `delivery` | string | no | Delivers within 1, 3 or 7 days. One of: `1d`, `3d`, `7d`. |
| `price` | string | no | Starting price band in credits. One of: `under-100`, `100-250`, `250-plus`. |
| `language` | string | no | Speaks this language on camera. One of: `english`, `spanish`, `french`, `german`, `japanese`, `hindi`. |
| `gender` | string | no | Creator gender. One of: `female`, `male`, `non-binary`. |
| `age` | string | no | Age range. One of: `18-24`, `25-34`, `35-44`, `45-plus`. |
| `specialty` | string | no | Content lane, e.g. `beauty-skincare`. Repeatable (any of). |
| `trait` | string | no | Style trait, e.g. `high-energy`. Repeatable (all of). |
| `platform` | string | no | Posts on this platform. One of: `tiktok`, `instagram`, `youtube`. |
| `state` | string | no | US state code, e.g. `CA` (real creators). |
| `available` | string | no | `1`: only creators taking orders now. One of: `1`. |
| `sort` | string | no | Order of results. Default `featured`. One of: `featured`, `portfolio`, `rating`, `newest`, `price_low`, `price_high`. |
| `limit` | integer | no | Page size, 1–100. Default 20. |
| `cursor` | string | no | The `next_cursor` of the previous page. |

cURL:

```bash
curl "https://besday.com/api/v1/creators?kind=real&delivery=3d&limit=10" \
  -H "Authorization: Bearer $BESDAY_API_KEY"
```

Node.js:

```javascript
const res = await fetch("https://besday.com/api/v1/creators?kind=real&delivery=3d&limit=10", {
  headers: {
    Authorization: `Bearer ${process.env.BESDAY_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

Python:

```python
import os, uuid, requests

res = requests.get(
    "https://besday.com/api/v1/creators?kind=real&delivery=3d&limit=10",
    headers={
        "Authorization": f"Bearer {os.environ['BESDAY_API_KEY']}",
    },
    timeout=30,
)
res.raise_for_status()
print(res.json())
```

Response (200):

```json
{
  "object": "list",
  "data": [
    {
      "object": "creator",
      "id": "cr_7f3a9c21",
      "slug": "maya-w",
      "name": "Maya W.",
      "kind": "real",
      "headline": "Unhurried product demos that sound like a friend’s recommendation",
      "bio": "I film honest, warm product videos in natural light.",
      "specialty": "beauty-skincare",
      "traits": [
        "warm-conversational"
      ],
      "languages": [
        "english",
        "spanish"
      ],
      "gender": "female",
      "age_bracket": "25-34",
      "availability": "available",
      "away_until": null,
      "accepting_orders": true,
      "delivery_days": 3,
      "from_price_credits": 99,
      "prices": [
        {
          "duration_seconds": 15,
          "price_credits": 99
        },
        {
          "duration_seconds": 30,
          "price_credits": 149
        },
        {
          "duration_seconds": 60,
          "price_credits": 249
        }
      ],
      "custom_lengths": null,
      "add_ons": [
        {
          "kind": "raw_footage",
          "price_credits": 49
        },
        {
          "kind": "extra_hooks",
          "price_credits": 25
        },
        {
          "kind": "captions",
          "price_credits": 19
        }
      ],
      "max_quantity": 10,
      "portfolio_count": 6,
      "has_intro_reel": true,
      "image_url": "https://besday.com/api/creators/photo/cr_7f3a9c21/portrait.webp",
      "profile_url": "https://besday.com/app/brands/creators/maya-w"
    }
  ],
  "has_more": true,
  "next_cursor": "bzoyMA"
}
```

Errors: `parameter_invalid`.

Note: Unknown filter values are ignored, like on the website.


## Step 3: create the order

### Create an order

`POST /api/v1/orders`

Creates an unpaid order (status `draft`) with your brief. Besday computes the price from the creator’s prices; pay it with POST /v1/orders/{id}/pay.

- Scope: `read_write`
- Returns: 201 `order`
- Supports `Idempotency-Key`

Body parameters (JSON):

| Name | Type | Required | Description |
|---|---|---|---|
| `creator` | string | yes | The creator’s `id` or `slug`. |
| `duration_seconds` | integer | yes | Video length. One of 15, 30, 45, 60, 90, 120, 180 (the creator’s `prices` list what they sell); AI creators also take 195–600 in 15-second steps. |
| `aspect_ratio` | string | no | Vertical video. Default `9:16`. One of: `9:16`. |
| `quantity` | integer | no | Videos of the same brief, 1–10 (real creators). Default 1. |
| `add_ons` | object[] | no | Real creators: `[{ "kind": "captions", "quantity": 1 }]`. Kinds: `raw_footage`, `extra_hooks`, `captions`, `rush`. `extra_hooks` takes quantity 1–5; `rush` halves the delivery time. |
| `product_url` | string | no | The product page (http or https). |
| `brief` | object | no | Structured brief, every field optional: `goal` (`awareness`, `sales`, `app_installs`, `other`), `goal_other`, `platforms` (`tiktok`, `instagram_reels`, `youtube_shorts`, `paid_ads`, `other`), `audience`, `key_messages[]`, `hooks[]`, `must_say`, `must_avoid`, `call_to_action`, `script`, `reference_links[]` (https), `anything_else`. |
| `note` | string | no | Free-text brief (up to 1,000 characters), instead of `brief`. |
| `requires_shipping` | boolean | no | Real creators: you will ship a physical product. The creator’s clock starts when it arrives. |

cURL:

```bash
curl -X POST "https://besday.com/api/v1/orders" \
  -H "Authorization: Bearer $BESDAY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "creator": "maya-w",
  "duration_seconds": 30,
  "add_ons": [
    {
      "kind": "captions",
      "quantity": 1
    }
  ],
  "product_url": "https://yourbrand.com/products/vitamin-c-serum",
  "requires_shipping": true,
  "brief": {
    "goal": "sales",
    "platforms": [
      "tiktok",
      "instagram_reels"
    ],
    "audience": "Women 25–40 with sensitive skin",
    "key_messages": [
      "Fragrance-free",
      "Visible glow in 2 weeks"
    ],
    "hooks": [
      "I stopped wearing foundation because of this"
    ],
    "must_say": "Use code MAYA15",
    "must_avoid": "Medical claims",
    "call_to_action": "Tap the link to try it"
  }
}'
```

Node.js:

```javascript
const res = await fetch("https://besday.com/api/v1/orders", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BESDAY_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "creator": "maya-w",
    "duration_seconds": 30,
    "add_ons": [
      {
        "kind": "captions",
        "quantity": 1
      }
    ],
    "product_url": "https://yourbrand.com/products/vitamin-c-serum",
    "requires_shipping": true,
    "brief": {
      "goal": "sales",
      "platforms": [
        "tiktok",
        "instagram_reels"
      ],
      "audience": "Women 25–40 with sensitive skin",
      "key_messages": [
        "Fragrance-free",
        "Visible glow in 2 weeks"
      ],
      "hooks": [
        "I stopped wearing foundation because of this"
      ],
      "must_say": "Use code MAYA15",
      "must_avoid": "Medical claims",
      "call_to_action": "Tap the link to try it"
    }
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

Python:

```python
import os, uuid, requests

res = requests.post(
    "https://besday.com/api/v1/orders",
    headers={
        "Authorization": f"Bearer {os.environ['BESDAY_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
      "creator": "maya-w",
      "duration_seconds": 30,
      "add_ons": [
        {
          "kind": "captions",
          "quantity": 1
        }
      ],
      "product_url": "https://yourbrand.com/products/vitamin-c-serum",
      "requires_shipping": True,
      "brief": {
        "goal": "sales",
        "platforms": [
          "tiktok",
          "instagram_reels"
        ],
        "audience": "Women 25–40 with sensitive skin",
        "key_messages": [
          "Fragrance-free",
          "Visible glow in 2 weeks"
        ],
        "hooks": [
          "I stopped wearing foundation because of this"
        ],
        "must_say": "Use code MAYA15",
        "must_avoid": "Medical claims",
        "call_to_action": "Tap the link to try it"
      }
    },
    timeout=30,
)
res.raise_for_status()
print(res.json())
```

Response (201):

```json
{
  "object": "order",
  "id": "prj_01HZX8Q4V2",
  "status": "draft",
  "creator": {
    "id": "cr_7f3a9c21",
    "slug": "maya-w",
    "name": "Maya W.",
    "kind": "real"
  },
  "duration_seconds": 30,
  "aspect_ratio": "9:16",
  "quantity": 1,
  "add_ons": [
    {
      "kind": "captions",
      "quantity": 1,
      "unit_price_credits": 19
    }
  ],
  "price_credits": 168,
  "product_url": "https://yourbrand.com/products/vitamin-c-serum",
  "brief": {
    "goal": "sales",
    "goal_other": null,
    "platforms": [
      "tiktok",
      "instagram_reels"
    ],
    "audience": "Women 25–40 with sensitive skin",
    "key_messages": [
      "Fragrance-free",
      "Visible glow in 2 weeks"
    ],
    "hooks": [
      "I stopped wearing foundation because of this"
    ],
    "must_say": "Use code MAYA15",
    "must_avoid": "Medical claims",
    "call_to_action": "Tap the link to try it",
    "script": null,
    "reference_links": [],
    "anything_else": null
  },
  "note": null,
  "requires_shipping": true,
  "delivery_days": 3,
  "campaign_id": null,
  "paid_at": null,
  "accept_by": null,
  "accepted_at": null,
  "delivery_due_at": null,
  "delivered_at": null,
  "approved_at": null,
  "cancelled_at": null,
  "cancellation_reason": null,
  "created_at": "2026-12-03T17:02:11.000Z",
  "updated_at": "2026-12-03T17:02:11.000Z",
  "dashboard_url": "https://besday.com/app/brands/projects/prj_01HZX8Q4V2"
}
```

Errors: `parameter_invalid`, `creator_unavailable`, `insufficient_scope`, `idempotency_key_reused`.

Note: Accepted fields: `creator`, `duration_seconds`, `aspect_ratio`, `quantity`, `add_ons`, `product_url`, `brief`, `note`, `requires_shipping`. Any other field is refused (422), so a typo never goes unnoticed.


## Step 4: pay from your credits

### Pay for an order

`POST /api/v1/orders/{id}/pay`

Pays the order from your credits. A real creator then has 48 hours to accept; an AI creator starts at once.

- Scope: `read_write`
- Returns: 200 `order`
- Supports `Idempotency-Key`

Path parameters:

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | The order id. |

cURL:

```bash
curl -X POST "https://besday.com/api/v1/orders/prj_01HZX8Q4V2/pay" \
  -H "Authorization: Bearer $BESDAY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

Node.js:

```javascript
const res = await fetch("https://besday.com/api/v1/orders/prj_01HZX8Q4V2/pay", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BESDAY_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

Python:

```python
import os, uuid, requests

res = requests.post(
    "https://besday.com/api/v1/orders/prj_01HZX8Q4V2/pay",
    headers={
        "Authorization": f"Bearer {os.environ['BESDAY_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    timeout=30,
)
res.raise_for_status()
print(res.json())
```

Response (200):

```json
{
  "object": "order",
  "id": "prj_01HZX8Q4V2",
  "status": "awaiting_acceptance",
  "creator": {
    "id": "cr_7f3a9c21",
    "slug": "maya-w",
    "name": "Maya W.",
    "kind": "real"
  },
  "duration_seconds": 30,
  "aspect_ratio": "9:16",
  "quantity": 1,
  "add_ons": [
    {
      "kind": "captions",
      "quantity": 1,
      "unit_price_credits": 19
    }
  ],
  "price_credits": 168,
  "product_url": "https://yourbrand.com/products/vitamin-c-serum",
  "brief": {
    "goal": "sales",
    "goal_other": null,
    "platforms": [
      "tiktok",
      "instagram_reels"
    ],
    "audience": "Women 25–40 with sensitive skin",
    "key_messages": [
      "Fragrance-free",
      "Visible glow in 2 weeks"
    ],
    "hooks": [
      "I stopped wearing foundation because of this"
    ],
    "must_say": "Use code MAYA15",
    "must_avoid": "Medical claims",
    "call_to_action": "Tap the link to try it",
    "script": null,
    "reference_links": [],
    "anything_else": null
  },
  "note": null,
  "requires_shipping": true,
  "delivery_days": 3,
  "campaign_id": null,
  "paid_at": "2026-12-03T17:03:40.000Z",
  "accept_by": "2026-12-05T17:03:40.000Z",
  "accepted_at": null,
  "delivery_due_at": null,
  "delivered_at": null,
  "approved_at": null,
  "cancelled_at": null,
  "cancellation_reason": null,
  "created_at": "2026-12-03T17:02:11.000Z",
  "updated_at": "2026-12-04T15:00:00.000Z",
  "dashboard_url": "https://besday.com/app/brands/projects/prj_01HZX8Q4V2",
  "payment": {
    "spent_credits": 168,
    "balance_after_credits": 332
  }
}
```

Errors: `insufficient_credits`, `already_paid`, `email_unverified`, `member_limit`, `credits_blocked`, `creator_unavailable`, `order_state`, `not_found`.

Note: On 402 `insufficient_credits` the error also carries `price_credits`, `balance_credits`, `shortfall_credits`, `suggested_top_up_credits` and `buy_credits_url`.


## Step 5: get told when it is delivered

### Create a webhook endpoint

`POST /api/v1/webhook_endpoints`

Registers an https URL for order events. The answer includes the signing secret, once.

- Scope: `read_write`
- Returns: 201 `webhook_endpoint`
- Supports `Idempotency-Key`

Body parameters (JSON):

| Name | Type | Required | Description |
|---|---|---|---|
| `url` | string | yes | https URL on port 443 that resolves to public addresses. |
| `events` | string[] | no | Event types to send, or `["*"]` (default) for all: `order.paid`, `order.awaiting_acceptance`, `order.awaiting_product`, `order.in_production`, `order.delivered`, `order.revision_requested`, `order.disputed`, `order.completed`, `order.cancelled`. |
| `description` | string | no | Your label, up to 200 characters. |

cURL:

```bash
curl -X POST "https://besday.com/api/v1/webhook_endpoints" \
  -H "Authorization: Bearer $BESDAY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://yourapp.com/webhooks/besday",
  "events": [
    "order.delivered",
    "order.completed",
    "order.cancelled"
  ],
  "description": "Production"
}'
```

Node.js:

```javascript
const res = await fetch("https://besday.com/api/v1/webhook_endpoints", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BESDAY_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://yourapp.com/webhooks/besday",
    "events": [
      "order.delivered",
      "order.completed",
      "order.cancelled"
    ],
    "description": "Production"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

Python:

```python
import os, uuid, requests

res = requests.post(
    "https://besday.com/api/v1/webhook_endpoints",
    headers={
        "Authorization": f"Bearer {os.environ['BESDAY_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
      "url": "https://yourapp.com/webhooks/besday",
      "events": [
        "order.delivered",
        "order.completed",
        "order.cancelled"
      ],
      "description": "Production"
    },
    timeout=30,
)
res.raise_for_status()
print(res.json())
```

Response (201):

```json
{
  "object": "webhook_endpoint",
  "id": "we_3f9d0c8e",
  "url": "https://yourapp.com/webhooks/besday",
  "description": "Production",
  "events": [
    "order.delivered",
    "order.completed",
    "order.cancelled"
  ],
  "created_at": "2026-12-03T17:20:00.000Z",
  "secret": "whsec_Wq3m…(shown once)"
}
```

Errors: `parameter_invalid`, `url_not_allowed`, `limit_reached`.


## Step 6: list and download the delivery

### List deliveries

`GET /api/v1/orders/{id}/deliveries`

Every delivered version of the order and its files, with preview and download links.

- Scope: `read`
- Returns: 200 a list of `delivery` objects

Path parameters:

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | The order id. |

cURL:

```bash
curl "https://besday.com/api/v1/orders/prj_01HZX8Q4V2/deliveries" \
  -H "Authorization: Bearer $BESDAY_API_KEY"
```

Node.js:

```javascript
const res = await fetch("https://besday.com/api/v1/orders/prj_01HZX8Q4V2/deliveries", {
  headers: {
    Authorization: `Bearer ${process.env.BESDAY_API_KEY}`,
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

Python:

```python
import os, uuid, requests

res = requests.get(
    "https://besday.com/api/v1/orders/prj_01HZX8Q4V2/deliveries",
    headers={
        "Authorization": f"Bearer {os.environ['BESDAY_API_KEY']}",
    },
    timeout=30,
)
res.raise_for_status()
print(res.json())
```

Response (200):

```json
{
  "object": "list",
  "originals_unlocked": false,
  "locked_reason": "Downloads unlock when you approve. Until then you watch a watermarked preview, which keeps the creator’s work safe while you review it.",
  "data": [
    {
      "object": "delivery",
      "id": "dv_91aa2f",
      "order_id": "prj_01HZX8Q4V2",
      "version": 1,
      "status": "delivered",
      "delivered_at": "2026-12-06T18:40:00.000Z",
      "created_at": "2026-12-06T18:02:00.000Z",
      "files": [
        {
          "object": "delivery_file",
          "id": "df_4c7e10",
          "slot": "Main video",
          "file_name": "maya-serum-v1.mp4",
          "media": "video",
          "mime_type": "video/mp4",
          "size_bytes": 48211904,
          "duration_seconds": 31.2,
          "width": 1080,
          "height": 1920,
          "preview_url": "https://besday.com/api/v1/orders/prj_01HZX8Q4V2/deliveries/files/df_4c7e10?variant=preview",
          "download_url": null
        }
      ]
    }
  ],
  "has_more": false,
  "next_cursor": null
}
```

Errors: `not_found`.

Note: On a real creator’s order, originals unlock when you approve; until then `download_url` is null and `preview_url` serves a watermarked preview. AI creators’ files download at once.


## Step 7: approve

### Approve a delivery

`POST /api/v1/orders/{id}/approve`

Approves the delivered video. The order completes, its licence is issued, and a real creator’s original files unlock. Safe to call twice.

- Scope: `read_write`
- Returns: 200 `order`
- Supports `Idempotency-Key`

Path parameters:

| Name | Type | Required | Description |
|---|---|---|---|
| `id` | string | yes | The order id. |

cURL:

```bash
curl -X POST "https://besday.com/api/v1/orders/prj_01HZX8Q4V2/approve" \
  -H "Authorization: Bearer $BESDAY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

Node.js:

```javascript
const res = await fetch("https://besday.com/api/v1/orders/prj_01HZX8Q4V2/approve", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BESDAY_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
  },
});
const data = await res.json();
if (!res.ok) throw new Error(`${data.error.code}: ${data.error.message}`);
```

Python:

```python
import os, uuid, requests

res = requests.post(
    "https://besday.com/api/v1/orders/prj_01HZX8Q4V2/approve",
    headers={
        "Authorization": f"Bearer {os.environ['BESDAY_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    timeout=30,
)
res.raise_for_status()
print(res.json())
```

Response (200):

```json
{
  "object": "order",
  "id": "prj_01HZX8Q4V2",
  "status": "completed",
  "creator": {
    "id": "cr_7f3a9c21",
    "slug": "maya-w",
    "name": "Maya W.",
    "kind": "real"
  },
  "duration_seconds": 30,
  "aspect_ratio": "9:16",
  "quantity": 1,
  "add_ons": [
    {
      "kind": "captions",
      "quantity": 1,
      "unit_price_credits": 19
    }
  ],
  "price_credits": 168,
  "product_url": "https://yourbrand.com/products/vitamin-c-serum",
  "brief": {
    "goal": "sales",
    "goal_other": null,
    "platforms": [
      "tiktok",
      "instagram_reels"
    ],
    "audience": "Women 25–40 with sensitive skin",
    "key_messages": [
      "Fragrance-free",
      "Visible glow in 2 weeks"
    ],
    "hooks": [
      "I stopped wearing foundation because of this"
    ],
    "must_say": "Use code MAYA15",
    "must_avoid": "Medical claims",
    "call_to_action": "Tap the link to try it",
    "script": null,
    "reference_links": [],
    "anything_else": null
  },
  "note": null,
  "requires_shipping": true,
  "delivery_days": 3,
  "campaign_id": null,
  "paid_at": "2026-12-03T17:03:40.000Z",
  "accept_by": "2026-12-05T17:03:40.000Z",
  "accepted_at": "2026-12-03T19:12:00.000Z",
  "delivery_due_at": "2026-12-07T15:00:00.000Z",
  "delivered_at": "2026-12-06T18:40:00.000Z",
  "approved_at": "2026-12-07T09:15:00.000Z",
  "cancelled_at": null,
  "cancellation_reason": null,
  "created_at": "2026-12-03T17:02:11.000Z",
  "updated_at": "2026-12-04T15:00:00.000Z",
  "dashboard_url": "https://besday.com/app/brands/projects/prj_01HZX8Q4V2"
}
```

Errors: `order_state`, `not_found`.


## Next steps

- Read the [order lifecycle](https://besday.com/docs/api/order-lifecycle) to handle every status.
- Verify webhook signatures: [Webhooks](https://besday.com/docs/api/webhooks).
- Make retries safe with [idempotency keys](https://besday.com/docs/api/idempotency).
