Skip to main content
POST
Send an email to a list
Sends one email to a list. You either write it here, with subject and body, or point at a template your team designed in the portal with template_id. The send is created as an email broadcast: it shows up in Channels › Broadcasts in the portal, opens are tracked, every email carries an unsubscribe link, and addresses that already unsubscribed are skipped. Follow it with GET /v1/email/sends/{id}.

Endpoint

Required scope

messages:bulk

Headers

Body

Recipient

Which sender is used

Example requests

JavaScript
Python

Response

201 Created

400 Bad Request

The body does not match the schema — for example an empty recipients, more than 5000, an invalid address, or a field over its length limit — or one of these:

401 Unauthorized

Missing, invalid, revoked, or expired token.

403 Forbidden

The token does not have the messages:bulk scope.

422 Unprocessable Entity

The reason arrives in error.code, so you can branch on it directly.

502 Bad Gateway

The messaging service could not answer.

Operational notes

  • This is a real send. Every recipient gets the email. There is no draft or preview step on this endpoint.
  • Duplicate addresses are sent once. Addresses are trimmed and lowercased, and repeats are dropped. recipients in the response is the count after that.
  • A scheduled_at in the past sends right away. The response then carries scheduled_at: null.
  • promo respects marketing unsubscribes. Use notice only for service messages, such as a booking confirmation, not for promotions.
  • Outlook can ignore from_name. When the sender is an Outlook mailbox, Microsoft may show the account name instead.

Authorizations

Authorization
string
header
required

Personal Access Token con prefijo kbai_pk_. Generar desde el portal con permiso developer.manage_tokens.

Body

application/json
recipients
object[]
required
subject
string

Required unless template_id is sent.

body
string

Plain text of the email; line breaks are kept and {{nombre}}, {{correo}} and {{empresa}} are replaced per recipient. Required unless template_id is sent.

heading
string

Optional title above the text.

button
object
template_id
string

Email template designed in the portal, instead of subject + body.

kind
enum<string>

promo (default) honors marketing unsubscribes; notice is a service notice.

Available options:
promo,
notice
channel_id
string

Sender from GET /v1/email/senders. Default: the ready sender.

from_email
string

Send from this address, one of GET /v1/email/senders.

Example:

"hello@empresa.com"

from_name
string

Sender name the recipients see. Default: the name of the sender account.

Example:

"Keebai AI"

name
string

Name of the send in the portal.

scheduled_at
string

ISO 8601 date-time to send later.

Response

201