- Applies to: Sprinklr Email API V3 (
/api/v3/email) - V2 API reference: Create Email | Sprinklr Developer Portal
The Email API ingests an email into the Sprinklr Platform as either a customer message or a brand message. It is an ingestion-only API — it writes email records into Sprinklr so they surface in engagement workflows. It does not send email on your behalf, and it does not read email back out.
Dev Note: This API can only be used for ingesting data into Sprinklr.
To view an ingested email, create an Engagement Dashboard with the Email column and filter on the account ID.
Email V3 exposes three operations:
| Operation | Method | Path | operationId |
|---|---|---|---|
| Ingest an email (URL / base64 attachments) | POST | /api/v3/email | EmailApiV3_ingestEmail |
| Ingest an email with local file attachments | POST | /api/v3/email/upload | EmailApiV3_ingestEmailWithAttachments |
The central design change from V2 is consolidation. V2 published two separate creation endpoints that differed only in how the attachment arrived:
POST /api/v2/email/create— JSON body, attachment supplied as a URLPOST /api/v2/email/generate—multipart/form-data, attachment supplied as a local file
V3 collapses the verb out of the path (POST already implies creation) and lets the attachment source drive the shape of the request rather than the path.
An ingested email is assembled from four layers. Understanding them is the fastest way to understand every field in this guide.
| Layer | Fields | What it does |
|---|---|---|
| Routing | accountId / accountUserId | Selects the Sprinklr Email Account the message lands in. Without it, the message has no inbox to arrive at. |
| Envelope | from, to, cc, bcc, subject, sentTime | Standard email addressing and metadata. |
| Content | body, attachments[] | The message payload. body supports HTML. |
| Classification & enrichment | brandPost, customProperties | Decides whether the message is inbound (customer) or outbound (brand), and attaches Sprinklr custom-field values. |
from is the identity anchor. The from address acts as a unique identifier: if consecutive calls carry the same from address, every message is associated with the same sender profile. A new audience profile is created for the details supplied in from when no profile matches. This is the mechanism that threads a customer's emails into one conversation view.
A single field decides the direction of the message:
brandPost | Interpretation | to field |
|---|---|---|
false or omitted | Customer message — inbound, from a customer to the brand | Optional |
true | Brand message — outbound, from the brand to a customer | Required — the recipient the brand sent to |
brandPost defaults to false (customer message).
Every ingest call must name the Sprinklr Email Account that receives the message. This is the email address of the Email Account added on the Sprinklr Accounts page — not an arbitrary mailbox, and not the customer's address.
- V2:
?aId={emailId}, URL-encoded - V3:
?accountId={id}, URL-encoded — "Replaces v2'saId— renamed for clarity and consistency"
URL-encode the value. An email address contains @, which must be encoded as %40 in a query string.
All API calls are sent to the production endpoint:
https://api3.sprinklr.com/{env}/api/v3So the email resource in production is:
https://api3.sprinklr.com/{env}/api/v3/emailReplace {env} with your assigned environment identifier.
See APIs | Sprinklr Developer Portal for the environment list mapped to your workspace.
All Email API calls are authenticated with OAuth 2.0. See Developer Tools in Sprinklr for API key and secret generation, and the Authorize flow.
| Header | Value | Purpose |
|---|---|---|
Authorization | Bearer {{accessToken}} | Authenticates the user with the server |
Key | {{apiKey}} | Authenticates the application with the server |
Content-Type | application/json | Declares the request body media type |
Content-Type | multipart/form-data | Declares the request body media type for local file upload |
Accept | application/json | Declares the acceptable response type |
POST /api/v3/email
Ingests an external inbound email as a customer or brand message, with optional attachments supplied by URL or base64-encoded content.
| Parameter | Required | Type | Description |
|---|---|---|---|
accountId | Required | String | The email account ID within Sprinklr. URL-encoded. Replaces V2's aId — renamed for clarity and consistency. |
| Parameter | Sub-parameter | Required | Type | Description |
|---|---|---|---|---|
from | Required | String | Email address of the sender. Acts as a unique identifier — the same address links messages to the same sender profile. | |
to | Optional | String | Primary recipient email address. Required only when ingesting as a brand message. | |
cc | Optional | Array[String] | CC recipient email addresses. Changed from V2 — see the note below. | |
bcc | Optional | Array[String] | BCC recipient email addresses. Changed from V2 — see the note below. | |
subject | Required | String | Subject line of the email. | |
body | Required | String | Body content of the email. Supports HTML. Use <p> tags for line breaks. | |
brandPost | Optional | Boolean | If true, the email is ingested as a brand message. Default: false (customer message). | |
sentTime | Optional | Integer (int64) | Sent time in epoch milliseconds. | |
accountUserId | See note | String | Email account user ID. Present in EmailCreateRequestDTO; conflicts with the query-parameter accountId specified in IN-12882. | |
customProperties | Optional | Object | Map of custom-field key → array of string values. Keys are Sprinklr custom-field names in _c_<id> form. | |
attachments | Optional | Array[Object] | Attachment objects. Schema: ExternalMailAttachment. | |
fileName | Required | String | The name of the file attachment. | |
contentType | Required | String | The MIME/asset type of the file attachment. See §6. | |
url | Conditional | String | The URL where the attachment can be accessed. Use for web-hosted attachments. | |
base64EncodedContent | Conditional | String | The base64-encoded content of the file attachment. New in V3 — no V2 equivalent. |
attachmentsprovideurlorbase64EncodedContent. "Attachments: provide url or base64EncodedContent. For local file uploads use the multipart variant of this endpoint." The two fields are alternatives, not companions.
body accepts HTML. To render line breaks, wrap each line in a paragraph tag.
<p class="export-block__parent">Testing</p><p class="export-block__parent">Email</p><p class="export-block__parent">API</p><p class="export-block__parent">With Line Breaks</p>curl --location 'https://api3.sprinklr.com/{env}/api/v3/email?accountId=support%40yourbrand.com' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
"from": "customer@example.com",
"cc": ["team1@example.com"],
"bcc": ["archive@example.com"],
"subject": "Test Email Query Thread",
"body": "<p class=\"export-block__parent\">My order has not arrived.</p><p class=\"export-block__parent\">Order #10432.</p>",
"brandPost": false,
"attachments": [
{
"fileName": "receipt",
"contentType": "SPREADSHEET",
"url": "https://files.example.com/400002/bf8fcd8bf0e8-99344174.xlsx"
}
],
"customProperties": {
"_c_5fc0cb96b0a31e0d4535f447": ["Value1", "Value2"],
"_c_5fcb618ed75d24677df0fd22": ["1"],
"_c_619696a27d40de0ce801f801": ["textField"],
"_c_619697007d40de0ce8020268": ["1635791400000"]
}
}'The only structural difference is brandPost: true and the now-required to:
curl --location 'https://api3.sprinklr.com/{env}/api/v3/email?accountId=support%40yourbrand.com' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
"from": "support@yourbrand.com",
"to": "customer@example.com",
"cc": ["team1@example.com"],
"subject": "Re: Test Email Query Thread",
"brandPost": true,
"body": "<p class=\"export-block__parent\">Thanks for reaching out — your replacement has shipped.</p>",
"sentTime": 1635791400000,
"attachments": [
{
"fileName": "shipping-label",
"contentType": "PDF",
"url": "https://files.example.com/400002/label-99344174.pdf"
}
]
}'200 OK
SUCCESSPOST /api/v3/email/upload
Ingests an email where attachments are local files sent as multipart/form-data. This is the V3 successor to V2's POST /api/v2/email/generate.
| Parameter | Required | Type | Description |
|---|---|---|---|
accountId | Required | String | Email account user id. |
Carried forward from the V2 /email/generate contract. The OpenAPI document does not declare a requestBody for this operation, so the field list below is sourced from the V2 Developer Portal page and IN-12882.
| Form-data field | Required | Type | Description |
|---|---|---|---|
from | Required | String | Email address of the sender. |
subject | Required | String | Subject line of the email. |
body | Required | String | Body content of the email. |
file | Optional | File | Email attachment, up to 100 MB. Multiple attachments are supported — repeat the file part. |
Supported local attachment types: pdf, excel, mp3, mp4, doc, txt, html, image, csv, zip.
curl --location --request POST 'https://api3.sprinklr.com/{env}/api/v3/email/upload?accountUserId=support%40yourbrand.com' \
--header 'Authorization: Bearer {{accessToken}}' \
--header 'Key: {{apiKey}}' \
--form 'from=customer@example.com' \
--form 'subject=Screenshot of the error' \
--form 'body=Yeah! test it with attachment' \
--form 'file=@/Users/abc/Desktop/screenshot.png'200 OK
SUCCESSThe following are the three structural changes:
- Two endpoints consolidated into one. V2 had
POST /email/create(URL attachment, JSON body) andPOST /email/generate(local file attachment, form-data). V3 uses a singlePOST /email; the server infers the attachment source from whetherurlorfileis present in the attachment object — the same pattern as media upload single vs bulk. (See the §1 conflict box — the OpenAPI document still shows two paths.) - Verb removed from path.
/email/createand/email/generate→/email.POSTalready implies creation. aIdrenamed toaccountId.?aId={id}→?accountId={id}. A cryptic abbreviation replaced with a self-documenting name consistent with V3 naming conventions.
Values for attachments[].contentType on POST /api/v3/email..
contentType | Typical use |
|---|---|
IMAGE | PNG, JPEG, GIF screenshots and photos |
VIDEO | MP4 and other video attachments |
AUDIO | MP3 and other audio attachments |
DOC | Word-processor documents |
DOCUMENT | Generic documents |
PDF | PDF files |
SPREADSHEET | XLSX / XLS spreadsheets |
CSV | Comma-separated values |
HTML | HTML files |
PRESENTATION | Slide decks |
PSD | Photoshop documents |
PSB | Large-format Photoshop documents |
ZIP | Archives |
BINARY | Generic binary content |
FONT | Font files |
SUBTITLE | Subtitle / caption tracks |
For local file uploads via POST /api/v3/email/upload, the following file types are supported: pdf, excel, mp3, mp4, doc, txt, html, image, csv, zip. Maximum 100 MB per file. Multiple attachments are supported.
You run a support mailbox outside Sprinklr and want every inbound message to appear in Sprinklr's engagement workflow.
POST /api/v3/email with brandPost: false (or omitted), from set to the customer's address, and accountId set to the Sprinklr Email Account. The customer's audience profile is created or matched automatically from from.
Ingesting only inbound mail produces a one-sided conversation. Mirror the agent's replies too:
POST /api/v3/email with brandPost: true, from set to the brand address, and to set to the customer. Because from anchors the profile, the inbound and outbound messages thread into the same conversation view.
Set sentTime to the original epoch-millisecond timestamp on every record so the imported history sorts correctly rather than collapsing onto the import date. This field does not exist in V2 — it is one of the concrete reasons to migrate a backfill job to V3.
Pair it with a correlation ID in customProperties so you can reconcile the import against your source system.
A 40 MB screen recording exists only on the agent's machine. Use the multipart endpoint:
POST /api/v3/email/upload with --form 'file=@/path/to/recording.mp4'. The 100 MB per-file ceiling applies.
Your source system emits plain text with \n. Sprinklr renders body as HTML, so newlines collapse. Transform each line before sending:
Line one\nLine twobecomes
<p class="export-block__parent">Line one</p><p class="export-block__parent">Line two</p>accountId selects the receiving Email Account. Drive it from configuration — one entry per brand, region, or product line — so the same ingestion code serves every mailbox and adding a mailbox is a config change, not a deployment.
All JSON payloads in this guide are illustrative examples derived from the supplied specifications and published references. They are not real customer data and are not guaranteed production responses. All credentials are placeholders ({{accessToken}}, {{apiKey}}) and must never be committed or logged.