Saltar al contenido
Esc
↑↓navegar↵abrir⌘Jvista previa

Retrieve a draft

One draft with its body, also after it was sent (status sent, email_id set).

GET/inboxes/{inbox_id}/drafts/{draft_id}
Autorización
AuthorizationToken Bearer · headerobligatorio

A BillionSend API key (bs_…).

Parámetros de ruta
inbox_idstringobligatorio

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

draft_idstring<uuid>obligatorio
Respuestas
200

Draft

objectstringobligatorio
Valores permitidos:inbox_draft
idstring<uuid>obligatorio
typestringobligatorio
Valores permitidos:standalonereply
tostring[] | nullobligatorio
ccstring[]obligatorio
bccstring[]obligatorio
subjectstring | nullobligatorio
htmlstring | nullobligatorio
textstring | nullobligatorio
thread_idstring<uuid> | nullobligatorio
reply_to_email_idstring<uuid> | nullobligatorio
email_idstring<uuid> | nullobligatorio
created_atstringobligatorio
updated_atstringobligatorio
attachmentsobject[]obligatorio

The draft's files, by position; empty once it is sent, rejected or expired

Mostrar propiedades
Array de object
idstringobligatorio
filenamestringobligatorio
content_typestringobligatorio
sizeintegerobligatorio
statusstringobligatorio
Valores permitidos:draftpending_approvalsentrejectedexpired
approval_reasonsstring[]obligatorio
forwardbooleanobligatorio
decided_bystring | nullobligatorio
decided_atstring | nullobligatorio
expires_atstring | nullobligatorio
send_atstring | nullobligatorio

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

send_errorstring | nullobligatorio

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

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
403

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

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
404

Not found

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
409

Idempotency conflict, or a draft already sent

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
422

Validation error

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
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)

statusCodenumberobligatorio
namestringobligatorio
messagestringobligatorio
Pruébalo
Servidor
Autorización
Parámetros
Solicitud
curl -X GET 'https://api.billionsend.com/inboxes/string/drafts/497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Respuesta
{
  "object": "inbox_draft",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "type": "standalone",
  "to": [
    "string"
  ],
  "cc": [
    "string"
  ],
  "bcc": [
    "string"
  ],
  "subject": "string",
  "html": "string",
  "text": "string",
  "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
  "reply_to_email_id": "5e00f13a-4994-422b-8a76-6ae8ac072852",
  "email_id": "8e6bf5ae-e456-4654-87f8-33e2156caffc",
  "created_at": "string",
  "updated_at": "string",
  "attachments": [
    {
      "id": "string",
      "filename": "string",
      "content_type": "string",
      "size": 0
    }
  ],
  "status": "draft",
  "approval_reasons": [
    "string"
  ],
  "forward": true,
  "decided_by": "string",
  "decided_at": "string",
  "expires_at": "string",
  "send_at": "string",
  "send_error": "string"
}

¿Te ha resultado útil esta página?