Aller au contenu
Esc
↑↓naviguer↵ouvrir⌘Japerçu

List drafts

Unsent drafts (draft and pending_approval), most recently updated first; after pages toward older ones.

GET/inboxes/{inbox_id}/drafts
Autorisation
AuthorizationJeton Bearer · headerrequis

A BillionSend API key (bs_…).

Paramètres de chemin
inbox_idstringrequis

The inbox ID or its email address, such as support@example.com

Paramètres de requête
limitinteger

Page size, 1-100 (default 20)

min 1 · max 100
afterstring<uuid>

Cursor: id of the last item of the current page; returns the next page. Must be an id this list returned; there is no sentinel value.

beforestring<uuid>

Cursor: id of the first item of the current page; returns the previous page; same rule as after.

Réponses
200

Drafts

objectstringrequis
Valeurs autorisées :list
has_morebooleanrequis
dataobject[]requis
Afficher les propriétés
Tableau de object
idstring<uuid>requis
typestringrequis
Valeurs autorisées :standalonereply
tostring[] | nullrequis
ccstring[]requis
bccstring[]requis
subjectstring | nullrequis
snippetstring | nullrequis
thread_idstring<uuid> | nullrequis
reply_to_email_idstring<uuid> | nullrequis
updated_atstringrequis
attachmentsobject[]requis
Afficher les propriétés
Tableau de object
idstringrequis
filenamestringrequis
content_typestringrequis
sizeintegerrequis
statusstringrequis
Valeurs autorisées :draftpending_approvalsentrejectedexpired
approval_reasonsstring[]requis
send_atstring | nullrequis

BillionSend extension: when the scheduled send goes out; null when not scheduled

send_errorstring | nullrequis

BillionSend extension: the error name of the last scheduled send that was refused (e.g. invalid_api_key, inbox_send_cap_reached, not_found); null otherwise

401

Missing, malformed, unknown or revoked API key

statusCodenumberrequis
namestringrequis
messagestringrequis
403

Restricted API key, the inbox's or the shared domain's rules, or held mail

statusCodenumberrequis
namestringrequis
messagestringrequis
404

Not found

statusCodenumberrequis
namestringrequis
messagestringrequis
409

Idempotency conflict, or a draft already sent

statusCodenumberrequis
namestringrequis
messagestringrequis
422

Validation error

statusCodenumberrequis
namestringrequis
messagestringrequis
429

The inbox's daily send limit, or the team's daily limit for mail from the shared domain, or the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumberrequis
namestringrequis
messagestringrequis
Essayer
Serveur
Autorisation
Paramètres
Requête
curl -X GET 'https://api.billionsend.com/inboxes/string/drafts' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Réponse
{
  "object": "list",
  "has_more": true,
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "type": "standalone",
      "to": [
        "string"
      ],
      "cc": [
        "string"
      ],
      "bcc": [
        "string"
      ],
      "subject": "string",
      "snippet": "string",
      "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
      "reply_to_email_id": "5e00f13a-4994-422b-8a76-6ae8ac072852",
      "updated_at": "string",
      "attachments": [
        {
          "id": "string",
          "filename": "string",
          "content_type": "string",
          "size": 0
        }
      ],
      "status": "draft",
      "approval_reasons": [
        "string"
      ],
      "send_at": "string",
      "send_error": "string"
    }
  ]
}

Cette page vous a-t-elle été utile ?