Přeskočit na obsah
API dokumentace

Campaigns

One-off e-mail campaigns (newsletters): draft, audience, content, test, approve (send now or schedule), pause, resume, cancel, language variants.

Technická reference je anglicky (stejně jako strojově čitelný dokument OpenAPI). Celou skupinu pro AI agenta načtete z /api/openapi.json?tag=Campaigns.

Přihlášení: Authorization: Bearer pst_... nebo HTTP Basic (e-mail člena firmy a API klíč).

Operace

MetodaCestaPopis
GET/api/v1/tenants/{tenant}/campaignsList campaigns
POST/api/v1/tenants/{tenant}/campaignsCreate a campaign (draft)
POST/api/v1/tenants/{tenant}/campaigns/audienceCount and explain the recipients of an audience
POST/api/v1/tenants/{tenant}/campaigns/tagsChange labels of campaigns
GET/api/v1/tenants/{tenant}/campaigns/{campaign_id}Get a campaign
PATCH/api/v1/tenants/{tenant}/campaigns/{campaign_id}Update a campaign draft
DELETE/api/v1/tenants/{tenant}/campaigns/{campaign_id}Delete a campaign draft
POST/api/v1/tenants/{tenant}/campaigns/{campaign_id}/approveApprove a campaign: send now or schedule
POST/api/v1/tenants/{tenant}/campaigns/{campaign_id}/cancelCancel a scheduled or paused campaign
GET/api/v1/tenants/{tenant}/campaigns/{campaign_id}/contentGet the content of a campaign
PUT/api/v1/tenants/{tenant}/campaigns/{campaign_id}/contentSave the content of a campaign draft
POST/api/v1/tenants/{tenant}/campaigns/{campaign_id}/pausePause a sending or scheduled campaign
POST/api/v1/tenants/{tenant}/campaigns/{campaign_id}/previewRender a campaign for one contact
POST/api/v1/tenants/{tenant}/campaigns/{campaign_id}/resumeResume a paused campaign
GET/api/v1/tenants/{tenant}/campaigns/{campaign_id}/statsStatistics of a campaign by provider and domain
POST/api/v1/tenants/{tenant}/campaigns/{campaign_id}/testSend a test e-mail of a campaign
GET/api/v1/tenants/{tenant}/campaigns/{campaign_id}/variantsGet the language variants of a campaign
POST/api/v1/tenants/{tenant}/campaigns/{campaign_id}/variantsCreate language variants of a campaign
PUT/api/v1/tenants/{tenant}/campaigns/{campaign_id}/variantsChange the language variants of a campaign
POST/api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants/approveApprove the language variants (send or schedule)
POST/api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants/cancelCancel the language variants
POST/api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants/pausePause the language variants
POST/api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants/previewPreview the audience split of language variants
POST/api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants/resumeResume the language variants
GET/api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants/statsStatistics of the language variants
GET/api/v1/tenants/{tenant}/campaigns/{campaign_id}/versionsList saved content versions of a campaign
GET/api/v1/tenants/{tenant}/campaigns/{campaign_id}/versions/{version_id}Get one content version of a campaign
GET/api/v1/tenants/{tenant}/sendersList verified senders

List campaigns

GET /api/v1/tenants/{tenant}/campaigns

Oprávnění: modul campaigns, úroveň read; klíč s přístupem read nebo full · Nástroj MCP: list_campaigns

Campaigns (draft, scheduled, sending, paused, completed, cancelled) with recipients and stats.

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
pagequeryintegernePage number, from 1. default 1, min 1
pageSizequeryintegerneItems per page, 1 to 100. default 25, min 1, max 100
qquerystringneSearch text. max 200 chars
shopquerystringneShop id filter.
sortquerystringneSort fields separated by commas, "-" = descending, at most 3 (e.g. name,-id).
statusqueryone of: draft, scheduled, sending, paused, completed, cancelledneStatus filter.
tagquerystringneLabel filter; repeat for more labels.

Odpovědi

  • 200 OK: application/json object

Chyby

StavKódHodnoty message
400validationq, sort, status, tag
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
429429 rate_limited: wait Retry-After seconds.

Create a campaign (draft)

POST /api/v1/tenants/{tenant}/campaigns

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full · Nástroj MCP: create_campaign

Creates a campaign draft (only name and shopId are required). Then save_campaign_content, preview_campaign_audience, send_campaign_test and send_campaign.

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.

Tělo požadavku (application/json)

PoleTypPovinnéPopis
namestringano
shopIdstringano
senderIdstring or nullanoA sender address of the campaign shop; it must be verified for approval.
fromNamestringano
subjectstringano
preheaderstringano
templateIdstring or nullanoTemplate the content was copied from; the content itself is saved with saveCampaignContent.
audienceCampaignAudienceano
trackOpensbooleanne
trackClicksbooleanne
utmCampaignUtm or nullne
headersarray of CampaignHeaderne
timingone of: now, schedule, laterne
plannedAtstring or nullne
replyTostringneOne of replyToOptions; '' = the sender's own reply-to.
linkParamsarray of CampaignLinkParamne
preferTimebooleanne
unsubscribePageIdstring or nullneAn active unsubscribe page of the tenant, null = the template's or the default; left out on a new draft made from a template = the template's page.
footerIdstring or nullneA published footer of the tenant, null = the template's or the default; left out on a new draft made from a template = the template's footer.

Odpovědi

Chyby

StavKódHodnoty message
400validationaudience, footerId, preferTime, replyTo, senderId, templateId, timing, unsubscribePageId
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
429429 rate_limited: wait Retry-After seconds.

Count and explain the recipients of an audience

POST /api/v1/tenants/{tenant}/campaigns/audience

Oprávnění: modul campaigns, úroveň read; klíč s přístupem read nebo full · Nástroj MCP: preview_campaign_audience

Counts recipients of an audience without saving: matched, recipients and every excluded reason.

AudienceCount of an audience for a shop: matched, recipients and one reason per left-out contact. anyShop true = the audience of a language variant (lists and segments of any shop).

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.

Tělo požadavku (application/json)

object

Odpovědi

Chyby

StavKódHodnoty message
400validationanyShop, audience
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
429429 rate_limited: wait Retry-After seconds.

Change labels of campaigns

POST /api/v1/tenants/{tenant}/campaigns/tags

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.

Tělo požadavku (application/json): Required by the server: ids.

PoleTypPovinnéPopis
idsarray of stringano
addarray of stringne
removearray of stringne
tagsarray of stringne

Odpovědi

  • 200 OK: application/json object

Chyby

StavKódHodnoty message
400validationids
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
429429 rate_limited: wait Retry-After seconds.

Get a campaign

GET /api/v1/tenants/{tenant}/campaigns/{campaign_id}

Oprávnění: modul campaigns, úroveň read; klíč s přístupem read nebo full · Nástroj MCP: get_campaign

One campaign with audience, sender, tracking and state.

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.

Update a campaign draft

PATCH /api/v1/tenants/{tenant}/campaigns/{campaign_id}

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full · Nástroj MCP: update_campaign

Changes a draft campaign (any CampaignInput field).

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Tělo požadavku (application/json)

PoleTypPovinnéPopis
namestringne
shopIdstringne
senderIdstring or nullneA sender address of the campaign shop; it must be verified for approval.
fromNamestringne
subjectstringne
preheaderstringne
templateIdstring or nullneTemplate the content was copied from; the content itself is saved with saveCampaignContent.
audienceCampaignAudiencene
trackOpensbooleanne
trackClicksbooleanne
utmCampaignUtm or nullne
headersarray of CampaignHeaderne
timingone of: now, schedule, laterne
plannedAtstring or nullne
replyTostringneOne of replyToOptions; '' = the sender's own reply-to.
linkParamsarray of CampaignLinkParamne
preferTimebooleanne
unsubscribePageIdstring or nullneAn active unsubscribe page of the tenant, null = the template's or the default; left out on a new draft made from a template = the template's page.
footerIdstring or nullneA published footer of the tenant, null = the template's or the default; left out on a new draft made from a template = the template's footer.

Odpovědi

Chyby

StavKódHodnoty message
400validationaudience, footerId, preferTime, replyTo, senderId, templateId, timing, unsubscribePageId
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
409conflictstatus
429429 rate_limited: wait Retry-After seconds.

Delete a campaign draft

DELETE /api/v1/tenants/{tenant}/campaigns/{campaign_id}

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full · Nástroj MCP: delete_campaign (přes MCP jen s náhledem a potvrzením)

