send0 Drafts API
The Drafts API from send0 — 5 operation(s) for drafts.
The Drafts API from send0 — 5 operation(s) for drafts.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/send0-dev:send0-dev-drafts-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: send0 Drafts API
version: 1.0.0
description: 'Email inboxes for AI agents: create an address, receive, wait, reply, and get webhooks. https://send0.dev'
license:
name: AGPL-3.0
identifier: AGPL-3.0-only
servers:
- url: https://api.send0.dev
security:
- bearerAuth: []
tags:
- name: Drafts
paths:
/v1/inboxes/{inbox_id}/drafts:
get:
operationId: listDrafts
summary: List drafts
tags:
- Drafts
x-send0-scope: read
parameters:
- name: inbox_id
in: path
required: true
description: Inbox id (ibx_…)
schema:
type: string
- name: limit
in: query
required: false
schema:
default: 20
type: integer
minimum: 1
maximum: 100
- name: cursor
in: query
required: false
schema:
type: string
maxLength: 200
- name: status
in: query
required: false
schema:
type: string
enum:
- pending
- approved
- rejected
- sent
responses:
'200':
description: DraftList
content:
application/json:
schema:
$ref: '#/components/schemas/DraftList'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Not allowed (scope, policy or account state)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found, or not visible to this key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Rate limit (`rate_limited`, see Retry-After) or daily send limit reached
headers:
Retry-After:
description: Seconds to wait before retrying
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/drafts:
get:
operationId: listAllDrafts
summary: List drafts across inboxes
description: Every inbox the key can see, newest first. Pass `status=pending` for the approval queue.
tags:
- Drafts
x-send0-scope: read
parameters:
- name: limit
in: query
required: false
schema:
default: 20
type: integer
minimum: 1
maximum: 100
- name: cursor
in: query
required: false
schema:
type: string
maxLength: 200
- name: status
in: query
required: false
schema:
type: string
enum:
- pending
- approved
- rejected
- sent
- name: inbox_id
in: query
required: false
schema:
type: string
maxLength: 40
responses:
'200':
description: DraftList
content:
application/json:
schema:
$ref: '#/components/schemas/DraftList'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Not allowed (scope, policy or account state)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found, or not visible to this key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Rate limit (`rate_limited`, see Retry-After) or daily send limit reached
headers:
Retry-After:
description: Seconds to wait before retrying
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/drafts/{draft_id}:
patch:
operationId: updateDraft
summary: Edit a draft
description: Changes the subject or body of a pending draft before it's approved. Needs an admin key (like approving), so an agent can't change a draft after a person has reviewed it. Decided drafts return 409.
tags:
- Drafts
x-send0-scope: admin
parameters:
- name: draft_id
in: path
required: true
description: Draft id (drf_…)
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
subject:
type: string
minLength: 1
maxLength: 998
text:
anyOf:
- type: string
maxLength: 500000
- type: 'null'
html:
anyOf:
- type: string
maxLength: 1000000
- type: 'null'
responses:
'200':
description: Draft
content:
application/json:
schema:
$ref: '#/components/schemas/Draft'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Not allowed (scope, policy or account state)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found, or not visible to this key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Rate limit (`rate_limited`, see Retry-After) or daily send limit reached
headers:
Retry-After:
description: Seconds to wait before retrying
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
get:
operationId: getDraft
summary: Get a draft
tags:
- Drafts
x-send0-scope: read
parameters:
- name: draft_id
in: path
required: true
description: Draft id (drf_…)
schema:
type: string
responses:
'200':
description: Draft
content:
application/json:
schema:
$ref: '#/components/schemas/Draft'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Not allowed (scope, policy or account state)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found, or not visible to this key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Rate limit (`rate_limited`, see Retry-After) or daily send limit reached
headers:
Retry-After:
description: Seconds to wait before retrying
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/drafts/{draft_id}/send:
post:
operationId: sendDraft
summary: Approve and send a draft
description: Needs an admin key, so an agent can't approve its own mail. Members can also approve in the dashboard. A draft someone else already decided returns 409.
tags:
- Drafts
x-send0-scope: admin
parameters:
- name: draft_id
in: path
required: true
description: Draft id (drf_…)
schema:
type: string
- name: Idempotency-Key
in: header
required: false
description: 'Retry-safe POSTs: same key + same body returns the stored response for 24 hours.'
schema:
type: string
maxLength: 255
responses:
'201':
description: Message
content:
application/json:
schema:
$ref: '#/components/schemas/Message'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Not allowed (scope, policy or account state)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found, or not visible to this key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Rate limit (`rate_limited`, see Retry-After) or daily send limit reached
headers:
Retry-After:
description: Seconds to wait before retrying
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
/v1/drafts/{draft_id}/reject:
post:
operationId: rejectDraft
summary: Reject a draft
description: Needs an admin key, so an agent can't approve its own mail. Members can also approve in the dashboard. A draft someone else already decided returns 409.
tags:
- Drafts
x-send0-scope: admin
parameters:
- name: draft_id
in: path
required: true
description: Draft id (drf_…)
schema:
type: string
- name: Idempotency-Key
in: header
required: false
description: 'Retry-safe POSTs: same key + same body returns the stored response for 24 hours.'
schema:
type: string
maxLength: 255
responses:
'200':
description: Draft
content:
application/json:
schema:
$ref: '#/components/schemas/Draft'
'400':
description: Invalid request
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'403':
description: Not allowed (scope, policy or account state)
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'404':
description: Not found, or not visible to this key
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
description: Rate limit (`rate_limited`, see Retry-After) or daily send limit reached
headers:
Retry-After:
description: Seconds to wait before retrying
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
components:
schemas:
Draft:
$id: '#/components/schemas/Draft'
type: object
properties:
object:
type: string
const: draft
id:
type: string
inbox_id:
type: string
thread_id:
type:
- string
- 'null'
status:
type: string
enum:
- pending
- approved
- rejected
- sent
kind:
type: string
enum:
- new
- reply
- forward
to:
type: array
items:
$ref: '#/components/schemas/Mailbox'
cc:
type: array
items:
$ref: '#/components/schemas/Mailbox'
bcc:
type: array
items:
$ref: '#/components/schemas/Mailbox'
subject:
type: string
text:
type:
- string
- 'null'
html:
type:
- string
- 'null'
decided_by:
type:
- string
- 'null'
decided_at:
anyOf:
- type: string
format: date-time
- type: 'null'
created_at:
type: string
format: date-time
required:
- object
- id
- inbox_id
- thread_id
- status
- kind
- to
- cc
- bcc
- subject
- text
- html
- decided_by
- decided_at
- created_at
additionalProperties: false
Error:
$id: '#/components/schemas/Error'
type: object
properties:
error:
type: object
properties:
code:
type: string
description: Stable, machine-readable code, e.g. not_found, recipient_not_allowed
message:
type: string
param:
description: The request field the error is about
type: string
request_id:
type: string
required:
- code
- message
additionalProperties: false
required:
- error
additionalProperties: false
DraftList:
$id: '#/components/schemas/DraftList'
type: object
properties:
object:
type: string
const: list
data:
type: array
items:
$ref: '#/components/schemas/Draft'
next_cursor:
type:
- string
- 'null'
required:
- object
- data
- next_cursor
additionalProperties: false
Attachment:
$id: '#/components/schemas/Attachment'
type: object
properties:
id:
type: string
filename:
type:
- string
- 'null'
content_type:
type: string
size:
type: integer
inline:
type: boolean
content_id:
type:
- string
- 'null'
required:
- id
- filename
- content_type
- size
- inline
- content_id
additionalProperties: false
Message:
$id: '#/components/schemas/Message'
type: object
properties:
object:
type: string
const: message
id:
type: string
inbox_id:
type: string
thread_id:
type: string
direction:
type: string
enum:
- in
- out
status:
type: string
enum:
- received
- queued
- sent
- delivered
- bounced
- complained
- failed
expired:
type: boolean
description: 'true once the inbox''s retention period has passed: text, html, extracted_text, extracted and attachments are gone (null or empty) and the raw message can''t be downloaded. Addresses, subject, status and timestamps remain until the message is deleted, 35 days after it was created.'
rfc_message_id:
type:
- string
- 'null'
in_reply_to:
type: array
items:
type: string
references:
type: array
items:
type: string
from:
anyOf:
- $ref: '#/components/schemas/Mailbox'
- type: 'null'
to:
type: array
items:
$ref: '#/components/schemas/Mailbox'
cc:
type: array
items:
$ref: '#/components/schemas/Mailbox'
reply_to:
type: array
items:
$ref: '#/components/schemas/Mailbox'
subject:
type: string
text:
type:
- string
- 'null'
html:
description: Only on single-message reads and threads with include_html=true
type:
- string
- 'null'
extracted_text:
description: 'New text only: quoted history, forwards and signatures removed'
type:
- string
- 'null'
extracted:
anyOf:
- type: object
properties:
otp:
description: Most likely one-time code
type:
- string
- 'null'
links:
type: array
items:
type: string
action_link:
description: Most likely verify / sign-in / reset link
type:
- string
- 'null'
required:
- otp
- links
- action_link
additionalProperties: false
- type: 'null'
auth:
anyOf:
- type: object
properties:
spf:
type: string
dkim:
type: string
dmarc:
type: string
required:
- spf
- dkim
- dmarc
additionalProperties: false
- type: 'null'
safety:
anyOf:
- type: object
properties:
prompt_injection:
type: string
enum:
- none
- suspected
- likely
reasons:
type: array
items:
type: string
required:
- prompt_injection
- reasons
additionalProperties: false
- type: 'null'
tag:
description: Plus-address tag, e.g. task42 for bot+task42@
type:
- string
- 'null'
attachments:
type: array
items:
$ref: '#/components/schemas/Attachment'
size:
type: integer
sent_at:
anyOf:
- type: string
format: date-time
- type: 'null'
received_at:
anyOf:
- type: string
format: date-time
- type: 'null'
created_at:
type: string
format: date-time
required:
- object
- id
- inbox_id
- thread_id
- direction
- status
- expired
- rfc_message_id
- in_reply_to
- references
- from
- to
- cc
- reply_to
- subject
- text
- extracted_text
- extracted
- auth
- safety
- tag
- attachments
- size
- sent_at
- received_at
- created_at
additionalProperties: false
Mailbox:
$id: '#/components/schemas/Mailbox'
type: object
properties:
name:
type:
- string
- 'null'
email:
type: string
required:
- name
- email
additionalProperties: false
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'API key: s0_live_… or s0_test_…'