Skip to content
Internal: only for Sendwing’s own apps (the web app, admin). It may change at any time.

Resume a paused campaign

POST
/api/organizations/{organizationId}/campaigns/{campaignId}/resume
curl --request POST \
--url https://api.sendwing.app/api/organizations/example/campaigns/example/resume \
--header 'x-api-key: <x-api-key>'

Sending its remaining recipients picks up within seconds. 422 with the issues when the checklist doesn’t pass, like the From domain still not verified or the workspace still over its plan’s limits; 409 unless it’s paused.

organizationId
required
string

The workspace, like org_…. An OAuth access token works in the one the member picked when connecting, which GET /me returns.

campaignId
required
string

Like cmp_…

The campaign, sending

Media typeapplication/json
object
id
required

Like cmp_…

string
name
required

Internal name, never shown to contacts

string
status
required

draft until it’s sent or scheduled, and the only status where it can change; scheduled sends at scheduledAt; sending until every recipient is handled, then sent; canceled when stopped first

string
Allowed values: draft scheduled sending sent canceled
subject
required
string | null
previewText
required

The inbox snippet shown after the subject

string | null
fromName
required
string | null
fromEmail
required

On one of the workspace’s verified sending domains

string | null
replyTo
required
string | null
html

May use merge tags, like {{firstName}}. Lists leave out the content

string | null
text

The plain-text version; generated from html when null

string | null
contentJson

The editor’s content html was rendered from; null for HTML written by hand

Any of:
Any of:

A design of the email editor (contentVersion 2)

object
styles
required
object
backdrop
required

A colour like “#4f46e5”

string
default: #f4f4f5 /^#[0-9a-fA-F]{6}$/
background
required

A colour like “#4f46e5”

string
default: #ffffff /^#[0-9a-fA-F]{6}$/
textColor
required

A colour like “#4f46e5”

string
default: #1f2937 /^#[0-9a-fA-F]{6}$/
linkColor
required

A colour like “#4f46e5”

string
default: #2563eb /^#[0-9a-fA-F]{6}$/
brandColor
required

A colour like “#4f46e5”

string
default: #2563eb /^#[0-9a-fA-F]{6}$/
fontFamily
required
string
default: system
Allowed values: system arial verdana trebuchet georgia times courier
fontSize
required
integer
default: 16 >= 12 <= 24
sections
required
Array<object>
<= 100 items
object
id
required
string
/^[A-Za-z0-9_-]{1,64}$/
kind
required
string
default: content
Allowed values: content footer
layout
required
string
Allowed values: 1 2 3 4 1:2 2:1 1:3 3:1
columns
required
Array<Array>
background

A colour like “#4f46e5”

string
/^#[0-9a-fA-F]{6}$/
paddingTop
required
integer
default: 16 <= 120
paddingBottom
required
integer
default: 16 <= 120
paddingLeft
required
integer
0 <= 120
paddingRight
required
integer
0 <= 120
verticalAlign
required
string
default: top
Allowed values: top middle bottom
stackOnMobile
required
boolean
default: true
contentVersion

2 for a design, 1 for the old editor’s document

Any of:
integer
>= -9007199254740991 <= 9007199254740991
templateId
required

The template it started from, for reference; its content was copied

string | null
audience
required

Who receives the campaign

One of:
object
type
required
string
Allowed value: all
trackOpens
required
boolean
trackClicks
required
boolean
scheduledAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
sendingStartedAt
required
Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
finishedAt
required

When it became sent or canceled

Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
recipientCount
required

How many contacts it’s sent to, counted when sending starts; null before

Any of:
integer
>= -9007199254740991 <= 9007199254740991
error
required

Why a scheduled campaign couldn’t start and went back to draft; cleared by the next send

string | null
paused
required

While set, a sending campaign sends nothing; resume it once the reason is fixed

Any of:
object
at
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
reason
required

sender_setup: the From domain’s setup was refused; plan_limit_exceeded: the workspace is over its plan’s contacts or members; monthly_email_limit: the plan’s emails for the month are used

Any of:
string
Allowed values: sender_setup plan_limit_exceeded monthly_email_limit
cancelWarnedAt
required

When the owners and admins were warned it’s been sending too long: it’s canceled 60 days after sendingStartedAt, and no sooner than 7 days after this

Any of:
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
createdBy
required

The user_… or key_… that created it