Deletes a draft campaign that sent nothing.

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Odpovědi

  • 204 No content

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
409conflictstatus
429429 rate_limited: wait Retry-After seconds.

Approve a campaign: send now or schedule

POST /api/v1/tenants/{tenant}/campaigns/{campaign_id}/approve

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full · Nástroj MCP: send_campaign (přes MCP jen s náhledem a potvrzením)

Approves a draft campaign and sends it now (sendAt null) or schedules it (sendAt ISO time, 5 minutes to 365 days ahead). The preview shows subject, sender and the exact recipient count; expectedRecipients defaults to that count.

Body {sendAt: ISO time in UTC or null (now), expectedRecipients: the number the user confirmed}.

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Tělo požadavku (application/json)

PoleTypPovinnéPopis
sendAtstring or nullanonull = send now; otherwise at least 5 minutes and at most 365 days ahead.
expectedRecipientsnumberanoThe number the user confirmed; the server refuses (409 recipients) when the audience drifted more than 5 %.

Odpovědi

Chyby

StavKódHodnoty message
400validationsendAt
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
409conflicttest_only
429429 rate_limited: wait Retry-After seconds.

Cancel a scheduled or paused campaign

POST /api/v1/tenants/{tenant}/campaigns/{campaign_id}/cancel

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full · Nástroj MCP: cancel_campaign

Cancels a campaign for good (what was sent stays in the statistics).

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Tělo požadavku (application/json)

object

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
409conflictstatus
429429 rate_limited: wait Retry-After seconds.

Get the content of a campaign

GET /api/v1/tenants/{tenant}/campaigns/{campaign_id}/content

Oprávnění: modul campaigns, úroveň read; klíč s přístupem read nebo full · Nástroj MCP: get_campaign_content

Content of a campaign (editor, html, design, version).

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.

Save the content of a campaign draft

PUT /api/v1/tenants/{tenant}/campaigns/{campaign_id}/content

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full · Nástroj MCP: save_campaign_content

Saves the content of a draft campaign (copy a template: get_template, then save its content here).

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Tělo požadavku (application/json)

PoleTypPovinnéPopis
editorone of: visual, htmlano
htmlstringano
designEmailDesign or nullano
baseVersionnumberanoThe version the editor started from; a newer one on the server answers 409 version (saved elsewhere meanwhile).
saveKindone of: manual, auto, restoreneHistory entry kind: auto (autosave, journaled), manual (Uložit), restore (a version taken back). Default auto.

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.

Pause a sending or scheduled campaign

POST /api/v1/tenants/{tenant}/campaigns/{campaign_id}/pause

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full · Nástroj MCP: pause_campaign

Pauses a scheduled or sending campaign.

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Tělo požadavku (application/json)

object

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
409conflictstatus
429429 rate_limited: wait Retry-After seconds.

Render a campaign for one contact

POST /api/v1/tenants/{tenant}/campaigns/{campaign_id}/preview

Oprávnění: modul campaigns, úroveň read; klíč s přístupem read nebo full

The e-mail as one contact would get it: body {email} of a contact of the tenant; answers {subject, preheader, html} with every merge tag filled and sample links. Nothing is sent or recorded. It shows one contact's data (name, e-mail, custom fields, orders in scripts), so it needs the module contacts too (read): campaigns read alone (content manager, developer) neither reads a contact nor learns whether an address is one (review of batch 8).

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Tělo požadavku (application/json): Required by the server: email.

PoleTypPovinnéPopis
emailstringano

Odpovědi

Chyby

StavKódHodnoty message
400validationscript
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403forbiddencontacts
404not_found
429429 rate_limited: wait Retry-After seconds.

Resume a paused campaign

POST /api/v1/tenants/{tenant}/campaigns/{campaign_id}/resume

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full · Nástroj MCP: resume_campaign (přes MCP jen s náhledem a potvrzením)

Resumes a paused campaign (it sends again, or goes back to scheduled when its time is ahead).

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Tělo požadavku (application/json)

object

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
409conflictstatus
429429 rate_limited: wait Retry-After seconds.

Statistics of a campaign by provider and domain

GET /api/v1/tenants/{tenant}/campaigns/{campaign_id}/stats

