POST
Create Email Batch

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
field_map
FieldMap · object
required

Which column in the merged space carries each of the three sent fields.

A value may name a CSV header or an output field of the task — that is the whole point of the merged space, and it is what makes "the CSV has emails" and "feed it a phone number and let the task find the email" the same feature.

from_email
string
required

The default sending address. Its domain must be verified on that Resend account; a single send may override this for that press alone.

integration_id
string<uuid>
required

A connected Resend account.

name
string
required
Required string length: 1 - 200
recipients
EmailRecipientInput · object[]
required
Required array length: 1 - 5000 elements
task_id
string<uuid>
required

The agent task that drafts each row.

timezone
string
required
body_format
enum<string>
default:text
Available options:
text,
html
calling_window
CallingWindow · object | null

The hours a batch may dial in, on the batch's own clock.

A window that crosses midnight (21:0006:00) is valid and means exactly what an evening consumer-calling window means: the day check applies to the start side, so 21:0006:00 on days: [5] runs Friday 21:00 through Saturday 06:00.

from_name
string | null
Maximum string length: 200
max_attempts
integer
default:1
Required range: 1 <= x <= 5
max_concurrency
integer
default:5
Required range: 1 <= x <= 10
reply_to
string | null
retry_after_minutes
integer
default:30
Required range: 5 <= x <= 1440
send_sleep_seconds
integer
default:1

Seconds slept after each email within one send. One press of 50 rows takes about 50 x this seconds.

Required range: 1 <= x <= 60
start_at
string<date-time> | null

Response

Successful Response

body_format
enum<string>
required
Available options:
text,
html
calling_window
CallingWindow · object | null
required

The hours a batch may dial in, on the batch's own clock.

A window that crosses midnight (21:0006:00) is valid and means exactly what an evening consumer-calling window means: the day check applies to the start side, so 21:0006:00 on days: [5] runs Friday 21:00 through Saturday 06:00.

counts
EmailBatchCounts · object
required
created_at
string<date-time>
required
drafted_at
string<date-time> | null
required
failure_reason
string | null
required
field_map
FieldMap · object
required

Which column in the merged space carries each of the three sent fields.

A value may name a CSV header or an output field of the task — that is the whole point of the merged space, and it is what makes "the CSV has emails" and "feed it a phone number and let the task find the email" the same feature.

from_email
string
required
from_name
string | null
required
id
string<uuid>
required
input_columns
string[]
required
integration_id
string<uuid> | null
required
integration_name
string | null
required
max_attempts
integer
required
max_concurrency
integer
required
name
string
required
next_draft_at
string<date-time> | null
required
output_columns
string[]
required
provider_cost
number | null
required
reply_to
string | null
required
retry_after_minutes
integer
required
send_sleep_seconds
integer
required
start_at
string<date-time> | null
required
started_at
string<date-time> | null
required
status
enum<string>
required
Available options:
scheduled,
drafting,
paused,
drafted,
canceled,
failed
task_id
string<uuid> | null
required
task_name
string | null
required
timezone
string
required