---
title: "Replace Inbox Drafts"
method: PUT
path: "/inbox/drafts"
tags: ["Inbox"]
---

# Replace Inbox Drafts

`PUT /inbox/drafts`

## Request

- Base URL: `https://synchronex.ai/api/v1`
- URL: `https://synchronex.ai/api/v1/inbox/drafts`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://synchronex.ai/oauth/authorize`, token URL `https://synchronex.ai/api/oauth/token`, scopes: `read`)

Upserts one Wren draft row per Gmail thread and optionally deletes rows omitted from this mailbox replacement set. Requires write scope.

## Request body

- InboxDraftsPutRequest
  - `account` object, required
    - `email` string, email, required
  - `replace` boolean
  - `drafts` InboxThreadDraft[], required
    - `thread_id` string, required
    - `latest_message_id` string, required
    - `latest_message_at` string, date-time, required
    - `generated_at` string, date-time, required
    - `why` string, required
    - `drafts` InboxDraftAlternative[], required
      - `tone` string, required
      - `text` string, required

## Response `200`

Draft replacement set stored.

- InboxDraftsPutResponse
  - `upserted` integer, required
  - `deleted` integer, required

## Other responses

- `400`: Validation error. The request body or query string is invalid.
- `401`: Unauthorized. Missing, malformed, expired, or revoked bearer token.
- `403`: Forbidden. The token scope or account tier is insufficient.
- `429`: Rate limit exceeded. Retry after the indicated reset time.
- `500`: Internal server error.

---

[API](https://skmtc.dev/synchronex/apis/synchronex-api.md) · [All operations](https://skmtc.dev/synchronex/apis/synchronex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/synchronex/apis/synchronex-api/revisions/aa1e0df0a8d5?raw)
