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

Get a campaign’s opens and clicks over time

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

When its recipients first opened and first clicked it, from the hour or day it started sending to now, or to 30 days after it started. No points before it starts sending.

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 timeline

Media typeapplication/json
object
interval
required

What each point counts: by the hour for up to three days, else by the day

string
Allowed values: hour day
timeZone
required

The workspace’s IANA time zone, which hours and days are in

string
points
required
Array<object>
object
at
required

When the hour or day starts, ISO 8601 in UTC

string
opened
required

Recipients who first opened in it

integer
>= -9007199254740991 <= 9007199254740991
clicked
required

Recipients who first clicked in it

integer
>= -9007199254740991 <= 9007199254740991

Example

{
"interval": "hour"
}

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

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