Oprávnění: modul campaigns, úroveň read; klíč s přístupem read nebo full

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Odpovědi

  • 200 OK: application/json object

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.

Send a test e-mail of a campaign

POST /api/v1/tenants/{tenant}/campaigns/{campaign_id}/test

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full · Nástroj MCP: send_campaign_test

Sends a test e-mail of the campaign to the account's test addresses only (list_test_recipients).

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Tělo požadavku (application/json)

PoleTypPovinnéPopis
tostringano

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablemail

Get the language variants of a campaign

GET /api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants

Oprávnění: modul campaigns, úroveň read; klíč s přístupem read nebo full

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.

Create language variants of a campaign

POST /api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full

Duplicate as variant: body {shopId, label, sourceLabel?}. Answers the new variant's id and the group.

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Tělo požadavku (application/json): Required by the server: label, shopId.

PoleTypPovinnéPopis
shopIdstringano
labelstringano
sourceLabelstringne

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.

Change the language variants of a campaign

PUT /api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full

Order and labels of the group: body {variants: [{id, label}] in the new order, every variant once}.

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Tělo požadavku (application/json): Required by the server: variants.

PoleTypPovinnéPopis
variantsarray of objectano

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.

Approve the language variants (send or schedule)

POST /api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants/approve

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full

One send action for every variant: body {sendAt: ISO time or null (now), expectedRecipients: {id: final}}.

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Tělo požadavku (application/json)

PoleTypPovinnéPopis
sendAtstring or nullanonull = now.
expectedRecipientsmap of numberanoThe final number per variant id the user confirmed.

Odpovědi

Chyby

StavKódHodnoty message
400validationsendAt
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
409conflicttest_only
429429 rate_limited: wait Retry-After seconds.

Cancel the language variants

POST /api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants/cancel

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
409conflictstatus, variants
429429 rate_limited: wait Retry-After seconds.

Pause the language variants

POST /api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants/pause

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
409conflictstatus, variants
429429 rate_limited: wait Retry-After seconds.

Preview the audience split of language variants

POST /api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants/preview

Oprávnění: modul campaigns, úroveň read; klíč s přístupem read nebo full

Final numbers per variant: matched, recipients of its own audience, taken by an earlier variant, final.

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.

Resume the language variants

POST /api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants/resume

Oprávnění: modul campaigns, úroveň full; klíč s přístupem full

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
409conflictstatus, variants
429429 rate_limited: wait Retry-After seconds.

Statistics of the language variants

GET /api/v1/tenants/{tenant}/campaigns/{campaign_id}/variants/stats

Oprávnění: modul campaigns, úroveň read; klíč s přístupem read nebo full

Statistics per variant and combined (unique contacts: one variant per contact, so the sums add up).

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.

List saved content versions of a campaign

GET /api/v1/tenants/{tenant}/campaigns/{campaign_id}/versions

Oprávnění: modul campaigns, úroveň read; klíč s přístupem read nebo full

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).
beforequerystringne
limitquerystringne

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.

Get one content version of a campaign

GET /api/v1/tenants/{tenant}/campaigns/{campaign_id}/versions/{version_id}

Oprávnění: modul campaigns, úroveň read; klíč s přístupem read nebo full

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
campaign_idpathstringanoId of the campaign (string of digits).
version_idpathstringanoId of the version (string of digits).

Odpovědi

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.

List verified senders

GET /api/v1/tenants/{tenant}/senders

Oprávnění: modul campaigns, úroveň read; klíč s přístupem read nebo full · Nástroj MCP: list_senders

Sender addresses per shop (only verified ones may send).

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.

Odpovědi

  • 200 OK: application/json object

Chyby

StavKódHodnoty message
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
429429 rate_limited: wait Retry-After seconds.

Schémata

ApproveInput

PoleTypPovinnéPopis
sendAtstring or nullanonull = send now; otherwise at least 5 minutes and at most 365 days ahead.
expectedRecipientsnumberanoThe number the user confirmed; the server refuses (409 recipients) when the audience drifted more than 5 %.

AudienceCount

PoleTypPovinnéPopis
matchednumberanoUnique contacts in the chosen lists and segments.
recipientsnumberanoWho would receive the campaign now.
excludedobjectano

BoxPadding

PoleTypPovinnéPopis
topnumberano
rightnumberano
bottomnumberano
leftnumberano

CampaignAudience

PoleTypPovinnéPopis
listIdsarray of stringano
segmentIdsarray of stringanoSegments of the campaign shop.
excludeListIdsarray of stringanoMembers of these lists are left out.
excludeInactivebooleananoLeave out engagement E and the excluded state (long inactive); recommended.
excludeEmailsarray of stringanoAddresses left out by hand (at most 1000).
onlyWithPurposebooleananoOnly contacts with a valid consent for one of purposeIds (any purpose when empty).
purposeIdsarray of stringano

CampaignDetail

PoleTypPovinnéPopis
preheaderstringano
senderIdstring or nullano
fromNamestringano
fromEmailstringano
replyTostringano
templateIdstring or nullanoTemplate the content was copied from (information only; later template edits do not change the campaign).
hasContentbooleananoThe campaign has its own content (GET …/content); without it the approval answers 400 content.
audienceCampaignAudienceano
pausedReasonone of: manual, bounce_rate, complaint_rate, unsubscribe_rate, recipient_drift, template_error, nullano
approvedAtstring or nullanoSE's Aktivováno: when the campaign was approved for sending (null for drafts).
trackOpensbooleananoAdvanced step: tracking (on by default as in SE), UTM on links of the campaign's e-shop, own X- headers.
trackClicksbooleanano
utmCampaignUtm or nullano
headersarray of CampaignHeaderano
timingSendTiminganoSend time chosen in step 1 of the draft; the approval still takes the time explicitly.
plannedAtstring or nullano
linkParamsarray of CampaignLinkParamanoStep 3 "Sledování odkazů" (SE): free name / value pairs added to links of the campaign's e-shop.
preferTimebooleananoStep 3 "Ideální čas odeslání": each contact at the hour of his or her usual opens, within 24 hours.
replyToOptionsarray of stringanoAddresses that may receive replies (the shop's sender addresses and their reply-to).
unsubscribePageIdstring or nullneStep 3 Odhlašovací stránka (SE, migration 0391): the campaign's own page; null = the template's or the default.
footerIdstring or nullneVybraná patička / Patička emailu (PA-01, migration 0410): a published footer; null = the template's or the default one.
idstringano
namestringano
shopIdstringano
subjectstringano
statusone of: cancelled, completed, draft, scheduled, sending, pausedano
recipientsnumber or nullanoRecipients frozen at approval (expected_recipients); null for drafts.
scheduledAtstring or nullano
startedAtstring or nullano
completedAtstring or nullano
createdAtstringano
updatedAtstringano
publicUrlstringneOdkaz ke sdílení: the campaign's public preview (merge tags unfilled); absent from older servers.
statsCampaignStats or nullanonull until sending starts.
variantGroupIdstring or nullneLanguage variants sent together (Kampaně › Varianty): the group's id, null or absent for a single campaign.
variantLabelstringneShort name of the variant (CZ, SK ...); '' for a single campaign.
variantPositionnumberneOrder in the group: a contact in several variants' audiences receives only the first one.
tagsarray of stringneLabels (Štítky, set from the grid's ⋮ menu or as a bulk action); absent from older servers.

CampaignHeader

PoleTypPovinnéPopis
namestringano
valuestringano

CampaignInput

PoleTypPovinnéPopis
namestringano
shopIdstringano
senderIdstring or nullanoA sender address of the campaign shop; it must be verified for approval.
fromNamestringano
subjectstringano
preheaderstringano
templateIdstring or nullanoTemplate the content was copied from; the content itself is saved with saveCampaignContent.
audienceCampaignAudienceano
trackOpensbooleanne
trackClicksbooleanne
utmCampaignUtm or nullne
headersarray of CampaignHeaderne
timingone of: now, schedule, laterne
plannedAtstring or nullne
replyTostringneOne of replyToOptions; '' = the sender's own reply-to.
linkParamsarray of CampaignLinkParamne
preferTimebooleanne
unsubscribePageIdstring or nullneAn active unsubscribe page of the tenant, null = the template's or the default; left out on a new draft made from a template = the template's page.
footerIdstring or nullneA published footer of the tenant, null = the template's or the default; left out on a new draft made from a template = the template's footer.

CampaignLinkParam

PoleTypPovinnéPopis
namestringano
valuestringano

CampaignListItem

PoleTypPovinnéPopis
idstringano
namestringano
shopIdstringano
subjectstringano
statusone of: cancelled, completed, draft, scheduled, sending, pausedano
recipientsnumber or nullanoRecipients frozen at approval (expected_recipients); null for drafts.
scheduledAtstring or nullano
startedAtstring or nullano
completedAtstring or nullano
createdAtstringano
updatedAtstringano
approvedAtstring or nullneSE's Aktivováno: when the campaign was approved for sending (null for drafts).
publicUrlstringneOdkaz ke sdílení: the campaign's public preview (merge tags unfilled); absent from older servers.
statsCampaignStats or nullanonull until sending starts.
variantGroupIdstring or nullneLanguage variants sent together (Kampaně › Varianty): the group's id, null or absent for a single campaign.
variantLabelstringneShort name of the variant (CZ, SK ...); '' for a single campaign.
variantPositionnumberneOrder in the group: a contact in several variants' audiences receives only the first one.
tagsarray of stringneLabels (Štítky, set from the grid's ⋮ menu or as a bulk action); absent from older servers.

CampaignPreview

The e-mail as one contact would get it (POST /campaigns/{id}/preview): every merge tag filled, sample links.

PoleTypPovinnéPopis
subjectstringano
preheaderstringano
htmlstringano

CampaignStats

Unique contacts per event type.

PoleTypPovinnéPopis
sentnumberano
deliverednumberano
openednumberano
clickednumberano
bouncednumberano
complainednumberano
unsubscribednumberano

CampaignUtm

PoleTypPovinnéPopis
sourcestringano
mediumstringano
campaignstringano
termstringne
contentstringne

CampaignVariant

One variant: a whole campaign of its own shop (content, subject, sender, feeds) with an audience chosen by hand.

PoleTypPovinnéPopis
idstringano
namestringano
labelstringano
positionnumberano
shopIdstringano
shopCodestringano
currencyCurrencyano
languageLangano
subjectstringano
preheaderstringano
statusone of: cancelled, completed, draft, scheduled, sending, pausedano
senderIdstring or nullano
fromNamestringano
hasContentbooleanano
listIdsarray of stringano
segmentIdsarray of stringano
recipientsnumber or nullanoFinal number frozen at the approval; null for drafts.
scheduledAtstring or nullano
pausedReasonone of: manual, bounce_rate, complaint_rate, unsubscribe_rate, recipient_drift, template_error, nullano
statsCampaignStats or nullano

CampaignVariantGroup

PoleTypPovinnéPopis
groupIdstring or nullanonull = a single campaign (no variants yet).
variantsarray of CampaignVariantanoIn their order.
createdstringneId of the variant just created by addCampaignVariant.

ContentVersion

One entry of the content history (Historie uložení).

PoleTypPovinnéPopis
idstringano
versionnumberano
kindone of: manual, auto, restoreano
createdAtstringano
createdBystring or nullanoName or e-mail of the user; null for the API or unknown.

ContentVersionDetail

PoleTypPovinnéPopis
contentobjectano
idstringano
versionnumberano
kindone of: manual, auto, restoreano
createdAtstringano
createdBystring or nullanoName or e-mail of the user; null for the API or unknown.

ContentVersionList

PoleTypPovinnéPopis
itemsarray of ContentVersionano
morebooleanano

Currency

one of: CZK, EUR

EmailContent

E-mail content of a template or a campaign.

PoleTypPovinnéPopis
editorone of: visual, htmlano
htmlstringanoHTML with merge tags left in place (compiled from the design, or written by hand); the core personalises and sends it.
designEmailDesign or nullanoVisual editor only.
versionnumberano0 = no content yet; every save adds one.
updatedAtstring or nullano

EmailContentInput

PoleTypPovinnéPopis
editorone of: visual, htmlano
htmlstringano
designEmailDesign or nullano
baseVersionnumberanoThe version the editor started from; a newer one on the server answers 409 version (saved elsewhere meanwhile).
saveKindone of: manual, auto, restoreneHistory entry kind: auto (autosave, journaled), manual (Uložit), restore (a version taken back). Default auto.

EmailDesign

Source of a visual design: MJML plus the global styles, so the editor reopens it exactly.

PoleTypPovinnéPopis
formatmjml-1anoFormat version; a later editor migrates older designs.
mjmlstringano
stylesEmailStylesano

EmailStyles

Global look of a visual design. The editor writes it as MJML attributes; every element can override it.

PoleTypPovinnéPopis
fontFamilystringanoOne of EMAIL_FONTS (web-safe stacks; recipients' clients have no web fonts by default).
headingFontFamilystringano
fontSizenumberanoBase text size in px (12 to 20).
textColorstringano
headingColorstringano
linkColorstringano
buttonColorstringano
buttonTextColorstringano
backgroundColorstringanoAround the e-mail.
contentColorstringanoBody of the e-mail.
widthnumberanoWidth of the e-mail in px (480 to 800).
magicMagicStylesneSettings of the Magic editor (e-mail paddings, text styles, dark mode, element defaults); the server keeps the object as it is (bounded JSON, API-CONTRACT.md). Absent in designs saved before it.

Error

PoleTypPovinnéPopis
errorobjectano
json
{
  "error": {
    "code": "validation",
    "message": "email"
  }
}

GridTagsInput

Bulk label change: add and remove, or tags = the new labels of every row.

PoleTypPovinnéPopis
idsarray of stringano
addarray of stringne
removearray of stringne
tagsarray of stringne

Lang

one of: cs, sk

MagicBackground

A background of the Magic editor: a plain colour, a linear gradient or a picture (https).

PoleTypPovinnéPopis
typeone of: color, gradient, imageano
fromstringne
tostringne
anglenumberneGradient direction in degrees (180 = top to bottom).
imagestringne
fitone of: cover, repeat, originalnePicture: cover the area, tile, or the original size once.

MagicStyles

PoleTypPovinnéPopis
paddingBoxPaddingneSpace around the e-mail body, desktop and mobile.
paddingMobileBoxPaddingne
darkModebooleanneDark mode in the recipient's app (prefers-color-scheme) with its colours.
darkBackgroundColorstringne
darkContentColorstringne
darkTextColorstringne
darkHeadingColorstringne
darkLinkColorstringne
darkButtonColorstringneDark mode colours of the buttons and the divider (SE: every colour has its "(tmavé schéma)" variant).
darkButtonTextColorstringne
darkButton2Colorstringne
darkButton2TextColorstringne
darkDividerColorstringne
backgroundMagicBackgroundneSE "Typ pozadí" of the e-mail (around the body) and of the body: a gradient or a picture over the colour (backgroundColor / contentColor stay the fallback of clients without head styles).
bodyBackgroundMagicBackgroundne
button2ColorstringneSecondary button and divider colours.
button2TextColorstringne
button2BorderColorstringne
buttonBorderColorstringne
dividerColorstringne
footerDefaultbooleanneSystem footer (SmartEmailing "Patička"): its own default look instead of the e-mail's, and no background.
footerTransparentbooleanne
textobjectneText styles per kind; missing keys = defaults. Mobile values override desktop ones under 480 px.
textMobileobjectne
defaultsobjectneDefaults of new elements (SmartEmailing "Prvky").

SendTiming

one of: now, schedule, later

Sender

PoleTypPovinnéPopis
idstringano
shopIdstringano
namestringano
emailstringano
replyTostringano
verifiedbooleananoDomain verified (SPF, DKIM, DMARC); only verified senders can send.
isDefaultbooleanano

TestSendResult

PoleTypPovinnéPopis
tostringano
sentAtstringano

VariantApproveInput

PoleTypPovinnéPopis
sendAtstring or nullanonull = now.
expectedRecipientsmap of numberanoThe final number per variant id the user confirmed.

VariantPreview

PoleTypPovinnéPopis
variantsarray of VariantPreviewItemano
totalnumberano

VariantPreviewItem

Counts of one variant before sending: its own audience, the recipients an earlier variant takes, the final number.

PoleTypPovinnéPopis
campaignIdstringano
labelstringano
shopIdstringano
takenByEarliernumberano
finalnumberano
matchednumberanoUnique contacts in the chosen lists and segments.
recipientsnumberanoWho would receive the campaign now.
excludedobjectano

VariantStats

PoleTypPovinnéPopis
variantsarray of objectano
totalCampaignStats or nullanoSums over the variants (a contact gets one variant, so these are unique contacts); null before sending.