Skip to main content
PATCH
Update a message of a campaign

Authorizations

Authorization
string
header
required

API key for authentication

Headers

Idempotency-Key
string

A unique key, such as a UUID, that makes retrying this request safe: a retry with the same key and body returns the original response without running the operation again. Keys are kept for 24 hours after the request completes.

Maximum string length: 255
Example:

"8e03978e-40d5-43e8-bc93-6894a57f9324"

Path Parameters

campaignId
string
required

The ID of the campaign.

Required string length: 40
messageId
string
required

The ID of the message.

Required string length: 40

Body

application/json

The final content of one message: only the fields given change.

subject
string

The subject of the message, in plain text. A follow-up sent in the same thread has the first step's subject, so it takes none. Leave it out to keep the current one.

Maximum string length: 1000
Example:

"Congrats on the round, Ana"

body
string

The body of the message, in HTML (or plain text with bodyFormat: "text"). Its content is final: {{variables}} are rejected, apart from {{signature}} and {{unsubscribeLink}}. End it with <p>{{signature}}</p> to keep the message's signature as it is, edited or not; a body without it has no signature. An unsubscribe link, for SendGrid senders only, is <a href="{{unsubscribeLink}}">. Leave it out to keep the current body.

Maximum string length: 200000
Example:

"<p>Hi Ana, congrats on the round!</p><p>{{signature}}</p>"

bodyFormat
enum<string>

How body is written. html (default) is read as HTML. text is plain text: a blank line starts a new paragraph, each further blank line adds an empty paragraph, a single newline is a line break, and < and & are literal characters. Bodies always read back as HTML.

Available options:
html,
text
Example:

"html"

cc
string[]

Email addresses copied on the message. Leave it out to keep the current ones. At most 5 distinct addresses; duplicates are removed.

Maximum array length: 50
Maximum string length: 254
Example:
bcc
string[]

Email addresses blind-copied on the message. Leave it out to keep the current ones. At most 5 distinct addresses; duplicates are removed.

Maximum array length: 50
Maximum string length: 254
Example:

Response

The message, as updated.

data
object
required

A message of a campaign: the email of one step for one recipient, with the variables of the step filled in for that recipient. There is one message per recipient and per step.

Example:
deprecations
string[]
Example: