curl --request GET \
--url https://apix.spotzee.com/api/client/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://apix.spotzee.com/api/client/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apix.spotzee.com/api/client/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apix.spotzee.com/api/client/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"results": [
{
"id": 24,
"project_id": 123,
"type": "blast",
"name": "<string>",
"channel": "email",
"subscription_id": 123,
"provider_id": 123,
"state": "draft",
"created_at": "<string>",
"updated_at": "<string>",
"list_ids": [
123
],
"exclusion_list_ids": [
123
],
"subscription": {
"id": 7,
"project_id": 42,
"name": "Weekly newsletter",
"channel": "email",
"is_public": true,
"created_at": "<string>",
"updated_at": "<string>"
},
"provider": {
"id": 19,
"project_id": 42,
"type": "smtp",
"name": "Primary transactional SMTP",
"group": "email",
"is_default": true,
"rate_limit": 0,
"rate_interval": "second",
"created_at": "<string>",
"updated_at": "<string>",
"deleted_at": "<string>"
},
"delivery": {
"sent": 123,
"total": 123,
"opens": 123,
"clicks": 123,
"bounced": 123,
"bounce_categories": {
"invalid_recipient": 1,
"mailbox_unavailable": 1,
"mailbox_full": 1,
"authentication_failed": 1,
"policy_blocked": 1,
"spam_rejected": 1,
"reputation_blocked": 1,
"rate_limited": 1,
"content_rejected": 1,
"dns_routing_error": 1,
"transport_error": 1,
"unknown": 1
},
"classification_coverage": {
"classified": 1,
"unclassified": 1,
"total": 1
},
"calculated_at": "2023-11-07T05:31:56Z"
},
"tags": [
"<string>"
],
"send_in_user_timezone": true,
"send_at": "<string>",
"custom_domain_id": 123,
"created_by": 123,
"created_by_admin": {
"admin_id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com"
},
"description": "<string>"
}
],
"nextCursor": "<string>",
"prevCursor": "<string>",
"limit": 123
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}List campaigns
Returns a paginated list of campaigns in the project, ordered by created_at descending by default.
curl --request GET \
--url https://apix.spotzee.com/api/client/campaigns \
--header 'Authorization: Bearer <token>'import requests
url = "https://apix.spotzee.com/api/client/campaigns"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://apix.spotzee.com/api/client/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://apix.spotzee.com/api/client/campaigns"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"results": [
{
"id": 24,
"project_id": 123,
"type": "blast",
"name": "<string>",
"channel": "email",
"subscription_id": 123,
"provider_id": 123,
"state": "draft",
"created_at": "<string>",
"updated_at": "<string>",
"list_ids": [
123
],
"exclusion_list_ids": [
123
],
"subscription": {
"id": 7,
"project_id": 42,
"name": "Weekly newsletter",
"channel": "email",
"is_public": true,
"created_at": "<string>",
"updated_at": "<string>"
},
"provider": {
"id": 19,
"project_id": 42,
"type": "smtp",
"name": "Primary transactional SMTP",
"group": "email",
"is_default": true,
"rate_limit": 0,
"rate_interval": "second",
"created_at": "<string>",
"updated_at": "<string>",
"deleted_at": "<string>"
},
"delivery": {
"sent": 123,
"total": 123,
"opens": 123,
"clicks": 123,
"bounced": 123,
"bounce_categories": {
"invalid_recipient": 1,
"mailbox_unavailable": 1,
"mailbox_full": 1,
"authentication_failed": 1,
"policy_blocked": 1,
"spam_rejected": 1,
"reputation_blocked": 1,
"rate_limited": 1,
"content_rejected": 1,
"dns_routing_error": 1,
"transport_error": 1,
"unknown": 1
},
"classification_coverage": {
"classified": 1,
"unclassified": 1,
"total": 1
},
"calculated_at": "2023-11-07T05:31:56Z"
},
"tags": [
"<string>"
],
"send_in_user_timezone": true,
"send_at": "<string>",
"custom_domain_id": 123,
"created_by": 123,
"created_by_admin": {
"admin_id": 123,
"first_name": "<string>",
"last_name": "<string>",
"email": "jsmith@example.com"
},
"description": "<string>"
}
],
"nextCursor": "<string>",
"prevCursor": "<string>",
"limit": 123
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}{
"status": "error",
"code": "resource_missing",
"message": "User usr_01HXY7Z9K8M5J2N4P6Q8R0S1T2 was not found in this project.",
"error": "<string>",
"title": "Resource missing",
"type": "https://docs.spotzee.com/main-api/errors#resource_missing",
"request_id": "req_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
"param": "id",
"errors": [
{
"param": "email",
"code": "parameter_invalid_format",
"message": "Must be a valid email address."
}
]
}Authorizations
Project-scoped secret API key (sk_…). Pass in the Authorization: Bearer <key> header. Grants access to the project the key was issued for.
Query Parameters
Opaque cursor returned by a previous page response. Omit on the first request.
Direction to walk relative to cursor. Defaults to next when omitted.
next, prev Maximum results per page. Use -1 to request all (rate-limited; large pages may be rejected).
-1 <= x <= 10025
Field to sort by. Defaults vary per resource.
"created_at"
Sort direction. Defaults vary per resource.
asc, desc Free-text search across the resource’s indexed fields.
Response
A page of campaigns.
Paginated response of CampaignList.
Page of results, ordered per the request’s sort and direction.
Hide child attributes
Hide child attributes
Numeric campaign identifier.
24
blast campaigns send to every user in the target lists. trigger campaigns fire per-user when an event matches.
blast, trigger Delivery channel the campaign sends through.
email, text, push, webhook, in_app Subscription type a user must be opted in to in order to receive this campaign.
Delivery provider used to send the campaign.
Campaign lifecycle state. Set state: "scheduled" (with send_at) to send a blast; set state: "aborted" to cancel.
draft, scheduled, loading, running, finished, aborting, aborted IDs of the lists targeted by the campaign.
IDs of lists whose members should be excluded from the campaign.
Hydrated subscription type referenced by subscription_id.
Hide child attributes
Hide child attributes
Numeric subscription-type identifier.
7
Identifier of the owning project.
42
Human-readable subscription-type name shown on preference centres.
"Weekly newsletter"
Delivery channel a subscription type covers.
email, text, push, webhook, in_app "email"
Whether this subscription type is shown on customer-facing preference centres.
Time the subscription type was created. ISO 8601.
Time the subscription type was last modified. ISO 8601.
Hydrated delivery provider referenced by provider_id. Returned in the redacted public shape — see Provider schema. Credentials (data, auth, API keys, tokens) are NEVER included.
Hide child attributes
Hide child attributes
Numeric provider identifier.
19
Identifier of the owning project.
42
Provider type within its group — the exact identifier of the underlying integration.
"smtp"
Human-readable provider name shown in dashboards.
"Primary transactional SMTP"
Channel family the provider belongs to.
email, text, push, webhook, analytics "email"
Whether this provider is the default for its group within the project.
Maximum sends per rate_interval. Zero means unlimited.
x >= 00
Window over which rate_limit is counted.
second, minute, hour, day "second"
Time the provider was created. ISO 8601.
Time the provider was last modified. ISO 8601.
Time the provider was soft-deleted, if applicable.
Aggregated delivery counters for the campaign.
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
x >= 0x >= 0x >= 0x >= 0x >= 0x >= 0x >= 0x >= 0x >= 0x >= 0x >= 0x >= 0When true, send_at is interpreted as a wall-clock time in each user’s local timezone.
When the campaign should send. ISO 8601 string accepted on input.
Optional override of the project’s default tracking and from-address domain.
Admin who created the campaign. Null for system- or API-key-created campaigns.
Safe display details for created_by, or null when the creator is system/API-key-created or no longer belongs to the project.
Internal-only description for the audit trail. Never shown to recipients.
Opaque cursor for the next page. null when no further pages exist.
Opaque cursor for the previous page. null when on the first page.
Page size used to build this response.
Was this page helpful?