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

Delete a campaign

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

Deletes it with its recipients and report. 409 while it’s scheduled or sending: cancel it first. Unsubscribe links in emails it sent keep working.

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_…

Deleted

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"
}

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"
}