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

Reply to an email

BillionSend extension: replies server-side, threaded with In-Reply-To and References. It goes out from the inbox the email reached (inbox_id picks one), else from the first address it was received for, or from from. A reply from an inbox runs its rules and may be held as a draft (202). Accepts an Idempotency-Key. Needs a full access key.

POST/emails/receiving/{id}/reply
Autorisation
AuthorizationJeton Bearer · headerrequis

A BillionSend API key (bs_…).

Paramètres de chemin
idstring<uuid>requis
Paramètres d'en-tête
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.

longueur min 1 · longueur max 256
Corps de la requête
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

Afficher les propriétés
Tableau de object
filenamestring | boolean | null
Afficher les propriétés
Au moins un de :
string
string
boolean
boolean
null
null
contentstring
content_typestring
content_idstring

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

longueur min 1 · longueur max 255
pathstring
ccstring | string[]

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

Afficher les propriétés
Au moins un de :
string
string
string[]
Tableau de string
string
bccstring | string[]

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

Afficher les propriétés
Au moins un de :
string
string
string[]
Tableau 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)

fromstring

Sender on a verified team domain; defaults to the inbox address the email reached, else the first address it was received for

inbox_idstring<uuid>

The inbox to answer from, among those the email reached

Réponses
200

Sent

objectstringrequis
Valeurs autorisées :email
idstring<uuid>requis
thread_idstring<uuid> | nullrequis
inbox_idstring<uuid> | nullrequis
202

Held for approval

objectstringrequis
Valeurs autorisées :inbox_draft
idstring<uuid>requis
typestringrequis
Valeurs autorisées :standalonereply
tostring[] | nullrequis
ccstring[]requis
bccstring[]requis
subjectstring | nullrequis
htmlstring | nullrequis
textstring | nullrequis
thread_idstring<uuid> | nullrequis
reply_to_email_idstring<uuid> | nullrequis
email_idstring<uuid> | nullrequis
created_atstringrequis
updated_atstringrequis
attachmentsobject[]requis

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

Afficher les propriétés
Tableau de object
idstringrequis
filenamestringrequis
content_typestringrequis
sizeintegerrequis
statusstringrequis
Valeurs autorisées :draftpending_approvalsentrejectedexpired
approval_reasonsstring[]requis
forwardbooleanrequis
decided_bystring | nullrequis
decided_atstring | nullrequis
expires_atstring | nullrequis
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
Corpsapplication/json
Requête
curl -X POST 'https://api.billionsend.com/emails/receiving/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,
  "from": "string",
  "inbox_id": "5127f22b-d152-46dd-aeaa-3a852d9fbfc2"
}'
Réponse
{
  "object": "email",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
  "inbox_id": "5127f22b-d152-46dd-aeaa-3a852d9fbfc2"
}

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