Pular para o conteúdo
Esc
↑↓navegar↵abrir⌘Jpré-visualizar

Reply in a thread

Replies from the inbox address in the thread, with In-Reply-To and References set: to the email’s Reply-To or sender (or, for an email the inbox sent, its recipients), plus everyone else on it with reply_all. Bcc is never copied. Takes attachments as POST /emails does. Accepts an Idempotency-Key. When the inbox’s rules hold the reply (or requires_approval is true) it is kept as a draft for a person to approve and the answer is 202 with the Draft.

POST/inboxes/{inbox_id}/threads/{thread_id}/emails/{email_id}/reply
Autorização
AuthorizationToken Bearer · headerobrigatório

A BillionSend API key (bs_…).

Parâmetros de caminho
inbox_idstringobrigatório

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

thread_idstring<uuid>obrigatório
email_idstring<uuid>obrigatório
Parâmetros de cabeçalho
Idempotency-Keystring

1 to 256 characters. A retry with the same key and the same body answers the original response instead of sending again; the same key with a different body answers 409 invalid_idempotent_request.

comprimento mín. 1 · comprimento máx. 256
Corpo da requisição
application/json
htmlstring

HTML body

textstring

Plain-text body

subjectstring

1-2000 characters on one line; defaults to the thread subject with Re: or Fwd:

attachmentsobject[] | null

Files with base64 content (no remote paths), 10 MiB decoded in all; none on the shared domain. A held send keeps them with its draft

Mostrar propriedades
Array de object
filenamestring | boolean | null
Mostrar propriedades
Pelo menos um de:
string
string
boolean
boolean
null
null
contentstring
content_typestring
content_idstring

Inline part: the HTML shows it with <img src="cid:<content_id>">

comprimento mín. 1 · comprimento máx. 255
pathstring
ccstring | string[]

An address or a list of them; "Name <address>" works too

Mostrar propriedades
Pelo menos um de:
string
string
string[]
Array de string
string
bccstring | string[]

An address or a list of them; "Name <address>" works too

Mostrar propriedades
Pelo menos um de:
string
string
string[]
Array de string
string
reply_allboolean

Also copy the message's other recipients (cc), never its bcc

requires_approvalboolean

BillionSend extension: hold the email as a draft that a person approves (202 with the Draft)

headersany

Not supported yet: only an empty value is accepted, anything else answers 422

Respostas
200

Sent

idstring<uuid>obrigatório

The ID of the sent email: GET /emails/{id} reads it

thread_idstring<uuid> | nullobrigatório

BillionSend extension: the thread the email was sent in

202

Held for approval

objectstringobrigatório
Valores permitidos:inbox_draft
idstring<uuid>obrigatório
typestringobrigatório
Valores permitidos:standalonereply
tostring[] | nullobrigatório
ccstring[]obrigatório
bccstring[]obrigatório
subjectstring | nullobrigatório
htmlstring | nullobrigatório
textstring | nullobrigatório
thread_idstring<uuid> | nullobrigatório
reply_to_email_idstring<uuid> | nullobrigatório
email_idstring<uuid> | nullobrigatório
created_atstringobrigatório
updated_atstringobrigatório
attachmentsobject[]obrigatório

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

Mostrar propriedades
Array de object
idstringobrigatório
filenamestringobrigatório
content_typestringobrigatório
sizeintegerobrigatório
statusstringobrigatório
Valores permitidos:draftpending_approvalsentrejectedexpired
approval_reasonsstring[]obrigatório
forwardbooleanobrigatório
decided_bystring | nullobrigatório
decided_atstring | nullobrigatório
expires_atstring | nullobrigatório
send_atstring | nullobrigatório

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

send_errorstring | nullobrigatório

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

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
403

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

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
404

Not found

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
409

Idempotency conflict, or a draft already sent

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
422

Validation error

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
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)

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
Experimentar
Servidor
Autorização
Parâmetros
Corpoapplication/json
Requisição
curl -X POST 'https://api.billionsend.com/inboxes/string/threads/497f6eca-6276-4993-bfeb-53cbbbba6f08/emails/497f6eca-6276-4993-bfeb-53cbbbba6f08/reply' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "html": "string",
  "text": "string",
  "subject": "string",
  "attachments": [
    {
      "filename": "string",
      "content": "string",
      "content_type": "string",
      "content_id": "string",
      "path": "string"
    }
  ],
  "cc": "string",
  "bcc": "string",
  "reply_all": true,
  "requires_approval": true,
  "headers": null
}'
Resposta
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84"
}

Esta página foi útil?