{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Email API V3 — Developer Guide","description":"Sprinklr offers robust, convenient, and simple RESTful Web service APIs to integrate data from Sprinklr to any external system.","keywords":["Sprinklr API","Sprinklr Developer Portal","OAuth 2.0","RESTful API","Social Media API","Customer Experience API","Unified-CXM","Social Listening API"]},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"email-api-v3--developer-guide","__idx":0},"children":["Email API V3 — Developer Guide"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Applies to:"]}," Sprinklr Email API V3 (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/v3/email"]},")"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["V2 API reference:"]}," ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://legacy-dev.sprinklr.com/create-email"},"children":["Create Email | Sprinklr Developer Portal"]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"overview","__idx":1},"children":["Overview"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Email API"]}," ingests an email into the Sprinklr Platform as either a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["customer message"]}," or a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["brand message"]},". It is an ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["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."]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Dev Note:"]}," This API can only be used for ingesting data into Sprinklr."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["To view an ingested email, create an ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Engagement Dashboard"]}," with the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Email"]}," column and filter on the account ID."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Email V3 exposes three operations:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Operation"},"children":["Operation"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Method"},"children":["Method"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Path"},"children":["Path"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"operationId"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["operationId"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ingest an email (URL / base64 attachments)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/v3/email"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EmailApiV3_ingestEmail"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ingest an email with local file attachments"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/api/v3/email/upload"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EmailApiV3_ingestEmailWithAttachments"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The central design change from V2 is ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["consolidation"]},". V2 published two separate creation endpoints that differed only in how the attachment arrived:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/v2/email/create"]}," — JSON body, attachment supplied as a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["URL"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/v2/email/generate"]}," — ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["multipart/form-data"]},", attachment supplied as a ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["local file"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["V3 collapses the verb out of the path (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}," already implies creation) and lets the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["attachment source drive the shape of the request"]}," rather than the path."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"11-the-email-ingestion-model","__idx":2},"children":["1.1 The email ingestion model"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["An ingested email is assembled from four layers. Understanding them is the fastest way to understand every field in this guide."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Layer"},"children":["Layer"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Fields"},"children":["Fields"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"What it does"},"children":["What it does"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Routing"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountId"]}," / ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountUserId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Selects the Sprinklr ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Email Account"]}," the message lands in. Without it, the message has no inbox to arrive at."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Envelope"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cc"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bcc"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subject"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sentTime"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Standard email addressing and metadata."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Content"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["body"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attachments[]"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The message payload. ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["body"]}," supports HTML."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Classification & enrichment"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["brandPost"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customProperties"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Decides whether the message is inbound (customer) or outbound (brand), and attaches Sprinklr custom-field values."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}," is the identity anchor."]}," The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}," address acts as a unique identifier: if consecutive calls carry the same ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}," address, every message is associated with the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["same sender profile"]},". A new audience profile is created for the details supplied in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}," when no profile matches. This is the mechanism that threads a customer's emails into one conversation view."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"12-customer-message-vs-brand-message","__idx":3},"children":["1.2 Customer message vs brand message"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A single field decides the direction of the message:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"brandPost"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["brandPost"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Interpretation"},"children":["Interpretation"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"to field"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]}," field"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," or omitted"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Customer message"]}," — inbound, from a customer to the brand"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Brand message"]}," — outbound, from the brand to a customer"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Required"]}," — the recipient the brand sent to"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["brandPost"]}," defaults to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," (customer message)."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"13-addressing-the-email-account","__idx":4},"children":["1.3 Addressing the email account"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Every ingest call must name the Sprinklr Email Account that receives the message. This is the email address of the Email Account ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["added on the Sprinklr Accounts page"]}," — not an arbitrary mailbox, and not the customer's address."]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["V2:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["?aId={emailId}"]},", URL-encoded"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["V3:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["?accountId={id}"]},", URL-encoded — ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["\"Replaces v2's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aId"]}," — renamed for clarity and consistency\""]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["URL-encode the value. An email address contains ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@"]},", which must be encoded as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["%40"]}," in a query string."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"2-base-urls-and-environments","__idx":5},"children":["2. Base URLs and environments"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["All API calls are sent to the production endpoint:"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://api3.sprinklr.com/{env}/api/v3\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["So the email resource in production is:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"https://api3.sprinklr.com/{env}/api/v3/email\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Replace ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{env}"]}," with your assigned environment identifier."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://legacy-dev.sprinklr.com/apis"},"children":["APIs | Sprinklr Developer Portal"]}," for the environment list mapped to your workspace."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"3-authentication-and-common-headers","__idx":6},"children":["3. Authentication and common headers"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["All Email API calls are authenticated with OAuth 2.0. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://www.sprinklr.com/help/articles/developer-tools/developer-tools-in-sprinklr/692e8b39f0afa271d18a5929"},"children":["Developer Tools in Sprinklr"]}," for API key and secret generation, and the Authorize flow."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Header"},"children":["Header"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Value"},"children":["Value"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Purpose"},"children":["Purpose"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Bearer {{accessToken}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authenticates the user with the server"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{apiKey}}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Authenticates the application with the server"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application/json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Declares the request body media type"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Content-Type"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["multipart/form-data"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Declares the request body media type for local file upload"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Accept"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["application/json"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Declares the acceptable response type"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"4-write-operations","__idx":7},"children":["4. Write operations"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"41-ingest-an-email","__idx":8},"children":["4.1 Ingest an email"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/v3/email"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ingests an external inbound email as a customer or brand message, with optional attachments supplied by ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["URL"]}," or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["base64-encoded content"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"query-parameters","__idx":9},"children":["Query parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The email account ID within Sprinklr. URL-encoded. Replaces V2's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aId"]}," — renamed for clarity and consistency."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request-body","__idx":10},"children":["Request body"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Sub-parameter"},"children":["Sub-parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Email address of the sender. Acts as a unique identifier — the same address links messages to the same sender profile."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Primary recipient email address. Required only when ingesting as a brand message."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cc"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array[String]"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["CC recipient email addresses. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Changed from V2"]}," — see the note below."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bcc"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array[String]"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["BCC recipient email addresses. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Changed from V2"]}," — see the note below."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subject"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Subject line of the email."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["body"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Body content of the email. Supports HTML. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<p>"]}," tags for line breaks."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["brandPost"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Boolean"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["true"]},", the email is ingested as a brand message. Default: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["false"]}," (customer message)."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["sentTime"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integer (int64)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sent time in ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["epoch milliseconds"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountUserId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["See note"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Email account user ID. Present in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["EmailCreateRequestDTO"]},"; conflicts with the query-parameter ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountId"]}," specified in IN-12882."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customProperties"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Object"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Map of custom-field key → ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["array of string values"]},". Keys are Sprinklr custom-field names in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["_c_<id>"]}," form."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attachments"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Array[Object]"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Attachment objects. Schema: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ExternalMailAttachment"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fileName"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The name of the file attachment."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["contentType"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The MIME/asset type of the file attachment. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#6-supported-attachment-content-types"},"children":["§6"]},"."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The URL where the attachment can be accessed. Use for web-hosted attachments."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["base64EncodedContent"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Conditional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The base64-encoded content of the file attachment. ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New in V3"]}," — no V2 equivalent."]}]}]}]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attachments"]}," provide ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url"]}," ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["or"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["base64EncodedContent"]},"."]},"  ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["\"Attachments: provide url or base64EncodedContent. For local file uploads use the multipart variant of this endpoint.\""]}," The two fields are alternatives, not companions."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"line-breaks-in-body","__idx":11},"children":["Line breaks in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["body"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["body"]}," accepts HTML. To render line breaks, wrap each line in a paragraph tag."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"html","header":{"controls":{"copy":{}}},"source":"<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>\n","lang":"html"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request--ingest-as-a-customer-message","__idx":12},"children":["Request — ingest as a customer message"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl --location 'https://api3.sprinklr.com/{env}/api/v3/email?accountId=support%40yourbrand.com' \\\n--header 'Authorization: Bearer {{accessToken}}' \\\n--header 'Key: {{apiKey}}' \\\n--header 'Content-Type: application/json' \\\n--header 'Accept: application/json' \\\n--data-raw '{\n  \"from\": \"customer@example.com\",\n  \"cc\": [\"team1@example.com\"],\n  \"bcc\": [\"archive@example.com\"],\n  \"subject\": \"Test Email Query Thread\",\n  \"body\": \"<p class=\\\"export-block__parent\\\">My order has not arrived.</p><p class=\\\"export-block__parent\\\">Order #10432.</p>\",\n  \"brandPost\": false,\n  \"attachments\": [\n    {\n      \"fileName\": \"receipt\",\n      \"contentType\": \"SPREADSHEET\",\n      \"url\": \"https://files.example.com/400002/bf8fcd8bf0e8-99344174.xlsx\"\n    }\n  ],\n  \"customProperties\": {\n    \"_c_5fc0cb96b0a31e0d4535f447\": [\"Value1\", \"Value2\"],\n    \"_c_5fcb618ed75d24677df0fd22\": [\"1\"],\n    \"_c_619696a27d40de0ce801f801\": [\"textField\"],\n    \"_c_619697007d40de0ce8020268\": [\"1635791400000\"]\n  }\n}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request--ingest-as-a-brand-message","__idx":13},"children":["Request — ingest as a brand message"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The only structural difference is ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["brandPost: true"]}," and the now-required ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl --location 'https://api3.sprinklr.com/{env}/api/v3/email?accountId=support%40yourbrand.com' \\\n--header 'Authorization: Bearer {{accessToken}}' \\\n--header 'Key: {{apiKey}}' \\\n--header 'Content-Type: application/json' \\\n--header 'Accept: application/json' \\\n--data-raw '{\n  \"from\": \"support@yourbrand.com\",\n  \"to\": \"customer@example.com\",\n  \"cc\": [\"team1@example.com\"],\n  \"subject\": \"Re: Test Email Query Thread\",\n  \"brandPost\": true,\n  \"body\": \"<p class=\\\"export-block__parent\\\">Thanks for reaching out — your replacement has shipped.</p>\",\n  \"sentTime\": 1635791400000,\n  \"attachments\": [\n    {\n      \"fileName\": \"shipping-label\",\n      \"contentType\": \"PDF\",\n      \"url\": \"https://files.example.com/400002/label-99344174.pdf\"\n    }\n  ]\n}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"response","__idx":14},"children":["Response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"200 OK\nSUCCESS\n"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"42-ingest-an-email-with-local-file-attachments","__idx":15},"children":["4.2 Ingest an email with local file attachments"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/v3/email/upload"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ingests an email where attachments are ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["local files"]}," sent as ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["multipart/form-data"]},". This is the V3 successor to V2's ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/v2/email/generate"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"query-parameters-1","__idx":16},"children":["Query parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter"},"children":["Parameter"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Email account user id."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"form-data-fields","__idx":17},"children":["Form-data fields"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Carried forward from the V2 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/email/generate"]}," contract. The OpenAPI document does ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["not"]}," declare a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["requestBody"]}," for this operation, so the field list below is sourced from the V2 Developer Portal page and IN-12882."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Form-data field"},"children":["Form-data field"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Required"},"children":["Required"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Email address of the sender."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["subject"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Subject line of the email."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["body"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Required"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["String"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Body content of the email."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Optional"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["File"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Email attachment, ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["up to 100 MB"]},". Multiple attachments are supported — repeat the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file"]}," part."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Supported local attachment types:"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pdf"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["excel"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mp3"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mp4"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["doc"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["txt"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["html"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["image"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["csv"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["zip"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"request","__idx":18},"children":["Request"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl --location --request POST 'https://api3.sprinklr.com/{env}/api/v3/email/upload?accountUserId=support%40yourbrand.com' \\\n--header 'Authorization: Bearer {{accessToken}}' \\\n--header 'Key: {{apiKey}}' \\\n--form 'from=customer@example.com' \\\n--form 'subject=Screenshot of the error' \\\n--form 'body=Yeah! test it with attachment' \\\n--form 'file=@/Users/abc/Desktop/screenshot.png'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"response-1","__idx":19},"children":["Response"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"200 OK\nSUCCESS\n"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"5-v2--v3-migration","__idx":20},"children":["5. V2 → V3 migration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The following are the three structural changes:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Two endpoints consolidated into one."]}," V2 had ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /email/create"]}," (URL attachment, JSON body) and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /email/generate"]}," (local file attachment, form-data). V3 uses a single ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /email"]},"; the server infers the attachment source from whether ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["url"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file"]}," is present in the attachment object — the same pattern as media upload single vs bulk. ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["(See the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#1-overview"},"children":["§1"]}," conflict box — the OpenAPI document still shows two paths.)"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Verb removed from path."]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/email/create"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/email/generate"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/email"]},". ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST"]}," already implies creation."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["aId"]}," renamed to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountId"]},"."]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["?aId={id}"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["?accountId={id}"]},". A cryptic abbreviation replaced with a self-documenting name consistent with V3 naming conventions."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"6-supported-attachment-content-types","__idx":21},"children":["6. Supported attachment content types"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Values for ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["attachments[].contentType"]}," on ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/v3/email"]},".."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"contentType"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["contentType"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Typical use"},"children":["Typical use"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["IMAGE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["PNG, JPEG, GIF screenshots and photos"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["VIDEO"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MP4 and other video attachments"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["AUDIO"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["MP3 and other audio attachments"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DOC"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Word-processor documents"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["DOCUMENT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Generic documents"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PDF"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["PDF files"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SPREADSHEET"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["XLSX / XLS spreadsheets"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["CSV"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Comma-separated values"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["HTML"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["HTML files"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PRESENTATION"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Slide decks"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PSD"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Photoshop documents"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PSB"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Large-format Photoshop documents"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ZIP"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Archives"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BINARY"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Generic binary content"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["FONT"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Font files"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["SUBTITLE"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Subtitle / caption tracks"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["local file uploads"]}," via ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/v3/email/upload"]},", the following file types are supported: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pdf"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["excel"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mp3"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mp4"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["doc"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["txt"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["html"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["image"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["csv"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["zip"]},". ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Maximum 100 MB per file."]}," Multiple attachments are supported."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"7-use-cases","__idx":22},"children":["7. Use cases"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ingest-inbound-customer-mail-from-a-legacy-mailbox","__idx":23},"children":["Ingest inbound customer mail from a legacy mailbox"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You run a support mailbox outside Sprinklr and want every inbound message to appear in Sprinklr's engagement workflow."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/v3/email"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["brandPost: false"]}," (or omitted), ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}," set to the customer's address, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["accountId"]}," set to the Sprinklr Email Account. The customer's audience profile is created or matched automatically from ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"mirror-outbound-brand-replies-for-a-complete-thread","__idx":24},"children":["Mirror outbound brand replies for a complete thread"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Ingesting only inbound mail produces a one-sided conversation. Mirror the agent's replies too:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/v3/email"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["brandPost: true"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}," set to the brand address, and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["to"]}," set to the customer. Because ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from"]}," anchors the profile, the inbound and outbound messages thread into the same conversation view."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"backfill-historical-email-during-a-platform-migration","__idx":25},"children":["Backfill historical email during a platform migration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Set ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["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."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Pair it with a correlation ID in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["customProperties"]}," so you can reconcile the import against your source system."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ingest-a-large-screenshot-an-agent-captured-locally","__idx":26},"children":["Ingest a large screenshot an agent captured locally"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A 40 MB screen recording exists only on the agent's machine. Use the multipart endpoint:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /api/v3/email/upload"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--form 'file=@/path/to/recording.mp4'"]},". The 100 MB per-file ceiling applies."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"preserve-line-breaks-in-a-plain-text-source","__idx":27},"children":["Preserve line breaks in a plain-text source"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Your source system emits plain text with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\\n"]},". Sprinklr renders ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["body"]}," as HTML, so newlines collapse. Transform each line before sending:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"Line one\\nLine two\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["becomes"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"html","header":{"controls":{"copy":{}}},"source":"<p class=\"export-block__parent\">Line one</p><p class=\"export-block__parent\">Line two</p>\n","lang":"html"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"route-to-different-mailboxes-per-brand-or-region","__idx":28},"children":["Route to different mailboxes per brand or region"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["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."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"em","attributes":{},"children":["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 (",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{accessToken}}"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{{apiKey}}"]},") and must never be committed or logged."]}]}]},"headings":[{"value":"Email API V3 — Developer Guide","id":"email-api-v3--developer-guide","depth":1},{"value":"Overview","id":"overview","depth":2},{"value":"1.1 The email ingestion model","id":"11-the-email-ingestion-model","depth":3},{"value":"1.2 Customer message vs brand message","id":"12-customer-message-vs-brand-message","depth":3},{"value":"1.3 Addressing the email account","id":"13-addressing-the-email-account","depth":3},{"value":"2. Base URLs and environments","id":"2-base-urls-and-environments","depth":2},{"value":"3. Authentication and common headers","id":"3-authentication-and-common-headers","depth":2},{"value":"4. Write operations","id":"4-write-operations","depth":2},{"value":"4.1 Ingest an email","id":"41-ingest-an-email","depth":3},{"value":"Query parameters","id":"query-parameters","depth":4},{"value":"Request body","id":"request-body","depth":4},{"value":"Line breaks in body","id":"line-breaks-in-body","depth":4},{"value":"Request — ingest as a customer message","id":"request--ingest-as-a-customer-message","depth":4},{"value":"Request — ingest as a brand message","id":"request--ingest-as-a-brand-message","depth":4},{"value":"Response","id":"response","depth":4},{"value":"4.2 Ingest an email with local file attachments","id":"42-ingest-an-email-with-local-file-attachments","depth":3},{"value":"Query parameters","id":"query-parameters-1","depth":4},{"value":"Form-data fields","id":"form-data-fields","depth":4},{"value":"Request","id":"request","depth":4},{"value":"Response","id":"response-1","depth":4},{"value":"5. V2 → V3 migration","id":"5-v2--v3-migration","depth":2},{"value":"6. Supported attachment content types","id":"6-supported-attachment-content-types","depth":2},{"value":"7. Use cases","id":"7-use-cases","depth":2},{"value":"Ingest inbound customer mail from a legacy mailbox","id":"ingest-inbound-customer-mail-from-a-legacy-mailbox","depth":3},{"value":"Mirror outbound brand replies for a complete thread","id":"mirror-outbound-brand-replies-for-a-complete-thread","depth":3},{"value":"Backfill historical email during a platform migration","id":"backfill-historical-email-during-a-platform-migration","depth":3},{"value":"Ingest a large screenshot an agent captured locally","id":"ingest-a-large-screenshot-an-agent-captured-locally","depth":3},{"value":"Preserve line breaks in a plain-text source","id":"preserve-line-breaks-in-a-plain-text-source","depth":3},{"value":"Route to different mailboxes per brand or region","id":"route-to-different-mailboxes-per-brand-or-region","depth":3}],"frontmatter":{"seo":{"title":"Email API V3 — Developer Guide"}},"lastModified":"2026-10-27T09:16:33.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/developer-guides-v3/email-api-v3-developer-guide","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}