string | null
createdAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
updatedAt
required
string format: date-time
/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/
markdown

The design as markdown, with ?include=markdown or when saved from markdown; null for content that isn’t a design

string | null

Example

{
"status": "draft",
"contentJson": {
"styles": {
"backdrop": "#f4f4f5",
"background": "#ffffff",
"textColor": "#1f2937",
"linkColor": "#2563eb",
"brandColor": "#2563eb",
"fontFamily": "system",
"fontSize": 16
},
"sections": [
{
"kind": "content",
"layout": "1",
"columns": [
[
{
"type": "heading",
"level": 1,
"content": [
{
"type": "text",
"marks": [
{
"type": "bold"
}
]
}
],
"align": "left"
}
]
],
"paddingTop": 16,
"paddingBottom": 16,
"paddingLeft": 0,
"paddingRight": 0,
"verticalAlign": "top",
"stackOnMobile": true
}
]
},
"audience": {
"type": "all"
},
"paused": {
"reason": "sender_setup"
}
}

The request isn’t valid; issues lists each problem

Media typeapplication/json
object
error
required

What went wrong, in words you can show people

string
issues

For a 400, each invalid field of the request; for a 422, what to fix first

Array<object>
object
path
required

The field, like events.0.name in the request or subject of what it acts on

string
message
required
string
requestId

For a 5xx: quote it when contacting support

string

Example generated

{
"error": "example",
"issues": [
{
"path": "example",
"message": "example"
}
],
"requestId": "example"
}

The API key or access token is missing, invalid or expired

Media typeapplication/json
object
error
required

What went wrong, in words you can show people

string
issues

For a 400, each invalid field of the request; for a 422, what to fix first

Array<object>
object
path
required

The field, like events.0.name in the request or subject of what it acts on

string
message
required
string
requestId

For a 5xx: quote it when contacting support

string

Example generated

{
"error": "example",
"issues": [
{
"path": "example",
"message": "example"
}
],
"requestId": "example"
}

The API key’s permissions, or the app’s scopes and the member’s role, don’t allow this

Media typeapplication/json
object
error
required

What went wrong, in words you can show people

string
issues

For a 400, each invalid field of the request; for a 422, what to fix first

Array<object>
object
path
required

The field, like events.0.name in the request or subject of what it acts on

string
message
required
string
requestId

For a 5xx: quote it when contacting support

string

Example generated

{
"error": "example",
"issues": [
{
"path": "example",
"message": "example"
}
],
"requestId": "example"
}

Not found in this workspace

Media typeapplication/json
object
error
required

What went wrong, in words you can show people

string
issues

For a 400, each invalid field of the request; for a 422, what to fix first

Array<object>
object
path
required

The field, like events.0.name in the request or subject of what it acts on

string
message
required
string
requestId

For a 5xx: quote it when contacting support

string

Example generated

{
"error": "example",
"issues": [
{
"path": "example",
"message": "example"
}
],
"requestId": "example"
}

Conflicts with the current state; error says how

Media typeapplication/json
object
error
required

What went wrong, in words you can show people

string
issues

For a 400, each invalid field of the request; for a 422, what to fix first

Array<object>
object
path
required

The field, like events.0.name in the request or subject of what it acts on

string
message
required
string
requestId

For a 5xx: quote it when contacting support

string

Example generated

{
"error": "example",
"issues": [
{
"path": "example",
"message": "example"
}
],
"requestId": "example"
}

Valid, but what it acts on isn’t ready for it; issues lists what to fix

Media typeapplication/json
object
error
required

What went wrong, in words you can show people

string
issues

For a 400, each invalid field of the request; for a 422, what to fix first

Array<object>
object
path
required

The field, like events.0.name in the request or subject of what it acts on

string
message
required
string
requestId

For a 5xx: quote it when contacting support

string

Example generated

{
"error": "example",
"issues": [
{
"path": "example",
"message": "example"
}
],
"requestId": "example"
}

Too many requests; wait for the seconds in Retry-After

Media typeapplication/json
object
error
required

What went wrong, in words you can show people

string
issues

For a 400, each invalid field of the request; for a 422, what to fix first

Array<object>
object
path
required

The field, like events.0.name in the request or subject of what it acts on

string
message
required
string
requestId

For a 5xx: quote it when contacting support

string

Example generated

{
"error": "example",
"issues": [
{
"path": "example",
"message": "example"
}
],
"requestId": "example"
}