API v1 documentation

Last updated: 19. 11. 2026

Introduction

General information

Data format

json, html

Protocol

https

Type

REST

Encoding

UTF-8

Authentication

With a positive authorization, access to the API is limited by the rights and plan of the specific customer. When accessed via the API, the system behaves as if the administrator of the given customer account were logged in.

Base URL

https://api.onquanda.com/api/

Authorization

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

You can obtain the API key in the application under Settings / API keys, using the green "Add API key" button.

Access limits

To secure the system and ensure its normal operation, an access limit is implemented per API key. This limit prevents parallel access and access that is too frequent. Requests to the API will have to be serialized, and to free up resources after processing a request a certain time delay is also added. Otherwise an error return code is returned:

429 Too many requests

and the request must then be repeated.

Delay

The delay between the completion of the previous request and the start of the next one is set to 30ms.

Some calls may be limited by the amount of input data.

API structure

Individual API calls are structured into modules.

https://api.onquanda.com/api/{nazev_modulu}/…

HTTP methods used

Based on RFC 2616 section 9.1.2 (https://www.ietf.org/rfc/rfc2616.txt). Mapping to CRUD:

GET (read)

POST (create)

PUT (update)

DELETE (delete)

OPTION (help for the call)

PATCH (partial update)

URL addresses

Retrieving a list of objects (GET) and creating a new object (POST) in the form:

https://api.onquanda.com/api/{nazev_modulu}/{model}s/

Retrieving the detail of an object (GET) or updating it (PUT):

https://api.onquanda.com/api/{nazev_modulu}/{model}s/{id}/

Other calls take the form

If they concern more than one model:

https://api.onquanda.com/api/{nazev_modulu}/{volani}/

Multiple objects of one specific model:

https://api.onquanda.com/api/{nazev_modulu}/{model}s/{volani}/

A single specific object:

https://api.onquanda.com/api/{nazev_modulu}/{model}s/{id}/{volani}/

Types of API calls

Basic help

All types of API calls should support the OPTION method, which returns basic help for the call.

OPTIONhttps://api.onquanda.com/api/newsletter/newsletters/77345/recipients/
Response
200 OK Content-Type: application/json
{"name": "Recipient List",
"description": "",
"renders": [
"application/json",
"text/html"
],
"parses": [
"application/json",
"application/x-www-form-urlencoded",
"multipart/form-data"
],
"actions": {
"GET": {
"id": {
"type": "integer",
"required": false,
"read_only": true,
"label": "ID"
},
"email": {
"type": "email",
"required": false,
"read_only": false,
"label": "email",
"max_length": 255
},
"tracked": {
"type": "boolean",
"required": false,
"read_only": true
},
"clicked": {
"type": "boolean",
"required": false,
"read_only": true
},
"unsubscribed": {
"type": "boolean",
"required": false,
"read_only": true
},
"status": {
"type": "string",
"required": false,
"read_only": true
},
"data": {
"type": "json",
"required": false,
"read_only": true
}
}
}
}

This is automatically generated help and may not exactly correspond to specific properties, and it does not contain, for example, information about integrity or other constraints imposed by the system.

List of objects

All lists are available via the GET method and are paginated (the output includes the total number of objects and the URL of the next and previous page, respectively). Each object is represented by several of its basic attributes. These basic attributes are defined in the definition of each call. This is a minimal set that may be extended during development.

Example
GEThttps://api.onquanda.com/api/contact/contacts/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "count": 124439,
 "next": "https://api.onquanda.com/api/contact/contacts/?page=2",
 "previous": null,
 "results": [
 {
 "id": 1049682,
 "email": "info+1@quanda.com"
 },
 {
 "id": 1049683,
 "email": "info+2@quanda.com"
 }
]
}

Ping

Allows you to verify the connection functionality for GET and POST.

GEThttps://api.onquanda.com/api/helper/ping/
POSThttps://api.onquanda.com/api/helper/ping/

Enumerations

Contacts

Email sending status

  • 1 = Send emails
  • 2 = Cannot send (unsubscribed)
  • 3 = Cannot send (consent expired)
  • 4 = Cannot send (waiting for consent)

List of legal titles

  • Legitimate interest of the controller
  • Fulfilment of a legal obligation
  • Performance of a contract or negotiation of its conclusion
  • Consent to the processing of personal data
  • Public interest
  • Vital interest

List of purposes for processing personal data

  • 1 = Not set (default)
  • 2 = Sending commercial and advertising messages
  • 3 = Direct marketing
  • 4 = Improving products and services
  • 5 = Sending news updates
  • 6 = Response to expressed interest
  • 7 = Providing professional content
  • 8 = Running a customer competition
  • 9 = Running educational events
  • 10 = Conducting a marketing survey
  • 11 = Conducting market research
  • 12 = Performance of a purchase contract or negotiation of its conclusion
  • 13 = Performance of a work contract or negotiation of its conclusion
  • 14 = Fulfilment of employment contracts and obligations
  • 15 = Protection of property and health
  • 16 = Taking legal action
  • 17 = Compliance with the accounting act
  • 18 = Archiving in the public interest
  • 19 = For statistical purposes

Surveys

Question types

  • 1 = Short text
  • 2 = Longer text
  • 3 = Short text, 1 or more lines
  • 4 = Number
  • 5 = Number, 1 or more lines
  • 6 = Date
  • 7 = Date and/or time, 1 or more lines
  • 8 = Dropdown menu
  • 9 = List of radio buttons (radiobutton)
  • 10 = List of checkboxes (checkbox)
  • 11 = Rating scale
  • 12 = Table of radio buttons (radiobuttons)
  • 13 = Table of checkboxes (checkboxes)
  • 14 = E-mail
  • 15 = Upload file
  • 16 = NPS (net promoter score)

Email campaigns

Email campaign types

  • 10 = Simple email campaign
  • 20 = Logic email campaign
  • 30 = Email series
  • 40 = Birthday email campaign
  • 50 = Email campaign for anniversaries and holidays
  • 60 = Email campaign with A/B testing
  • 70 = Transactional email

Email campaign statuses

  • 10 = Paused
  • 20 = Ready to send / Sent / Activated
  • 30 = Under construction
  • 40 = Finished

Email states in a series

  • DRAFT = Draft
  • TO_CHECK = To check
  • CHECKED = Checked
  • DONE = Done

Test email options (strategy)

  • all = all emails
  • changed_today = only emails edited today
  • select = selected emails

Allowed attachment types for transactional emails

doc, docx, xls, xlsx, ppt, pptx, jpeg, jpg, gif, png, bmp and pdf

Maximum attachment size

20MB


API endpoints

Contacts

List of contacts

GEThttps://api.onquanda.com/api/contact/contacts/
Query parameters
GEThttps://api.onquanda.com/api/contact/contacts/?tag=Zakaznici&tag=Ostrava&tags_behavior=or
ParameterTypeDescriptionNote
tagstringTag nameThe tag name is case-sensitive and diacritics-sensitive
tags_behaviorenumand or or"and" corresponds to the intersection, "or" corresponds to the union
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "count": 330,
 "next": "https://api.onquanda.com/api/contact/contacts/?page=2",
 "previous": null,
 "results": [
 {
 "id": 9272515,
 "email": "prvni@prvni.cz"
 },
 {
 "id": 6464018,
 "email": "druhy@gmail.com"
 },
 {
 "id": 8127767,
 "email": "treti@seznam.cz"
 }
 ]
}

Find contact ID by email

GEThttps://api.onquanda.com/api/contact/contacts/?email=petr.novak@quanda.cz
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "count": 1,
 "next": null,
 "previous": null,
 "results": [
 {
 "id": 9649947,
 "email": "petr.novak@quanda.cz"
 }
 ]
}

New contact

PUThttps://api.onquanda.com/api/contact/importer/single/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
overwritebooleanfalseOverwriting of contact data, default false
contact_tags_overwritebooleanfalseOverwriting of contact tags, default true
overwrite_companiesbooleanfalseOverwriting of company data, default false
company_tags_overwritebooleanfalseOverwriting of company tags, default true
dataobjecttrueData of one contact
ContactobjecttrueContact. Only the email attribute is required
Contact.emailemailtrueEmail (main email)
Contact.sourcestringfalseSource
Contact.title_beforestringfalseTitle
Contact.first_namestringfalseFirst name
Contact.last_namestringfalseLast name
Contact.sexchoicefalseSex
Contact.birthdatedatefalseDate of birth
Contact.occupationstringfalseJob title
Contact.phone_homestringfalseHome phone
Contact.phone_workstringfalseWork phone
Contact.mobilestringfalseMobile
Contact.address_work_streetstringfalseWork address: street
Contact.address_work_citystringfalseWork address: city
Contact.address_work_zipcodestringfalseWork address: postal code
Contact.address_work_countrystringfalseWork address: country
Contact.main_companystringfalseName of the main company
Contact.notestringfalseNote
Contact.custom_field_1stringfalseCustom field 1
Contact.erp_ident_numstringfalseContact identifier in the ERP
Contact.salutation_last_namestringfalseFull salutation with the last name
Contact.salutation_first_namestringfalseFull salutation with the first name
Contact.salutation_last_name_vocativestringfalseLast name in the vocative
Contact.salutation_first_name_vocativestringfalseFirst name in the vocative
Contact.tagsstringfalseContact tags separated by commas
ContactPurposeOfProcessingobjectfalsePurpose of processing. If provided, it must have all attributes
ContactPurposeOfProcessing.purpose_of_processingfieldtruePurpose of processing personal data
ContactPurposeOfProcessing.status_valid_todatetimefalseValid until
ContactPurposeOfProcessing.statuschoicefalseEmail sending status
ContactPurposeOfProcessing.contactpurposeofprocessing_status_ignorebooleanfalseDo not overwrite the saved sending status
ContactPurposeOfProcessing.legal_title_legitimate_interest_of_administratorbooleanfalseLegitimate interest of the controller
CompanyobjectfalseCompany of the contact. If provided, it must have the name attribute
Company.namestringtrueCompany name
Company.tagsstringfalseCompany tags separated by commas

The table lists the fields from the example. All fields of the Contact object are listed in the Schema below, overwriting is described in Overwrite settings and the fields of the Company and ContactPurposeOfProcessing objects in Bulk import of contacts, tags and companies.

{
 "overwrite": true,
 "contact_tags_overwrite": true,
 "overwrite_companies": true,
 "company_tags_overwrite": true,
 "data": {
 "Contact": {
 "email": "petr.novak@quanda.cz",
 "source": "Veletrh",
 "title_before": "Ing.",
 "first_name": "Petr",
 "last_name": "Novák",
 "sex": "Muž",
 "birthdate": "06.05.1981",
 "occupation": "Ekonom",
 "phone_home": "+420602123456",
 "phone_work": "+420987654321",
 "mobile": "+42603123456",
 "address_work_street": "Jarní 58",
 "address_work_city": "Praha 9",
 "address_work_zipcode": "19000",
 "address_work_country": "CZ",
 "main_company": "ABC a.s.",
 "note": "Zasílat e-maily maximálně 2x týdně",
 "custom_field_1": "ForArch2019",
 "erp_ident_num": "A124578",
 "salutation_last_name": "Vážený pane Nováku",
 "salutation_first_name": "Dobrý den, Petře",
 "salutation_last_name_vocative": "Nováku",
 "salutation_first_name_vocative": "Petře",
 "tags": "VIP,Praha,OP356"
 },
 "ContactPurposeOfProcessing": {
 "purpose_of_processing": 1,
 "status_valid_to": "23.12.2020 14:30:00",
 "status": 1,
 "contactpurposeofprocessing_status_ignore": false,
 "legal_title_legitimate_interest_of_administrator": true
 },
 "Company": {
 "name": "ABC a.s.",
 "tags": "Dodavatel,Praha"
 }
 }
}

Schema

{
 "name": "Contact List",
 "description": "",
 "renders": [
 "application/json",
 "text/html"
 ],
 "parses": [
 "application/json",
 "application/x-www-form-urlencoded",
 "multipart/form-data"
 ],
 "actions": {
 "PUT": {
 "id": {
 "type": "integer",
 "required": false,
 "read_only": true,
 "label": "ID"
 },
 "created": {
 "type": "datetime",
 "required": false,
 "read_only": true,
 "label": "Vytvořeno",
 "help_text": "admin-vytvoreno_help"
 },
 "modified": {
 "type": "datetime",
 "required": false,
 "read_only": true,
 "label": "Změněno",
 "help_text": "admin-zmeneno_help"
 },
 "email": {
 "type": "email",
 "required": true,
 "read_only": false,
 "label": "E-mail (hlavní e-mail)",
 "help_text": "admin-email_help",
 "max_length": 150
 },
 "title_before": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Titul",
 "help_text": "admin-titul_help",
 "max_length": 255
 },
 "first_name": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Jméno",
 "help_text": "admin-jmeno_help",
 "max_length": 255
 },
 "second_name": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Prostřední jméno",
 "help_text": "admin-prostredni_jmeno_help",
 "max_length": 255
 },
 "last_name": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Příjmení",
 "help_text": "admin-prijmeni_help",
 "max_length": 255
 },
 "title_after": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Titul za",
 "help_text": "admin-titul_za_help",
 "max_length": 255
 },
 "salutation": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Oslovení",
 "help_text": "admin-osloveni_help",
 "max_length": 255
 },
 "salutation_last_name": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Kompletní oslovení s příjmením",
 "help_text": "admin-osloveni_komplet_prijmeni_help",
 "max_length": 255
 },
 "salutation_first_name": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Kompletní oslovení se jménem",
 "help_text": "admin-osloveni_komplet_krestni_help",
 "max_length": 255
 },
 "salutation_last_name_vocative": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Příjmení v 5 pádu",
 "help_text": "admin-osloveni_prijmeni_5_pad_help",
 "max_length": 255
 },
 "salutation_first_name_vocative": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Jméno v 5 pádu",
 "help_text": "admin-osloveni_krestni_5_pad_help",
 "max_length": 255
 },
 "email_2": {
 "type": "email",
 "required": false,
 "read_only": false,
 "label": "E-mail 2",
 "help_text": "admin-email_2_help",
 "max_length": 150
 },
 "email_3": {
 "type": "email",
 "required": false,
 "read_only": false,
 "label": "E-mail 3",
 "help_text": "admin-email_3_help",
 "max_length": 150
 },
 "sex": {
 "type": "choice",
 "required": false,
 "read_only": false,
 "label": "Pohlaví",
 "help_text": "admin-pohlavi_help",
 "choices": [
 {
 "value": "male",
 "display_name": "Muž"
 },
 {
 "value": "female",
 "display_name": "Žena"
 }
 ]
 },
 "source": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Zdroj",
 "help_text": "admin-zdroj_help",
 "max_length": 255
 },
 "recommended_by": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Doporučeno kým",
 "help_text": "admin-doporuceno_help",
 "max_length": 255
 },
 "birthdate": {
 "type": "date",
 "required": false,
 "read_only": false,
 "label": "Datum narození",
 "help_text": "admin-datum_narozeni_help"
 },
 "anniversary": {
 "type": "date",
 "required": false,
 "read_only": false,
 "label": "Datum svátku / výročí",
 "help_text": "Datum svátku nebo výročí uvádějte ve tvaru 1.1.2021 nebo 01.01.2021"
 },
 "occupation": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Funkce",
 "help_text": "admin-funkce_help",
 "max_length": 255
 },
 "double_opt_in_status": {
 "type": "choice",
 "required": false,
 "read_only": false,
 "label": "?",
 "help_text": "admin-contact-double_opt_in_status_help",
 "choices": [
 {
 "value": 0,
 "display_name": "?"
 },
 {
 "value": 1,
 "display_name": "?"
 },
 {
 "value": 2,
 "display_name": "?"
 }
 ]
 },
 "www": {
 "type": "url",
 "required": false,
 "read_only": false,
 "label": "Www adresa",
 "help_text": "Vyplňte adresu Vašeho webu",
 "max_length": 255
 },
 "phone_home": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Telefon domů",
 "help_text": "Telefonní číslo uvádějte ve tvaru: +420123456789",
 "max_length": 50
 },
 "phone_work": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Telefon práce",
 "help_text": "Telefonní číslo uvádějte ve tvaru: +420123456789",
 "max_length": 50
 },
 "mobile": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Mobil",
 "help_text": "Telefonní číslo uvádějte ve tvaru: +420123456789",
 "max_length": 50
 },
 "address_work_street": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Ulice a číslo popisné",
 "help_text": "admin-adresa_prace_ulice_help",
 "max_length": 255
 },
 "address_work_city": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Město",
 "help_text": "admin-adresa_prace_mesto_help",
 "max_length": 255
 },
 "address_work_region": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Kraj",
 "help_text": "admin-adresa_prace_region_help",
 "max_length": 255
 },
 "address_work_zipcode": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "PSČ",
 "help_text": "Poštovní směrovací číslo uvádějte ve tvaru \"000 00\" nebo \"00000\"",
 "max_length": 20
 },
 "address_work_country": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Země",
 "help_text": "admin-adresa_prace_zeme_help",
 "max_length": 255
 },
 "address_home_street": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Ulice a číslo popisné",
 "help_text": "admin-adresa_domu_ulice_help",
 "max_length": 255
 },
 "address_home_city": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Město",
 "help_text": "admin-adresa_domu_mesto_help",
 "max_length": 255
 },
 "address_home_region": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Kraj",
 "help_text": "admin-adresa_domu_region_help",
 "max_length": 255
 },
 "address_home_zipcode": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "PSČ",
 "help_text": "Pro PSČ použijte formát 000 00 nebo 00000",
 "max_length": 20
 },
 "address_home_country": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Země",
 "help_text": "admin-adresa_domu_zeme_help",
 "max_length": 255
 },
 "custom_field_1": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Uživatelské pole 1",
 "max_length": 255
 },
 "custom_field_2": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Uživatelské pole 2",
 "max_length": 255
 },
 "custom_field_3": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Uživatelské pole 3",
 "max_length": 255
 },
 "custom_field_4": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Uživatelské pole 4",
 "max_length": 255
 },
 "custom_field_5": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Uživatelské pole 5",
 "max_length": 255
 },
 "custom_field_6": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Uživatelské pole 6",
 "max_length": 255
 },
 "tags": {
 "type": "field",
 "required": false,
 "read_only": true,
 "label": "Tags",
 "child": {
 "type": "nested object",
 "required": false,
 "read_only": true,
 "children": {
 "id": {
 "type": "integer",
 "required": false,
 "read_only": true,
 "label": "ID"
 },
 "created": {
 "type": "datetime",
 "required": false,
 "read_only": true,
 "label": "Vytvořeno",
 "help_text": "admin-vytvoreno_help"
 },
 "modified": {
 "type": "datetime",
 "required": false,
 "read_only": true,
 "label": "Změněno",
 "help_text": "admin-zmeneno_help"
 },
 "name": {
 "type": "string",
 "required": true,
 "read_only": false,
 "label": "Název",
 "help_text": "admin-tags-nazev_help",
 "max_length": 255
 },
 "contacts_count": {
 "type": "integer",
 "required": false,
 "read_only": true,
 "label": "api-contact-pocet_kontaktu_stitku"
 }
 }
 }
 },
 "note": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Poznámka",
 "help_text": "admin-poznamka_help"
 },
 "main_company": {
 "type": "nested object",
 "required": false,
 "read_only": true,
 "label": "Main company",
 "children": {
 "id": {
 "type": "integer",
 "required": false,
 "read_only": true,
 "label": "ID"
 },
 "name": {
 "type": "string",
 "required": true,
 "read_only": false,
 "label": "Název firmy",
 "help_text": "ABC, a.s.",
 "max_length": 255
 }
 }
 },
 "owner": {
 "type": "field",
 "required": false,
 "read_only": false,
 "label": "Vlastník kontaktu",
 "help_text": "Vlastník kontaktu je jeden z Uživatelů uložených v Quandě."
 },
 "erp_ident_num": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Helios person number",
 "help_text": "admin-kontakt-erp_ident_num_pl_help"
 },
 "content_categories": {
 "type": "field",
 "required": false,
 "read_only": true,
 "label": "Content categories",
 "child": {
 "type": "nested object",
 "required": false,
 "read_only": true,
 "children": {
 "identifier": {
 "type": "string",
 "required": true,
 "read_only": false,
 "label": "Identifier"
 },
 "is_enabled": {
 "type": "boolean",
 "required": true,
 "read_only": false,
 "label": "Is enabled"
 },
 "timestamp": {
 "type": "datetime",
 "required": false,
 "read_only": true,
 "label": "Timestamp"
 }
 }
 }
 },
 "companies": {
 "type": "field",
 "required": false,
 "read_only": true,
 "label": "Companies",
 "child": {
 "type": "nested object",
 "required": false,
 "read_only": true,
 "children": {
 "id": {
 "type": "integer",
 "required": false,
 "read_only": true,
 "label": "ID"
 },
 "name": {
 "type": "string",
 "required": true,
 "read_only": false,
 "label": "Název firmy",
 "help_text": "ABC, a.s.",
 "max_length": 255
 }
 }
 }
 },
 "purposes_of_processing": {
 "type": "field",
 "required": false,
 "read_only": true,
 "label": "Purposes of processing",
 "child": {
 "type": "nested object",
 "required": false,
 "read_only": true,
 "children": {
 "purpose_of_processing": {
 "type": "integer",
 "required": true,
 "read_only": false,
 "label": "Purpose of processing"
 },
 "status": {
 "type": "choice",
 "required": false,
 "read_only": false,
 "label": "Status zasílání e-mailů",
 "help_text": "admin-contact-ucel_zpracovani-status_help",
 "choices": [
 {
 "value": 1,
 "display_name": "Zasílat e-maily"
 },
 {
 "value": 2,
 "display_name": "Nemůžeme zasílat (odhlášení)"
 },
 {
 "value": 3,
 "display_name": "Nemůžeme zasílat (vypršel souhlas)"
 },
 {
 "value": 4,
 "display_name": "Nemůžeme zasílat (čekáme na souhlas)"
 }
 ]
 },
 "status_valid_to": {
 "type": "datetime",
 "required": false,
 "read_only": false,
 "label": "Platnost do",
 "help_text": "admin-contact-ucel_zpracovani-status_platny_do_help"
 },
 "status_paused_to": {
 "type": "datetime",
 "required": false,
 "read_only": false,
 "label": "Admin-contact-ucel_zpracovani-status_pozastaven_do",
 "help_text": "admin-contact-ucel_zpracovani-status_pozastaven_do_help"
 },
 "legal_title_legitimate_interest_of_administrator": {
 "type": "boolean",
 "required": false,
 "read_only": false,
 "label": "Oprávněný zájem správce"
 },
 "legal_title_legitimate_fulfilling_legal_obligation": {
 "type": "boolean",
 "required": false,
 "read_only": false,
 "label": "Plnění právní povinnosti"
 },
 "legal_title_contract_fulfilling_or_negotiation_of_conclusion": {
 "type": "boolean",
 "required": false,
 "read_only": false,
 "label": "Plnění smlouvy nebo jednání o jejím uzavření"
 },
 "legal_title_legitimate_consent_to_processing_personal_data": {
 "type": "boolean",
 "required": false,
 "read_only": false,
 "label": "Souhlas se zpracováním osobních údajů"
 },
 "legal_title_public_interest": {
 "type": "boolean",
 "required": false,
 "read_only": false,
 "label": "Veřejný zájem"
 },
 "legal_title_legitimate_vital_interest": {
 "type": "boolean",
 "required": false,
 "read_only": false,
 "label": "Životně důležitý zájem"
 }
 }
 }
 }
 }
 }
}
Response
200 OK Content-Type: application/json
{
 "contact_id": 9649947
}

Response when the number of contacts set by the plan is exceeded.

200 OK Content-Type: application/json
{
 "contact_id": 9667546,
 "warnings": [
 {
 "code": "001",
 "message": "Došlo k překročení limitu počtu kontaktů nastaveným aktuálním tarifem zákazníka. Kontaktujte prosím Quanda support."
 }
 ]
}

Response when limited by the customer's plan.

400 Bad Request Content-Type: application/json
{
 "errors": [
 {
 "code": "501",
 "message": "Tarif zákazníka omezil přidávání nových kontaktů. Kontaktujte prosím Quanda support."
 }
 ]
}

Contact detail

GEThttps://api.onquanda.com/api/contact/contacts/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDContact ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "id": 9649947,
 "created": "2021-12-15T12:35:40.833792",
 "modified": "2024-06-20T11:19:20.794174",
 "email": "petr.novak@quanda.cz",
 "title_before": "Ing.",
 "first_name": "Petr",
 "second_name": "",
 "last_name": "Novák",
 "title_after": "",
 "salutation": "",
 "salutation_last_name": "Vážený pane Nováku",
 "salutation_first_name": "Dobrý den, Petře",
 "salutation_last_name_vocative": "Nováku",
 "salutation_first_name_vocative": "Petře",
 "email_2": "",
 "email_3": "",
 "sex": "male",
 "source": "Veletrh",
 "recommended_by": "",
 "birthdate": "1981-05-06",
 "anniversary": "2023-06-29",
 "occupation": "Ekonom",
 "double_opt_in_status": 0,
 "www": "",
 "phone_home": "+420602123456",
 "phone_work": "+420987654321",
 "mobile": "+42603123456",
 "address_work_street": "Jarní 58",
 "address_work_city": "Praha 9",
 "address_work_region": "",
 "address_work_zipcode": "19000",
 "address_work_country": "CZ",
 "address_home_street": "",
 "address_home_city": "",
 "address_home_region": "",
 "address_home_zipcode": "",
 "address_home_country": "",
 "custom_field_1": "ForArch2019",
 "custom_field_2": "Odesílatel: Quanda International s.r.o., Národních hrdinů 44, Dolní Počernice, 190 12 Praha 9",
 "custom_field_3": "Obchodní sdělení.",
 "custom_field_4": "ahoj",
 "custom_field_5": "",
 "custom_field_6": "",
 "tags": [
 {
 "id": 66875,
 "created": "2023-10-31T16:48:03.105883",
 "modified": "2023-10-31T16:48:03.105909",
 "name": "OP356",
 "contacts_count": 5
 },
 {
 "id": 66874,
 "created": "2023-10-31T16:48:03.095789",
 "modified": "2023-10-31T16:48:03.095820",
 "name": "Praha",
 "contacts_count": 5
 },
 {
 "id": 45385,
 "created": "2018-03-23T09:05:09.057457",
 "modified": "2018-03-23T09:05:09.057490",
 "name": "VIP",
 "contacts_count": 109
 }
 ],
 "note": "Zasílat e-maily maximálně 2x týdně",
 "main_company": {
 "id": 1419671,
 "name": "ABC a.s."
 },
 "owner": null,
 "erp_ident_num": "A124578",
 "content_categories": [
 {
 "identifier": "d0mtuf",
 "is_enabled": true,
 "timestamp": null
 }
 ],
 "companies": [
 {
 "id": 1419671,
 "name": "ABC a.s."
 }
 ],
 "purposes_of_processing": [
 {
 "purpose_of_processing": 1,
 "status": 3,
 "status_valid_to": "2020-12-23T14:30:00",
 "status_paused_to": null,
 "legal_title_legitimate_interest_of_administrator": true,
 "legal_title_legitimate_fulfilling_legal_obligation": false,
 "legal_title_contract_fulfilling_or_negotiation_of_conclusion": false,
 "legal_title_legitimate_consent_to_processing_personal_data": false,
 "legal_title_public_interest": false,
 "legal_title_legitimate_vital_interest": false
 }
 ]
}

Response when the contact ID does not exist.

404 Not Found Content-Type: application/json
{
 "detail": "Nenalezeno."
}

Edit contact

To edit a contact, you can use the same endpoint as for creating a new contact. As needed, you can configure the overwriting of data and tags using the parameters:

"overwrite": true / false, "contact_tags_overwrite": true / false, "overwrite_companies": true / false, "company_tags_overwrite": true / false,

More about using these parameters can be found in the section Bulk import of contacts, tags and companies / Overwrite settings.

Delete contact

When a contact is deleted, all records linked to the contact are deleted. Deleting a contact thus removes the sending status (unsubscribe), and the contact is removed from all lists, email campaign statistics, survey respondent, form respondent.

Deleting contacts is disabled by default. If you need to enable deleting contacts, contact our support at email: support@onquanda.com.

DELETEhttps://api.onquanda.com/api/contact/contacts/{id}/
TypeRequiredRead_onlyDescriptionMax-length
idintegerfalsetrueID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
204 No content Content-Type: application/json

Tags

List of tags

GEThttps://api.onquanda.com/api/contact/contacttags/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "count": 151,
 "next": "https://quanda.onquanda.com/api/contact/contacttags/?page=2",
 "previous": null,
 "results": [
 {
 "id": 31765,
 "name": "Praha",
 "contacts_count": 27
 },
 {
 "id": 25868,
 "name": "VIP",
 "contacts_count": 76
 },
 {
 "id": 25959,
 "name": "Dodavatel",
 "contacts_count": 69
 }
 ]
}

New tag

POSThttps://api.onquanda.com/api/contact/contacttags/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
namestringtrueTag name, at most 255 characters
{
 "name": "Název štítku"
}

Schema

{
"name": {
 "type": "string",
 "required": true,
 "read_only": false,
 "label": "Název",
 "max_length": 255
 }
}
Response
200 OK Content-Type: application/json
{
 "id": 66828,
 "created": "2022-06-08T19:45:29.669932",
 "modified": "2022-06-08T19:45:29.670005",
 "name": "Název štítku",
 "contacts_count": 0
}
400 Bad Request Content-Type: application/json
[
    "Štítek, který chcete vytvořit již existuje"
]

Tag detail

GEThttps://api.onquanda.com/api/contact/contacttags/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDTag ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "id": 66828,
 "created": "2022-06-08T19:45:29.669932",
 "modified": "2022-06-08T19:45:29.670005",
 "name": "Název štítku",
 "contacts_count": 488
}
404 Not Found Content-Type: application/json
{
 "detail": "Nenalezeno."
}

Edit tag

PUThttps://api.onquanda.com/api/contact/contacttags/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDTag ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
namestringtrueTag name, at most 255 characters
{
 "name": "Nový název štítku",
}

Schema

{
"name": {
 "type": "string",
 "required": true,
 "read_only": false,
 "label": "Název",
 "max_length": 255
 }
}
Response
200 OK Content-Type: application/json
{
 "id": 31765,
 "created": "2017-05-16T16:21:41.402352",
 "modified": "2023-04-24T17:10:34.970675",
 "name": "Nový název štítku",
 "contacts_count": 100
}
400 Bad Request Content-Type: application/json
[
    "Štítek, který chcete vytvořit již existuje"
]

Delete tag

DELETEhttps://api.onquanda.com/api/contact/contacttags/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDTag ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
204 No Content Content-Type: application/json

Bulk import of contacts, tags and companies

Corresponds to the frontend feature "Bulk import of contacts". Ids are not used. The call is synchronous, and therefore the limit on the number of records is capped at 1 000 per call.

Basic description

Contacts

  • Only the Contact object with a defined email attribute is required.
  • When a "null" value is entered into an optional field, this value is interpreted as clearing the field. For boolean fields, a null value is considered invalid.
  • If the ContactPurposeOfProcessing object is provided, it must have all attributes specified.

Contact tags

  • To import tags for the imported contact, use "Contact.tags", which is entered in a format where individual tags are separated by a comma. E.g.: VIP,štítek 27,muž.
  • Tags starting with the pair of characters *# are not processed but are evaluated as a special code. Such tags cannot be inserted using this method.

Companies

  • If the Company object is provided, it must have the name attribute specified, which is required.

Overwrite settings

ParameterTypeDefaultDescriptionNote
overwritebooleanfalseContact data overwrite settingIf the value is set to "false", a contact that already exists in Quanda will be skipped without any update. If the value is set to "true", the original data will be overwritten with new data. If the contact does not exist, it will be created.
overwrite_companiesbooleanfalseCompany data overwrite settingIf the value is set to "false", a company that already exists in Quanda will be skipped without any update. If the value is set to "true", the original data will be overwritten with new data. If the company does not exist, it will be created.
contact_tags_overwritebooleantrueContact tags overwrite settingIf the value is set to "false", new tags are only added to the existing ones. If the value is set to "true", the contact's original tags will be deleted and replaced with new ones. Non-existent tags are created automatically.
company_tags_overwritebooleantrueCompany tags overwrite settingIf the value is set to "false", new tags are only added to the existing ones. If the value is set to "true", the company's original tags will be deleted and replaced with new ones. Non-existent tags are created automatically.

Bulk import of contacts

PUThttps://api.onquanda.com/api/contact/importer/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
overwritebooleanfalseOverwriting of contact data, default false
contact_tags_overwritebooleanfalseOverwriting of contact tags, default true
overwrite_companiesbooleanfalseOverwriting of company data, default false
company_tags_overwritebooleanfalseOverwriting of company tags, default true
dataarray of objectstrueRecords to import, at most 1,000 per call
ContactobjecttrueContact. Only the email attribute is required
Contact.emailemailtrueEmail (main email)
Contact.sourcestringfalseSource
Contact.title_beforestringfalseTitle
Contact.first_namestringfalseFirst name
Contact.last_namestringfalseLast name
Contact.sexchoicefalseSex
Contact.birthdatedatefalseDate of birth
Contact.occupationstringfalseJob title
Contact.phone_homestringfalseHome phone
Contact.phone_workstringfalseWork phone
Contact.mobilestringfalseMobile
Contact.address_work_streetstringfalseWork address: street
Contact.address_work_citystringfalseWork address: city
Contact.address_work_zipcodestringfalseWork address: postal code
Contact.address_work_countrystringfalseWork address: country
Contact.main_companystringfalseName of the main company
Contact.notestringfalseNote
Contact.custom_field_1stringfalseCustom field 1
Contact.erp_ident_numstringfalseContact identifier in the ERP
Contact.salutation_last_namestringfalseFull salutation with the last name
Contact.salutation_first_namestringfalseFull salutation with the first name
Contact.salutation_last_name_vocativestringfalseLast name in the vocative
Contact.salutation_first_name_vocativestringfalseFirst name in the vocative
Contact.tagsstringfalseContact tags separated by commas
ContactPurposeOfProcessingobjectfalsePurpose of processing. If provided, it must have all attributes
ContactPurposeOfProcessing.purpose_of_processingfieldtruePurpose of processing personal data
ContactPurposeOfProcessing.status_valid_todatetimefalseValid until
ContactPurposeOfProcessing.statuschoicefalseEmail sending status
ContactPurposeOfProcessing.legal_title_legitimate_interest_of_administratorbooleanfalseLegitimate interest of the controller
CompanyobjectfalseCompany of the contact. If provided, it must have the name attribute
Company.namestringtrueCompany name
Company.tagsstringfalseCompany tags separated by commas

The table lists the fields from the example. All fields of the Contact object are listed in the Schema below, overwriting is described in Overwrite settings and the fields of the Company and ContactPurposeOfProcessing objects in Bulk import of contacts, tags and companies.

{
 "overwrite": true,
 "contact_tags_overwrite": true,
 "overwrite_companies": true,
 "company_tags_overwrite": true,
 "data": [
 {
 "Contact": {
 "email": "petr.novak@quanda.cz",
 "source": "Veletrh",
 "title_before": "Ing.",
 "first_name": "Petr",
 "last_name": "Novák",
 "sex": "Muž",
 "birthdate": "06.05.1981",
 "occupation": "Ekonom",
 "phone_home": "+420602123456",
 "phone_work": "+420987654321",
 "mobile": "+42603123456",
 "address_work_street": "Jarní 58",
 "address_work_city": "Praha 9",
 "address_work_zipcode": "19000",
 "address_work_country": "CZ",
 "main_company": "ABC a.s.",
 "note": "Zasílat e-maily maximálně 2x týdně",
 "custom_field_1": "ForArch2019",
 "erp_ident_num": "A124578",
 "salutation_last_name": "Vážený pane Nováku",
 "salutation_first_name": "Dobrý den, Petře",
 "salutation_last_name_vocative": "Nováku",
 "salutation_first_name_vocative": "Petře",
 "tags": "VIP,Praha,OP356"
 },
 "ContactPurposeOfProcessing": {
 "purpose_of_processing": 1,
 "status_valid_to": "23.12.2020 14:30:00",
 "status": 1,
 "legal_title_legitimate_interest_of_administrator": true
 },
 "Company": {
 "name": "ABC a.s.",
 "tags": "Dodavatel,Praha"
 }
 }
 ]
}

Schema

{
 "name": "Contact List",
 "description": "",
 "renders": [
 "application/json",
 "text/html"
 ],
 "parses": [
 "application/json",
 "application/x-www-form-urlencoded",
 "multipart/form-data"
 ],
 "actions": {
 "PUT": {
 "id": {
 "type": "integer",
 "required": false,
 "read_only": true,
 "label": "ID"
 },
 "created": {
 "type": "datetime",
 "required": false,
 "read_only": true,
 "label": "Vytvořeno",
 "help_text": "admin-vytvoreno_help"
 },
 "modified": {
 "type": "datetime",
 "required": false,
 "read_only": true,
 "label": "Změněno",
 "help_text": "admin-zmeneno_help"
 },
 "email": {
 "type": "email",
 "required": true,
 "read_only": false,
 "label": "E-mail (hlavní e-mail)",
 "help_text": "admin-email_help",
 "max_length": 150
 },
 "title_before": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Titul",
 "help_text": "admin-titul_help",
 "max_length": 255
 },
 "first_name": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Jméno",
 "help_text": "admin-jmeno_help",
 "max_length": 255
 },
 "second_name": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Prostřední jméno",
 "help_text": "admin-prostredni_jmeno_help",
 "max_length": 255
 },
 "last_name": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Příjmení",
 "help_text": "admin-prijmeni_help",
 "max_length": 255
 },
 "title_after": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Titul za",
 "help_text": "admin-titul_za_help",
 "max_length": 255
 },
 "salutation": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Oslovení",
 "help_text": "admin-osloveni_help",
 "max_length": 255
 },
 "salutation_last_name": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Kompletní oslovení s příjmením",
 "help_text": "admin-osloveni_komplet_prijmeni_help",
 "max_length": 255
 },
 "salutation_first_name": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Kompletní oslovení se jménem",
 "help_text": "admin-osloveni_komplet_krestni_help",
 "max_length": 255
 },
 "salutation_last_name_vocative": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Příjmení v 5 pádu",
 "help_text": "admin-osloveni_prijmeni_5_pad_help",
 "max_length": 255
 },
 "salutation_first_name_vocative": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Jméno v 5 pádu",
 "help_text": "admin-osloveni_krestni_5_pad_help",
 "max_length": 255
 },
 "email_2": {
 "type": "email",
 "required": false,
 "read_only": false,
 "label": "E-mail 2",
 "help_text": "admin-email_2_help",
 "max_length": 150
 },
 "email_3": {
 "type": "email",
 "required": false,
 "read_only": false,
 "label": "E-mail 3",
 "help_text": "admin-email_3_help",
 "max_length": 150
 },
 "sex": {
 "type": "choice",
 "required": false,
 "read_only": false,
 "label": "Pohlaví",
 "help_text": "admin-pohlavi_help",
 "choices": [
 {
 "value": "male",
 "display_name": "Muž"
 },
 {
 "value": "female",
 "display_name": "Žena"
 }
 ]
 },
 "source": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Zdroj",
 "help_text": "admin-zdroj_help",
 "max_length": 255
 },
 "recommended_by": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Doporučeno kým",
 "help_text": "admin-doporuceno_help",
 "max_length": 255
 },
 "birthdate": {
 "type": "date",
 "required": false,
 "read_only": false,
 "label": "Datum narození",
 "help_text": "admin-datum_narozeni_help"
 },
 "anniversary": {
 "type": "date",
 "required": false,
 "read_only": false,
 "label": "Datum svátku / výročí",
 "help_text": "Datum svátku nebo výročí uvádějte ve tvaru 1.1.2021 nebo 01.01.2021"
 },
 "occupation": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Funkce",
 "help_text": "admin-funkce_help",
 "max_length": 255
 },
 "double_opt_in_status": {
 "type": "choice",
 "required": false,
 "read_only": false,
 "label": "?",
 "help_text": "admin-contact-double_opt_in_status_help",
 "choices": [
 {
 "value": 0,
 "display_name": "?"
 },
 {
 "value": 1,
 "display_name": "?"
 },
 {
 "value": 2,
 "display_name": "?"
 }
 ]
 },
 "www": {
 "type": "url",
 "required": false,
 "read_only": false,
 "label": "Www adresa",
 "help_text": "Vyplňte adresu Vašeho webu",
 "max_length": 255
 },
 "phone_home": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Telefon domů",
 "help_text": "Telefonní číslo uvádějte ve tvaru: +420123456789",
 "max_length": 50
 },
 "phone_work": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Telefon práce",
 "help_text": "Telefonní číslo uvádějte ve tvaru: +420123456789",
 "max_length": 50
 },
 "mobile": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Mobil",
 "help_text": "Telefonní číslo uvádějte ve tvaru: +420123456789",
 "max_length": 50
 },
 "address_work_street": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Ulice a číslo popisné",
 "help_text": "admin-adresa_prace_ulice_help",
 "max_length": 255
 },
 "address_work_city": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Město",
 "help_text": "admin-adresa_prace_mesto_help",
 "max_length": 255
 },
 "address_work_region": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Kraj",
 "help_text": "admin-adresa_prace_region_help",
 "max_length": 255
 },
 "address_work_zipcode": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "PSČ",
 "help_text": "Poštovní směrovací číslo uvádějte ve tvaru \"000 00\" nebo \"00000\"",
 "max_length": 20
 },
 "address_work_country": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Země",
 "help_text": "admin-adresa_prace_zeme_help",
 "max_length": 255
 },
 "address_home_street": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Ulice a číslo popisné",
 "help_text": "admin-adresa_domu_ulice_help",
 "max_length": 255
 },
 "address_home_city": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Město",
 "help_text": "admin-adresa_domu_mesto_help",
 "max_length": 255
 },
 "address_home_region": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Kraj",
 "help_text": "admin-adresa_domu_region_help",
 "max_length": 255
 },
 "address_home_zipcode": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "PSČ",
 "help_text": "Pro PSČ použijte formát 000 00 nebo 00000",
 "max_length": 20
 },
 "address_home_country": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Země",
 "help_text": "admin-adresa_domu_zeme_help",
 "max_length": 255
 },
 "custom_field_1": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Uživatelské pole 1",
 "max_length": 255
 },
 "custom_field_2": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Uživatelské pole 2",
 "max_length": 255
 },
 "custom_field_3": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Uživatelské pole 3",
 "max_length": 255
 },
 "custom_field_4": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Uživatelské pole 4",
 "max_length": 255
 },
 "custom_field_5": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Uživatelské pole 5",
 "max_length": 255
 },
 "custom_field_6": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Uživatelské pole 6",
 "max_length": 255
 },
 "tags": {
 "type": "field",
 "required": false,
 "read_only": true,
 "label": "Tags",
 "child": {
 "type": "nested object",
 "required": false,
 "read_only": true,
 "children": {
 "id": {
 "type": "integer",
 "required": false,
 "read_only": true,
 "label": "ID"
 },
 "created": {
 "type": "datetime",
 "required": false,
 "read_only": true,
 "label": "Vytvořeno",
 "help_text": "admin-vytvoreno_help"
 },
 "modified": {
 "type": "datetime",
 "required": false,
 "read_only": true,
 "label": "Změněno",
 "help_text": "admin-zmeneno_help"
 },
 "name": {
 "type": "string",
 "required": true,
 "read_only": false,
 "label": "Název",
 "help_text": "admin-tags-nazev_help",
 "max_length": 255
 },
 "contacts_count": {
 "type": "integer",
 "required": false,
 "read_only": true,
 "label": "api-contact-pocet_kontaktu_stitku"
 }
 }
 }
 },
 "note": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Poznámka",
 "help_text": "admin-poznamka_help"
 },
 "main_company": {
 "type": "nested object",
 "required": false,
 "read_only": true,
 "label": "Main company",
 "children": {
 "id": {
 "type": "integer",
 "required": false,
 "read_only": true,
 "label": "ID"
 },
 "name": {
 "type": "string",
 "required": true,
 "read_only": false,
 "label": "Název firmy",
 "help_text": "ABC, a.s.",
 "max_length": 255
 }
 }
 },
 "owner": {
 "type": "field",
 "required": false,
 "read_only": false,
 "label": "Vlastník kontaktu",
 "help_text": "Vlastník kontaktu je jeden z Uživatelů uložených v Quandě."
 },
 "erp_ident_num": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Helios person number",
 "help_text": "admin-kontakt-erp_ident_num_pl_help"
 },
 "content_categories": {
 "type": "field",
 "required": false,
 "read_only": true,
 "label": "Content categories",
 "child": {
 "type": "nested object",
 "required": false,
 "read_only": true,
 "children": {
 "identifier": {
 "type": "string",
 "required": true,
 "read_only": false,
 "label": "Identifier"
 },
 "is_enabled": {
 "type": "boolean",
 "required": true,
 "read_only": false,
 "label": "Is enabled"
 },
 "timestamp": {
 "type": "datetime",
 "required": false,
 "read_only": true,
 "label": "Timestamp"
 }
 }
 }
 },
 "Company": {
 "name": {
 "type": "string",
 "required": false,
 "label": "Název firmy",
 "max_length": 255
 },
 "ident_num": {
 "type": "string",
 "required": false,
 "label": "IČ",
 "max_length": 30
 },
 "vat_num": {
 "type": "string",
 "required": false,
 "label": "DIČ",
 "max_length": 30
 },
 "business_branch": {
 "type": "string",
 "required": false,
 "label": "Obor podnikání",
 "max_length": 255
 },
 "category": {
 "type": "string",
 "required": false,
 "label": "Kategorie",
 "max_length": 255
 },
 "employees": {
 "type": "integer",
 "required": false,
 "label": "Počet zaměstnanců"
 },
 "bank_account_number": {
 "type": "string",
 "required": false,
 "label": "Číslo účtu",
 "max_length": 255
 },
 "bank": {
 "type": "string",
 "required": false,
 "label": "Banka",
 "max_length": 255
 },
 "custom_field_1": {
 "type": "string",
 "required": false,
 "label": "Uživatelské pole 1",
 "max_length": 255
 },
 "custom_field_2": {
 "type": "string",
 "required": false,
 "label": "Uživatelské pole 2",
 "max_length": 255
 },
 "custom_field_3": {
 "type": "string",
 "required": false,
 "label": "Uživatelské pole 3",
 "max_length": 255
 },
 "address_headquarter_street": {
 "type": "string",
 "required": false,
 "label": "Ulice a číslo popisné",
 "max_length": 255
 },
 "address_headquarter_city": {
 "type": "string",
 "required": false,
 "label": "Město",
 "max_length": 255
 },
 "address_headquarter_region": {
 "type": "string",
 "required": false,
 "label": "Kraj",
 "max_length": 255
 },
 "address_headquarter_zipcode": {
 "type": "string",
 "required": false,
 "label": "PSČ",
 "max_length": 20
 },
 "address_headquarter_country": {
 "type": "string",
 "required": false,
 "label": "Země",
 "max_length": 255
 },
 "address_postal_street": {
 "type": "string",
 "required": false,
 "label": "Ulice a číslo popisné",
 "max_length": 255
 },
 "address_postal_city": {
 "type": "string",
 "required": false,
 "label": "Město",
 "max_length": 255
 },
 "address_postal_region": {
 "type": "string",
 "required": false,
 "label": "Kraj",
 "max_length": 255
 },
 "address_postal_zipcode": {
 "type": "string",
 "required": false,
 "label": "PSČ",
 "max_length": 20
 },
 "address_postal_country": {
 "type": "string",
 "required": false,
 "label": "Země",
 "max_length": 255
 },
 "email": {
 "type": "email",
 "required": false,
 "label": "E-mail",
 "max_length": 255
 },
 "www": {
 "type": "string",
"required": false,
 "label": "www adresa",
 "max_length": 255
 },
 "note": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Poznámka"
 }
 },
 "purposes_of_processing": {
 "type": "field",
 "required": false,
 "read_only": true,
 "label": "Purposes of processing",
 "child": {
 "type": "nested object",
 "required": false,
 "read_only": true,
 "children": {
 "purpose_of_processing": {
 "type": "integer",
 "required": true,
 "read_only": false,
 "label": "Purpose of processing"
 },
 "status": {
 "type": "choice",
 "required": false,
 "read_only": false,
 "label": "Status zasílání e-mailů",
 "help_text": "admin-contact-ucel_zpracovani-status_help",
 "choices": [
 {
 "value": 1,
 "display_name": "Zasílat e-maily"
 },
 {
 "value": 2,
 "display_name": "Nemůžeme zasílat (odhlášení)"
 },
 {
 "value": 3,
 "display_name": "Nemůžeme zasílat (vypršel souhlas)"
 },
 {
 "value": 4,
 "display_name": "Nemůžeme zasílat (čekáme na souhlas)"
 }
 ]
 },
 "status_valid_to": {
 "type": "datetime",
 "required": false,
 "read_only": false,
 "label": "Platnost do",
 "help_text": "admin-contact-ucel_zpracovani-status_platny_do_help"
 },
 "status_paused_to": {
 "type": "datetime",
 "required": false,
 "read_only": false,
 "label": "Admin-contact-ucel_zpracovani-status_pozastaven_do",
 "help_text": "admin-contact-ucel_zpracovani-status_pozastaven_do_help"
 },
 "legal_title_legitimate_interest_of_administrator": {
 "type": "boolean",
 "required": false,
 "read_only": false,
 "label": "Oprávněný zájem správce"
 },
 "legal_title_legitimate_fulfilling_legal_obligation": {
 "type": "boolean",
 "required": false,
 "read_only": false,
 "label": "Plnění právní povinnosti"
 },
 "legal_title_contract_fulfilling_or_negotiation_of_conclusion": {
 "type": "boolean",
 "required": false,
 "read_only": false,
 "label": "Plnění smlouvy nebo jednání o jejím uzavření"
 },
 "legal_title_legitimate_consent_to_processing_personal_data": {
 "type": "boolean",
 "required": false,
 "read_only": false,
 "label": "Souhlas se zpracováním osobních údajů"
 },
 "legal_title_public_interest": {
 "type": "boolean",
 "required": false,
 "read_only": false,
 "label": "Veřejný zájem"
 },
 "legal_title_legitimate_vital_interest": {
 "type": "boolean",
 "required": false,
 "read_only": false,
 "label": "Životně důležitý zájem"
 }
 }
 }
 }
 }
 }
}
Response
200 OK Content-Type: application/json
{
 "stats": {
 "total": 1,
 "invalid": 0,
 "skipped": 0,
 "updated": 0,
 "created": 1
 },
 "stats_v2": {
 "total": 1,
 "total_contacts": 1,
 "total_companies": 1,
 "created_contacts": 1,
 "created_companies": 0,
 "invalid": 0,
 "updated_contacts": 0,
 "updated_companies": 1,
 "skipped": 0,
 "ignored_contact_tags": 0,
 "ignored_company_tags": 0,
 "ignored_contactpurposeofprocessing_status": 0
 },
 "invalid_list": [],
 "warnings": [],
 "errors": []
}

Response when the number of contacts set by the plan is exceeded.

200 OK Content-Type: application/json
{
 "stats": {
 "total": 1,
 "invalid": 0,
 "skipped": 0,
 "updated": 0,
 "created": 1
 },
 "stats_v2": {
 "total": 1,
 "total_contacts": 1,
 "total_companies": 1,
 "created_contacts": 1,
 "created_companies": 1,
 "invalid": 0,
 "updated_contacts": 0,
 "updated_companies": 0,
 "skipped": 0,
 "ignored_contact_tags": 0,
 "ignored_company_tags": 0,
 "ignored_contactpurposeofprocessing_status": 0
 },
 "invalid_list": [],
 "warnings": [
 {
 "code": "001",
 "message": "Došlo k překročení limitu počtu kontaktů nastaveným aktuálním tarifem zákazníka. Kontaktujte prosím Quanda support."
 }
 ],
 "errors": []
}

Response when the import is limited by the customer's plan.

200 OK Content-Type: application/json
{
 "stats": {
 "total": 0,
 "invalid": 0,
 "skipped": 0,
 "updated": 0,
 "created": 0
 },
 "stats_v2": {
 "total": 0,
 "total_contacts": 0,
 "total_companies": 0,
 "created_contacts": 0,
 "created_companies": 0,
 "invalid": 0,
 "updated_contacts": 0,
 "updated_companies": 0,
 "skipped": 0,
 "ignored_contact_tags": 0,
 "ignored_company_tags": 0,
 "ignored_contactpurposeofprocessing_status": 0
 },
 "invalid_list": [],
 "warnings": [],
 "errors": [
 {
 "code": "501",
 "message": "Tarif zákazníka omezil přidávání nových kontaktů. Kontaktujte prosím Quanda support."
 }
 ]
}

Response when the number of allowed records per call is exceeded.

413 Request Entity Too Large

The maximum number of allowed records per call has been exceeded.

Importing multiple objects for a single Contact object

Multiple Company objects and multiple ContactPurposeOfProcessing objects can be assigned to a single Contact object. This can be achieved in two ways.

Method 1

To a single Contact object we assign at most one Company object or one ContactPurposeOfProcessing object, or both at the same time.

Company

FieldExampleNote
Company{“name”: ...}The Company field contains the name field; a company with the name name is created or updated according to the other provided fields and the contact is assigned to this company.
Company{}For a new contact no company is created and it is not assigned to any; for an existing one no change regarding the company is made.
CompanynullFor a new contact no company is created and it is not assigned to any; for an existing one the contact's assignment to a company is removed.
Company is not provided at allSame as in the case of Company: {}

ContactPurposeOfProcessing

FieldExampleNote
ContactPurposeOfProcessing{“purpose_of_processing”: … }A processing purpose with the name purpose_of_processing is created for the given customer's account if it does not yet exist, and is then assigned to the given contact. If the given contact was already assigned to this processing purpose, the attributes of this assignment are updated.
ContactPurposeOfProcessing{}No processing purpose is created on the given customer's account. No processing purpose is assigned to the given contact either. If the ContactPurposeOfProcessing field is not provided, or is empty and a new contact is being created, then the default processing purpose for the given customer account is assigned to this contact and the status value of this processing purpose is set to 1 ("Send emails").
ContactPurposeOfProcessing is not provided at allSame as in the case of ContactPurposeOfProcessing: {}. If the ContactPurposeOfProcessing field is not provided, or is empty and a new contact is being created, then the default processing purpose for the given customer account is assigned to this contact and the status value of this processing purpose is set to 1 ("Send emails").

Method 2

To a single Contact object we assign multiple Company or ContactPurposeOfProcessing objects.

Companies

FieldExampleNote
Companies[ { “name”: … }, {“name”: … }, … ]The Companies field contains a list of companies defined in the same way as in method 1. If the overwrite_companies parameter is set to True, the contact is first removed from all current companies and then added to the companies in the Companies field. If one of the companies in the Companies field does not exist, it will be created and the contact will be selected as the main contact of that company. If the overwrite_companies parameter is set to False, the contact is added to Companies. If the contact already appears in one of the Companies, that Company is ignored. If one of the companies in the Companies field does not exist, it will be created and the contact will be selected as the main contact of that company.
Companies[]Depending on the overwrite_companies parameter, the contact is removed from all companies in which it appears, or the number of companies in which the contact appears remains unchanged (see the point above).
The Companies field is not provided at allSame as in the case of Companies: [].

ContactPurposesOfProcessing

FieldExampleNote
ContactPurposesOfProcessing[ { “purpose_of_processing”: … }, {“purpose_of_processing”: … }, … ]The ContactPurposesOfProcessing field contains a list of the contact's processing purposes defined in the same way as in method 1.
ContactPurposesOfProcessing[]Same as in the case of ContactPurposeOfProcessing: [] in method 1.
The ContactPurposesOfProcessing field is not provided at allSame as in the case of ContactPurposesOfProcessing: [].

Both methods are mutually exclusive, so a state where the data is in the format of both methods is undefined.

Data for "ContactPurposeOfProcessing"

FieldTypeRequiredDescriptionNote
"purpose_of_processing"fieldtruePurpose of processing personal dataSee values in "Used enumerations" below.
"status"choicefalseEmail sending statusSee values in "Used enumerations" below.
"contactpurposeofprocessing_status_ignore"booleanfalseDo not overwrite the saved sending statusAllows you to keep and not overwrite the currently saved sending status even when overwriting of existing contacts is set to "overwrite".
"status_valid_to"datetimefalseValid untilDate and time
"legal_title_legitimate_interest_of_administrator"booleanfalseLegitimate interest of the controllerLegal title
"legal_title_legitimate_fulfilling_legal_obligation"booleanfalseFulfilment of a legal obligationLegal title
"legal_title_contract_fulfilling_or_negotiation_of_conclusion"booleanfalsePerformance of a contract or negotiation of its conclusionLegal title
"legal_title_legitimate_consent_to_processing_personal_data"booleanfalseConsent to the processing of personal dataLegal title
"legal_title_public_interest"booleanfalsePublic interestLegal title
"legal_title_legitimate_vital_interest"booleanfalseVital interestLegal title

Data for "Company"

FieldTypeRequiredDescriptionMax-length
"name"stringtrueCompany name255
"ident_num"stringfalseCompany ID number30
"vat_num"stringfalseVAT number30
"business_branch"stringfalseField of business255
"category"stringfalseCategory255
"employees"integerfalseNumber of employees255
"bank_account_number"stringfalseAccount number255
"bank"stringfalseBank255
"custom_field_1"stringfalseCustom field 1255
"custom_field_2"stringfalseCustom field 2255
"custom_field_3"stringfalseCustom field 3255
"address_headquarter_street"stringfalseStreet and house number255
"address_headquarter_city"stringfalseCity255
"address_headquarter_region"stringfalseRegion255
"address_headquarter_zipcode"stringfalsePostal code255
"address_headquarter_country"stringfalseCountry255
"address_postal_street"stringfalseStreet and house number255
"address_postal_city"stringfalseCity255
"address_postal_region"stringfalseRegion255
"address_postal_zipcode"stringfalsePostal code255
"address_postal_country"stringfalseCountry255
"email"emailfalseE-mail255
"www"stringfalsewww address255
"tags"stringfalseCompany tags255
"assigned_customeruser"emailfalseAssigned to user"dependencies"

Email campaigns

List of email campaigns

GEThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_type}/
URI ParametersTypeRequiredNote
campaign_typeintegerfalseEmail campaign type: 10 = Simple email campaign 20 = Logic email campaign 30 = Email series 40 = Birthday email campaign 50 = Email campaign for anniversaries and holidays 60 = Email campaign with A/B testing 70 = Transactional email

List items differ by campaign type. The list of email series (campaign_type 30) additionally returns "activated_at" (start time; null until the series has been started) and "contents_count" (number of active emails) for each item; the "sent_datetime" and "newsletters" fields stay. The list of transactional campaigns (campaign_type 70) additionally returns "contents_count". The list of simple campaigns and the list without a type are unchanged.

Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "count": 3,
 "next": null,
 "previous": null,
 "results": [
 {
 "id": 43491,
 "name": "10 most common mistakes to avoid in the implementation of the online survey",
 "state": 20,
 "activated_at": "2017-12-02T17:10:08.643985",
 "email_subject": "10 most common mistakes to avoid in the implementation of the online survey"
 },
 {
 "id": 43492,
 "name": "10 nejčastějších chyb při realizaci online průzkumů",
 "state": 20,
 "activated_at": "2017-12-02T17:10:08.643985",
 "email_subject": "10 nejčastějších chyb při realizaci online průzkumů"
 },
 {
 "id": 43500,
 "name": "10 způsobů, jak připravit obsah",
 "state": 20,
 "activated_at": "2017-12-02T17:10:08.643985",
 "email_subject": "10 způsobů, jak připravit kvalitní a hodnotný obsah Vašeho e-mailu"
 }
 ]
}

List of emails

GEThttps://api.onquanda.com/api/newsletter/newsletters/?campaing_name=Novinky&content_name=1 díl&content_email_subject=Květnové novinky z naší firmy
Query parameters
ParametersDescriptionNote
campaing_namestring example: campaing_name=NovinkyFiltering the list of sent email campaigns by campaign name
content_namestring example: content_name=1 dílFiltering the list of sent email campaigns by email name
content_email_subjectstring content_email_subject=Květnové novinky z naší firmyFiltering the list of sent email campaigns by email subject
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "count": 491,
 "next": "https://quanda.onquanda.com/api/newsletter/newsletters/?page=2",
 "previous": null,
 "results": [
 {
 "id": 99716,
 "campaign_name": "Seriál pro nové zákazníky",
 "content_name": "Díl 3.",
 "content_email_subject": "Odešlete jednoduchou e-mailovou kampaň."
 },
 {
 "id": 99941,
 "campaign_name": "Seriál pro nové zákazníky",
 "content_name": "Díl 5.",
 "content_email_subject": "Vytvořte a odešlete dotazník."
 },
 {
 "id": 160983,
 "campaign_name": "Novinky z naší firmy",
 "content_name": "",
 "content_email_subject": "Květnové novinky"
 }
]
}

Email campaigns that do not use the "Email name" have an empty value in the "content_name" part.

List of campaigns sent after a specific date and time

Allows you to limit the list of sent emails only to those that were sent after a specific date and time. It is a string that matches the ISO 8601 date and time format.

GET/api/newsletter/newsletters/?sent_after=2020-7-1T09:00:00.00
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
    "count": 6,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 160710,
            "campaign_name": "test Q",
            "content_name": "",
            "content_email_subject": "nové API"
        },
        {
            "id": 103347,
            "campaign_name": "2. Díl - Trial: Naimportujte své kontakty do Quandy.",
            "content_name": "2. Díl",
            "content_email_subject": "Naimportujte své kontakty do Quandy."
        },
        {
            "id": 103432,
            "campaign_name": "5. Díl - Trial: Vytvořte a odešlete dotazník.",
            "content_name": "5. Díl",
            "content_email_subject": "Vytvořte a odešlete dotazník."
        },
        {
            "id": 159474,
            "campaign_name": "Přání k svátkům 2",
            "content_name": "Přání k svátku",
            "content_email_subject": "{{ contact_salutation_first_name_vocative }}, všechno nejlepší k dnešnímu svátku!"
        },
        {
            "id": 103351,
            "campaign_name": "4. Díl - Trial: Vytvořte formulář a umístěte ho na svůj web.",
            "content_name": "4. Díl",
            "content_email_subject": "Vytvořte formulář a umístěte ho na svůj web."
        },
        {
            "id": 81103,
            "campaign_name": "Příklady předmětů z blogu",
            "content_name": "60+ příkladů na předmět emailu",
            "content_email_subject": "60+ příkladů pro poutavý předmět emailu"
        }
    ]
}

Campaign detail and statistics

GEThttps://api.onquanda.com/api/newsletter/newsletters/{id}/
URI ParametersTypeRequiredNote
idintegerfalsenewsletters/{id} = Campaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "id": 159995,
 "created": "2024-07-02T10:14:18.768038",
 "modified": "2024-07-02T13:00:37.096525",
 "started": "2024-07-02T13:00:36.211077",
 "resolve_in": 7,
 "resolved": false,
 "position": 0,
 "sent_recipients_count": 1,
 "delivered_recipients_count": 1,
 "not_delivered_recipients_count": 0,
 "recipients_tracked_count_sum": 2,
 "tracked_recipients_count": 1,
 "delivered_not_tracked_recipients_count": 0,
 "recipients_clicked_links_count": 0,
 "unsubscribed_recipients_count": 0,
 "url_stats": "https://quanda.onquanda.com/newsletter/campaign/141076/stats_detail/159995/",
 "label": "Novinky z naší firmy",
 "last_sent": "2024-07-02T13:00:36.775487"
}
AttributeTypeDescription
idintegerID
createddatetimeCreated
modifieddatetimeModified
starteddatetimeStart time
resolve_inintegerEvaluate in
resolvedbooleanEvaluated
positionintegerOrder
sent_recipients_countintegerNumber of sent emails
delivered_recipients_countintegerNumber of delivered emails
not_delivered_recipients_countintegerNumber of undelivered emails
recipients_tracked_count_sumintegerTotal number of opened emails
tracked_recipients_countintegerNumber of uniquely opened emails
delivered_not_tracked_recipients_countintegerNumber of unopened emails
recipients_clicked_links_countintegerNumber of unique clicks
unsubscribed_recipients_countintegerNumber of unsubscribed recipients
url_statsurlURL address for viewing statistics
labelstringCampaign name, Email name

Email content

GEThttps://api.onquanda.com/api/newsletter/newsletters/{id}/content/
URI ParametersTypeRequiredNote
idintegertruenewsletters/{id} = Campaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "id": 17128,
 "created": "2015-08-26T14:19:21.509501",
 "modified": "2018-09-25T13:43:59.052404",
 "name": "Název e-mailu č.1",
 "email_subject": "Plánová údržba systému Quanda",
 "email_body_html": "<html><head><style>\n@media only screen {\n html {\n min-height: 100%;\n background: #f3f3f3;\n }\n}\n@media only screen and (max-width: 596px) {\n .small-float-center {\n margin: 0 auto !important;\n float: none !important;\n text-align: center !important;\n }\n\n .small-text-center {\n text-align: center !important;\n }\n\n .small-text-left {\n text-align: left !important;\n }\n\n .small-text-right {\n text-align: right !important;\n }\n}\n@media only screen and (max-width: 596px) {\n .hide-for-large {\n display: block !important;\n width: auto !important;\n overflow: visible !important;\n max-height: none !important;\n font-size: inherit !important;\n line-height: inherit !important;\n }\n}\n@media only screen and (max-width: 596px) {\n .hide-for-mobile {\n mso-hide: all;\n display: none !important;\n width: 0 !important;\n overflow: hidden !important;\n max-height: 0 !important;\n font-size: 0 !important;\n line-height: 0 !important;\n }\n\n .fullwidth-mobile {\n width: 100% !important;\n }\n\n .fullwidth-mobile img {\n max-width: none !important;\n }\n}\n@media only screen and (max-width: 596px) {\n table.body table.container .hide-for-large,\ntable.body table.container .row.hide-for-large {\n display: table !important;\n width: 100% !important;\n }\n}\n@media only screen and (max-width: 596px) {\n table.body table.container .callout-inner.hide-for-large {\n display: table-cell !important;\n width: 100% !important;\n }\n}\n@media only screen and (max-width: 596px) {\n table.body table.container .show-for-large {\n display: none !important;\n width: 0;\n mso-hide: all;\n overflow: hidden;\n }\n}\n@media only screen and (max-width: 596px) {\n table.body img {\n max-width: none !important;\n height: auto;\n }\n\n .special-button table {\n min-width: 200px;\n }\n\n table.body center {\n min-width: 0 !important;\n }\n\n table.body .container {\n width: 100% !important;\n }\n\n table.body .help-container {\n width: 100% !important;\n }\n\n table.body .columns,\ntable.body .column {\n height: auto !important;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n }\n\n table.body .columns .column,\ntable.body .columns .columns,\ntable.body .column .column,\ntable.body .column .columns {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n table.body .collapse .columns,\ntable.body .collapse .column {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n td.small-1,\nth.small-1 {\n display: inline-block !important;\n width: 8.33333% !important;\n }\n\n td.small-2,\nth.small-2 {\n display: inline-block !important;\n width: 16.66667% !important;\n }\n\n td.small-3,\nth.small-3 {\n display: inline-block !important;\n width: 25% !important;\n }\n\n td.small-4,\nth.small-4 {\n display: inline-block !important;\n width: 33.33333% !important;\n }\n\n td.small-5,\nth.small-5 {\n display: inline-block !important;\n width: 41.66667% !important;\n }\n\n td.small-6,\nth.small-6 {\n display: inline-block !important;\n width: 50% !important;\n }\n\n td.small-7,\nth.small-7 {\n display: inline-block !important;\n width: 58.33333% !important;\n }\n\n td.small-8,\nth.small-8 {\n display: inline-block !important;\n width: 66.66667% !important;\n }\n\n td.small-9,\nth.small-9 {\n display: inline-block !important;\n width: 75% !important;\n }\n\n td.small-10,\nth.small-10 {\n display: inline-block !important;\n width: 83.33333% !important;\n }\n\n td.small-11,\nth.small-11 {\n display: inline-block !important;\n width: 91.66667% !important;\n }\n\n td.small-12,\nth.small-12 {\n display: inline-block !important;\n width: 100% !important;\n }\n\n .columns td.small-12,\n.column td.small-12,\n.columns th.small-12,\n.column th.small-12 {\n display: block !important;\n width: 100% !important;\n }\n\n table.body td.small-offset-1,\ntable.body th.small-offset-1 {\n margin-left: 8.33333% !important;\n Margin-left: 8.33333% !important;\n }\n\n table.body td.small-offset-2,\ntable.body th.small-offset-2 {\n margin-left: 16.66667% !important;\n Margin-left: 16.66667% !important;\n }\n\n table.body td.small-offset-3,\ntable.body th.small-offset-3 {\n margin-left: 25% !important;\n Margin-left: 25% !important;\n }\n\n table.body td.small-offset-4,\ntable.body th.small-offset-4 {\n margin-left: 33.33333% !important;\n Margin-left: 33.33333% !important;\n }\n\n table.body td.small-offset-5,\ntable.body th.small-offset-5 {\n margin-left: 41.66667% !important;\n Margin-left: 41.66667% !important;\n }\n\n table.body td.small-offset-6,\ntable.body th.small-offset-6 {\n margin-left: 50% !important;\n Margin-left: 50% !important;\n }\n\n table.body td.small-offset-7,\ntable.body th.small-offset-7 {\n margin-left: 58.33333% !important;\n Margin-left: 58.33333% !important;\n }\n\n table.body td.small-offset-8,\ntable.body th.small-offset-8 {\n margin-left: 66.66667% !important;\n Margin-left: 66.66667% !important;\n }\n\n table.body td.small-offset-9,\ntable.body th.small-offset-9 {\n margin-left: 75% !important;\n Margin-left: 75% !important;\n }\n\n table.body td.small-offset-10,\ntable.body th.small-offset-10 {\n margin-left: 83.33333% !important;\n Margin-left: 83.33333% !important;\n }\n\n table.body td.small-offset-11,\ntable.body th.small-offset-11 {\n margin-left: 91.66667% !important;\n Margin-left: 91.66667% !important;\n }\n\n table.body table.columns td.expander,\ntable.body table.columns th.expander {\n display: none !important;\n }\n\n table.body .right-text-pad,\ntable.body .text-pad-right {\n padding-left: 10px !important;\n }\n\n table.body .left-text-pad,\ntable.body .text-pad-left {\n padding-right: 10px !important;\n }\n\n table.menu {\n width: 100% !important;\n }\n\n table.menu td,\ntable.menu th {\n width: auto !important;\n display: inline-block !important;\n }\n\n table.menu.vertical td,\ntable.menu.vertical th,\ntable.menu.small-vertical td,\ntable.menu.small-vertical th {\n display: block !important;\n }\n\n table.menu[align=\"center\"] {\n width: auto !important;\n }\n\n table.button.small-expand,\ntable.button.small-expanded {\n width: 100% !important;\n }\n\n table.button.small-expand table,\ntable.button.small-expanded table {\n width: 100%;\n }\n\n table.button.small-expand table a,\ntable.button.small-expanded table a {\n text-align: center !important;\n width: 100% !important;\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n table.button.small-expand center,\ntable.button.small-expanded center {\n min-width: 0;\n }\n}\n</style><link href=\"https://fonts.googleapis.com/css?family=Anton|Lobster|Montserrat:400,700|Oswald:400,700|Playfair+Display:400,700|Raleway:400,700|Roboto+Condensed:400,700|Roboto:400,500,700&subset=latin-ext\" rel=\"stylesheet\"><!--[if gte mso 7]><xml>\n <o:OfficeDocumentSettings>\n <o:AllowPNG/>\n <o:PixelsPerInch>96</o:PixelsPerInch>\n </o:OfficeDocumentSettings>\n</xml><![endif]--><!--[if gte mso 9]>\n <style>\n li {\n text-indent: -1em; /* Normalise space between bullets and text */\n }\n </style>\n <![endif]--></link></head><body style=\"min-width: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; margin: 0; Margin: 0; padding: 0; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; mso-line-height-rule: exactly; font-size: 16px; width: 100%;\"><table class=\"body\" height=\"100%\" style=\"border-spacing: 0; border-collapse: collapse; padding: 0; vertical-align: top; text-align: left; background: #f3f3f3; height: 100%; width: 100%; mso-line-height-rule: exactly; font-size: 16px; background-color: #eeeeee;\" width=\"100%\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td align=\"center\" class=\"float-center\" style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; mso-line-height-rule: exactly; font-size: 16px; margin: 0 auto; Margin: 0 auto; float: none; text-align: center; border-collapse: collapse;\" valign=\"top\"><div class=\"hide-for-mobile\"><div><center style=\"width: 100%; min-width: 580px;\"><table align=\"center\" class=\"container float-center\" style=\"border-spacing: 0; border-collapse: collapse; padding: 0; vertical-align: top; margin: 0 auto; Margin: 0 auto; float: none; text-align: center; background-color: #eeeeee; width: 650px;\" width=\"650\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td colspan=\"3\" height=\"0\" style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; height: 0px; line-height: 0px; border-collapse: collapse;\"></td></tr><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; width: 0px; border-collapse: collapse;\" width=\"0\"></td><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; border-collapse: collapse;\"><table class=\"row\" style=\"border-spacing: 0; border-collapse: collapse; vertical-align: top; text-align: left; padding: 0; width: 100%; position: relative; display: table;\" width=\"100%\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><th class=\"large-6 small-12 last right content-exclude\" style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; text-align: right; width: 274px; padding-left: 8px; padding-right: 16px; padding: 0px;\"><table style=\"border-spacing: 0; border-collapse: collapse; padding: 0; vertical-align: top; text-align: left; width: 100%;\" width=\"100%\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td colspan=\"3\" height=\"15\" style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; height: 15px; line-height: 15px; border-collapse: collapse;\"></td></tr><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; width: 0px; border-collapse: collapse;\" width=\"0\"></td><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; border-collapse: collapse;\"><div class=\"sc-bdVaJa gzwiaj\" style=\"text-align: right; box-sizing: border-box; font-family: Roboto, helvetica, arial, sans-serif; font-size: 12px; font-weight: 400; font-style: normal; text-decoration: none; color: #000000;\">Zobrazit <a class=\"content-exclude hide-for-mobile\" href=\"{{ html_link }}\" style=\"mso-line-height-rule: exactly; text-decoration: underline; color: #000000;\">v prohlížeči</a></div></td><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; width: 0px; border-collapse: collapse;\" width=\"0\"></td></tr><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td colspan=\"3\" height=\"25\" style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; height: 25px; line-height: 25px; border-collapse: collapse;\"></td></tr></tbody></table></th></tr></tbody></table></td><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; width: 0px; border-collapse: collapse;\" width=\"0\"></td></tr></tbody></table></center></div></div><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-spacing: 0; border-collapse: collapse; padding: 0; vertical-align: top; text-align: left;\" width=\"100%\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; background-color: #eeeeee; background-repeat: no-repeat; background-size: auto; background-position: center center; background-image: url(); border-collapse: collapse;\"><div><center style=\"width: 100%; min-width: 580px;\"><table align=\"center\" class=\"container float-center\" style=\"border-spacing: 0; border-collapse: collapse; padding: 0; vertical-align: top; margin: 0 auto; Margin: 0 auto; float: none; text-align: center; width: 650px;\" width=\"650\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; background-color: #ffffff; background-repeat: no-repeat; background-size: auto; background-position: center center; background-image: url(); border-collapse: collapse;\"><table class=\"row\" style=\"border-spacing: 0; border-collapse: collapse; vertical-align: top; text-align: left; padding: 0; width: 100%; position: relative; display: table;\" width=\"100%\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: center;\"><th style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; width: 0px; padding: 0px;\" width=\"0px\"></th><th class=\"small-12 columns large-12 first last\" style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; margin: 0 auto; Margin: 0 auto; padding-left: 0px; padding-right: 0px; width: 650px;\"><table style=\"border-spacing: 0; border-collapse: collapse; padding: 0; vertical-align: top; text-align: left; width: 100%;\" width=\"100%\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><th class=\"hide-for-mobile\" style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; width: 0px; padding: 0px;\" width=\"0px\"></th><th style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; padding: 0px;\"><table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"container float-center\" style=\"border-spacing: 0; border-collapse: collapse; padding: 0; vertical-align: top; margin: 0 auto; Margin: 0 auto; float: none; text-align: center; width: 100%;\" width=\"100%\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td colspan=\"3\" height=\"25\" style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; height: 25px; line-height: 25px; border-collapse: collapse;\"></td></tr><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; width: 25px; border-collapse: collapse;\" width=\"25\"></td><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; border-collapse: collapse;\"><div class=\"sc-bwzfXH fICNhB\" color=\"#000000\" font-family=\"georgia,palatino,Times New Roman,Georgia,serif\" font-size=\"16px\" font-style=\"normal\" font-weight=\"400\" style=\"font-family: georgia, palatino, 'Times New Roman', Georgia, serif; font-size: 16px; color: #000000; font-weight: 400; font-style: normal; text-decoration: none; line-height: 24px; width: 100%;\" text-decoration=\"none\"><p style=\"Margin: 0 0 0 10px; mso-line-height-rule: exactly; margin: 0px; hyphens: none; font-family: georgia, palatino, 'Times New Roman', Georgia, serif; font-size: 16px; color: #000000; font-weight: 400; font-style: normal; text-decoration: none; line-height: 24px;\"><p style=\"margin: 0px; line-height: 24px;\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; margin: 0px;\" width=\"100%\"><tr><td><img alt=\"\" height=\"128\" src=\"http://quanda.onquanda.com/media/uploaded/27/ba/9259ce6d21d3d893b660fe451686/upgrade.png\" style=\"display: block;\" width=\"160\"/></td></tr></table></p>\n<p style=\"margin: 0px; line-height: 24px;\"><br/>{{ contact_salutation }},<br/><br/>dnes <strong>26.8. 2015 od 16:00</strong> proběhne plánovaná<strong> údržba systému Quanda</strong>. Systém bude nedostupný cca 20-30 minut.</p>\n<p style=\"margin: 0px; line-height: 24px;\">Všechny e-maily budou v pořádku odeslány a doručeny.<br/><br/></p>\n<p style=\"margin: 0px; line-height: 24px;\"><span style=\"line-height: 1.6;\">Děkujeme za pochopení.</span></p>\n<p style=\"margin: 0px; line-height: 24px;\"><span style=\"line-height: 1.6;\">V případě jakýchkoliv dotazů nás, prosím, kontaktujte na telefonu +420 603 734 514 nebo na e-mailu support@onquanda.com.<br/><br/></span></p>\n<p style=\"margin: 0px; line-height: 24px;\">Hezký den,<br/><br/><span style=\"line-height: 1.6;\">tým Quanda<br/></span></p>\n<p style=\"margin: 0px; line-height: 24px;\"><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse; mso-table-lspace: 0pt; mso-table-rspace: 0pt; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; margin: 0px;\" width=\"100%\"><tr><td><img alt=\"\" height=\"37\" src=\"http://quanda.onquanda.com/media/uploaded/4b/e9/2cf63dc0c23bd1a5d770a2e3af40/logo_quanda-2_1.png\" style=\"display: block;\" width=\"147\"/></td></tr></table></p></p></div></td><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; width: 25px; border-collapse: collapse;\" width=\"25\"></td></tr><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td colspan=\"3\" height=\"25\" style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; height: 25px; border-collapse: collapse;\"></td></tr></tbody></table></th><th class=\"hide-for-mobile\" style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; width: 0px; padding: 0px;\" width=\"0px\"></th><th class=\"expander\" style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; visibility: hidden; width: 0; padding: 0;\"></th></tr></tbody></table></th><th style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; width: 0px; padding: 0px;\" width=\"0px\"></th></tr></tbody></table></td></tr></tbody></table></center></div></td></tr></tbody></table><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-spacing: 0; border-collapse: collapse; padding: 0; vertical-align: top; text-align: left;\" width=\"100%\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; background-color: #eeeeee; background-repeat: no-repeat; background-size: auto; background-position: center center; background-image: url(); border-collapse: collapse;\"><div><center style=\"width: 100%; min-width: 580px;\"><table align=\"center\" class=\"container float-center\" style=\"border-spacing: 0; border-collapse: collapse; padding: 0; vertical-align: top; margin: 0 auto; Margin: 0 auto; float: none; text-align: center; width: 650px;\" width=\"650\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; background-color: #eeeeee; background-repeat: no-repeat; background-size: auto; background-position: center center; background-image: url(); border-collapse: collapse;\"><table class=\"row\" style=\"border-spacing: 0; border-collapse: collapse; vertical-align: top; text-align: left; padding: 0; width: 100%; position: relative; display: table;\" width=\"100%\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: center;\"><th style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; width: 0px; padding: 0px;\" width=\"0px\"></th><th class=\"small-12 columns large-12 first last\" style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; margin: 0 auto; Margin: 0 auto; padding-left: 0px; padding-right: 0px; width: 650px;\"><table style=\"border-spacing: 0; border-collapse: collapse; padding: 0; vertical-align: top; text-align: left; width: 100%;\" width=\"100%\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><th class=\"hide-for-mobile\" style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; width: 0px; padding: 0px;\" width=\"0px\"></th><th style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; padding: 0px;\"><table align=\"center\" cellpadding=\"0\" cellspacing=\"0\" class=\"container float-center\" style=\"border-spacing: 0; border-collapse: collapse; padding: 0; vertical-align: top; margin: 0 auto; Margin: 0 auto; float: none; text-align: center; width: 100%;\" width=\"100%\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td colspan=\"3\" height=\"25\" style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; height: 25px; line-height: 25px; border-collapse: collapse;\"></td></tr><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; width: 25px; border-collapse: collapse;\" width=\"25\"></td><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; border-collapse: collapse;\"><div class=\"sc-bwzfXH aEdEw\" color=\"#000000\" font-family=\"georgia,palatino,Times New Roman,Georgia,serif\" font-size=\"14px\" font-style=\"normal\" font-weight=\"400\" style=\"font-family: georgia, palatino, 'Times New Roman', Georgia, serif; font-size: 14px; color: #000000; font-weight: 400; font-style: normal; text-decoration: none; line-height: 21px; width: 100%;\" text-decoration=\"none\"><p style=\"Margin: 0 0 0 10px; mso-line-height-rule: exactly; margin: 0px; hyphens: none; font-family: georgia, palatino, 'Times New Roman', Georgia, serif; font-size: 14px; color: #000000; font-weight: 400; font-style: normal; text-decoration: none; line-height: 21px;\"><p style=\"margin: 0px; line-height: 24px;\">{{ contact_custom_field_3 }}</p>\n<p style=\"margin: 0px; line-height: 24px;\">{{ contact_custom_field_4 }}</p></p></div></td><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; width: 25px; border-collapse: collapse;\" width=\"25\"></td></tr><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td colspan=\"3\" height=\"25\" style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; height: 25px; border-collapse: collapse;\"></td></tr></tbody></table></th><th class=\"hide-for-mobile\" style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; width: 0px; padding: 0px;\" width=\"0px\"></th><th class=\"expander\" style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; visibility: hidden; width: 0; padding: 0;\"></th></tr></tbody></table></th><th style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; width: 0px; padding: 0px;\" width=\"0px\"></th></tr></tbody></table></td></tr></tbody></table></center></div></td></tr></tbody></table><div><div><center style=\"width: 100%; min-width: 580px;\"><table align=\"center\" class=\"container float-center\" style=\"border-spacing: 0; border-collapse: collapse; padding: 0; vertical-align: top; margin: 0 auto; Margin: 0 auto; float: none; text-align: center; background-color: #eeeeee; width: 650px;\" width=\"650\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; width: 0px; border-collapse: collapse;\" width=\"0\"></td><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; border-collapse: collapse;\"><table class=\"row\" style=\"border-spacing: 0; border-collapse: collapse; vertical-align: top; text-align: left; padding: 0; width: 100%; position: relative; display: table;\" width=\"100%\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><th class=\"large-12 small-12 first last center content-exclude\" style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; text-align: center; width: 564px; padding-left: 16px; padding-right: 16px; padding: 0px;\"><table style=\"border-spacing: 0; border-collapse: collapse; padding: 0; vertical-align: top; text-align: left; width: 100%;\" width=\"100%\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td colspan=\"3\" height=\"25\" style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; height: 25px; line-height: 25px; border-collapse: collapse;\"></td></tr><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; width: 0px; border-collapse: collapse;\" width=\"0\"></td><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; border-collapse: collapse;\"><div class=\"sc-bdVaJa gzwiaj\" style=\"text-align: center; box-sizing: border-box; font-family: Roboto, helvetica, arial, sans-serif; font-size: 12px; font-weight: 400; font-style: normal; text-decoration: none; color: #000000;\">Pokud nechcete dostávat další e-maily, snadno se můžete <a class=\"content-exclude\" href=\"{{ unsubscribe_link }}\" style=\"mso-line-height-rule: exactly; text-decoration: underline; color: #000000;\">odhlásit.</a></div></td><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; width: 0px; border-collapse: collapse;\" width=\"0\"></td></tr><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td colspan=\"3\" height=\"0\" style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; height: 0px; line-height: 0px; border-collapse: collapse;\"></td></tr></tbody></table></th></tr><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><th class=\"large-12 small-12 first last center content-exclude\" style=\"mso-line-height-rule: exactly; font-size: 16px; padding-top: 0; padding-bottom: 0; text-align: center; width: 564px; padding-left: 16px; padding-right: 16px; padding: 0px;\"><table style=\"border-spacing: 0; border-collapse: collapse; padding: 0; vertical-align: top; text-align: left; width: 100%;\" width=\"100%\"><tbody><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td colspan=\"3\" height=\"25\" style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; height: 25px; line-height: 25px; border-collapse: collapse;\"></td></tr><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td colspan=\"3\" height=\"15\" style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; height: 15px; line-height: 15px; border-collapse: collapse;\"></td></tr></tbody></table></th></tr></tbody></table></td><td style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; width: 0px; border-collapse: collapse;\" width=\"0\"></td></tr><tr style=\"padding: 0; vertical-align: top; text-align: left;\"><td colspan=\"3\" height=\"0\" style=\"-webkit-hyphens: auto; -moz-hyphens: auto; hyphens: auto; padding: 0; vertical-align: top; text-align: left; mso-line-height-rule: exactly; font-size: 16px; height: 0px; line-height: 0px; border-collapse: collapse;\"></td></tr></tbody></table></center></div></div></td></tr></tbody></table></body></html>",
 "email_body_plain": "Zobrazit \n{{ contact_salutation }},dnes 26.8. 2015 od 16:00\n proběhne plánovaná údržba systému Quanda\n. Systém bude nedostupný cca 20-30 minut.\nVšechny e-maily budou v pořádku odeslány a doručeny.\nDěkujeme za pochopení.\nV případě jakýchkoliv dotazů nás, prosím, kontaktujte na telefonu +420 603 734 514 nebo na e-mailu support@onquanda.com.\nHezký den,tým Quanda\n{{ contact_custom_field_3 }}\n{{ contact_custom_field_4 }}\nPokud nechcete dostávat další e-maily, snadno se můžete ",
 "email_footer": "<p>{{ contact_custom_field_3 }}</p>\r\n<p>{{ contact_custom_field_4 }}</p>",
 "is_spam": false,
 "spam_score": 0.0,
 "spam_data": "",
 "url_public_html_preview": "https://quanda.onquanda.com/newsletter/html-preview/b74e6909902edf35a1c9c5e97c769216/"
}
AttributesTypeRequiredRead_onlyDescriptionMax-length
idintegerfalsetrueID
createddatetimefalsetrueCreated
modifieddatetimefalsetrueModified
namestringtruefalseEmail name255
email_subjectstringtruefalseEmail subject
email_body_htmlstringtruefalseEmail content in HTML
email_body_plainstringtruefalseEmail content as "plain text"
email_footerstringfalsefalseEmail footer
is_spambooleanfalsetrueSPAM YES / NO
spam_scorefloatfalsetrueSpam score
spam_datastringfalsetrueDetailed report on the Spam score
url_public_html_previewurlfalsetrueURL address for email preview

Email campaign type

GEThttps://api.onquanda.com/api/newsletter/newsletters/{id}/campaign/
URI ParametersTypeRequiredNote
idintegerfalseCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "id": 17438,
 "created": "2015-09-14T13:29:32.143661",
 "modified": "2022-01-18T11:50:40.377976",
 "name": "Průzkum spokojenosti zaměstnanců 2015",
 "campaign_type": 10,
 "backward_write_to_erp_enabled": false,
 "crm_activity_metadata": "..."
}
AttributesTypeRequiredRead_onlyLabelMax-length
idintegerfalsetrueID
createddatetimefalsetrue
modifieddatetimefalsetrue
namestringtruefalse255
campaign_typechoicetruefalse
backward_write_to_erp_enabledbooleanfalsefalse
crm_activity_metadatastringfalsefalse

Limitations

The "backward_write_to_erp_enabled" and "crm_activity_metadata" attributes are returned only if the customer's plan allows it.

List of content categories

The call returns the content categories of the account in the order used in the application. Send the "identifier" value in the "content_category" field when creating and in the settings of an email series, a transactional campaign and a simple campaign. The identifier is case sensitive and the category name is not accepted instead of it.

GEThttps://api.onquanda.com/api/newsletter/content-categories/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
200 OK Content-Type: application/json
{
 "count": 2,
 "next": null,
 "previous": null,
 "results": [
 {
 "identifier": "d0mtuf",
 "name": "News",
 "position": 1
 },
 {
 "identifier": "k3x9pa",
 "name": "Offers and discounts",
 "position": 2
 }
 ]
}

The "name" field is in the language of the Accept-Language header; when the category has no name in that language, the name in the default language of the category is returned. The response is paginated like the other lists.

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

List of templates

The call returns the email templates an email can be created from: public Quanda templates and the templates of the account. Send the "id" value in the "template_id" field when creating a campaign or a new email. An email created from a template has "editor_type": "json" and its HTML cannot be changed through the API.

GEThttps://api.onquanda.com/api/newsletter/templates/
Query ParametersTypeRequiredNote
namestringfalseReturns only templates whose name contains the given text
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
200 OK Content-Type: application/json
{
 "count": 2,
 "next": null,
 "previous": null,
 "results": [
 {
 "id": 88,
 "name": "Welcome email",
 "type": "customer",
 "thumbnail_url": "https://…/template-88.jpg"
 },
 {
 "id": 12,
 "name": "Three column newsletter",
 "type": "public",
 "thumbnail_url": null
 }
 ]
}
  • "type" is "public" for a Quanda template and "customer" for a template of the account.
  • "thumbnail_url" is the address of the template preview, or null when the template has none.

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Simple email campaign

Sending in one step

Sending an email campaign in one step allows quick sending of a prepared simple email campaign. In one step, recipients are set using the provided emails or tags and the send time is entered. Before sending, the email goes through the standard content check and SPAM check. However, test emails are not sent. Therefore we recommend thoroughly testing and configuring everything in advance directly in Quanda.

The campaign send time is not a required value. If the send time is not provided, the email campaign is sent immediately.

POSThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/one-step-send/
URI ParametersTypeRequiredNote
campaign_idintegertrueSimple email campaign ID
Request (Variant selecting recipients by emails)

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
send_datetimestringfalseSend time. Without it the campaign is sent immediately
emailsarray of stringsemails or tagsEmails of the contacts the recipients are created from
{
 "send_datetime": "20250228T162480.000Z",
 "emails": ["example1@example.com", "example2@example.com"]
}

The provided emails are used to look up contacts in Quanda. If found, Recipients of the email campaign are created from the contacts.

Recipients are not created based on the provided email addresses if the provided email address:

  • does not exist (is not found among already created contacts),
  • is unsubscribed,
  • is invalid,
  • is blacklisted,
  • is not subscribed to the content category selected in the settings of the given email campaign.
Response
200 OK Content-Type: application/json
{
"not_found_emails": ["example2@example.com"]
}
Request (Variant selecting recipients by tags)

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
send_datetimestringfalseSend time. Without it the campaign is sent immediately
tagsarray of integersemails or tagsIDs of the tags used to select recipients
tags_behaviorstringwith the tags fieldand = intersection of tags, or = union of tags
{
 "send_datetime": "20250228T162480.000Z",
 "tags": [1, 2],
 "tags_behavior": "or" (nebo "and")
}
Response
200 OK Content-Type: application/json

Response when blocked by the plan.

403 Not available Content-Type: application/json
"Váš současný tarif nedovoluje vytvářet a odesílat jednoduché e-mailové kampaně pomocí API. Kontaktujte podporu na support@onquanda.com."

Response when the email campaign id is not found.

404 Not Found Content-Type: application/json
{
 "detail": "Nenalezeno."
}

Response when the selected email campaign has already been sent.

400 Bad Request Content-Type: application/json
"E-mailová kampaň již byla odeslaná a není možné ji dále upravovat ani znova odesílat."

Response when the maximum number of inserted email addresses (50 000) is exceeded.

400 Bad Request Content-Type: application/json
{
"emails": ["Byl překročen maximální počet vložených e-mailových adres (50 000) na jeden požadavek."]
}

New campaign and email content

POSThttps://api.onquanda.com/api/newsletter/campaigns/10/

The "sender_type" field is optional, the default value is 10. If "sender_id" is missing for "sender_type" 10, the call returns 400 Bad Request.

Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
namestringtrueCampaign name
content_categorystringfalseContent category identifier
languagestringtrueLanguage code, for example cs
manager_idintegertrueID of an account user, the campaign manager
assigned_customerusersarray of integersfalseIDs of users assigned to the campaign
template_idintegerexactly one of html and template_idTemplate ID
htmlstringexactly one of html and template_idEmail HTML, must be valid and contain {{ unsubscribe_link }}
email_subjectstringtrueEmail subject
sender_typeintegerfalse10 = manual sender (default), 20 = automatic
sender_idintegertrue for sender_type 10ID of a user with a verified email
custom_template_variablesobjectfalseCustom template variables as key: value
{
 "name": "Název kampaně",
 "content_category": "d0mtuf",
 "language": "cs",
 "manager_id": 708,
 "assigned_customerusers": [2847,5273],
 "template_id": 3636,
 "html": "<!DOCTYPE html><html lang=\"cs\"><head><meta charset=\"UTF-8\"><title></title></head><body><p>Pokud nechcete dostávat další e-maily, snadno můžete jejich zasílání <a href=\"{{ unsubscribe_link }}\">úplně zrušit</a>.</p></body></html>",
 "email_subject": "Předmět kampaně",
 "sender_type": 10,
 "sender_id": 493,
 "custom_template_variables": {
 "key_1": "value_1",
 "key_2": "value_2",
 "key_3": "value_3"
 }
}

Email content using a saved template or custom HTML

Quanda allows you to create email content using a template saved in your account or using custom HTML. If you want to create email content using your own template, use the "template_id" parameter in the API call, specifying the id of the template you want to use.

If you want to create email content using custom HTML, use the „html“ parameter in the API call and attach the complete HTML code of the email.

Important notice: In order to send an email using custom HTML code, it must contain the unsubscribe tag {{ unsubscribe_link }}, for example in the form:

<p style="margin:0; font-family:Arial,Helvetica,sans-serif; font-size:11px; color:#ffffff; line-height:18px; mso-line-height-rule:exactly; text-align:center;">
  Pokud už nechcete dostávat tyto e-maily, můžete
  <a href="{{ unsubscribe_link }}" style="color:#ffffff; text-decoration:underline;">zrušit jejich odběr</a>.
</p>

Custom template content defined using inserted tags

In order to insert into the chosen template, according to "template_id", the html content sent via the API request in "custom_template_variables", the template must contain the tags {{ key_1 }}, {{ key_2 }} etc. These tags are then replaced in the email template by the content sent via "value_1", "value_2" etc.

Example of a tag and value

The "key_1" in the tag {{ key_1 }} can be replaced with a custom value. Using "value_1" we then insert, for example, text into the email. The resulting format will be:

{
 "name": "Název kampaně",
 "content_category": "d0mtuf",
 "language": "cs",
 "manager_id": 708,
 "assigned_customerusers": [2847,5273],
 "template_id": 3636,
 "html": "",
 "email_subject": "Předmět kampaně",
 "sender_type": 10,
 "sender_id": 493,
 "custom_template_variables": {
 "email_body_text_1": "Text, který se vloží do e-mailu na místo uvedené značky"
 }
}

In this way you can insert into the email template:

  • texts,
  • links or parts of them,
  • images and their names.

How to proceed?

  • Create a new email.
  • Into the places in the email that should be replaced with content sent via the API, insert the appropriate tags. Name the tags as needed. For example {{ nadpis_1 }}, {{ text_1 }}, {{ url_obrazku_1 }}, {{ url_odkazu_obrazku_1 }} etc.
  • Always follow the correct tag format in the form: {{ ... }}.
  • You can format and align text tags according to the requirements for the resulting format, color and placement.
  • Save the email as a new template.
  • In the template overview, hovering over a given template reveals its ID.
  • Send an API request that will contain the individual tags (the tags in the API request must match those you have placed in the email template) and their content.
  • Send a test email manually or via the API and verify that everything displays correctly. If not, check whether the tags match the API request and are part of the email template. If you are not sure what to do, write to us at email: support@onquanda.com.

Example of an email template with tags

In the email template, set rows and columns according to the desired final format of the email. You can combine images, text, other content, system tags and your own custom tags.

Example of an email template with custom tags for API content

Response
201 Created Content-Type: application/json
{
 "id": 89432,
 "name": "Název kampaně",
 "content_category": "d0mtuf",
 "manager_id": 708,
 "language": "cs",
 "assigned_customerusers": [
 2847,
 5273
 ],
 "sender_type": 10,
 "sender_id": 493,
 "reply_to_id": null
}

Response when blocked by the plan.

403 Not available Content-Type: application/json
"Váš současný tarif nedovoluje vytvářet a odesílat jednoduché e-mailové kampaně pomocí API. Kontaktujte podporu na support@onquanda.com."

Response in case of HTML content validation error.

400 Bad Request Content-Type: application/json
"Vložený HTML kód obsahuje chyby a proto z něj není možné vytvořit validní e-mail. Zkontrolujte vložené HTML, najděte chyby a opravte je. Pokud si nevíte rady využijte pro opravu nalezení a opravu chyb například Claude Code AI."

Response when the content category id does not exist.

400 Bad Request Content-Type: application/json
"Objekt s identifier=d0mtuf neexistuje."

Response when the campaign manager id does not exist, the collaborator id does not exist, or the sender id does not exist.

400 Bad Request Content-Type: application/json
"Chybný primární klíč \"7080\" - objekt neexistuje."

Response when the email template id was not found.

400 Bad Request Content-Type: application/json
"ID e-mailové šablony nebylo nalezeno."

Response when the email campaign type id is provided incorrectly.

400 Bad Request Content-Type: application/json
"\"323\" není platnou možností."

Edit email content

The same address also edits the first email of a series and the main email of a transactional campaign, see Email series and Transactional emails.

PUThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/content/
URI ParametersTypeRequiredNote
{campaign_id}integertrue{campaign_id} = Campaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
htmlstringfalseValid HTML with {{ unsubscribe_link }}
email_subjectstringfalseSubject
{
 "html": "<!DOCTYPE html><html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:v=\"urn:schemas-microsoft-com:vml\" xmlns:o=\"urn:schemas-microsoft-com:office:office\"><head><meta charset=\"UTF-8\"><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"><meta name=\"x-apple-disable-message-reformatting\"><meta name=\"color-scheme\" content=\"light dark\"><meta name=\"supported-color-schemes\" content=\"light dark\"><title>Quanda pro neziskové organizace</title><!--[if gte mso 15]><xml><o:OfficeDocumentSettings><o:AllowPNG/><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml><![endif]--><style>:root { color-scheme: light dark; } body, table, td, a { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } table, td { mso-table-lspace: 0pt; mso-table-rspace: 0pt; } img { -ms-interpolation-mode: bicubic; border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; }...",
 "email_subject": "Nový předmět kampaně"
}

Important notice:

In order to send an email using custom HTML code, it must contain the unsubscribe tag {{ unsubscribe_link }}, for example in the form:

<p style="margin:0; font-family:Arial,Helvetica,sans-serif; font-size:11px; color:#ffffff; line-height:18px; mso-line-height-rule:exactly; text-align:center;">
 Pokud už nechcete dostávat tyto e-maily, můžete
 <a href="{{ unsubscribe_link }}" style="color:#ffffff; text-decoration:underline;">zrušit jejich odběr</a>.
</p>
Response
200 OK Content-Type: application/json

Response in case of HTML content validation error.

400 Bad Request Content-Type: application/json
"Vložený HTML kód obsahuje chyby a proto z něj není možné vytvořit validní e-mail. Zkontrolujte vložené HTML, najděte chyby a opravte je. Pokud si nevíte rady využijte pro opravu nalezení a opravu chyb například Claude Code AI."

Response when blocked by the plan.

403 Not available Content-Type: application/json
"Váš současný tarif nedovoluje vytvářet a odesílat jednoduché e-mailové kampaně pomocí API. Kontaktujte podporu na support@onquanda.com."

Response when the campaign is of a type other than 10, 30 and 70.

404 Not Found Content-Type: application/json
"Nenalezeno."

Response when the specified campaign has already been sent.

400 Bad Request Content-Type: application/json
"E-mailová kampaň již byla odeslána. Není možné ji upravovat."

Recipients

POSThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/add-contacts/

Recipients can be selected using enumerated email addresses or using tags. The two methods cannot be combined with each other.

Request (Variant selecting recipients by emails)

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
emailsarray of stringsemails or tagsEmails of the contacts the recipients are created from
{
 "emails": ["example1@example.com", "example2@example.com"]
}

The provided emails are used to look up contacts in Quanda. If found, Recipients of the email campaign are created from the contacts.

Recipients are not created based on the provided email addresses if the provided email address:

  • does not exist (is not found among already created contacts),
  • is unsubscribed,
  • is invalid,
  • is blacklisted,
  • is not subscribed to the content category selected in the settings of the given email campaign.
Response
200 OK Content-Type: application/json
{
"not_found_emails": ["example2@example.com"]
}
Request (Variant selecting recipients by tags)

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
tagsarray of integersemails or tagsIDs of the tags used to select recipients
tags_behaviorstringwith the tags fieldand = intersection of tags, or = union of tags
{
 "tags": [1, 2],
 "tags_behavior": "or" (nebo "and")
}
Response
200 OK Content-Type: application/json

Response when blocked by the plan.

403 Not available Content-Type: application/json
"Váš současný tarif nedovoluje vytvářet a odesílat jednoduché e-mailové kampaně pomocí API. Kontaktujte podporu na support@onquanda.com."

Response when the email campaign id is not found.

404 Not Found Content-Type: application/json
{
 "detail": "Nenalezeno."
}

Response when an incorrect email campaign type is selected.

400 Bad Request Content-Type: application/json
"Přidávání příjemců pomocí e-mailových adres nebo štíků je podporováno pouze pro jednouché e-mailové kamapně. Zvolené id kampaně odpovídá jinému typu e-mailové kampaně."

Response when the selected email campaign has already been sent.

400 Bad Request Content-Type: application/json
"Do této e-mailové kampaně není možné přidat příjemce. E-mailová kampaň již byla odeslaná a není možné ji dále upravovat."

Response when the maximum number of inserted email addresses (50 000) per request is exceeded.

400 Bad Request Content-Type: application/json
{
"emails": ["Byl překročen maximální počet vložených e-mailových adres (50 000) na jeden požadavek."]
}

Sending test emails

For an email series and a transactional campaign the call also has the fields "strategy" and "content_ids", see Sending test emails for a series.

POSThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/send-test/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
emailsarray of stringstrueAddresses the test email is sent to
{
"emails": ["example1@example.com", "example2@example.com"]
}
Response
200 OK Content-Type: application/json

Response when blocked by the plan.

403 Not available Content-Type: application/json
"Váš současný tarif nedovoluje vytvářet a odesílat jednoduché e-mailové kampaně pomocí API. Kontaktujte podporu na support@onquanda.com."

Response when the total limit for the number of sent test emails is exceeded.

403 Not available Content-Type: application/json
"Váš limit pro počet odeslaných testovacích e-mailů byl překročen. Kontaktujte podporu na support@onquanda.com."

Response when the specified email campaign was not found.

404 Not Found Content-Type: application/json

Response when the format of the email address to which the test email should be sent is incorrect.

400 Bad Request Content-Type: application/json
{
 "emails": [
 "Vložte platnou e-mailovou adresu."
 ]
}

Response when the limit for the number of entered email addresses to which the test email should be sent is exceeded.

400 Bad Request Content-Type: application/json
"Byl překročen maximální počet (3) zadaných e-mailových adres pro odeslání testovacího e-mailu."

Response when the email did not pass the content check.

400 Bad Request Content-Type: application/json
{
 "Nepovolená slova nebo slovní spojení": [
 "Moneta"
 ],
 "Nepovolené domény nebo url adresy": []
}

Response when the email campaign has no recipients selected.

400 Bad Request Content-Type: application/json
"Testovací e-mail není možné odeslat. E-mailová kampaň nemá vybrané žádné příjemce."

Sending the campaign

POSThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/send/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
send_datetimestringfalseSend time
{
"send_datetime": "20250228T162480.000Z"
}
Response
200 OK Content-Type: application/json

Response when blocked by the plan.

403 Not available Content-Type: application/json
"Váš současný tarif nedovoluje vytvářet a odesílat jednoduché e-mailové kampaně pomocí API. Kontaktujte podporu na support@onquanda.com."

Response when the email campaign id is not found.

404 Not Found Content-Type: application/json
{
 "detail": "Nenalezeno."
}

Response when the selected email campaign has already been sent.

400 Bad Request Content-Type: application/json
"E-mailová kampaň již byla odeslaná a není možné ji dále upravovat ani znova odesílat."

Email series

An email series (campaign type 30) is a sequence of emails that contacts with the selected tags receive one after another, in the sending order and with a set number of days between them. The calls for a series follow the same logic as the calls for a simple email campaign: you create the series together with its first email, add more emails, send yourself a test email and activate the series.

A series created through the API is a regular campaign. You can keep editing it in the app, and a series created in the app can be edited through the API. To see which calls are allowed in which campaign status, go to What is allowed in each campaign status.

The addresses use {campaign_id} = campaign ID and {content_id} = email ID. The email ID is returned when you create a campaign, add an email or list the emails.

An email created or changed through the API gets its thumbnail in the application automatically. This makes a write call a few seconds longer.

The shape of error responses and the list of all codes are in Error responses and codes. The errors a particular call returns are in the Response part of each endpoint.

New series and first email

One call creates the series together with its first email. Save "id" from the response (the campaign_id for all further calls) and "content_id" (the ID of the first email). The series is created in the Under construction status and nothing is sent until you activate it.

POSThttps://api.onquanda.com/api/newsletter/campaigns/30/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
namestringtrueCampaign name
manager_idintegertrueID of an account user, the campaign manager
sender_typeintegerfalse10 = manual sender (default), 20 = automatic
sender_idintegertrue for sender_type 10ID of a user with a verified email
reply_to_idintegerfalseID of the user for replies
languagestringtrueLanguage code, for example cs
content_categorystringfalseContent category identifier from the list of content categories, for example d0mtuf; case sensitive, the category name is not accepted
assigned_customerusersarray of integersfalseIDs of users assigned to the campaign
email_subjectstringtrueSubject of the first email
email_namestringfalseInternal name of the first email; the default is the subject
htmlstringexactly one of html and template_idEmail HTML, must be valid and contain {{ unsubscribe_link }}
template_idintegerexactly one of html and template_idTemplate ID
custom_template_variablesobjectfalseCustom variables; the key is a string, the value a string or a number; a key must not be a reserved Quanda tag name
contact_tagsarray of integersfalseTag IDs; the series is sent to contacts with these tags
periodintegerfalseNumber of days between emails, 1 to 60; can be set later, on activation
move_from_last_to_firstbooleanfalseAfter the last email the contact starts again from the first one

Example with HTML:

{
 "name": "Welcome series",
 "manager_id": 12,
 "sender_type": 10,
 "sender_id": 12,
 "reply_to_id": 14,
 "language": "en",
 "content_category": "d0mtuf",
 "assigned_customerusers": [12, 14],
 "contact_tags": [345],
 "period": 3,
 "move_from_last_to_first": false,
 "email_subject": "Welcome",
 "email_name": "Day 1",
 "html": "<!DOCTYPE html><html>… <a href=\"{{ unsubscribe_link }}\">unsubscribe</a> …</html>",
 "custom_template_variables": {"discount": "10 %", "year": 2026}
}

Example with a template:

{
 "name": "Welcome series",
 "manager_id": 12,
 "sender_type": 10,
 "sender_id": 12,
 "reply_to_id": 14,
 "language": "en",
 "content_category": "d0mtuf",
 "assigned_customerusers": [12, 14],
 "contact_tags": [345],
 "period": 3,
 "move_from_last_to_first": false,
 "email_subject": "Welcome",
 "email_name": "Day 1",
 "template_id": 88,
 "custom_template_variables": {"discount": "10 %", "year": 2026}
}

An email created from "html" has "editor_type": "html" and its HTML can still be changed through the API. An email created from "template_id" is edited in the editor of the app (drag and drop) and its HTML cannot be changed through the API, see Editor type.

Response
201 Created Content-Type: application/json
{
 "id": 4711,
 "name": "Welcome series",
 "content_category": "d0mtuf",
 "manager_id": 12,
 "language": "en",
 "assigned_customerusers": [12, 14],
 "sender_type": 10,
 "sender_id": 12,
 "reply_to_id": 14,
 "content_id": 9001,
 "contact_tags": [345],
 "period": 3,
 "move_from_last_to_first": false
}

Response when the request contains a field the call does not accept (a typo, a field of the other campaign type or a read-only field). Nothing is saved.

400 Bad Request Content-Type: application/json
{
 "id": ["This field is not accepted by this request."],
 "codes": {"id": ["unknown_field"]}
}

Response when a required field is missing or a field value is invalid (codes required, invalid, null, blank, invalid_choice, does_not_exist, max_length). Example: a "manager_id" that does not exist.

400 Bad Request Content-Type: application/json
{
 "manager_id": ["Invalid pk \"7080\" - object does not exist."],
 "codes": {"manager_id": ["does_not_exist"]}
}

Response when a tag in "contact_tags" does not exist.

400 Bad Request Content-Type: application/json
{
 "contact_tags": ["The tag 999 does not exist."],
 "codes": {"contact_tags": ["tag_does_not_exist"]}
}

Response when "sender_type" is 10 (manually chosen sender) and "sender_id" is missing.

400 Bad Request Content-Type: application/json
{
 "non_field_errors": ["The sender_id field is required for a manually chosen sender."],
 "codes": {"non_field_errors": ["sender_id_is_required"]}
}

Response when the sender does not have a verified email.

400 Bad Request Content-Type: application/json
{
 "non_field_errors": ["The sender does not have a verified email."],
 "codes": {"non_field_errors": ["sender_is_not_verified"]}
}

Response when the sender domain does not have a valid DNS setup.

400 Bad Request Content-Type: application/json
{
 "non_field_errors": ["The sender domain does not have a valid DNS setup."],
 "codes": {"non_field_errors": ["sender_dns_is_not_valid"]}
}

Response when the request has neither "html" nor "template_id", or has both.

400 Bad Request Content-Type: application/json
{
 "non_field_errors": ["Provide exactly one of template_id and html."],
 "codes": {"non_field_errors": ["template_id_xor_html_required"]}
}

Response when the template in "template_id" is unknown.

400 Bad Request Content-Type: application/json
{
 "template_id": ["The email template ID was not found."],
 "codes": {"template_id": ["template_not_found"]}
}

Response when the {{ unsubscribe_link }} tag is missing in the HTML. It is checked first.

400 Bad Request Content-Type: application/json
{
 "html": ["The HTML must contain the {{ unsubscribe_link }} tag."],
 "codes": {"html": ["html_missing_unsubscribe_link"]}
}

Response when the HTML is not valid.

400 Bad Request Content-Type: application/json
{
 "html": ["The inserted HTML code contains errors, so a valid email cannot be created from it. Check the inserted HTML, find the errors and fix them. If you are not sure, use for example Claude Code AI to find and fix them."],
 "codes": {"html": ["html_is_not_valid"]}
}

Response when "custom_template_variables" is not an object (for example a list or a text).

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The custom_template_variables field must be an object of key: value pairs."],
 "codes": {"custom_template_variables": ["custom_template_variables_must_be_an_object"]}
}

Response when a variable key is not a string.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The keys of custom_template_variables must be strings."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_must_be_string"]}
}

Response when a variable key is a reserved Quanda tag name (for example contact_first_name). The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The key contact_first_name is a reserved Quanda tag and cannot be used."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_is_reserved"]}
}

Response when a variable value is neither a string nor a number. The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The value of the key product must be a text or a number."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_value_must_be_string_int_or_float"]}
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the plan does not allow another series.

403 Forbidden Content-Type: application/json
{
 "detail": "Your plan does not allow you to create another e-mail series.",
 "code": "automatic_campaign_count_add_restriction"
}

The first email of a series is created in the DRAFT state if your plan offers email states. Otherwise it is created in the DONE state. Email states are listed in the email campaign code lists.

Whether the account offers email states is told by the "content_states_available" field in the series settings. Without states every email is created as DONE: the "state" field with the value DONE is accepted, any other value returns 400 at the "state" field with the code content_states_are_not_available and the other fields of the request are not saved. On such a plan an email of a running series cannot be switched off by changing its state; the series has to be paused.

Series settings detail

The call returns the settings, the status of the series and the list of emails with their IDs. It is a good first call when you only know the campaign_id. To change the settings, use the Update series settings call.

GEThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/settings/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
200 OK Content-Type: application/json
{
 "id": 4711,
 "name": "Welcome series",
 "campaign_type": 30,
 "state": 30,
 "activated_at": null,
 "manager_id": 12,
 "language": "en",
 "content_category": null,
 "assigned_customerusers": [],
 "sender_type": 10,
 "sender_id": 12,
 "reply_to_id": null,
 "main_content_id": 9001,
 "content_states_available": true,
 "contents": [
 {
 "id": 9001,
 "newsletter_id": 7701,
 "name": "Welcome",
 "email_subject": "Welcome",
 "position": 0,
 "state": "DONE",
 "editor_type": "html",
 "is_main": true,
 "last_update_at": "2026-11-11T10:00:00",
 "version_of": null
 }
 ],
 "contact_tags": [345],
 "period": 3,
 "move_from_last_to_first": false,
 "planned_start_at": null,
 "next_dispatch": null,
 "reschedule_required": false
}
  • "activated_at" is the date and time the series started; null until the series has been started for the first time.
  • "planned_start_at" is the planned start saved by the Update series settings call; after the first start it is null and the start time is in "activated_at".
  • "content_states_available" with the value true means the series and the plan offer email states. With false every email is DONE and the "state" field accepts only DONE.
  • "next_dispatch" is the planned time of the next sending.
  • "reschedule_required" set to true means that the paused series can only be started again with the activate call with a new date and period.
  • "main_content_id" is the ID of the email targeted by the shortcut PUT campaigns/{campaign_id}/content/. For a series it is the email that is currently first in the sending order. The value changes after the order is changed or the first email is deleted.
  • "is_main" set to true marks this same email in the "contents" list.

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Update series settings

The call changes the settings of a series in the Under construction and Paused statuses. It changes only the fields you send. You know the campaign_id from the response of creating the series.

PUThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/settings/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
namestringfalseCampaign name; cannot be changed after the first start of the campaign (409)
manager_idintegerfalseID of an account user, the campaign manager; cannot be changed after the first start of the campaign (409)
languagestringfalseLanguage code, for example cs; cannot be changed after the first start of the campaign (409)
content_categorystringfalseContent category identifier from the list of content categories, for example d0mtuf; case sensitive, the category name is not accepted
assigned_customerusersarray of integersfalseIDs of users assigned to the campaign
sender_typeintegerfalse10 = manual sender, 20 = automatic
sender_idintegerfalseID of a user with a verified email
reply_to_idintegerfalseID of the user for replies
contact_tagsarray of integersfalseTag IDs; the series is sent to contacts with these tags
periodintegerfalseNumber of days between emails, 1 to 60; cannot be changed after the first start of the campaign (409)
planned_start_atdate and timefalsePlanned start of the series, a whole hour, today or later, for example 2027-12-01T09:00:00; null clears the value. It is only saved and prefilled in the application, the series is not started. Cannot be changed after the first start (409)
move_from_last_to_firstbooleanfalseAfter the last email the contact starts again from the first one
confirm_audience_changebooleanfalseConfirms a change of the tags of a started series in which contacts are already progressing; all contacts then start the series from the first email
{
 "name": "Welcome series 2026",
 "manager_id": 12,
 "language": "en",
 "content_category": "d0mtuf",
 "assigned_customerusers": [12, 14],
 "sender_type": 10,
 "sender_id": 12,
 "reply_to_id": 14,
 "contact_tags": [345, 346],
 "period": 7,
 "planned_start_at": "2027-12-01T09:00:00",
 "move_from_last_to_first": true,
 "confirm_audience_change": true
}

The example shows all fields. You only need to send the ones you are changing. The response has the same shape as for the GET call.

The "name", "manager_id", "language" and "period" fields can be changed only until the campaign is started for the first time. Once the campaign has run, a call with a different name, manager, language or period returns 409, even in the Paused status. The other fields of a paused campaign can be changed.

The "planned_start_at" field only saves the start date: the series stays in the Under construction status and nothing is sent. The date is prefilled in the distribution form in the application. Start the series with the separate activate call with the "start_at" and "period" fields. After the first start a call with the "planned_start_at" field returns 409 with the code planned_start_only_before_first_start.

Response
200 OK Content-Type: application/json
{
 "id": 4711,
 "name": "Welcome series 2026",
 "campaign_type": 30,
 "state": 30,
 "activated_at": null,
 "manager_id": 12,
 "language": "en",
 "content_category": "d0mtuf",
 "assigned_customerusers": [12, 14],
 "sender_type": 10,
 "sender_id": 12,
 "reply_to_id": 14,
 "main_content_id": 9001,
 "content_states_available": true,
 "contents": [
 {
  "id": 9001,
  "newsletter_id": 7701,
  "name": "Welcome",
  "email_subject": "Welcome",
  "position": 0,
  "state": "DONE",
  "editor_type": "html",
  "is_main": true,
  "last_update_at": "2026-11-11T10:00:00",
  "version_of": null
 }
 ],
 "contact_tags": [345, 346],
 "period": 7,
 "move_from_last_to_first": true,
 "planned_start_at": null,
 "next_dispatch": null,
 "reschedule_required": false
}
  • The settings can only be changed in the Under construction and Paused statuses.
  • Once the campaign has been started for the first time, "name", "manager_id", "language" and "period" cannot be changed, not even while the campaign is paused. The call returns 409.
  • Changing "contact_tags" of a started series in which contacts are already progressing requires "confirm_audience_change": true. All contacts then start the series from the first email. Without the confirmation the call returns 409.

Response when the request contains a field the call does not accept (a typo, a field of the other campaign type or a read-only field). Nothing is saved.

400 Bad Request Content-Type: application/json
{
 "id": ["This field is not accepted by this request."],
 "codes": {"id": ["unknown_field"]}
}

Response when a required field is missing or a field value is invalid (codes required, invalid, null, blank, invalid_choice, does_not_exist, max_length). Example: a value of "period" that is not allowed.

400 Bad Request Content-Type: application/json
{
 "period": ["\"9\" is not a valid choice."],
 "codes": {"period": ["invalid_choice"]}
}

Response when a tag in "contact_tags" does not exist.

400 Bad Request Content-Type: application/json
{
 "contact_tags": ["The tag 999 does not exist."],
 "codes": {"contact_tags": ["tag_does_not_exist"]}
}

Response when "sender_type" is 10 (manually chosen sender) and the campaign has no "sender_id".

400 Bad Request Content-Type: application/json
{
 "detail": "The sender_id field is required for a manually chosen sender.",
 "code": "sender_id_is_required"
}

Response when the sender does not have a verified email.

400 Bad Request Content-Type: application/json
{
 "detail": "The sender does not have a verified email.",
 "code": "sender_is_not_verified"
}

Response when "planned_start_at" is not a whole hour.

400 Bad Request Content-Type: application/json
{
 "detail": "The start time must be a whole hour.",
 "code": "start_at_must_be_a_whole_hour"
}

Response when "planned_start_at" is in the past.

400 Bad Request Content-Type: application/json
{
 "detail": "The start date must be today or later.",
 "code": "start_at_must_be_today_or_later"
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is in progress. Pause it first.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is in progress. Pause it first.",
 "code": "campaign_is_in_progress_pause_it_first"
}

Response when the "name", "manager_id" or "language" field of a campaign that has already been started is changed. The field name is in the error text.

409 Conflict Content-Type: application/json
{
 "detail": "The field name cannot be changed after the campaign has started.",
 "code": "field_cannot_be_changed_after_start"
}

Response when "period" of a series that has already been started is changed. The period changes only through activate after a missed dispatch.

409 Conflict Content-Type: application/json
{
 "detail": "After the start the period can be changed only by a new activation after a missed dispatch.",
 "code": "period_can_be_changed_only_by_new_activation"
}

Response when "planned_start_at" is sent for a series that has already been started.

409 Conflict Content-Type: application/json
{
 "detail": "The planned start can be saved only before the first start. After that the date changes only through activate.",
 "code": "planned_start_only_before_first_start"
}

Response when changing the tags of a started series without the confirm_audience_change confirmation.

409 Conflict Content-Type: application/json
{
 "detail": "Changing the tags returns all contacts to the start of the series. Confirm it with confirm_audience_change.",
 "code": "audience_change_resets_contact_positions_confirm_it"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Delete series

The call deletes the series including its emails. Only a series in the Under construction or Paused status can be deleted; pause a running series first. A deleted series disappears from the lists and further calls to it return 404. The deletion cannot be undone through the API. You know the campaign_id from the response of creating the series.

DELETEhttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/settings/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
204 No Content Content-Type: application/json

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is in progress. Pause it first.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is in progress. Pause it first.",
 "code": "campaign_is_in_progress_pause_it_first"
}

Response when the campaign or one of its emails is sent by an automation.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign or one of its emails is used in an automation. Remove it from the automation first.",
 "code": "campaign_is_used_in_automation"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

List of series emails

The call returns all emails of the series in the sending order. Use it to find the content_id of each email, its state and its editor type. The list does not contain the fields "html", "custom_template_variables", "tags_to_add" and "tags_to_remove". Those are returned by the email detail.

GEThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/content/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
200 OK Content-Type: application/json
[
 {
 "id": 9001,
 "newsletter_id": 7701,
 "name": "Welcome",
 "email_subject": "Welcome",
 "position": 0,
 "state": "DONE",
 "editor_type": "html",
 "is_main": true,
 "last_update_at": "2026-11-11T10:00:00",
 "version_of": null
 },
 {
 "id": 9002,
 "newsletter_id": 7702,
 "name": "Part 2",
 "email_subject": "Tips to get started",
 "position": 1,
 "state": "DRAFT",
 "editor_type": "html",
 "is_main": false,
 "last_update_at": "2026-11-11T10:05:00",
 "version_of": null
 }
]
  • "is_main" set to true marks the email that is currently first in the sending order. The shortcut PUT campaigns/{campaign_id}/content/ targets it and its ID is in the series settings in the "main_content_id" field.
  • "editor_type" says whether the HTML of the email can be changed through the API, see Editor type.

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70. The response has no "code" field.

405 Method Not Allowed Content-Type: application/json
{
 "detail": "Method \"GET\" not allowed."
}

New series email

The call adds a new email to the end of the series. The series must be in the Under construction or Paused status. Save the "id" of the new email from the response.

The call can carry an Idempotency-Key header with any string. A repeated call with the same key within 7 days does not create a second email and returns the original one. The response has status 201 in that case too. A second call with the same key that arrives before the first one has finished does not create an email and returns 409 with the code idempotency_key_is_being_processed. Repeat it after a moment and it returns the email created by the first call. The key is stored separately for each campaign.

POSThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/content/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4",
 "Idempotency-Key": "part-2-2026-11-12"
}

Body

FieldTypeRequiredNote
email_subjectstringtrueSubject
htmlstringexactly one of html and template_idValid HTML with {{ unsubscribe_link }}
template_idintegerexactly one of html and template_idA template can only be used on creation
namestringfalseInternal name; defaults to the subject
custom_template_variablesobjectfalseCustom variables
statestringfalseSeries only: DRAFT, TO_CHECK, CHECKED, DONE
tags_to_addarray of integersfalseSeries only: tags the contact gets after the email is sent
tags_to_removearray of integersfalseSeries only: tags removed from the contact after the email is sent

Example with HTML:

{
 "name": "Part 2",
 "email_subject": "Tips to get started",
 "html": "<!DOCTYPE html><html>… {{ unsubscribe_link }} …</html>",
 "custom_template_variables": {"discount": "10 %"},
 "state": "DRAFT",
 "tags_to_add": [346],
 "tags_to_remove": [345]
}

Example with a template:

{
 "name": "Part 2",
 "email_subject": "Tips to get started",
 "template_id": 88,
 "custom_template_variables": {"discount": "10 %"},
 "state": "DRAFT",
 "tags_to_add": [346],
 "tags_to_remove": [345]
}

An email created from "html" has "editor_type": "html" and its HTML can still be changed through the API. An email created from "template_id" is edited in the editor of the app (drag and drop) and its HTML cannot be changed through the API, see Editor type.

Response
201 Created Content-Type: application/json
{
 "id": 9002,
 "newsletter_id": 7702,
 "name": "Part 2",
 "email_subject": "Tips to get started",
 "position": 1,
 "state": "DRAFT",
 "editor_type": "html",
 "is_main": false,
 "last_update_at": "2026-11-11T10:05:00",
 "version_of": null,
 "html": "<!DOCTYPE html><html>…</html>",
 "custom_template_variables": {"discount": "10 %"},
 "tags_to_add": [346],
 "tags_to_remove": [345]
}

Response when the request contains a field the call does not accept (a typo, a field of the other campaign type or a read-only field). Nothing is saved.

400 Bad Request Content-Type: application/json
{
 "id": ["This field is not accepted by this request."],
 "codes": {"id": ["unknown_field"]}
}

Response when a required field is missing or a field value is invalid (codes required, invalid, null, blank, invalid_choice, does_not_exist, max_length). Example: an unknown value of "state".

400 Bad Request Content-Type: application/json
{
 "state": ["\"READY\" is not a valid choice."],
 "codes": {"state": ["invalid_choice"]}
}

Response when "email_subject" is missing.

400 Bad Request Content-Type: application/json
{
 "email_subject": ["The e-mail subject is required."],
 "codes": {"email_subject": ["email_subject_is_required"]}
}

Response when the request has neither "html" nor "template_id", or has both.

400 Bad Request Content-Type: application/json
{
 "non_field_errors": ["Provide exactly one of template_id and html."],
 "codes": {"non_field_errors": ["template_id_xor_html_required"]}
}

Response when the template in "template_id" is unknown.

400 Bad Request Content-Type: application/json
{
 "template_id": ["The email template ID was not found."],
 "codes": {"template_id": ["template_not_found"]}
}

Response when the {{ unsubscribe_link }} tag is missing in the HTML. It is checked first.

400 Bad Request Content-Type: application/json
{
 "html": ["The HTML must contain the {{ unsubscribe_link }} tag."],
 "codes": {"html": ["html_missing_unsubscribe_link"]}
}

Response when the HTML is not valid.

400 Bad Request Content-Type: application/json
{
 "html": ["The inserted HTML code contains errors, so a valid email cannot be created from it. Check the inserted HTML, find the errors and fix them. If you are not sure, use for example Claude Code AI to find and fix them."],
 "codes": {"html": ["html_is_not_valid"]}
}

Response when "custom_template_variables" is not an object (for example a list or a text).

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The custom_template_variables field must be an object of key: value pairs."],
 "codes": {"custom_template_variables": ["custom_template_variables_must_be_an_object"]}
}

Response when a variable key is not a string.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The keys of custom_template_variables must be strings."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_must_be_string"]}
}

Response when a variable key is a reserved Quanda tag name (for example contact_first_name). The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The key contact_first_name is a reserved Quanda tag and cannot be used."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_is_reserved"]}
}

Response when a variable value is neither a string nor a number. The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The value of the key product must be a text or a number."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_value_must_be_string_int_or_float"]}
}

Response when a tag in "tags_to_add" or "tags_to_remove" does not exist.

400 Bad Request Content-Type: application/json
{
 "tags_to_add": ["The tag 999 does not exist."],
 "codes": {"tags_to_add": ["tag_does_not_exist"]}
}

Response when "state" has a value other than DONE on a plan without email states. The other fields of the request are not saved.

400 Bad Request Content-Type: application/json
{
 "state": ["E-mail states are not available for this campaign or plan."],
 "codes": {"state": ["content_states_are_not_available"]}
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70. The response has no "code" field.

405 Method Not Allowed Content-Type: application/json
{
 "detail": "Method \"POST\" not allowed."
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is in progress. Pause it first.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is in progress. Pause it first.",
 "code": "campaign_is_in_progress_pause_it_first"
}

Response when the campaign already has the maximum allowed number of emails.

409 Conflict Content-Type: application/json
{
 "detail": "Another e-mail cannot be added (limit reached or campaign state).",
 "code": "content_cannot_be_added"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Response when a call with the same Idempotency-Key is still running. Repeat it after a while.

409 Conflict Content-Type: application/json
{
 "detail": "A request with the same Idempotency-Key is still being processed. Repeat it in a moment.",
 "code": "idempotency_key_is_being_processed"
}

Only series emails in the DONE state are sent, tested and counted towards the limit. The limit is 150 emails per series.

Email detail

The call returns any email of the series, the first one as well as the others, including its HTML. You get the content_id from creating the series, from adding an email or from the list of emails. To edit the email, use the Update email call; to delete it, use the Delete email call.

GEThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/content/{content_id}/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
content_idintegertrueEmail ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
200 OK Content-Type: application/json
{
 "id": 9002,
 "newsletter_id": 7702,
 "name": "Part 2",
 "email_subject": "Tips to get started",
 "position": 1,
 "state": "DRAFT",
 "editor_type": "html",
 "is_main": false,
 "last_update_at": "2026-11-11T10:05:00",
 "version_of": null,
 "html": "<!DOCTYPE html><html>…</html>",
 "custom_template_variables": {"discount": "10 %"},
 "tags_to_add": [346],
 "tags_to_remove": [345]
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign or email does not exist, belongs to another account or is deleted.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Update email

The call edits any email of the series, the first one as well as the others. It changes only the fields you send. You get the content_id from creating the series, from adding an email or from the list of emails. The first email of the series can also be edited with the shortcut without content_id, see Update the first email.

PUThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/content/{content_id}/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
content_idintegertrueEmail ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
email_subjectstringfalseSubject
htmlstringfalseValid HTML with {{ unsubscribe_link }}
namestringfalseInternal name; defaults to the subject
custom_template_variablesobjectfalseCustom variables
statestringfalseSeries only: DRAFT, TO_CHECK, CHECKED, DONE
tags_to_addarray of integersfalseSeries only: tags the contact gets after the email is sent
tags_to_removearray of integersfalseSeries only: tags removed from the contact after the email is sent
{
 "name": "Part 2: first week",
 "email_subject": "Tips for your first week",
 "html": "<!DOCTYPE html><html>… {{ unsubscribe_link }} …</html>",
 "custom_template_variables": {"discount": "15 %"},
 "state": "DONE",
 "tags_to_add": [346],
 "tags_to_remove": [345]
}

The example shows all fields. You only need to send the ones you are changing. The PUT call does not accept the "template_id" field (400).

Response
200 OK Content-Type: application/json
{
 "id": 9002,
 "newsletter_id": 7702,
 "name": "Part 2: first week",
 "email_subject": "Tips for your first week",
 "position": 1,
 "state": "DONE",
 "editor_type": "html",
 "is_main": false,
 "last_update_at": "2026-11-11T10:20:00",
 "version_of": null,
 "html": "<!DOCTYPE html><html>…</html>",
 "custom_template_variables": {"discount": "15 %"},
 "tags_to_add": [346],
 "tags_to_remove": [345]
}

Response when a new version of the email is created.

200 OK Content-Type: application/json
{
 "id": 9010,
 "newsletter_id": 7710,
 "name": "Part 2: first week",
 "email_subject": "Tips for your first week",
 "position": 1,
 "state": "DONE",
 "editor_type": "html",
 "is_main": false,
 "last_update_at": "2026-12-05T08:30:00",
 "version_of": 9002,
 "html": "<!DOCTYPE html><html>…</html>",
 "custom_template_variables": {"discount": "15 %"},
 "tags_to_add": [346],
 "tags_to_remove": [345]
}

Response when the request contains a field the call does not accept (a typo, a field of the other campaign type or a read-only field). Nothing is saved.

400 Bad Request Content-Type: application/json
{
 "id": ["This field is not accepted by this request."],
 "codes": {"id": ["unknown_field"]}
}

Response when a required field is missing or a field value is invalid (codes required, invalid, null, blank, invalid_choice, does_not_exist, max_length). Example: an unknown value of "state".

400 Bad Request Content-Type: application/json
{
 "state": ["\"READY\" is not a valid choice."],
 "codes": {"state": ["invalid_choice"]}
}

Response when "template_id" is sent when updating an email. A template can be chosen only when the email is created.

400 Bad Request Content-Type: application/json
{
 "template_id": ["A template can be chosen only when the e-mail is created."],
 "codes": {"template_id": ["template_only_on_create"]}
}

Response when the {{ unsubscribe_link }} tag is missing in the HTML. It is checked first.

400 Bad Request Content-Type: application/json
{
 "html": ["The HTML must contain the {{ unsubscribe_link }} tag."],
 "codes": {"html": ["html_missing_unsubscribe_link"]}
}

Response when the HTML is not valid.

400 Bad Request Content-Type: application/json
{
 "html": ["The inserted HTML code contains errors, so a valid email cannot be created from it. Check the inserted HTML, find the errors and fix them. If you are not sure, use for example Claude Code AI to find and fix them."],
 "codes": {"html": ["html_is_not_valid"]}
}

Response when "custom_template_variables" is not an object (for example a list or a text).

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The custom_template_variables field must be an object of key: value pairs."],
 "codes": {"custom_template_variables": ["custom_template_variables_must_be_an_object"]}
}

Response when a variable key is not a string.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The keys of custom_template_variables must be strings."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_must_be_string"]}
}

Response when a variable key is a reserved Quanda tag name (for example contact_first_name). The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The key contact_first_name is a reserved Quanda tag and cannot be used."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_is_reserved"]}
}

Response when a variable value is neither a string nor a number. The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The value of the key product must be a text or a number."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_value_must_be_string_int_or_float"]}
}

Response when a tag in "tags_to_add" or "tags_to_remove" does not exist.

400 Bad Request Content-Type: application/json
{
 "tags_to_add": ["The tag 999 does not exist."],
 "codes": {"tags_to_add": ["tag_does_not_exist"]}
}

Response when "state" has a value other than DONE on a plan without email states. The other fields of the request are not saved.

400 Bad Request Content-Type: application/json
{
 "state": ["E-mail states are not available for this campaign or plan."],
 "codes": {"state": ["content_states_are_not_available"]}
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign or email does not exist, belongs to another account or is deleted.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is running and the call changes a field other than "state". Pause the campaign first.

409 Conflict Content-Type: application/json
{
 "detail": "While the campaign is in progress, only the email state can be changed. Pause it to make other changes.",
 "code": "only_state_can_be_changed_in_progress"
}

Response when "state": "DONE" is sent for a running campaign.

409 Conflict Content-Type: application/json
{
 "detail": "The state Done cannot be set while the campaign is in progress.",
 "code": "done_cannot_be_set_in_progress"
}

Response when the "html" field is changed for an email with "editor_type": "json".

409 Conflict Content-Type: application/json
{
 "detail": "The e-mail was made in the visual editor and its HTML cannot be changed through the API.",
 "code": "content_is_not_html"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Editor type

The HTML of an email can be changed through the API only for emails created as HTML ("editor_type": "html"), that is, created through the API with the "html" field or in the HTML editor of the app. An email created in the drag and drop editor or from a template ("template_id") has "editor_type": "json". A PUT call with the "html" field returns 409 with an explanation for such an email and the email is not changed. Its other fields ("name", "email_subject", "custom_template_variables", "state", "tags_to_add", "tags_to_remove") can be changed. You can find the editor type in the list of emails and in the email detail.

New email version: when the campaign is running, the email has already been sent and its links change (also through values in "custom_template_variables" that are part of a link), the original email is kept for statistics and a new version is created. The response then carries a new "id" and a "version_of" field with the original id. The "version_of" field is filled only in the response of the call that created the new version; in the email detail, the email list and the campaign settings it is null afterwards. The original id stops existing in the API (404), use the new one from then on.

Update the first email

The same address as for a simple email campaign (edit email content), without an email ID. Use it when you want to edit the first email of the series and do not know its content_id. No other email can be edited with this call.

The shortcut edits the email that is currently first in the sending order. After the order is changed or the first email is deleted, it therefore targets a different email. Which email that is, is shown by "is_main": true in the list of emails and by "main_content_id" in the series settings.

Any email, including the first one, can also be edited with the call that uses content_id, see Update email. The body and the response are the same. Only the fields you send are changed. The HTML can only be changed for emails with "editor_type": "html", see Editor type.

PUThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/content/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
email_subjectstringfalseSubject
htmlstringfalseValid HTML with {{ unsubscribe_link }}
namestringfalseInternal name; defaults to the subject
custom_template_variablesobjectfalseCustom variables
statestringfalseSeries only: DRAFT, TO_CHECK, CHECKED, DONE
tags_to_addarray of integersfalseSeries only: tags the contact gets after the email is sent
tags_to_removearray of integersfalseSeries only: tags removed from the contact after the email is sent
{
 "name": "Welcome",
 "email_subject": "Welcome",
 "html": "<!DOCTYPE html><html>… <a href=\"{{ unsubscribe_link }}\">unsubscribe</a> …</html>",
 "custom_template_variables": {"discount": "15 %"},
 "state": "DONE",
 "tags_to_add": [346],
 "tags_to_remove": [345]
}

The example shows all fields. You only need to send the ones you are changing. The PUT call does not accept the "template_id" field (400).

Response
200 OK Content-Type: application/json
{
 "id": 9001,
 "newsletter_id": 7701,
 "name": "Welcome",
 "email_subject": "Welcome",
 "position": 0,
 "state": "DONE",
 "editor_type": "html",
 "is_main": true,
 "last_update_at": "2026-11-11T10:00:00",
 "version_of": null,
 "html": "<!DOCTYPE html><html>…</html>",
 "custom_template_variables": {"discount": "15 %"},
 "tags_to_add": [346],
 "tags_to_remove": [345]
}

Response when the request contains a field the call does not accept (a typo, a field of the other campaign type or a read-only field). Nothing is saved.

400 Bad Request Content-Type: application/json
{
 "id": ["This field is not accepted by this request."],
 "codes": {"id": ["unknown_field"]}
}

Response when a required field is missing or a field value is invalid (codes required, invalid, null, blank, invalid_choice, does_not_exist, max_length). Example: an unknown value of "state".

400 Bad Request Content-Type: application/json
{
 "state": ["\"READY\" is not a valid choice."],
 "codes": {"state": ["invalid_choice"]}
}

Response when "template_id" is sent when updating an email. A template can be chosen only when the email is created.

400 Bad Request Content-Type: application/json
{
 "template_id": ["A template can be chosen only when the e-mail is created."],
 "codes": {"template_id": ["template_only_on_create"]}
}

Response when the {{ unsubscribe_link }} tag is missing in the HTML. It is checked first.

400 Bad Request Content-Type: application/json
{
 "html": ["The HTML must contain the {{ unsubscribe_link }} tag."],
 "codes": {"html": ["html_missing_unsubscribe_link"]}
}

Response when the HTML is not valid.

400 Bad Request Content-Type: application/json
{
 "html": ["The inserted HTML code contains errors, so a valid email cannot be created from it. Check the inserted HTML, find the errors and fix them. If you are not sure, use for example Claude Code AI to find and fix them."],
 "codes": {"html": ["html_is_not_valid"]}
}

Response when "custom_template_variables" is not an object (for example a list or a text).

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The custom_template_variables field must be an object of key: value pairs."],
 "codes": {"custom_template_variables": ["custom_template_variables_must_be_an_object"]}
}

Response when a variable key is not a string.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The keys of custom_template_variables must be strings."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_must_be_string"]}
}

Response when a variable key is a reserved Quanda tag name (for example contact_first_name). The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The key contact_first_name is a reserved Quanda tag and cannot be used."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_is_reserved"]}
}

Response when a variable value is neither a string nor a number. The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The value of the key product must be a text or a number."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_value_must_be_string_int_or_float"]}
}

Response when a tag in "tags_to_add" or "tags_to_remove" does not exist.

400 Bad Request Content-Type: application/json
{
 "tags_to_add": ["The tag 999 does not exist."],
 "codes": {"tags_to_add": ["tag_does_not_exist"]}
}

Response when "state" has a value other than DONE on a plan without email states. The other fields of the request are not saved.

400 Bad Request Content-Type: application/json
{
 "state": ["E-mail states are not available for this campaign or plan."],
 "codes": {"state": ["content_states_are_not_available"]}
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign has no active first email. A campaign that does not exist returns 404 without the "code" field.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is running and the call changes a field other than "state". Pause the campaign first.

409 Conflict Content-Type: application/json
{
 "detail": "While the campaign is in progress, only the email state can be changed. Pause it to make other changes.",
 "code": "only_state_can_be_changed_in_progress"
}

Response when "state": "DONE" is sent for a running campaign.

409 Conflict Content-Type: application/json
{
 "detail": "The state Done cannot be set while the campaign is in progress.",
 "code": "done_cannot_be_set_in_progress"
}

Response when the "html" field is changed for an email with "editor_type": "json".

409 Conflict Content-Type: application/json
{
 "detail": "The e-mail was made in the visual editor and its HTML cannot be changed through the API.",
 "code": "content_is_not_html"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Delete email

The call deletes an email of a series in the Under construction or Paused status. You get the content_id from the list of emails. You cannot delete the only email of a campaign or an email used by an automation. The call then returns 409.

DELETEhttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/content/{content_id}/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
content_idintegertrueEmail ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
204 No Content Content-Type: application/json

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign or email does not exist, belongs to another account or is deleted.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is in progress. Pause it first.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is in progress. Pause it first.",
 "code": "campaign_is_in_progress_pause_it_first"
}

Response when deleting the only email of a campaign.

409 Conflict Content-Type: application/json
{
 "detail": "The only email of the campaign cannot be deleted.",
 "code": "only_content_cannot_be_deleted"
}

Response when the email cannot be deleted for another reason.

409 Conflict Content-Type: application/json
{
 "detail": "The e-mail cannot be deleted (main or only e-mail, or campaign state).",
 "code": "content_cannot_be_deleted"
}

Response when the email is used in an automation.

409 Conflict Content-Type: application/json
{
 "detail": "The e-mail is used in an automation. Remove it from there first.",
 "code": "content_is_used_in_automation"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Update email order

Send the IDs of all emails of the series in the order in which they should be sent. Use the call after adding an email that should not be the last one. The "content_ids" list must contain every email of the series exactly once. Contacts that have already received some of the emails keep their progress. The order can only be changed for a series and only in the Under construction and Paused statuses.

The email in the first position of the list becomes the first email of the series ("is_main": true) and the shortcut PUT campaigns/{campaign_id}/content/ targets it.

PUThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/content/order/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
content_idsarray of integerstrueIDs of all emails of the series in the order they should be sent
{
 "content_ids": [9001, 9003, 9002]
}

The body has a single field, "content_ids". It is required and must contain all emails of the series.

Response
200 OK Content-Type: application/json
[
 {
  "id": 9001,
  "newsletter_id": 7701,
  "name": "Welcome",
  "email_subject": "Welcome",
  "position": 0,
  "state": "DONE",
  "editor_type": "html",
  "is_main": true,
  "last_update_at": "2026-11-11T10:00:00",
  "version_of": null
 },
 {
  "id": 9003,
  "newsletter_id": 7703,
  "name": "Part 3",
  "email_subject": "More tips",
  "position": 1,
  "state": "DRAFT",
  "editor_type": "html",
  "is_main": false,
  "last_update_at": "2026-11-11T10:10:00",
  "version_of": null
 },
 {
  "id": 9002,
  "newsletter_id": 7702,
  "name": "Part 2",
  "email_subject": "Tips to get started",
  "position": 2,
  "state": "DRAFT",
  "editor_type": "html",
  "is_main": false,
  "last_update_at": "2026-11-11T10:05:00",
  "version_of": null
 }
]

Response when the request contains a field the call does not accept (a typo, a field of the other campaign type or a read-only field). Nothing is saved.

400 Bad Request Content-Type: application/json
{
 "id": ["This field is not accepted by this request."],
 "codes": {"id": ["unknown_field"]}
}

Response when a required field is missing or a field value is invalid (codes required, invalid, null, blank, invalid_choice, does_not_exist, max_length). Example: "content_ids" is missing.

400 Bad Request Content-Type: application/json
{
 "content_ids": ["This field is required."],
 "codes": {"content_ids": ["required"]}
}

Response when an active email of the campaign is missing in "content_ids" or is listed more than once.

400 Bad Request Content-Type: application/json
{
 "detail": "List every active email of the campaign exactly once.",
 "code": "all_contents_must_be_listed_once"
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is in progress. Pause it first.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is in progress. Pause it first.",
 "code": "campaign_is_in_progress_pause_it_first"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Send test emails

The call sends a preview of the emails to the given addresses, at most three. Call it before activation or for a paused series; for a running campaign it returns 409. For a series only emails in the DONE state are tested.

POSThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/send-test/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
emailsarray of stringstrueAt most 3 addresses
strategystringfalseall (default) = all emails, changed_today = only emails edited today, select = selected emails
content_idsarray of integerstrue for strategy selectIDs of the emails to test

The call is synchronous. The first test of a newly created or changed email includes the spam check and takes roughly 1.5 to 2 s per email; a repeated test is fast (measured: 12 emails 19 s the first time, 3.5 s repeated). Set the client timeout to at least 60 s and for campaigns with more than about 20 emails send the test in batches with the select strategy and "content_ids".

The changed_today strategy selects the active emails (for a series those in the DONE state) whose subject, HTML or "custom_template_variables" changed today. A change of the name, state or tags does not count and does not change "last_update_at".

{
 "emails": ["test@example.com", "colleague@example.com"],
 "strategy": "select",
 "content_ids": [9002, 9003]
}

The "content_ids" field is sent only with strategy select.

Response
200 OK Content-Type: application/json

The response has no body.

Response when the request contains a field the call does not accept (a typo, a field of the other campaign type or a read-only field). Nothing is saved.

400 Bad Request Content-Type: application/json
{
 "id": ["This field is not accepted by this request."],
 "codes": {"id": ["unknown_field"]}
}

Response when a required field is missing or a field value is invalid (codes required, invalid, null, blank, invalid_choice, does_not_exist, max_length). Example: an invalid address in "emails".

400 Bad Request Content-Type: application/json
{
 "emails": ["Enter a valid email address."],
 "codes": {"emails": ["invalid"]}
}

Response when "strategy": "select" is sent without "content_ids".

400 Bad Request Content-Type: application/json
{
 "content_ids": ["With the select strategy, content_ids are required."],
 "codes": {"content_ids": ["content_ids_are_required"]}
}

Response when "emails" has more than three addresses.

400 Bad Request Content-Type: application/json
{
 "detail": "The maximum number (3) of email addresses for sending a test email has been exceeded.",
 "code": "maximum_number_of_emails_exceeded"
}

Response for the changed_today option when no email was edited today.

400 Bad Request Content-Type: application/json
{
 "detail": "No email was changed today.",
 "code": "no_content_changed_today"
}

Response when an email from "content_ids" is not an active email of the campaign. The email ID is in the error text.

400 Bad Request Content-Type: application/json
{
 "detail": "The e-mail 9002 is not an active e-mail of this campaign.",
 "code": "content_is_not_active"
}

Response when the campaign has no active email.

400 Bad Request Content-Type: application/json
{
 "detail": "The campaign has no active e-mail.",
 "code": "campaign_has_no_active_content"
}

Response when an email contains forbidden words or domains. The body lists the findings.

400 Bad Request Content-Type: application/json
{
 "blacklisted_words": ["Moneta"],
 "blacklisted_domains": [],
 "code": "content_is_blacklisted"
}

Response when the campaign did not pass the SPAM test and is blocked.

400 Bad Request Content-Type: application/json
{
 "detail": "The campaign is blocked because it did not pass the SPAM test.",
 "code": "campaign_is_spam_blocked"
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the limit of test emails in the plan is exceeded.

403 Forbidden Content-Type: application/json
{
 "detail": "Your limit for the number of sent test emails has been exceeded. Please contact support at support@onquanda.com.",
 "code": "test_email_count_add_restriction"
}

Response when the campaign does not exist, belongs to another account or is deleted. The response has no "code" field.

404 Not Found Content-Type: application/json
{
 "detail": "Not found."
}

Response when the campaign is in progress or finished. A test can be sent before the start or while the campaign is paused.

409 Conflict Content-Type: application/json
{
 "detail": "A test can be sent before the start or while the campaign is paused.",
 "code": "test_is_not_available_in_this_state"
}

Activate series

The call starts the series. It needs a start date and a period. Checks run before the start; if any of them does not pass, the series stays unchanged. The same call with a new "start_at" and "period" restarts a paused series for which resuming is not enough, see Resume series.

POSThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/activate/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
start_atdatetimetrueStart of the series, today or later, on the hour, for example 2026-12-01T09:00:00
periodintegertrueNumber of days between emails, 1 to 60
{
 "start_at": "2026-12-01T09:00:00",
 "period": 3
}
Response
200 OK Content-Type: application/json
{
 "id": 4711,
 "state": 20,
 "activated_at": "2026-12-01T09:00:00",
 "period": 3,
 "next_dispatch": "2026-12-01T09:00:00"
}

Response when the request contains a field the call does not accept (a typo, a field of the other campaign type or a read-only field). Nothing is saved.

400 Bad Request Content-Type: application/json
{
 "id": ["This field is not accepted by this request."],
 "codes": {"id": ["unknown_field"]}
}

Response when a required field is missing or a field value is invalid (codes required, invalid, null, blank, invalid_choice, does_not_exist, max_length). Example: "start_at" is missing.

400 Bad Request Content-Type: application/json
{
 "start_at": ["This field is required."],
 "codes": {"start_at": ["required"]}
}

Response when "start_at" is not a whole hour.

400 Bad Request Content-Type: application/json
{
 "detail": "The start time must be a whole hour.",
 "code": "start_at_must_be_a_whole_hour"
}

Response when "start_at" is in the past.

400 Bad Request Content-Type: application/json
{
 "detail": "The start date must be today or later.",
 "code": "start_at_must_be_today_or_later"
}

Response when sending from an unverified domain.

400 Bad Request Content-Type: application/json
{
 "detail": "Sending from an unverified domain is not allowed. Verify the sender domain.",
 "code": "sending_to_unverified_domains_is_not_allowed"
}

Response when the campaign has no email ready to be sent (for a series with email states only emails in the DONE state).

400 Bad Request Content-Type: application/json
{
 "detail": "The campaign has no email ready to be sent.",
 "code": "campaign_has_no_content"
}

Response when one of the emails is not valid. The name of the email is in the error text.

400 Bad Request Content-Type: application/json
{
 "detail": "The e-mail Uvítání is not valid.",
 "code": "content_is_not_valid"
}

Response when an email contains forbidden words or domains. The body lists the findings.

400 Bad Request Content-Type: application/json
{
 "blacklisted_words": ["Moneta"],
 "blacklisted_domains": [],
 "code": "content_is_blacklisted"
}

Response when the campaign did not pass the SPAM test and is blocked.

400 Bad Request Content-Type: application/json
{
 "detail": "The campaign is blocked because it did not pass the SPAM test.",
 "code": "campaign_is_spam_blocked"
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the account email is not verified.

403 Forbidden Content-Type: application/json
{
 "detail": "The email of your account is not verified. Verify it and try again.",
 "code": "customer_is_not_verified"
}

Response when the plan does not allow another running campaign of this type.

403 Forbidden Content-Type: application/json
{
 "detail": "Your plan does not allow you to run another campaign of this type.",
 "code": "in_progress_count_add_restriction"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is already in progress.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is already in progress.",
 "code": "campaign_is_already_active"
}

Response for a paused campaign that has already sent something and can continue. Use the resume call.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is paused. Continue with resume.",
 "code": "campaign_is_paused_use_resume"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Checks before activation

Before activation the following is checked, in this order:

  1. verified account email (403),
  2. verified sending domain (400),
  3. the plan limit on the number of running campaigns (403),
  4. for a transactional campaign, at least one contact in the account (400),
  5. validity of all emails and, for a series, at least one email in the DONE state (400),
  6. forbidden words and domains on paid plans (400, the response body lists the findings),
  7. spam check (400).

Until every check passes, the campaign stays unchanged.

Pause series

Pause the series before you start changing anything in it. A running series moves to the Paused status. Once you are done, resume it with the Resume series call.

POSThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/pause/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
200 OK Content-Type: application/json
{
 "id": 4711,
 "state": 10,
 "activated_at": "2026-12-01T09:00:00",
 "period": 3,
 "next_dispatch": "2026-12-04T09:00:00"
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is not in progress.

409 Conflict Content-Type: application/json
{
 "detail": "Only a campaign in progress can be paused.",
 "code": "campaign_is_not_in_progress"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Resume series

The call resumes a paused series, which then continues with its original schedule. Call it once you have finished your changes. The same checks run as on activation, except for the sending domain.

POSThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/resume/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
200 OK Content-Type: application/json
{
 "id": 4711,
 "state": 20,
 "activated_at": "2026-12-01T09:00:00",
 "period": 3,
 "next_dispatch": "2026-12-04T09:00:00"
}

Response when the campaign has no email ready to be sent (for a series with email states only emails in the DONE state).

400 Bad Request Content-Type: application/json
{
 "detail": "The campaign has no email ready to be sent.",
 "code": "campaign_has_no_content"
}

Response when one of the emails is not valid. The name of the email is in the error text.

400 Bad Request Content-Type: application/json
{
 "detail": "The e-mail Uvítání is not valid.",
 "code": "content_is_not_valid"
}

Response when an email contains forbidden words or domains. The body lists the findings.

400 Bad Request Content-Type: application/json
{
 "blacklisted_words": ["Moneta"],
 "blacklisted_domains": [],
 "code": "content_is_blacklisted"
}

Response when the campaign did not pass the SPAM test and is blocked.

400 Bad Request Content-Type: application/json
{
 "detail": "The campaign is blocked because it did not pass the SPAM test.",
 "code": "campaign_is_spam_blocked"
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the account email is not verified.

403 Forbidden Content-Type: application/json
{
 "detail": "The email of your account is not verified. Verify it and try again.",
 "code": "customer_is_not_verified"
}

Response when the plan does not allow another running campaign of this type.

403 Forbidden Content-Type: application/json
{
 "detail": "Your plan does not allow you to run another campaign of this type.",
 "code": "in_progress_count_add_restriction"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is not paused.

409 Conflict Content-Type: application/json
{
 "detail": "Only a paused campaign can be resumed.",
 "code": "campaign_is_not_paused"
}

Response when the series has not sent anything yet (it was paused before the first dispatch). Continue with the activate call.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign has not sent anything yet, so there is no schedule to continue. Call activate with a start date and period.",
 "code": "series_has_not_dispatched_yet"
}

Response when the next dispatch date passed while the series was paused. Start the series with the activate call with a new "start_at" and "period".

409 Conflict Content-Type: application/json
{
 "detail": "The next dispatch date has passed. Call activate with a new start date and period.",
 "code": "new_start_and_period_required_use_activate"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

When resuming is not enough

If the time of the next sending passed while the series was paused, or the series has not sent anything yet, the resume call returns 409. You then start the series with the activate call with a new "start_at" and "period". The progress of contacts in the series is kept. This is the only way to change the period of a started series. The app behaves the same way.

Error responses and codes

The rules apply to all calls of the email series and the transactional campaign and to the lists of content categories and templates. The error text is returned in the language of the Accept-Language header (cs, en, sk, pl); without it the text is English. Every error also carries a machine-readable code that does not change with the language. Decide by the code, not by the text. The calls of the simple campaign and sending a transactional email return errors in their original shape without codes. Which errors each call returns is listed in the Response part of each endpoint.

A single error of the whole request has its text in "detail" and its code in "code":

{
 "detail": "Only a campaign in progress can be paused.",
 "code": "campaign_is_not_in_progress"
}

Field errors have their texts under the field name and their codes in the "codes" object of the same structure:

{
 "contact_tags": ["The tag 999 does not exist."],
 "codes": {"contact_tags": ["tag_does_not_exist"]}
}

An error that does not belong to one field is under the "non_field_errors" key, for example the code template_id_xor_html_required.

Unknown fields

A request with a field the call does not accept (a typo, a field of the other campaign type or a read-only field such as "id", "state" or "position") returns 400 with the code unknown_field at the field name and saves nothing. This applies to creating a series and a transactional campaign, settings, emails, order, test email and activation. A transactional campaign is activated without a body. Example of the response to creating a transactional campaign with the "period" field:

{
 "period": ["This field is not accepted by this request."],
 "codes": {"period": ["unknown_field"]}
}

Blocked by the plan

If the plan does not include the campaign API, all these calls including the read calls return status 403 with a JSON body. The calls of the simple campaign return plain text when blocked, as before.

{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Error codes

StatuscodeWhen
403plan_does_not_allow_campaign_apithe plan does not include the campaign API
403automatic_campaign_count_add_restriction, transactional_campaign_count_add_restrictionlimit of the number of campaigns in the plan
403in_progress_count_add_restrictionlimit of running campaigns in the plan
403customer_is_not_verifiedthe account email is not verified
403test_email_count_add_restrictionlimit of test emails
400unknown_fielda field the call does not accept
400custom_template_variables_must_be_an_object"custom_template_variables" is not an object (for example a list or a text)
400custom_template_variables_key_must_be_string, custom_template_variables_key_is_reserved, custom_template_variables_key_value_must_be_string_int_or_floata variable key is not a string; the key is a reserved Quanda tag name (for example contact_first_name); a variable value is neither a string nor a number. The word "key" is part of the code, the name of the key is in the error text
400required, invalid, null, blank, invalid_choice, does_not_exist, max_lengthgeneral field validation errors
400tag_does_not_existthe tag does not exist
400template_id_xor_html_requiredan email with neither "html" nor "template_id", or with both
400template_not_found, template_only_on_createunknown template; a template when updating an email
400email_subject_is_requiredthe subject of a new email is missing
400html_missing_unsubscribe_link{{ unsubscribe_link }} is missing in the HTML (checked first)
400html_is_not_validinvalid HTML
400sender_id_is_required, sender_is_not_verified, sender_dns_is_not_validsender
400content_states_are_not_availablethe "state" field with a value other than DONE on a plan or campaign type without email states
400content_tags_are_not_available"tags_to_add" or "tags_to_remove" for a transactional campaign
400all_contents_must_be_listed_onceincomplete order of emails
400start_at_must_be_a_whole_hour, start_at_must_be_today_or_laterstart date of activate and "planned_start_at"
400content_ids_are_required, content_is_not_active, no_content_changed_today, campaign_has_no_active_content, maximum_number_of_emails_exceededtest email
400campaign_has_no_content, content_is_not_valid, customer_has_no_contacts, sending_to_unverified_domains_is_not_allowed, campaign_is_spam_blockedchecks before activation and resume
400content_is_blacklistedforbidden words or domains; the body lists the findings
404not_foundthe campaign or email does not exist
405without "code"list of emails and new email for a campaign that does not exist or is neither a series nor a transactional campaign
409campaign_is_in_progress_pause_it_first, campaign_is_finished, registration_campaign_is_read_onlythe campaign status does not allow the change
409field_cannot_be_changed_after_start, period_can_be_changed_only_by_new_activation, planned_start_only_before_first_startsettings locked after the first start
409audience_change_resets_contact_positions_confirm_itchange of tags of a started series without confirmation
409only_state_can_be_changed_in_progress, done_cannot_be_set_in_progressupdate of an email of a running campaign
409content_is_not_html, content_cannot_be_addedHTML of an email from the visual editor; limit of the number of emails
409only_content_cannot_be_deleted, main_content_cannot_be_deleted, content_cannot_be_deleted, content_is_used_in_automationdeleting an email
409order_is_not_availableorder for a transactional campaign
409campaign_is_already_active, campaign_is_paused_use_resumeactivate
409campaign_is_not_in_progresspause
409campaign_is_not_paused, series_has_not_dispatched_yet, new_start_and_period_required_use_activateresume
409test_is_not_available_in_this_statetest for a running campaign
409campaign_is_used_in_automationdeleting a campaign used by an automation
409campaign_is_being_changed_try_againanother call is changing the campaign right now (for example activation); nothing was changed, repeat the call
409idempotency_key_is_being_processeda call with the same Idempotency-Key is still running

Status 409 always means a conflict with the campaign status or with another call that is running right now. The status is checked when the change is written, so a call that arrives just after an activation already returns 409 and changes nothing. A field the campaign type or plan does not have returns 400 at the field name.

What is allowed in each campaign status

The rules apply to both an email series and a transactional campaign. Campaign statuses are listed in the email campaign code lists.

StatusAllowed calls
30 Under constructionAll
20 Activated (running)GET, pause, PUT of an email only with the "state" field set to a value other than DONE; other calls return 409
10 PausedPUT of the settings, adding, editing and deleting an email, order, test, resume (or activate, see Resume series)
40 FinishedGET only

Campaigns used for the registration emails of the account are read-only through the API. Other calls return 409.

Transactional emails

A transactional campaign (campaign type 70) is created and managed with calls similar to those for an email series. A campaign created through the API is a regular campaign, you can keep editing it in the app and the other way round. To see which calls are allowed in which campaign status, go to What is allowed in each campaign status. Error responses have the same shape and codes as for the series, see Error responses and codes.

New transactional campaign and first email

One call creates the transactional campaign together with its first email. Save "id" from the response (the campaign_id for all further calls) and "content_id" (the ID of the first email). The campaign is created in the Under construction status and nothing is sent until you activate it.

A transactional campaign does not have the fields "contact_tags", "period" and "move_from_last_to_first". The first email of a transactional campaign is always created in the DONE state.

POSThttps://api.onquanda.com/api/newsletter/campaigns/70/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
namestringtrueCampaign name
manager_idintegertrueID of an account user, the campaign manager
sender_typeintegerfalse10 = manual sender (default), 20 = automatic
sender_idintegertrue for sender_type 10ID of a user with a verified email
reply_to_idintegerfalseID of the user for replies
languagestringtrueLanguage code, for example cs
content_categorystringfalseContent category identifier from the list of content categories, for example d0mtuf; case sensitive, the category name is not accepted
assigned_customerusersarray of integersfalseIDs of users assigned to the campaign
email_subjectstringtrueSubject of the first email
email_namestringfalseInternal name of the first email; the default is the subject
htmlstringexactly one of html and template_idEmail HTML, must be valid and contain {{ unsubscribe_link }}
template_idintegerexactly one of html and template_idTemplate ID
custom_template_variablesobjectfalseCustom variables; the key is a string, the value a string or a number; a key must not be a reserved Quanda tag name

Example with HTML:

{
 "name": "Order confirmation",
 "manager_id": 12,
 "sender_type": 10,
 "sender_id": 12,
 "reply_to_id": 14,
 "language": "en",
 "content_category": "d0mtuf",
 "assigned_customerusers": [12, 14],
 "email_subject": "Your order",
 "email_name": "Day 1",
 "html": "<!DOCTYPE html><html>… <a href=\"{{ unsubscribe_link }}\">unsubscribe</a> …</html>",
 "custom_template_variables": {"shop": "My shop"}
}

Example with a template:

{
 "name": "Order confirmation",
 "manager_id": 12,
 "sender_type": 10,
 "sender_id": 12,
 "reply_to_id": 14,
 "language": "en",
 "content_category": "d0mtuf",
 "assigned_customerusers": [12, 14],
 "email_subject": "Your order",
 "email_name": "Day 1",
 "template_id": 88,
 "custom_template_variables": {"shop": "My shop"}
}

An email created from "html" has "editor_type": "html" and its HTML can still be changed through the API. An email created from "template_id" is edited in the editor of the app (drag and drop) and its HTML cannot be changed through the API, see Editor type.

Response
201 Created Content-Type: application/json
{
 "id": 4712,
 "name": "Order confirmation",
 "content_category": "d0mtuf",
 "manager_id": 12,
 "language": "en",
 "assigned_customerusers": [12, 14],
 "sender_type": 10,
 "sender_id": 12,
 "reply_to_id": 14,
 "content_id": 9101
}

Response when the request contains a field the call does not accept, for example "period" for a transactional campaign. Nothing is saved.

400 Bad Request Content-Type: application/json
{
 "period": ["This field is not accepted by this request."],
 "codes": {"period": ["unknown_field"]}
}

Response when a required field is missing or a field value is invalid (codes required, invalid, null, blank, invalid_choice, does_not_exist, max_length). Example: a "manager_id" that does not exist.

400 Bad Request Content-Type: application/json
{
 "manager_id": ["Invalid pk \"7080\" - object does not exist."],
 "codes": {"manager_id": ["does_not_exist"]}
}

Response when "sender_type" is 10 (manually chosen sender) and "sender_id" is missing.

400 Bad Request Content-Type: application/json
{
 "non_field_errors": ["The sender_id field is required for a manually chosen sender."],
 "codes": {"non_field_errors": ["sender_id_is_required"]}
}

Response when the sender does not have a verified email.

400 Bad Request Content-Type: application/json
{
 "non_field_errors": ["The sender does not have a verified email."],
 "codes": {"non_field_errors": ["sender_is_not_verified"]}
}

Response when the sender domain does not have a valid DNS setup.

400 Bad Request Content-Type: application/json
{
 "non_field_errors": ["The sender domain does not have a valid DNS setup."],
 "codes": {"non_field_errors": ["sender_dns_is_not_valid"]}
}

Response when the request has neither "html" nor "template_id", or has both.

400 Bad Request Content-Type: application/json
{
 "non_field_errors": ["Provide exactly one of template_id and html."],
 "codes": {"non_field_errors": ["template_id_xor_html_required"]}
}

Response when the template in "template_id" is unknown.

400 Bad Request Content-Type: application/json
{
 "template_id": ["The email template ID was not found."],
 "codes": {"template_id": ["template_not_found"]}
}

Response when the {{ unsubscribe_link }} tag is missing in the HTML. It is checked first.

400 Bad Request Content-Type: application/json
{
 "html": ["The HTML must contain the {{ unsubscribe_link }} tag."],
 "codes": {"html": ["html_missing_unsubscribe_link"]}
}

Response when the HTML is not valid.

400 Bad Request Content-Type: application/json
{
 "html": ["The inserted HTML code contains errors, so a valid email cannot be created from it. Check the inserted HTML, find the errors and fix them. If you are not sure, use for example Claude Code AI to find and fix them."],
 "codes": {"html": ["html_is_not_valid"]}
}

Response when "custom_template_variables" is not an object (for example a list or a text).

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The custom_template_variables field must be an object of key: value pairs."],
 "codes": {"custom_template_variables": ["custom_template_variables_must_be_an_object"]}
}

Response when a variable key is not a string.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The keys of custom_template_variables must be strings."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_must_be_string"]}
}

Response when a variable key is a reserved Quanda tag name (for example contact_first_name). The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The key contact_first_name is a reserved Quanda tag and cannot be used."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_is_reserved"]}
}

Response when a variable value is neither a string nor a number. The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The value of the key product must be a text or a number."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_value_must_be_string_int_or_float"]}
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the plan does not allow another transactional campaign.

403 Forbidden Content-Type: application/json
{
 "detail": "Your plan does not allow you to create another transactional campaign.",
 "code": "transactional_campaign_count_add_restriction"
}

Transactional campaign settings detail

The call returns the settings, the status of the campaign and the list of emails with their IDs. It is a good first call when you only know the campaign_id. To change the settings, use the Update transactional campaign settings call.

GEThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/settings/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
200 OK Content-Type: application/json
{
 "id": 4712,
 "name": "Order confirmation",
 "campaign_type": 70,
 "state": 30,
 "activated_at": null,
 "manager_id": 12,
 "language": "en",
 "content_category": null,
 "assigned_customerusers": [],
 "sender_type": 10,
 "sender_id": 12,
 "reply_to_id": null,
 "main_content_id": 9101,
 "content_states_available": false,
 "contents": [
 {
  "id": 9101,
  "newsletter_id": 7801,
  "name": "Your order",
  "email_subject": "Your order",
  "position": 0,
  "state": "DONE",
  "editor_type": "html",
  "is_main": true,
  "last_update_at": "2026-11-11T11:00:00",
  "version_of": null
 }
 ]
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

The "main_content_id" field is the ID of the main email, that is, the email the campaign was created with. The shortcut PUT campaigns/{campaign_id}/content/ targets it. The same email has "is_main": true in the "contents" list.

The "content_states_available" field is always false for a transactional campaign: its emails have no states.

Update transactional campaign settings

The call changes the settings of a transactional campaign in the Under construction and Paused statuses. It changes only the fields you send. You know the campaign_id from the response of creating the campaign.

PUThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/settings/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
namestringfalseCampaign name; cannot be changed after the first start of the campaign (409)
manager_idintegerfalseID of an account user, the campaign manager; cannot be changed after the first start of the campaign (409)
languagestringfalseLanguage code, for example cs; cannot be changed after the first start of the campaign (409)
content_categorystringfalseContent category identifier
assigned_customerusersarray of integersfalseIDs of users assigned to the campaign
sender_typeintegerfalse10 = manual sender, 20 = automatic
sender_idintegerfalseID of a user with a verified email
reply_to_idintegerfalseID of the user for replies
{
 "name": "Order confirmation 2026",
 "manager_id": 12,
 "language": "en",
 "content_category": "d0mtuf",
 "assigned_customerusers": [12, 14],
 "sender_type": 10,
 "sender_id": 12,
 "reply_to_id": 14
}

The example shows all fields. You only need to send the ones you are changing. The response has the same shape as for the GET call.

The "name", "manager_id" and "language" fields can be changed only until the campaign is started for the first time. Once the campaign has run, a call with a different name, manager or language returns 409, even in the Paused status. The other fields of a paused campaign can be changed.

Response
200 OK Content-Type: application/json
{
 "id": 4712,
 "name": "Order confirmation 2026",
 "campaign_type": 70,
 "state": 30,
 "activated_at": null,
 "manager_id": 12,
 "language": "en",
 "content_category": "d0mtuf",
 "assigned_customerusers": [12, 14],
 "sender_type": 10,
 "sender_id": 12,
 "reply_to_id": 14,
 "main_content_id": 9101,
 "content_states_available": false,
 "contents": [
 {
  "id": 9101,
  "newsletter_id": 7801,
  "name": "Your order",
  "email_subject": "Your order",
  "position": 0,
  "state": "DONE",
  "editor_type": "html",
  "is_main": true,
  "last_update_at": "2026-11-11T11:00:00",
  "version_of": null
 }
 ]
}
  • The settings can only be changed in the Under construction and Paused statuses.
  • Once the campaign has been started for the first time, "name", "manager_id" and "language" cannot be changed, not even while the campaign is paused. The call returns 409.

Response when the request contains a field the call does not accept (a typo, a field of the other campaign type or a read-only field). Nothing is saved.

400 Bad Request Content-Type: application/json
{
 "id": ["This field is not accepted by this request."],
 "codes": {"id": ["unknown_field"]}
}

Response when a required field is missing or a field value is invalid (codes required, invalid, null, blank, invalid_choice, does_not_exist, max_length). Example: a "sender_id" that does not exist.

400 Bad Request Content-Type: application/json
{
 "sender_id": ["Invalid pk \"7080\" - object does not exist."],
 "codes": {"sender_id": ["does_not_exist"]}
}

Response when "sender_type" is 10 (manually chosen sender) and the campaign has no "sender_id".

400 Bad Request Content-Type: application/json
{
 "detail": "The sender_id field is required for a manually chosen sender.",
 "code": "sender_id_is_required"
}

Response when the sender does not have a verified email.

400 Bad Request Content-Type: application/json
{
 "detail": "The sender does not have a verified email.",
 "code": "sender_is_not_verified"
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is in progress. Pause it first.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is in progress. Pause it first.",
 "code": "campaign_is_in_progress_pause_it_first"
}

Response when the "name", "manager_id" or "language" field of a campaign that has already been started is changed. The field name is in the error text.

409 Conflict Content-Type: application/json
{
 "detail": "The field name cannot be changed after the campaign has started.",
 "code": "field_cannot_be_changed_after_start"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Delete transactional campaign

The call deletes the transactional campaign including its emails. Only a campaign in the Under construction or Paused status that no automation sends can be deleted. A deleted campaign disappears from the lists and further calls to it return 404. The deletion cannot be undone through the API. You know the campaign_id from the response of creating the campaign.

DELETEhttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/settings/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
204 No Content Content-Type: application/json

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is in progress. Pause it first.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is in progress. Pause it first.",
 "code": "campaign_is_in_progress_pause_it_first"
}

Response when the campaign or one of its emails is sent by an automation.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign or one of its emails is used in an automation. Remove it from the automation first.",
 "code": "campaign_is_used_in_automation"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

List of transactional campaign emails

The call returns all emails of the campaign in the sending order, without the fields "html", "custom_template_variables", "tags_to_add" and "tags_to_remove". Use it to find the content_id of each email and its editor type. The main email has "is_main": true.

GEThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/content/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
200 OK Content-Type: application/json
[
 {
  "id": 9101,
  "newsletter_id": 7801,
  "name": "Your order",
  "email_subject": "Your order",
  "position": 0,
  "state": "DONE",
  "editor_type": "html",
  "is_main": true,
  "last_update_at": "2026-11-11T11:00:00",
  "version_of": null
 },
 {
  "id": 9102,
  "newsletter_id": 7802,
  "name": "Invoice",
  "email_subject": "Your invoice",
  "position": 1,
  "state": "DONE",
  "editor_type": "html",
  "is_main": false,
  "last_update_at": "2026-11-11T11:05:00",
  "version_of": null
 }
]

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70. The response has no "code" field.

405 Method Not Allowed Content-Type: application/json
{
 "detail": "Method \"GET\" not allowed."
}

New transactional campaign email

The call adds a new email to the end of the campaign. The campaign must be in the Under construction or Paused status. Save the "id" of the new email from the response.

The call can carry an Idempotency-Key header with any string. A repeated call with the same key within 7 days does not create a second email and returns the original one. The response has status 201 in that case too. A second call with the same key that arrives before the first one has finished does not create an email and returns 409 with the code idempotency_key_is_being_processed. Repeat it after a moment and it returns the email created by the first call. The key is stored separately for each campaign.

POSThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/content/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4",
 "Idempotency-Key": "part-2-2026-11-12"
}

Body

FieldTypeRequiredNote
email_subjectstringtrueSubject
htmlstringexactly one of html and template_idValid HTML with {{ unsubscribe_link }}
template_idintegerexactly one of html and template_idA template can only be used on creation
namestringfalseInternal name; defaults to the subject
custom_template_variablesobjectfalseCustom variables

The "state", "tags_to_add" and "tags_to_remove" fields exist only for a series. For a transactional campaign "tags_to_add" and "tags_to_remove" return status 400 at the field (code content_tags_are_not_available) and the "state" field accepts only the value DONE (otherwise 400, code content_states_are_not_available).

Example with HTML:

{
 "name": "Invoice",
 "email_subject": "Your invoice",
 "html": "<!DOCTYPE html><html>… {{ unsubscribe_link }} …</html>",
 "custom_template_variables": {"shop": "My shop"}
}

Example with a template:

{
 "name": "Invoice",
 "email_subject": "Your invoice",
 "template_id": 88,
 "custom_template_variables": {"shop": "My shop"}
}

An email created from "html" has "editor_type": "html" and its HTML can still be changed through the API. An email created from "template_id" is edited in the editor of the app (drag and drop) and its HTML cannot be changed through the API, see Editor type.

Response
201 Created Content-Type: application/json
{
 "id": 9102,
 "newsletter_id": 7802,
 "name": "Invoice",
 "email_subject": "Your invoice",
 "position": 1,
 "state": "DONE",
 "editor_type": "html",
 "is_main": false,
 "last_update_at": "2026-11-11T11:05:00",
 "version_of": null,
 "html": "<!DOCTYPE html><html>…</html>",
 "custom_template_variables": {"shop": "My shop"},
 "tags_to_add": [],
 "tags_to_remove": []
}

Response when the request contains a field the call does not accept (a typo, a field of the other campaign type or a read-only field). Nothing is saved.

400 Bad Request Content-Type: application/json
{
 "id": ["This field is not accepted by this request."],
 "codes": {"id": ["unknown_field"]}
}

Response when a required field is missing or a field value is invalid (codes required, invalid, null, blank, invalid_choice, does_not_exist, max_length). Example: an unknown value of "state".

400 Bad Request Content-Type: application/json
{
 "state": ["\"READY\" is not a valid choice."],
 "codes": {"state": ["invalid_choice"]}
}

Response when "email_subject" is missing.

400 Bad Request Content-Type: application/json
{
 "email_subject": ["The e-mail subject is required."],
 "codes": {"email_subject": ["email_subject_is_required"]}
}

Response when the request has neither "html" nor "template_id", or has both.

400 Bad Request Content-Type: application/json
{
 "non_field_errors": ["Provide exactly one of template_id and html."],
 "codes": {"non_field_errors": ["template_id_xor_html_required"]}
}

Response when the template in "template_id" is unknown.

400 Bad Request Content-Type: application/json
{
 "template_id": ["The email template ID was not found."],
 "codes": {"template_id": ["template_not_found"]}
}

Response when the {{ unsubscribe_link }} tag is missing in the HTML. It is checked first.

400 Bad Request Content-Type: application/json
{
 "html": ["The HTML must contain the {{ unsubscribe_link }} tag."],
 "codes": {"html": ["html_missing_unsubscribe_link"]}
}

Response when the HTML is not valid.

400 Bad Request Content-Type: application/json
{
 "html": ["The inserted HTML code contains errors, so a valid email cannot be created from it. Check the inserted HTML, find the errors and fix them. If you are not sure, use for example Claude Code AI to find and fix them."],
 "codes": {"html": ["html_is_not_valid"]}
}

Response when "custom_template_variables" is not an object (for example a list or a text).

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The custom_template_variables field must be an object of key: value pairs."],
 "codes": {"custom_template_variables": ["custom_template_variables_must_be_an_object"]}
}

Response when a variable key is not a string.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The keys of custom_template_variables must be strings."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_must_be_string"]}
}

Response when a variable key is a reserved Quanda tag name (for example contact_first_name). The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The key contact_first_name is a reserved Quanda tag and cannot be used."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_is_reserved"]}
}

Response when a variable value is neither a string nor a number. The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The value of the key product must be a text or a number."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_value_must_be_string_int_or_float"]}
}

Response when a tag in "tags_to_add" or "tags_to_remove" does not exist.

400 Bad Request Content-Type: application/json
{
 "tags_to_add": ["The tag 999 does not exist."],
 "codes": {"tags_to_add": ["tag_does_not_exist"]}
}

Response when "state" has a value other than DONE on a plan or campaign type without email states. The other fields of the request are not saved.

400 Bad Request Content-Type: application/json
{
 "state": ["E-mail states are not available for this campaign or plan."],
 "codes": {"state": ["content_states_are_not_available"]}
}

Response when "tags_to_add" or "tags_to_remove" is sent. A transactional campaign has no email tags.

400 Bad Request Content-Type: application/json
{
 "tags_to_add": ["E-mail tags are not available for this campaign type."],
 "codes": {"tags_to_add": ["content_tags_are_not_available"]}
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70. The response has no "code" field.

405 Method Not Allowed Content-Type: application/json
{
 "detail": "Method \"POST\" not allowed."
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is in progress. Pause it first.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is in progress. Pause it first.",
 "code": "campaign_is_in_progress_pause_it_first"
}

Response when the campaign already has the maximum allowed number of emails.

409 Conflict Content-Type: application/json
{
 "detail": "Another e-mail cannot be added (limit reached or campaign state).",
 "code": "content_cannot_be_added"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Response when a call with the same Idempotency-Key is still running. Repeat it after a while.

409 Conflict Content-Type: application/json
{
 "detail": "A request with the same Idempotency-Key is still being processed. Repeat it in a moment.",
 "code": "idempotency_key_is_being_processed"
}

The limit is 50 emails per transactional campaign. The fields "state", "tags_to_add" and "tags_to_remove" and the email order call apply to a series only.

Email detail

The call returns any email of the transactional campaign, the main one as well as the others, including its HTML. You get the content_id from creating the campaign, from adding an email or from the list of emails. To edit the email, use the Update email call; to delete it, use the Delete email call.

GEThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/content/{content_id}/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
content_idintegertrueEmail ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
200 OK Content-Type: application/json
{
 "id": 9102,
 "newsletter_id": 7802,
 "name": "Invoice",
 "email_subject": "Your invoice",
 "position": 1,
 "state": "DONE",
 "editor_type": "html",
 "is_main": false,
 "last_update_at": "2026-11-11T11:05:00",
 "version_of": null,
 "html": "<!DOCTYPE html><html>…</html>",
 "custom_template_variables": {"shop": "My shop"},
 "tags_to_add": [],
 "tags_to_remove": []
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign or email does not exist, belongs to another account or is deleted.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Update email

The call with content_id edits any email of the transactional campaign, the main one as well as the others. It changes only the fields you send. You get the content_id from creating the campaign, from adding an email or from the list of emails. The main email can also be edited with the shortcut without content_id, see Update the main email.

PUThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/content/{content_id}/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
content_idintegertrueEmail ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
email_subjectstringfalseSubject
htmlstringfalseValid HTML with {{ unsubscribe_link }}
namestringfalseInternal name; defaults to the subject
custom_template_variablesobjectfalseCustom variables
{
 "name": "Invoice",
 "email_subject": "Invoice for your order",
 "html": "<!DOCTYPE html><html>… {{ unsubscribe_link }} …</html>",
 "custom_template_variables": {"shop": "My shop"}
}

The example shows all fields. You only need to send the ones you are changing. The PUT call does not accept the "template_id" field (400).

Response
200 OK Content-Type: application/json
{
 "id": 9102,
 "newsletter_id": 7802,
 "name": "Invoice",
 "email_subject": "Invoice for your order",
 "position": 1,
 "state": "DONE",
 "editor_type": "html",
 "is_main": false,
 "last_update_at": "2026-11-11T11:30:00",
 "version_of": null,
 "html": "<!DOCTYPE html><html>…</html>",
 "custom_template_variables": {"shop": "My shop"},
 "tags_to_add": [],
 "tags_to_remove": []
}

Response when the request contains a field the call does not accept (a typo, a field of the other campaign type or a read-only field). Nothing is saved.

400 Bad Request Content-Type: application/json
{
 "id": ["This field is not accepted by this request."],
 "codes": {"id": ["unknown_field"]}
}

Response when a required field is missing or a field value is invalid (codes required, invalid, null, blank, invalid_choice, does_not_exist, max_length). Example: an unknown value of "state".

400 Bad Request Content-Type: application/json
{
 "state": ["\"READY\" is not a valid choice."],
 "codes": {"state": ["invalid_choice"]}
}

Response when "template_id" is sent when updating an email. A template can be chosen only when the email is created.

400 Bad Request Content-Type: application/json
{
 "template_id": ["A template can be chosen only when the e-mail is created."],
 "codes": {"template_id": ["template_only_on_create"]}
}

Response when the {{ unsubscribe_link }} tag is missing in the HTML. It is checked first.

400 Bad Request Content-Type: application/json
{
 "html": ["The HTML must contain the {{ unsubscribe_link }} tag."],
 "codes": {"html": ["html_missing_unsubscribe_link"]}
}

Response when the HTML is not valid.

400 Bad Request Content-Type: application/json
{
 "html": ["The inserted HTML code contains errors, so a valid email cannot be created from it. Check the inserted HTML, find the errors and fix them. If you are not sure, use for example Claude Code AI to find and fix them."],
 "codes": {"html": ["html_is_not_valid"]}
}

Response when "custom_template_variables" is not an object (for example a list or a text).

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The custom_template_variables field must be an object of key: value pairs."],
 "codes": {"custom_template_variables": ["custom_template_variables_must_be_an_object"]}
}

Response when a variable key is not a string.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The keys of custom_template_variables must be strings."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_must_be_string"]}
}

Response when a variable key is a reserved Quanda tag name (for example contact_first_name). The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The key contact_first_name is a reserved Quanda tag and cannot be used."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_is_reserved"]}
}

Response when a variable value is neither a string nor a number. The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The value of the key product must be a text or a number."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_value_must_be_string_int_or_float"]}
}

Response when a tag in "tags_to_add" or "tags_to_remove" does not exist.

400 Bad Request Content-Type: application/json
{
 "tags_to_add": ["The tag 999 does not exist."],
 "codes": {"tags_to_add": ["tag_does_not_exist"]}
}

Response when "state" has a value other than DONE on a plan or campaign type without email states. The other fields of the request are not saved.

400 Bad Request Content-Type: application/json
{
 "state": ["E-mail states are not available for this campaign or plan."],
 "codes": {"state": ["content_states_are_not_available"]}
}

Response when "tags_to_add" or "tags_to_remove" is sent. A transactional campaign has no email tags.

400 Bad Request Content-Type: application/json
{
 "tags_to_add": ["E-mail tags are not available for this campaign type."],
 "codes": {"tags_to_add": ["content_tags_are_not_available"]}
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign or email does not exist, belongs to another account or is deleted.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is running and the call changes a field other than "state". Pause the campaign first.

409 Conflict Content-Type: application/json
{
 "detail": "While the campaign is in progress, only the email state can be changed. Pause it to make other changes.",
 "code": "only_state_can_be_changed_in_progress"
}

Response when "state": "DONE" is sent for a running campaign.

409 Conflict Content-Type: application/json
{
 "detail": "The state Done cannot be set while the campaign is in progress.",
 "code": "done_cannot_be_set_in_progress"
}

Response when the "html" field is changed for an email with "editor_type": "json".

409 Conflict Content-Type: application/json
{
 "detail": "The e-mail was made in the visual editor and its HTML cannot be changed through the API.",
 "code": "content_is_not_html"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Editor type

The HTML of an email can be changed through the API only for emails created as HTML ("editor_type": "html"), that is, created through the API with the "html" field or in the HTML editor of the app. An email created in the drag and drop editor or from a template ("template_id") has "editor_type": "json". A PUT call with the "html" field returns 409 with an explanation for such an email and the email is not changed. Its other fields ("name", "email_subject", "custom_template_variables") can be changed. You can find the editor type in the list of emails and in the email detail.

New email version: when the campaign is running, the email has already been sent and its links change (also through values in "custom_template_variables" that are part of a link), the original email is kept for statistics and a new version is created. The response then carries a new "id" and a "version_of" field with the original id. The "version_of" field is filled only in the response of the call that created the new version; in the email detail, the email list and the campaign settings it is null afterwards. The original id stops existing in the API (404), use the new one from then on.

Update the main email

A shortcut without content_id, the same address as for a simple email campaign. It edits the main email of the campaign, that is, the one the campaign was created with; it has "is_main": true in the list of emails. Use it when you do not know its content_id. No other email can be edited with this call.

Any email, including the main one, can also be edited with the call that uses content_id, see Update email. The body and the response are the same. The HTML can only be changed for emails with "editor_type": "html", see Editor type.

PUThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/content/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
email_subjectstringfalseSubject
htmlstringfalseValid HTML with {{ unsubscribe_link }}
namestringfalseInternal name; defaults to the subject
custom_template_variablesobjectfalseCustom variables
{
 "name": "Order confirmation",
 "email_subject": "Your order is confirmed",
 "html": "<!DOCTYPE html><html>… <a href=\"{{ unsubscribe_link }}\">unsubscribe</a> …</html>",
 "custom_template_variables": {"shop": "My shop"}
}

The example shows all fields. You only need to send the ones you are changing. The PUT call does not accept the "template_id" field (400).

Response
200 OK Content-Type: application/json
{
 "id": 9101,
 "newsletter_id": 7801,
 "name": "Order confirmation",
 "email_subject": "Your order is confirmed",
 "position": 0,
 "state": "DONE",
 "editor_type": "html",
 "is_main": true,
 "last_update_at": "2026-11-11T11:20:00",
 "version_of": null,
 "html": "<!DOCTYPE html><html>…</html>",
 "custom_template_variables": {"shop": "My shop"},
 "tags_to_add": [],
 "tags_to_remove": []
}

Response when the request contains a field the call does not accept (a typo, a field of the other campaign type or a read-only field). Nothing is saved.

400 Bad Request Content-Type: application/json
{
 "id": ["This field is not accepted by this request."],
 "codes": {"id": ["unknown_field"]}
}

Response when a required field is missing or a field value is invalid (codes required, invalid, null, blank, invalid_choice, does_not_exist, max_length). Example: an unknown value of "state".

400 Bad Request Content-Type: application/json
{
 "state": ["\"READY\" is not a valid choice."],
 "codes": {"state": ["invalid_choice"]}
}

Response when "template_id" is sent when updating an email. A template can be chosen only when the email is created.

400 Bad Request Content-Type: application/json
{
 "template_id": ["A template can be chosen only when the e-mail is created."],
 "codes": {"template_id": ["template_only_on_create"]}
}

Response when the {{ unsubscribe_link }} tag is missing in the HTML. It is checked first.

400 Bad Request Content-Type: application/json
{
 "html": ["The HTML must contain the {{ unsubscribe_link }} tag."],
 "codes": {"html": ["html_missing_unsubscribe_link"]}
}

Response when the HTML is not valid.

400 Bad Request Content-Type: application/json
{
 "html": ["The inserted HTML code contains errors, so a valid email cannot be created from it. Check the inserted HTML, find the errors and fix them. If you are not sure, use for example Claude Code AI to find and fix them."],
 "codes": {"html": ["html_is_not_valid"]}
}

Response when "custom_template_variables" is not an object (for example a list or a text).

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The custom_template_variables field must be an object of key: value pairs."],
 "codes": {"custom_template_variables": ["custom_template_variables_must_be_an_object"]}
}

Response when a variable key is not a string.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The keys of custom_template_variables must be strings."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_must_be_string"]}
}

Response when a variable key is a reserved Quanda tag name (for example contact_first_name). The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The key contact_first_name is a reserved Quanda tag and cannot be used."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_is_reserved"]}
}

Response when a variable value is neither a string nor a number. The name of the key is in the error text.

400 Bad Request Content-Type: application/json
{
 "custom_template_variables": ["The value of the key product must be a text or a number."],
 "codes": {"custom_template_variables": ["custom_template_variables_key_value_must_be_string_int_or_float"]}
}

Response when a tag in "tags_to_add" or "tags_to_remove" does not exist.

400 Bad Request Content-Type: application/json
{
 "tags_to_add": ["The tag 999 does not exist."],
 "codes": {"tags_to_add": ["tag_does_not_exist"]}
}

Response when "state" has a value other than DONE on a plan or campaign type without email states. The other fields of the request are not saved.

400 Bad Request Content-Type: application/json
{
 "state": ["E-mail states are not available for this campaign or plan."],
 "codes": {"state": ["content_states_are_not_available"]}
}

Response when "tags_to_add" or "tags_to_remove" is sent. A transactional campaign has no email tags.

400 Bad Request Content-Type: application/json
{
 "tags_to_add": ["E-mail tags are not available for this campaign type."],
 "codes": {"tags_to_add": ["content_tags_are_not_available"]}
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign has no active main email. A campaign that does not exist returns 404 without the "code" field.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is running and the call changes a field other than "state". Pause the campaign first.

409 Conflict Content-Type: application/json
{
 "detail": "While the campaign is in progress, only the email state can be changed. Pause it to make other changes.",
 "code": "only_state_can_be_changed_in_progress"
}

Response when "state": "DONE" is sent for a running campaign.

409 Conflict Content-Type: application/json
{
 "detail": "The state Done cannot be set while the campaign is in progress.",
 "code": "done_cannot_be_set_in_progress"
}

Response when the "html" field is changed for an email with "editor_type": "json".

409 Conflict Content-Type: application/json
{
 "detail": "The e-mail was made in the visual editor and its HTML cannot be changed through the API.",
 "code": "content_is_not_html"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Delete email

The call deletes an email of a transactional campaign in the Under construction or Paused status. You get the content_id from the list of emails. You cannot delete the only email of a campaign, the main email of a transactional campaign or an email used by an automation. The call then returns 409.

DELETEhttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/content/{content_id}/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
content_idintegertrueEmail ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
204 No Content Content-Type: application/json

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign or email does not exist, belongs to another account or is deleted.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is in progress. Pause it first.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is in progress. Pause it first.",
 "code": "campaign_is_in_progress_pause_it_first"
}

Response when deleting the main email of a transactional campaign.

409 Conflict Content-Type: application/json
{
 "detail": "The main email of a transactional campaign cannot be deleted.",
 "code": "main_content_cannot_be_deleted"
}

Response when deleting the only email of a campaign.

409 Conflict Content-Type: application/json
{
 "detail": "The only email of the campaign cannot be deleted.",
 "code": "only_content_cannot_be_deleted"
}

Response when the email cannot be deleted for another reason.

409 Conflict Content-Type: application/json
{
 "detail": "The e-mail cannot be deleted (main or only e-mail, or campaign state).",
 "code": "content_cannot_be_deleted"
}

Response when the email is used in an automation.

409 Conflict Content-Type: application/json
{
 "detail": "The e-mail is used in an automation. Remove it from there first.",
 "code": "content_is_used_in_automation"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Send test emails

The call sends a preview of the emails to the given addresses, at most three. Call it before activation or for a paused campaign. The account must contain at least one contact, it is used to preview the variables.

POSThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/send-test/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
emailsarray of stringstrueAt most 3 addresses
strategystringfalseall (default) = all emails, changed_today = only emails edited today, select = selected emails
content_idsarray of integerstrue for strategy selectIDs of the emails to test

The call is synchronous. The first test of a newly created or changed email includes the spam check and takes roughly 1.5 to 2 s per email; a repeated test is fast (measured: 12 emails 19 s the first time, 3.5 s repeated). Set the client timeout to at least 60 s and for campaigns with more than about 20 emails send the test in batches with the select strategy and "content_ids".

The changed_today strategy selects the active emails (for a series those in the DONE state) whose subject, HTML or "custom_template_variables" changed today. A change of the name, state or tags does not count and does not change "last_update_at".

{
 "emails": ["test@example.com", "colleague@example.com"],
 "strategy": "select",
 "content_ids": [9101, 9102]
}

The "content_ids" field is sent only with strategy select.

Response
200 OK Content-Type: application/json

The response has no body.

Response when the request contains a field the call does not accept (a typo, a field of the other campaign type or a read-only field). Nothing is saved.

400 Bad Request Content-Type: application/json
{
 "id": ["This field is not accepted by this request."],
 "codes": {"id": ["unknown_field"]}
}

Response when a required field is missing or a field value is invalid (codes required, invalid, null, blank, invalid_choice, does_not_exist, max_length). Example: an invalid address in "emails".

400 Bad Request Content-Type: application/json
{
 "emails": ["Enter a valid email address."],
 "codes": {"emails": ["invalid"]}
}

Response when "strategy": "select" is sent without "content_ids".

400 Bad Request Content-Type: application/json
{
 "content_ids": ["With the select strategy, content_ids are required."],
 "codes": {"content_ids": ["content_ids_are_required"]}
}

Response when "emails" has more than three addresses.

400 Bad Request Content-Type: application/json
{
 "detail": "The maximum number (3) of email addresses for sending a test email has been exceeded.",
 "code": "maximum_number_of_emails_exceeded"
}

Response when the account has no contact. A transactional campaign uses it to render the preview and test.

400 Bad Request Content-Type: application/json
{
 "detail": "The account has no contact, which is needed for the preview and test.",
 "code": "customer_has_no_contacts"
}

Response for the changed_today option when no email was edited today.

400 Bad Request Content-Type: application/json
{
 "detail": "No email was changed today.",
 "code": "no_content_changed_today"
}

Response when an email from "content_ids" is not an active email of the campaign. The email ID is in the error text.

400 Bad Request Content-Type: application/json
{
 "detail": "The e-mail 9002 is not an active e-mail of this campaign.",
 "code": "content_is_not_active"
}

Response when the campaign has no active email.

400 Bad Request Content-Type: application/json
{
 "detail": "The campaign has no active e-mail.",
 "code": "campaign_has_no_active_content"
}

Response when an email contains forbidden words or domains. The body lists the findings.

400 Bad Request Content-Type: application/json
{
 "blacklisted_words": ["Moneta"],
 "blacklisted_domains": [],
 "code": "content_is_blacklisted"
}

Response when the campaign did not pass the SPAM test and is blocked.

400 Bad Request Content-Type: application/json
{
 "detail": "The campaign is blocked because it did not pass the SPAM test.",
 "code": "campaign_is_spam_blocked"
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the limit of test emails in the plan is exceeded.

403 Forbidden Content-Type: application/json
{
 "detail": "Your limit for the number of sent test emails has been exceeded. Please contact support at support@onquanda.com.",
 "code": "test_email_count_add_restriction"
}

Response when the campaign does not exist, belongs to another account or is deleted. The response has no "code" field.

404 Not Found Content-Type: application/json
{
 "detail": "Not found."
}

Response when the campaign is in progress or finished. A test can be sent before the start or while the campaign is paused.

409 Conflict Content-Type: application/json
{
 "detail": "A test can be sent before the start or while the campaign is paused.",
 "code": "test_is_not_available_in_this_state"
}

Activate transactional campaign

The call starts the transactional campaign. It is sent without a body. The checks before activation run first. Until every check passes, the campaign stays unchanged.

POSThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/activate/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
200 OK Content-Type: application/json
{
 "id": 4712,
 "state": 20,
 "activated_at": "2026-12-01T09:00:00"
}

Response when the request has a body with any field. A transactional campaign is activated without a body.

400 Bad Request Content-Type: application/json
{
 "start_at": ["This field is not accepted by this request."],
 "codes": {"start_at": ["unknown_field"]}
}

Response when sending from an unverified domain.

400 Bad Request Content-Type: application/json
{
 "detail": "Sending from an unverified domain is not allowed. Verify the sender domain.",
 "code": "sending_to_unverified_domains_is_not_allowed"
}

Response when the account has no contact. A transactional campaign uses it to render the preview and test.

400 Bad Request Content-Type: application/json
{
 "detail": "The account has no contact, which is needed for the preview and test.",
 "code": "customer_has_no_contacts"
}

Response when the campaign has no email ready to be sent (for a series with email states only emails in the DONE state).

400 Bad Request Content-Type: application/json
{
 "detail": "The campaign has no email ready to be sent.",
 "code": "campaign_has_no_content"
}

Response when one of the emails is not valid. The name of the email is in the error text.

400 Bad Request Content-Type: application/json
{
 "detail": "The e-mail Uvítání is not valid.",
 "code": "content_is_not_valid"
}

Response when an email contains forbidden words or domains. The body lists the findings.

400 Bad Request Content-Type: application/json
{
 "blacklisted_words": ["Moneta"],
 "blacklisted_domains": [],
 "code": "content_is_blacklisted"
}

Response when the campaign did not pass the SPAM test and is blocked.

400 Bad Request Content-Type: application/json
{
 "detail": "The campaign is blocked because it did not pass the SPAM test.",
 "code": "campaign_is_spam_blocked"
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the account email is not verified.

403 Forbidden Content-Type: application/json
{
 "detail": "The email of your account is not verified. Verify it and try again.",
 "code": "customer_is_not_verified"
}

Response when the plan does not allow another running campaign of this type.

403 Forbidden Content-Type: application/json
{
 "detail": "Your plan does not allow you to run another campaign of this type.",
 "code": "in_progress_count_add_restriction"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is already in progress.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is already in progress.",
 "code": "campaign_is_already_active"
}

Response for a paused campaign that has already sent something and can continue. Use the resume call.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is paused. Continue with resume.",
 "code": "campaign_is_paused_use_resume"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Pause transactional campaign

Pause the campaign before you start changing anything in it. A running campaign moves to the Paused status. Once you are done, resume it with the Resume transactional campaign call.

POSThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/pause/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
200 OK Content-Type: application/json
{
 "id": 4712,
 "state": 10,
 "activated_at": "2026-12-01T09:00:00"
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is not in progress.

409 Conflict Content-Type: application/json
{
 "detail": "Only a campaign in progress can be paused.",
 "code": "campaign_is_not_in_progress"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Resume transactional campaign

The call resumes a paused transactional campaign. Call it once you have finished your changes. The same checks run as on activation, except for the sending domain.

POSThttps://api.onquanda.com/api/newsletter/campaigns/{campaign_id}/resume/
URI ParametersTypeRequiredNote
campaign_idintegertrueCampaign ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

No body.

Response
200 OK Content-Type: application/json
{
 "id": 4712,
 "state": 20,
 "activated_at": "2026-12-01T09:00:00"
}

Response when the account has no contact. A transactional campaign uses it to render the preview and test.

400 Bad Request Content-Type: application/json
{
 "detail": "The account has no contact, which is needed for the preview and test.",
 "code": "customer_has_no_contacts"
}

Response when the campaign has no email ready to be sent (for a series with email states only emails in the DONE state).

400 Bad Request Content-Type: application/json
{
 "detail": "The campaign has no email ready to be sent.",
 "code": "campaign_has_no_content"
}

Response when one of the emails is not valid. The name of the email is in the error text.

400 Bad Request Content-Type: application/json
{
 "detail": "The e-mail Uvítání is not valid.",
 "code": "content_is_not_valid"
}

Response when an email contains forbidden words or domains. The body lists the findings.

400 Bad Request Content-Type: application/json
{
 "blacklisted_words": ["Moneta"],
 "blacklisted_domains": [],
 "code": "content_is_blacklisted"
}

Response when the campaign did not pass the SPAM test and is blocked.

400 Bad Request Content-Type: application/json
{
 "detail": "The campaign is blocked because it did not pass the SPAM test.",
 "code": "campaign_is_spam_blocked"
}

Response when blocked by the plan.

403 Forbidden Content-Type: application/json
{
 "detail": "Your current plan does not allow you to manage email campaigns using the API. Please contact support at support@onquanda.com.",
 "code": "plan_does_not_allow_campaign_api"
}

Response when the account email is not verified.

403 Forbidden Content-Type: application/json
{
 "detail": "The email of your account is not verified. Verify it and try again.",
 "code": "customer_is_not_verified"
}

Response when the plan does not allow another running campaign of this type.

403 Forbidden Content-Type: application/json
{
 "detail": "Your plan does not allow you to run another campaign of this type.",
 "code": "in_progress_count_add_restriction"
}

Response when the campaign does not exist, belongs to another account, is deleted or is not of type 30 or 70.

404 Not Found Content-Type: application/json
{
 "detail": "Not found.",
 "code": "not_found"
}

Response for a registration campaign of the account. It is read-only through the API.

409 Conflict Content-Type: application/json
{
 "detail": "A registration campaign cannot be changed through the API.",
 "code": "registration_campaign_is_read_only"
}

Response when the campaign is finished.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign is finished and cannot be changed.",
 "code": "campaign_is_finished"
}

Response when the campaign is not paused.

409 Conflict Content-Type: application/json
{
 "detail": "Only a paused campaign can be resumed.",
 "code": "campaign_is_not_paused"
}

Response when the campaign has not sent anything yet (it was paused before the first send). Continue with the activate call.

409 Conflict Content-Type: application/json
{
 "detail": "The campaign has not sent anything yet, so there is no schedule to continue. Call activate with a start date and period.",
 "code": "series_has_not_dispatched_yet"
}

Response when another call is changing the campaign right now (for example activation). Nothing was changed, repeat the call.

409 Conflict Content-Type: application/json
{
 "detail": "Another request is changing the campaign right now. Nothing was changed, please try again.",
 "code": "campaign_is_being_changed_try_again"
}

Sending a transactional email

The transactional campaign must be activated, in the app or with the activate call.

PUThttps://api.onquanda.com/api/newsletter/campaign/{transactional_campaign_id}/add-contact/{contact_id}/
URI ParametersTypeRequiredNote
transactional_campaign_idintegertrueTransactional email ID
contact_idintegertrueContact ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
send_anywaybooleanfalsetrue = the email is always sent, even if the contact is unsubscribed
attachmentsarray of stringsfalseURLs of the files sent as attachments
custom_template_variablesobjectfalseCustom template variables as key: value
{
 "send_anyway": true,
 "attachments": ["https://www.quanda.cz/media/download/ebook-jak-napsat-predmet-emailu/e-book-jak-napsat-predmet-e-mailu.pdf"],
 "custom_template_variables": {
 "key_1": "value_1",
 "key_2": "value_2",
 "key_3": "value_3"
 }
}

Schema

{
 "send_anyway": {
 "type": "boolean",
 "required": false,
 "read_only": false,
 "label": "Odeslat vždy",
 "help": "Pokud je uvedeno true, transakční e-mail je odeslán vždy a to i v případě, že je daný kontakt odhlášen"
 },
 "attachments": {
 "type": "string",
 "required": false,
 "read_only": false,
 "label": "Příloha",
 "help": "URL adresa souboru, který má být odeslán jako příloha transakčního e-mailu"
 },
 "custom_template_variables": {
 "type": "collection",
 "required": false,
 "read_only": false,
 "label": "Proměnné šablony",
 "help": "Vlastní proměnné pro šablonu e-mailu ve formátu klíč–hodnota",
 "spec": [
 {
 "name": "key_1",
 "type": "string",
 "label": "Klíč 1"
 },
 {
 "name": "key_2",
 "type": "string",
 "label": "Klíč 2"
 },
 {
 "name": "key_3",
 "type": "string",
 "label": "Klíč 3"
 }
 ]
 }
}

Allowed attachment types

doc, docx, xls, xlsx, ppt, pptx, jpeg, jpg, gif, png, bmp and pdf

Maximum attachment size

20MB

Custom template content defined using inserted tags

Define key-value pairs to replace custom tags in the email template. The key must match the name of the tag used in the email template (e.g. the key 'order_number' replaces the tag {{ order_number }} in the email template).

In order to insert into the chosen template, according to "template_id", the html content sent via the API request in "custom_template_variables", the email template must contain the tags {{ key_1 }}, {{ key_2 }} etc. These tags are then replaced in the email template by the content sent via "value_1", "value_2" etc.

Response
201 Created Content-Type: application/json

Response in case of a disallowed attachment type.

400 Bad Request Content-Type: application/json
{
 "attachments": [
 "Příloha typu .exe není povolena"
 ]
}

Response in case of an invalid url or a non-existent file at the given url.

400 Bad Request Content-Type: application/json
{
 "error": "Na uvedené adrese se nenachází žádný soubor nebo uvedená url adresa není platná. Zkontrolujte zadanou adresu: https://ww.quanda.cz/media/download/ebook-jak-napsat-predmet-emailu/e-book-jak-napsat-predmet-e-mailu.pdf"
}

Response when the campaign ID or contact ID does not exist.

404 Not Found Content-Type: application/json
{
 "detail": "Nenalezeno."
}

Sending a transactional email with a survey invitation with prefilled answers

  • The transactional email being sent must contain a link to the survey.
  • The individual IDs of questions and answers can be obtained using a separate API query described in the Surveys section.
  • Prefilled answers cannot be further edited in the survey.
  • If an answer is not prefilled, the respondent can select it.
PUThttps://api.onquanda.com/api/newsletter/campaign/{transactional_campaign_id}/add-contact/{contact_id}/
URI ParametersTypeRequiredNote
transactional_campaign_idintegertrueTransactional email ID
contact_idintegertrueContact ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
survey_dataobjecttruePre-filled survey answers
question_answersarray of objectstrueAnswers to individual questions
question_idintegertrueQuestion ID
answerstringdepends on the question typeAnswer for text, date, number and percentage scale questions
option_idintegerdepends on the question typeID of the selected option
subquestion_answersarray of objectsdepends on the question typeAnswers per row for multi-row questions and scales
subquestion_idintegertrueID of the question row
_commentstringfalseComment, the question type in the example
{
 "survey_data": {
 "question_answers": [
 {
 "_comment": "Krátký text",
 "question_id": 58888,
 "answer": "Ahoj"
 },
 {
 "_comment": "Delší text",
 "question_id": 58889,
 "answer": "Dodnes je to druhé nejprodávanější album v historii. Ale vznikalo ve velkých bolestech po smrti zpěváka AC/DC. Ostatní chtěli kapelu rozpustit, nakonec nahráli album, ze kterého temné pocity přímo kapou. Back in Black se navždy zapsalo do uší a srdcí posluchačů."
 },
 {
 "_comment": "Text (více řádků)",
 "question_id": 58890,
 "subquestion_answers": [
 {
 "subquestion_id": 1654,
 "answer": "Kšiltovka"
 },
 {
 "subquestion_id": 1655,
 "answer": "Černé"
 },
 {
 "subquestion_id": 1656,
 "answer": "Zimní"
 }
 ]
 },
 {
 "_comment": "Datum",
 "question_id": 58891,
 "answer": "2025-07-25"
 },
 {
 "_comment": "Datum (více řádků)",
 "question_id": 58892,
 "subquestion_answers": [
 {
 "subquestion_id": 145,
 "answer": "2025-07-01"
 },
 {
 "subquestion_id": 146,
 "answer": "2025-07-02"
 },
 {
 "subquestion_id": 147,
 "answer": "2025-07-03"
 }
 ]
 },
 {
 "_comment": "Číslo",
 "question_id": 58893,
 "answer": "100"
 },
 {
 "_comment": "Číslo (více řádků)",
 "question_id": 58894,
 "subquestion_answers": [
 {
 "subquestion_id": 2015,
 "answer": "101"
 },
 {
 "subquestion_id": 2016,
 "answer": "102"
 },
 {
 "subquestion_id": 2017,
 "answer": "103"
 }
 ]
 },
 {
 "_comment": "Jedna odpověď",
 "question_id": 58895,
 "option_id": 46813
 },
 {
 "_comment": "Více odpovědí",
 "question_id": 58896,
 "option_id": 31734
 },
 {
 "question_id": 58896,
 "option_id": 31736
 },
 {
 "question_id": 58896,
 "option_id": 31738
 },
 {
 "_comment": "Rozbalovací menu",
 "question_id": 58897,
 "option_id": 16164
 },
 {
 "_comment": "Škála spokojenosti",
 "question_id": 58898,
 "subquestion_answers": [
 {
 "subquestion_id": 29,
 "option_id": 69
 }
 ]
 },
 {
 "_comment": "Škála souhlasu",
 "question_id": 58899,
 "subquestion_answers": [
 {
 "subquestion_id": 19,
 "option_id": 31
 }
 ]
 },
 {
 "_comment": "% škála - předvyplněná hodnota 80 %",
 "question_id": 58900,
 "subquestion_answers": [
 {
 "subquestion_id": 15,
 "answer": 80
 }
 ]
 },
 {
 "_comment": "Hvězdičkové hodnocení",
 "question_id": 58901,
 "subquestion_answers": [
 {
 "subquestion_id": 48,
 "option_id": 370
 }
 ]
 },
 {
 "_comment": "Smajlíkové hodnocení",
 "question_id": 58902,
 "subquestion_answers": [
 {
 "subquestion_id": 39,
 "option_id": 143
 }
 ]
 },
 {
 "_comment": "Škála postojů - předvyplněné hodnoty dle řádků jsou -2, 3 a -3",
 "question_id": 58903,
 "subquestion_answers": [
 {
 "subquestion_id": 11,
 "answer": -2
 },
 {
 "subquestion_id": 12,
 "answer": 3
 },
 {
 "subquestion_id": 13,
 "answer": -3
 }
 ]
 },
 {
 "_comment": "NPS - Net promoter Score",
 "question_id": 58904,
 "subquestion_answers": [
 {
 "subquestion_id": 112,
 "option_id": 1227
 }
 ]
 },
 {
 "_comment": "Tabulka (jedna odpověď)",
 "question_id": 58905,
 "subquestion_answers": [
 {
 "subquestion_id": 5320,
 "option_id": 4005
 },
 {
 "subquestion_id": 5321,
 "option_id": 4007
 }
 ]
 },
 {
 "_comment": "Tabulka (více odpověďí)",
 "question_id": 58906,
 "subquestion_answers": [
 {
 "subquestion_id": 5434,
 "option_id": 3938
 },
 {
 "subquestion_id": 5435,
 "option_id": 3937
 }
 ]
 },
 {
 "_comment": "Vytvořit kontakt",
 "question_id": 58907,
 "subquestion_answers": [
 {
 "subquestion_id": 52,
 "answer": "Jan"
 },
 {
 "subquestion_id": 53,
 "answer": "Spáčil"
 },
 {
 "subquestion_id": 54,
 "answer": "spacil+1@quanda.com"
 }
 ]
 }

 ]
 }
}

Note

In addition to prefilled answers, the Body can also contain the "send_anyway" and "attachments" items.

Response
201 Created Content-Type: application/json

Response when the campaign ID or contact ID does not exist.

404 Not Found Content-Type: application/json
{
 "detail": "Nenalezeno."
}

Email recipients

List of recipients

The list of recipients can be filtered using the parameters listed below.

GEThttps://api.onquanda.com/api/newsletter/newsletters/{id}/recipients/
URI ParametersTypeRequiredNote
idintegerfalsenewsletters/{id} = Campaign ID
GEThttps://api.onquanda.com/api/newsletter/newsletters/{id}/recipients/?message_id={id}
Query ParametersTypeRequiredExampleNote
message_idintegerfalsemessage_id=805501The ID of a specific email. For example, for a transactional email it returns a specific recipient. A call without this parameter returns a list of all recipients to whom the given transactional email was sent.
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 126878177,
"email": "info@quanda.cz",
"tracked": true,
"clicked": true,
"unsubscribed": false,
"status": "delivered",
"sent_at": "2020-09-10T10:00:40.983297"
}
]
}

Recipient detail and statistics

GEThttps://api.onquanda.com/api/newsletter/newsletters/{newsletters_id}/recipients/{recipient_id}/
URI ParametersTypeRequiredNote
newsletters_idintegerfalseID of the sent email
recipient_idintegerfalseRecipient ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "id": 277631513,
 "email": "spacil+4002@quanda.com",
 "tracked": true,
 "opened": true,
 "opened_at": "2024-09-13T13:47:44",
 "last_opened_at": "2024-09-13T13:50:43",
 "opened_at_list": [
 "2024-09-13T13:47:44",
 "2024-09-13T13:47:51",
 "2024-09-13T13:47:51",
 "2024-09-13T13:48:16",
 "2024-09-13T13:48:16",
 "2024-09-13T13:48:12",
 "2024-09-13T13:48:18",
 "2024-09-13T13:48:20",
 "2024-09-13T13:49:57",
 "2024-09-13T13:50:43"
 ],
 "clicked": true,
 "unsubscribed": false,
 "unsubscribed_at": null,
 "status": "delivered",
 "data": null,
 "sent_at": "2024-09-13T13:47:37",
 "link_clicks": [
 {
 "link": {
 "url": "http://www.quanda.cz",
 "social_type": null,
 "position_type": "button",
 "text": "Zjistěte více",
 "title": "Zjistěte více"
 },
 "clicked_at": "2024-09-13T13:47:57"
 }
 ],
 "spam_complained_at": null,
 "bounce_reason": null,
 "not_delivered_at": null,
 "user_agent": "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)"
}

Surveys

List of surveys

GEThttps://api.onquanda.com/api/survey/surveys/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "count": 5,
 "next": null,
 "previous": null,
 "results": [
 {
 "id": 32505
 },
 {
 "id": 74913
 },
 {
 "id": 6260
 },
 {
 "id": 8852
 },
 {
 "id": 21373
 }
 ]
}

Survey detail

GEThttps://api.onquanda.com/api/survey/surveys/{id}/
URI ParametersTypeRequiredNote
idintegerfalseSurvey ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "id": 32505,
 "name": "Trendy e-mail marketingu 2017"
}

List of survey respondents

Every sent and saved survey has an assigned respondent. The Respondent ID does not correspond to the Contact ID. To find the contact that corresponds to the Respondent ID, a separate API call is required. The Contact ID for a saved survey is available only if the contact who filled in the survey was successfully identified. Contact identification occurs only if this contact entered the survey by clicking through an email invitation sent from Quanda.

GEThttps://api.onquanda.com/api/survey/surveys/{id}/respondents/
URI ParametersTypeRequiredNote
idintegerfalsesurveys/{id} = Survey ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "count": 5,
 "next": "https://quanda.onquanda.com/api/survey/surveys/32505/respondents/?page=2",
 "previous": null,
 "results": [
 {
 "id": 120073
 },
 {
 "id": 120686
 },
 {
 "id": 120688
 },
 {
 "id": 120689
 },
 {
 "id": 120690
 }
 ]
}

Detail of a completed survey

If the survey uses a question of type Table (one answer) or Table (multiple answers), the resulting json uses "subtitle", which corresponds to the "Answer row name" item when entering the question.

GEThttps://api.onquanda.com/api/survey/surveys/{survey_id}/respondents/{respondent_id}/
URI ParametersTypeRequiredNote
survey_idintegerfalseSurvey ID
respondent_idintegerfalseRespondent ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "id": 127681,
 "url_questionnaire": "https://quanda.onquanda.com/survey/respondent/32505/127681/",
 "survey_name": "Trendy e-mail marketingu 2017",
 "answers": [
 {
 "title": "Jak často měníte svou e-mailovou adresu?",
 "answer": "Nikdy",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "U jakého poskytovatele máte registrovaný e-mail, který nejčastěji používáte?",
 "answer": "Používám svůj firemní e-mail",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Jakého e-mailové klienta nejčastěji používáte?",
 "answer": "Outlook",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Používáte synchronizaci e-mailů mezi mobilním telefonem a PC?",
 "answer": "Ano",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Používáte automatické třídění e-mailů v doručené poště?",
 "answer": "Ne",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Na jakém zařízení nejčastěji čtete Vaše e-maily?",
 "subtitle": "v práci / kanceláři",
 "answer": "Stolní počítač",
 "type": 12,
 "is_answered": true
 },
 {
 "title": "Na jakém zařízení nejčastěji čtete Vaše e-maily?",
 "subtitle": "mimo práci / kancelář",
 "answer": "Mobil",
 "type": 12,
 "is_answered": true
 },
 {
 "title": "Očekáváte, že obsah e-mailu, který Vám přijde:",
 "answer": "bude kompletní a nebude již potřeba navštívit web pro zobrazení všech informací",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Jaký preferujete formát, ve kterém dostáváte e-maily?",
 "answer": "HTML (e-mail s obrázky, odkazy atd.)",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Očekáváte, že e-maily, které Vám přijdou, budou obsahovat:",
 "answer": "Kombinaci obrázků a textu, kde text převažuje",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Očekáváte, že obsah e-mailu, který Vám přijde, se po otevření:",
 "answer": "zobrazí tak, že vidíte hlavní informace na obrazovce a nevadí Vám rolovat, pokud je e-mail delší",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Svou e-mailovou schránku kontrolujete o víkendu",
 "answer": "vždy (i v sobotu i v neděli)",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Na co se podíváte jako první, když se rozhodujete, zda otevřete e-mail, který jste dostali?",
 "answer": "Jméno (adresa) odesílatele",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Cítili jste se někdy zmanipulováni k otevření prodejního e-mailu jeho předmětem?",
 "answer": "Ano",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Navštívili jste někdy stránky firmy, jako výsledek přijatého e-mailu, který jste ale neotevřeli?",
 "answer": "Ano",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Nakoupili jste někdy od firmy, jako výsledek přijatého e-mailu, který jste ale neotevřeli?",
 "answer": "Ne",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Kolik registrací k pravidelnému odběru newsletterů, tipů apod. aktuálně máte?",
 "answer": "6 - 10",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Když dostanete nevyžádaný obchodní e-mail poprvé, jak zareagujete?",
 "answer": "Vymažu ho",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Když dostanete nevyžádaný obchodní e-mail od stejného odesílatele opakovaně, jak zareagujete?",
 "answer": "Odhlásím se z odběru",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Když dostanete nevyžádaný obchodní e-mail, který neobsahuje odkaz (link) pro odhlášení, jak zareagujete?",
 "answer": "Označím jako spam",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Používáte při registracích a odběru novinek svůj běžný e-mail nebo máte zřízený speciální e-mail pro tyto účely?",
 "answer": "Používám svou běžnou (hlavní) e-mailovou adresu",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Jak často si kupujete produkty nebo služby na základě e-mailů, které dostanete?",
 "answer": "Dvakrát ročně",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Kolik obchodních e-mailů, které Vám přijdou, si skutečně přečtete?",
 "answer": "Většinu",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Vaše zaměstnání",
 "answer": "Podnikatel / živnostník",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Jste",
 "answer": "Žena",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Váš věk",
 "answer": "51 - 65 let",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Vaše nejvyšší dosažené vzdělání",
 "answer": "Vysokoškolské",
 "type": 9,
 "is_answered": true
 },
 {
 "title": "Chci poslat celkové výsledky tohoto průzkumu na e-mailovou adresu",
 "answer": "langerova@audica.cz",
 "type": 14,
 "is_answered": true
 }
 ]
}

Survey structure

GEThttps://api.onquanda.com/api/survey/surveys/{survey_id}/questions/
URI ParametersTypeRequiredNote
survey_idintegertrueSurvey ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
[
 {
 "id": 58888,
 "type": 1,
 "text": "Krátký text",
 "questions": [],
 "question_answer_options": [],
 "question_metadata": {}
 },
 {
 "id": 58889,
 "type": 2,
 "text": "Delší text",
 "questions": [],
 "question_answer_options": [],
 "question_metadata": {}
 },
 {
 "id": 58890,
 "type": 3,
 "text": "Text (více řádků)",
 "questions": [
 {
 "id": 1654,
 "text": "Čepice"
 },
 {
 "id": 1655,
 "text": "Kalhoty"
 },
 {
 "id": 1656,
 "text": "Bunda"
 }
 ],
 "question_answer_options": [],
 "question_metadata": {}
 },
 {
 "id": 58891,
 "type": 6,
 "text": "Datum",
 "questions": [],
 "question_answer_options": [],
 "question_metadata": {}
 },
 {
 "id": 58892,
 "type": 7,
 "text": "Datum (více řádků)",
 "questions": [
 {
 "id": 145,
 "text": "První termín"
 },
 {
 "id": 146,
 "text": "Druhý termín"
 },
 {
 "id": 147,
 "text": "Třetí termín"
 }
 ],
 "question_answer_options": [],
 "question_metadata": {
 "input_type": "only_date"
 }
 },
 {
 "id": 58893,
 "type": 4,
 "text": "Číslo",
 "questions": [],
 "question_answer_options": [],
 "question_metadata": {
 "max": 100.0,
 "min": 10.0,
 "decimal_places": 1
 }
 },
 {
 "id": 58894,
 "type": 5,
 "text": "Číslo (více řádků)",
 "questions": [
 {
 "id": 2015,
 "text": "Hmotnost 1"
 },
 {
 "id": 2016,
 "text": "Hmotnost 2"
 },
 {
 "id": 2017,
 "text": "Hmotnost 3"
 }
 ],
 "question_answer_options": [],
 "question_metadata": {
 "min": 10,
 "max": 100,
 "sum": 100,
 "sum_is_checked": true
 }
 },
 {
 "id": 58895,
 "type": 9,
 "text": "Jedna odpověď",
 "questions": [],
 "question_answer_options": [
 {
 "id": 46812,
 "text": "modrá"
 },
 {
 "id": 46813,
 "text": "zelená"
 },
 {
 "id": 46814,
 "text": "červená"
 },
 {
 "id": 46815,
 "text": "žlutá"
 },
 {
 "id": 46816,
 "text": "fialová"
 },
 {
 "id": 46817,
 "text": "šedá"
 }
 ],
 "question_metadata": {}
 },
 {
 "id": 58896,
 "type": 10,
 "text": "Více odpovědí",
 "questions": [],
 "question_answer_options": [
 {
 "id": 31734,
 "text": "Banán"
 },
 {
 "id": 31735,
 "text": "Jablko"
 },
 {
 "id": 31736,
 "text": "Hruška"
 },
 {
 "id": 31737,
 "text": "Broskev"
 },
 {
 "id": 31738,
 "text": "Meruňka"
 }
 ],
 "question_metadata": {
 "max_checked_options": null
 }
 },
 {
 "id": 58897,
 "type": 8,
 "text": "Rozbalovací menu",
 "questions": [],
 "question_answer_options": [
 {
 "id": 16162,
 "text": "Škoda"
 },
 {
 "id": 16163,
 "text": "BMW"
 },
 {
 "id": 16164,
 "text": "Mercedes"
 },
 {
 "id": 16165,
 "text": "Peugeot"
 },
 {
 "id": 16166,
 "text": "Opel"
 }
 ],
 "question_metadata": {}
 },
 {
 "id": 58898,
 "type": 12,
 "text": "Škála spokojenosti",
 "questions": [
 {
 "id": 29,
 "text": "Rychlost"
 },
 {
 "id": 43,
 "text": "Komunikace"
 },
 {
 "id": 44,
 "text": "Kompetentnost"
 }
 ],
 "question_answer_options": [
 {
 "id": 66,
 "text": "Velmi nespokojen"
 },
 {
 "id": 67,
 "text": "Spíše nespokojen"
 },
 {
 "id": 68,
 "text": "Něco mezi"
 },
 {
 "id": 69,
 "text": "Spíše spokojen"
 },
 {
 "id": 70,
 "text": "Velmi spokojen"
 }
 ],
 "question_metadata": {}
 },
 {
 "id": 58899,
 "type": 12,
 "text": "Škála souhlasu?",
 "questions": [
 {
 "id": 19,
 "text": "Vaše hodnocení"
 }
 ],
 "question_answer_options": [
 {
 "id": 31,
 "text": "Rozhodně nesouhlasím"
 },
 {
 "id": 32,
 "text": "Spíše nesouhlasím"
 },
 {
 "id": 33,
 "text": "Něco mezi"
 },
 {
 "id": 34,
 "text": "Spíše souhlasím"
 },
 {
 "id": 35,
 "text": "Rozhodně souhlasím"
 }
 ],
 "question_metadata": {}
 },
 {
 "id": 58900,
 "type": 11,
 "text": "% škála",
 "questions": [
 {
 "id": 15,
 "text": "Vaše hodnocení"
 }
 ],
 "question_answer_options": [],
 "question_metadata": {
 "range_start": 0,
 "range_end": 100,
 "range_step": 10
 }
 },
 {
 "id": 58901,
 "type": 11,
 "text": "Hvězdičkové hodnocení",
 "questions": [
 {
 "id": 48,
 "text": "Rychlost"
 },
 {
 "id": 80,
 "text": "Komunikace"
 }
 ],
 "question_answer_options": [
 {
 "id": 367,
 "text": "Bez hodnocení"
 },
 {
 "id": 368,
 "text": "1"
 },
 {
 "id": 369,
 "text": "2"
 },
 {
 "id": 370,
 "text": "3"
 },
 {
 "id": 371,
 "text": "4"
 },
 {
 "id": 372,
 "text": "5"
 }
 ],
 "question_metadata": {}
 },
 {
 "id": 58902,
 "type": 11,
 "text": "Smajlíkové hodnocení",
 "questions": [
 {
 "id": 39,
 "text": "Design"
 },
 {
 "id": 80,
 "text": "Kvalita"
 }
 ],
 "question_answer_options": [
 {
 "id": 139,
 "text": "Bez hodnocení"
 },
 {
 "id": 140,
 "text": "1"
 },
 {
 "id": 141,
 "text": "2"
 },
 {
 "id": 142,
 "text": "3"
 },
 {
 "id": 143,
 "text": "4"
 },
 {
 "id": 144,
 "text": "5"
 }
 ],
 "question_metadata": {}
 },
 {
 "id": 58903,
 "type": 11,
 "text": "Škála postojů",
 "questions": [
 {
 "id": 11,
 "text": "Pomalý - Rychlý"
 },
 {
 "id": 12,
 "text": "Špinavý - Čistý"
 },
 {
 "id": 13,
 "text": "Malý - Velký"
 }
 ],
 "question_answer_options": [],
 "question_metadata": {
 "range_start": -3,
 "range_end": 3,
 "range_step": 1
 }
 },
 {
 "id": 58904,
 "type": 16,
 "text": "NPS skóre",
 "questions": [
 {
 "id": 112,
 "text": "odpoved"
 }
 ],
 "question_answer_options": [
 {
 "id": 1222,
 "text": "0"
 },
 {
 "id": 1223,
 "text": "1"
 },
 {
 "id": 1224,
 "text": "2"
 },
 {
 "id": 1225,
 "text": "3"
 },
 {
 "id": 1226,
 "text": "4"
 },
 {
 "id": 1227,
 "text": "5"
 },
 {
 "id": 1228,
 "text": "6"
 },
 {
 "id": 1229,
 "text": "7"
 },
 {
 "id": 1230,
 "text": "8"
 },
 {
 "id": 1231,
 "text": "9"
 },
 {
 "id": 1232,
 "text": "10"
 }
 ],
 "question_metadata": {}
 },
 {
 "id": 58905,
 "type": 12,
 "text": "Tabulka (jedna odpověď)",
 "questions": [
 {
 "id": 5320,
 "text": "Paprika"
 },
 {
 "id": 5321,
 "text": "Mrkev"
 }
 ],
 "question_answer_options": [
 {
 "id": 4005,
 "text": "Ano"
 },
 {
 "id": 4006,
 "text": "Nevim"
 },
 {
 "id": 4007,
 "text": "Ne"
 }
 ],
 "question_metadata": {}
 },
 {
 "id": 58906,
 "type": 13,
 "text": "Tabulka (více odpovědí)",
 "questions": [
 {
 "id": 5434,
 "text": "Auto"
 },
 {
 "id": 5435,
 "text": "Autobus"
 }
 ],
 "question_answer_options": [
 {
 "id": 3937,
 "text": "Ano"
 },
 {
 "id": 3938,
 "text": "Nevím"
 },
 {
 "id": 3939,
 "text": "Ne"
 }
 ],
 "question_metadata": {}
 },
 {
 "id": 58907,
 "type": 7,
 "text": "Vytvořit kontakt",
 "questions": [
 {
 "id": 52,
 "text": "Jméno"
 },
 {
 "id": 53,
 "text": "Příjmení"
 },
 {
 "id": 54,
 "text": "E-mail"
 },
 {
 "id": 55,
 "text": "Pohlaví"
 }
 ],
 "question_answer_options": [],
 "question_metadata": {}
 }
]

Users

List of users

GEThttps://api.onquanda.com/api/customer/users/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "count": 3,
 "next": null,
 "previous": null,
 "results": [
 {
 "id": 2847,
 "email": "uzivatel_1@firma.cz",
 "verified_email": true
 },
 {
 "id": 6197,
 "email": "uzivatel_2@firma.cz",
 "verified_email": false
 },
 {
 "id": 6121,
 "email": "uzivatel_3@firma.cz",
 "verified_email": false
 }
 ]
}

Webhooks

A webhook is a tool for sending notifications about changes in Quanda to an external system via the HTTP protocol. Notifications are sent as POST requests to the chosen URL addresses.

Each webhook has the following properties set: url, event and optionally filters and headers. When an event occurs in Quanda, all filters set in filters are evaluated against the input object. If all filter conditions are met, the webhook is sent to the specified URL.

The optional headers property adds custom HTTP headers to every call, which the receiver uses to verify that the call was sent by Quanda. It is described in Verifying the call origin.

Response

The response must be the HTTP code 200 OK. The call timeout is 5 seconds. Redirects are not followed.

On any other response or on a connection error the call is repeated up to 5 times in sequence:

  • 1st attempt: 30 s
  • 2nd attempt: 300 s (5 minutes)
  • 3rd attempt: 3000 s (50 minutes)
  • 4th attempt: 30000 s (8:20 hours)
  • 5th attempt: 300000 s (3.5 days)

List of webhooks

GEThttps://api.onquanda.com/api/webhook/webhooks/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json
{
 "count": 1,
 "next": null,
 "previous": null,
 "results": [
 {
 "id": 26213,
 "url": "URL pro zasílání webhooku",
 "event": "Typ události",
 "filters": {},
 "headers": {}
 }
 ]
}

Verifying the call origin (custom headers)

When registering a webhook you can send the optional "headers" field. Quanda adds these HTTP headers to every webhook call, and the receiver uses them to verify that the call was sent by Quanda.

The field is optional. Webhooks without the "headers" field work exactly as before and the format of the call body does not change. The API never returns header values in readable form, they are masked in both the list and the detail of a webhook.

Header rules

RuleDescription
Shape of the "headers" fieldA JSON object where the key is the header name and the value is the header value. At most 5 headers.
Header nameLetters, digits and hyphens, 1 to 64 characters. Two names that differ only in letter case are rejected.
Header valueA string of 1 to 1024 printable ASCII characters, without line breaks. It must not start or end with a space.
Webhook addressA webhook with headers must have an address starting with https:// and a valid certificate. The certificate is verified on every call. Webhooks without headers can still be registered on an address starting with http://.

Forbidden header names

Host, Content-Length, Content-Type, Transfer-Encoding, Connection, Expect, Upgrade, Accept-Encoding, User-Agent, Cookie and all names starting with Proxy- and X-Quanda-.

The Authorization header is allowed.

Value masking

On read (GET and the responses to POST, PUT and PATCH) the API returns the header names and masked values: four asterisks and the last 4 characters of the value, for example "****OKEN". Values shorter than 12 characters are returned entirely as "****". A webhook without headers returns an empty object {}.

New webhook with headers

POSThttps://api.onquanda.com/api/webhook/webhooks/

The "headers" field is sent together with the "url", "event" and "filters" fields. It can be used with any event.

Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringtrueAddress the webhook is sent to, at most 1024 characters. With headers it must start with https://
eventstringtrueEvent type
filtersobjectfalseEvent filters
headersobjectfalseAt most 5 headers as name: value, see Header rules
{
 "url": "https://api.example.com/quanda/webhook",
 "event": "recipient_unsubscribe",
 "headers": {
 "X-Webhook-Token": "VELICETAJNYTOKEN"
 }
}

You can send more headers, at most 5:

{
 "url": "https://api.example.com/quanda/webhook",
 "event": "recipient_unsubscribe",
 "headers": {
 "Authorization": "Bearer 8d1f0c5a7b2e4936",
 "X-Tenant": "example"
 }
}
Response
201 Created Content-Type: application/json
{
 "id": 412,
 "created": "2026-11-10T10:42:17.531204",
 "modified": "2026-11-10T10:42:17.531231",
 "url": "https://api.example.com/quanda/webhook",
 "event": "recipient_unsubscribe",
 "filters": {},
 "headers": {
 "X-Webhook-Token": "****OKEN"
 }
}

Response when the "headers" field fails validation or the address of a webhook with headers does not start with https://.

400 Bad Request Content-Type: application/json
{
 "headers": [
 "Header name 'Host' is not allowed."
 ]
}

The error key is the field name, the value is a list of messages. Error texts are returned in the language of the request.

SituationField in the response
The "headers" field is not a JSON objectheaders
More than 5 headersheaders
Invalid header nameheaders
Forbidden header nameheaders
Invalid header valueheaders
Headers with an address that does not start with https://url

Call delivered to the webhook url

Quanda adds the configured headers to every webhook call. The call body stays the same as for a webhook without headers.

Example
POST /quanda/webhook HTTP/1.1
Host: api.example.com
Content-Type: application/json
X-Webhook-Token: VELICETAJNYTOKEN

{"timestamp": "2026-11-10T11:00:00.123456", "recipient": {"id": 23833}, "contact": {"id": 12457}, "newsletter": {"id": 563}, "campaign": {"id": 98}, "webhook": {"id": 412, "event": "recipient_unsubscribe", "occured": "2026-11-10T11:00:00.456789"}}

Headers in the list and detail

GEThttps://api.onquanda.com/api/webhook/webhooks/
GEThttps://api.onquanda.com/api/webhook/webhooks/{id}/

Both the list of webhooks and the webhook detail return the "headers" field with masked values. A webhook without headers returns an empty object {}.

Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
200 OK Content-Type: application/json

Item in the list of webhooks:

{
 "id": 412,
 "url": "https://api.example.com/quanda/webhook",
 "event": "recipient_unsubscribe",
 "filters": {},
 "headers": {
 "X-Webhook-Token": "****OKEN"
 }
}

Editing a webhook with headers

PUThttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID

The PUT call sends the whole webhook. If you send the mask returned by the API (for example "****OKEN") for an existing header, the stored value is kept. You can therefore load a webhook with GET, edit it and send it back with PUT without knowing the header value. All rules for the "headers" field on update are described in Changing and removing headers.

Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringtrueAddress the webhook is sent to, at most 1024 characters. With headers it must start with https://
eventstringtrueEvent type
filtersobjectfalseEvent filters
headersobjectfalseOmitted: unchanged. {} or null: removed. Mask returned by the API: the stored value is kept
{
 "url": "https://api.example.com/quanda/webhook",
 "event": "recipient_unsubscribe",
 "filters": {},
 "headers": {
 "X-Webhook-Token": "****OKEN"
 }
}
Response
200 OK Content-Type: application/json
{
 "id": 412,
 "created": "2026-11-10T10:42:17.531204",
 "modified": "2026-11-10T11:15:02.118340",
 "url": "https://api.example.com/quanda/webhook",
 "event": "recipient_unsubscribe",
 "filters": {},
 "headers": {
 "X-Webhook-Token": "****OKEN"
 }
}

Response when the "headers" field fails validation or the address of a webhook with headers does not start with https://.

400 Bad Request Content-Type: application/json
{
 "headers": [
 "Header name 'Host' is not allowed."
 ]
}

Validation and error responses are the same as for a new webhook with headers.

Changing and removing headers

PATCHhttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID

With PATCH it is enough to send only the "headers" field, which makes it suitable for rotating the token. The same rules apply to the "headers" field in a PUT call.

"headers" field in the bodyResult
Field omittedThe headers stay unchanged.
{} or nullThe headers are removed.
New valueThe value is saved and applies from the next call, including retries that are already waiting.
Mask returned by the API (for example "****OKEN") for an existing nameThe stored value is kept. You can therefore load a webhook with GET and send it back with PUT.
A value in the shape of a mask (**** and at most 4 characters) that does not match the stored valueThe call is rejected (400).
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringfalseAddress the webhook is sent to, at most 1024 characters. With headers it must start with https://
eventstringfalseEvent type
filtersobjectfalseEvent filters
headersobjectfalseNew headers. {} or null removes the headers

Send only the fields you are changing.

Token rotation:

{
 "headers": {
 "X-Webhook-Token": "NOVYTAJNYTOKEN"
 }
}

Removing headers:

{
 "headers": {}
}
Response

Response after the token rotation.

200 OK Content-Type: application/json
{
 "id": 412,
 "created": "2026-11-10T10:42:17.531204",
 "modified": "2026-11-10T11:15:02.118340",
 "url": "https://api.example.com/quanda/webhook",
 "event": "recipient_unsubscribe",
 "filters": {},
 "headers": {
 "X-Webhook-Token": "****OKEN"
 }
}

Response when the headers were removed.

200 OK Content-Type: application/json
{
 "id": 412,
 "created": "2026-11-10T10:42:17.531204",
 "modified": "2026-11-10T11:15:02.118340",
 "url": "https://api.example.com/quanda/webhook",
 "event": "recipient_unsubscribe",
 "filters": {},
 "headers": {}
}

Response when the "headers" field fails validation or the address of a webhook with headers does not start with https://.

400 Bad Request Content-Type: application/json
{
 "headers": [
 "Header name 'Host' is not allowed."
 ]
}

Validation and error responses are the same as for a new webhook with headers.

How to verify the call on your side

  • Use a random token of at least 32 characters, dedicated to Quanda only.
  • Compare the header value in constant time.
  • Reject calls without the header or with a different value with status 401. Quanda will then retry the call.
  • The header verifies the origin of the call. It does not verify the integrity of the body and does not protect against replaying a captured call, which is why HTTPS is required.
Verification example
Python
import hmac

EXPECTED_TOKEN = "VELICETAJNYTOKEN"


def is_from_quanda(headers) -> bool:
    """Compare the shared token header in constant time."""
    received = headers.get("X-Webhook-Token", "")
    return hmac.compare_digest(received, EXPECTED_TOKEN)
PHP
<?php

const EXPECTED_TOKEN = 'VELICETAJNYTOKEN';

/**
 * Compare the shared token header in constant time.
 */
function isFromQuanda(): bool
{
    $received = $_SERVER['HTTP_X_WEBHOOK_TOKEN'] ?? '';

    return hash_equals(EXPECTED_TOKEN, $received);
}

if (! isFromQuanda()) {
    http_response_code(401);
    exit;
}
Node.js
const crypto = require('node:crypto');

const EXPECTED_TOKEN = 'VELICETAJNYTOKEN';

// Compare the shared token header in constant time.
function isFromQuanda(headers) {
    const received = Buffer.from(headers['x-webhook-token'] ?? '');
    const expected = Buffer.from(EXPECTED_TOKEN);

    return received.length === expected.length
        && crypto.timingSafeEqual(received, expected);
}
C#
using System.Security.Cryptography;
using System.Text;

const string ExpectedToken = "VELICETAJNYTOKEN";

// Compare the shared token header in constant time.
static bool IsFromQuanda(IHeaderDictionary headers)
{
    var received = Encoding.UTF8.GetBytes(headers["X-Webhook-Token"].ToString());
    var expected = Encoding.UTF8.GetBytes(ExpectedToken);

    return CryptographicOperations.FixedTimeEquals(received, expected);
}

Email sent

New webhook

POSThttps://api.onquanda.com/api/webhook/webhooks/

The event newsletter_newsletter_sent occurs after all emails from the dispatch have been successfully sent to the email server. Two types of filters can be specified for this event:

FilterTypeExampleDescription
contacts.tag.idinteger{ "contacts.tag.id": integer, }Filters events only to those where the object has a link to at least one contact with a tag whose id is specified by the key value.
contacts.tag.namestring{ "contacts.tag.name": string, }Filters events only to those where the object has a link to at least one contact with a tag whose name is specified by the key value.
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringtrueAddress the webhook is sent to, at most 1024 characters
eventstringtrueEvent type, here newsletter_newsletter_sent
filtersobjectfalseEvent filters
headersobjectfalseCustom HTTP headers of the call, see Verifying the call origin
{
 "url": "URL adresa pro zasílání webhooku",
 "event": newsletter_newsletter_sent,
 "filters": null
}

Schema

{
 "url": {
 "type": "url",
 "required": true,
 "read_only": false,
 "label": "Vložte platnou URL",
 "max_length": 1024
 },
 "event": {
 "type": "choice",
 "required": true,
 "read_only": false,
 "label": "Zvolte událost",
 "choices": [
 {
 "value": "newsletter_newsletter_sent",
 "display_name": "Odeslání e-mailu"
 },
 {
 "value": "newsletter_recipient_updated",
 "display_name": "Změna stavu příjemce"
 },
 {
 "value": "recipient_clicked",
 "display_name": "Klik na odkaz v e-mailu"
 },
 {
 "value": "recipient_opened",
 "display_name": "Otevření e-mailu"
 },
 {
 "value": "recipient_unsubscribe",
 "display_name": "Odhlášení"
 },
 {
 "value": "questionnaire_sent",
 "display_name": "Uložení vyplněného dotazníku"
 }
 ]
 },
 "filters": {
 "type": "field",
 "required": false,
 "read_only": false,
 "label": "Filters"
 },
 "headers": {
 "type": "field",
 "required": false,
 "read_only": false,
 "label": "Headers"
 }
}

The optional "headers" field is described in Verifying the call origin. Header values are returned masked on read.

Response
201 Created Content-Type: application/json
{
 "id": 26428,
 "created": "2023-04-12T14:35:34.320552",
 "modified": "2023-04-12T14:35:34.320566",
 "url": "URL pro zasílání webhooku",
 "event": "newsletter_newsletter_sent",
 "filters": {},
 "headers": {}
}

Verifying the call origin with a custom header

You can add the optional "headers" field to a webhook. Quanda adds these HTTP headers to every webhook call and you use them to verify that the call was sent by Quanda. A webhook without the "headers" field works exactly as before.

  1. Generate a random token of at least 32 characters, dedicated to Quanda only.
  2. When creating the webhook, send the token in the "headers" field. The address of a webhook with headers must start with https:// and have a valid certificate.
  3. On your side, compare the header value with the token on every call. Reject calls without the header or with a different value with status 401.
Example of a request body with a header
{
 "url": "https://api.example.com/quanda/webhook",
 "event": "newsletter_newsletter_sent",
 "headers": {
 "X-Webhook-Token": "VELICETAJNYTOKEN"
 }
}
Example of the headers of a call delivered to the webhook url
POST /quanda/webhook HTTP/1.1
Host: api.example.com
Content-Type: application/json
X-Webhook-Token: VELICETAJNYTOKEN

The API returns the header value only masked, for example "****OKEN". The rules for names and values, error responses, token rotation and a verification example are described in Verifying the call origin.

Webhook detail

GEThttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
201 Created Content-Type: application/json
{
 "id": 26428,
 "created": "2023-04-12T14:35:34.320552",
 "modified": "2023-04-12T14:35:34.320566",
 "url": "URL pro zasílání webhooku",
 "event": "newsletter_newsletter_sent",
 "filters": {},
 "headers": {}
}

Edit webhook

PUThttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringtrueAddress the webhook is sent to, at most 1024 characters
eventstringtrueEvent type, here newsletter_newsletter_sent
filtersobjectfalseEvent filters
headersobjectfalseCustom HTTP headers of the call, see Verifying the call origin
{
 "url": "URL pro zasílání webhooku",
 "event": "newsletter_newsletter_sent",
 "filters": {
 "contacts.tag.name": "VIP"
 }
}
Response
200 OK Content-Type: application/json
{
 "id": 26429,
 "created": "2023-04-12T16:42:42.657397",
 "modified": "2023-04-12T16:46:20.523741",
 "url": "URL pro zasílání webhooku",
 "event": "newsletter_newsletter_sent",
 "filters": {
 "contacts.tag.name": "VIP"
 },
 "headers": {}
}

Delete webhook

DELETEhttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
204 No Content Content-Type: application/json

Structure sent to the webhook url after an email is sent

Example
{
 "newsletter": {
 "id": 61471
 },
 "webhook": {
 "occured": "2023-04-11T20:23:10.803103",
 "id": 15628,
 "event": "newsletter_newsletter_sent"
 },
 "campaign": {
 "campaign_type": 70
 },
 "message": {
 "id": 805501
 }
}

"newsletter id" is the ID of the email campaign. It can include multiple dispatches under separate "message id"s. For example, the "newsletter id" for a transactional email is always the same. However, each individual sent email has its own "message id". Thus, under a single "newsletter id" there can be several dozen or hundreds of "message id"s. A simple email campaign, on the other hand, contains only one "message id" for one "newsletter id".

Recipient status change

New webhook

POSThttps://api.onquanda.com/api/webhook/webhooks/

For the event newsletter_recipient_updated one filter can be specified:

FilterTypeExampleDescription
campaign.typechoice{ "campaign.type": 70, }Filters events only to the email campaign type according to the following enumeration: 10 = Simple, 20 = Logic, 30 = Email series, 40 = Birthday, 50 = Anniversaries and holidays, 60 = A / B testing, 70 = Transactional.
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringtrueAddress the webhook is sent to, at most 1024 characters
eventstringtrueEvent type, here newsletter_recipient_updated
filtersobjectfalseEvent filters
headersobjectfalseCustom HTTP headers of the call, see Verifying the call origin
{
 "url": "URL adresa pro zasílání webhooku",
 "event": newsletter_recipient_updated,
 "filters": null
}

Schema

{
 "url": {
 "type": "url",
 "required": true,
 "read_only": false,
 "label": "Vložte platnou URL",
 "max_length": 1024
 },
 "event": {
 "type": "choice",
 "required": true,
 "read_only": false,
 "label": "Zvolte událost",
 "choices": [
 {
 "value": "newsletter_newsletter_sent",
 "display_name": "Odeslání e-mailu"
 },
 {
 "value": "newsletter_recipient_updated",
 "display_name": "Změna stavu příjemce"
 },
 {
 "value": "recipient_clicked",
 "display_name": "Klik na odkaz v e-mailu"
 },
 {
 "value": "recipient_opened",
 "display_name": "Otevření e-mailu"
 },
 {
 "value": "recipient_unsubscribe",
 "display_name": "Odhlášení"
 },
 {
 "value": "questionnaire_sent",
 "display_name": "Uložení vyplněného dotazníku"
 }
 ]
 },
 "filters": {
 "type": "field",
 "required": false,
 "read_only": false,
 "label": "Filters"
 },
 "headers": {
 "type": "field",
 "required": false,
 "read_only": false,
 "label": "Headers"
 }
}

The optional "headers" field is described in Verifying the call origin. Header values are returned masked on read.

Response
201 Created Content-Type: application/json
{
 "id": 26428,
 "created": "2023-04-12T14:35:34.320552",
 "modified": "2023-04-12T14:35:34.320566",
 "url": "URL pro zasílání webhooku",
 "event": "newsletter_recipient_updated",
 "filters": {},
 "headers": {}
}

Verifying the call origin with a custom header

You can add the optional "headers" field to a webhook. Quanda adds these HTTP headers to every webhook call and you use them to verify that the call was sent by Quanda. A webhook without the "headers" field works exactly as before.

  1. Generate a random token of at least 32 characters, dedicated to Quanda only.
  2. When creating the webhook, send the token in the "headers" field. The address of a webhook with headers must start with https:// and have a valid certificate.
  3. On your side, compare the header value with the token on every call. Reject calls without the header or with a different value with status 401.
Example of a request body with a header
{
 "url": "https://api.example.com/quanda/webhook",
 "event": "newsletter_recipient_updated",
 "headers": {
 "X-Webhook-Token": "VELICETAJNYTOKEN"
 }
}
Example of the headers of a call delivered to the webhook url
POST /quanda/webhook HTTP/1.1
Host: api.example.com
Content-Type: application/json
X-Webhook-Token: VELICETAJNYTOKEN

The API returns the header value only masked, for example "****OKEN". The rules for names and values, error responses, token rotation and a verification example are described in Verifying the call origin.

Webhook detail

GEThttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
201 Created Content-Type: application/json
{
 "id": 26428,
 "created": "2023-04-12T14:35:34.320552",
 "modified": "2023-04-12T14:35:34.320566",
 "url": "URL pro zasílání webhooku",
 "event": "newsletter_recipient_updated",
 "filters": {},
 "headers": {}
}

Edit webhook

PUThttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringtrueAddress the webhook is sent to, at most 1024 characters
eventstringtrueEvent type, here newsletter_recipient_updated
filtersobjectfalseEvent filters
headersobjectfalseCustom HTTP headers of the call, see Verifying the call origin
{
 "url": "URL pro zasílání webhooku",
 "event": "newsletter_recipient_updated",
 "filters": {"campaign.type": 70}
}
Response
200 OK Content-Type: application/json
{
 "id": 26429,
 "created": "2023-04-12T16:42:42.657397",
 "modified": "2023-04-12T16:46:20.523741",
 "url": "URL pro zasílání webhooku",
 "event": "newsletter_recipient_updated",
 "filters": {
 "campaign.type": 70
 },
 "headers": {}
}

Delete webhook

DELETEhttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
204 No Content Content-Type: application/json

Structure sent to the webhook url after a recipient status change

Example webhook structure after an email is sent
{
 "newsletter": {
 "id": 61471
 },
 "webhook": {
 "occured": "2023-04-12T17:33:12.666395",
 "id": 15631,
 "event": "newsletter_recipient_updated"
 },
 "recipient": {
 "blacklist_type": null,
 "updated_data": {
 "status": {
 "old_value": 5,
 "new_value": 2
 }
 },
 "id": 160103722
 }
}

The values for the status field are:

1 = e-mail nebyl odeslán (čeká ve frontě)
2 = e-mail byl doručen
3 = e-mail nebyl doručen
4 = e-mail byl vyřazen z odesílání z důvodu blacklistace kontaktu
5 = e-mail byl odeslán
6 = e-mail byl vyřazen z odesílání z důvodu nastaveného omezovače (pouze pro ERP automatizace)
Example webhook structure when an open is recorded
{
 "newsletter": {
 "id": 61471
 },
 "webhook": {
 "occured": "2023-04-12T17:37:04.050773",
 "id": 15631,
 "event": "newsletter_recipient_updated"
 },
 "recipient": {
 "blacklist_type": null,
 "updated_data": {
 "last_tracked_at": {
 "old_value": null,
 "new_value": "2023-04-12T17:37:00"
 },
 "tracked_count": {
 "old_value": 0,
 "new_value": 1
 },
 "tracked_at": {
 "old_value": null,
 "new_value": "2023-04-12T17:37:00"
 },
 "tracked": {
 "old_value": false,
 "new_value": true
 },
 "tracked_count_unique": {
 "old_value": 0,
 "new_value": 1
 },
 "tracked_agent": {
 "old_value": null,
 "new_value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.9.1"
 }
 },
 "id": 160103722
 }
}
Example webhook structure on repeated email open
{
 "newsletter": {
 "id": 61471
 },
 "webhook": {
 "occured": "2023-04-12T20:44:10.381694",
 "id": 15631,
 "event": "newsletter_recipient_updated"
 },
 "recipient": {
 "blacklist_type": null,
 "updated_data": {
 "last_tracked_at": {
 "old_value": "2023-04-12T20:18:03",
 "new_value": "2023-04-12T20:34:02"
 },
 "tracked_count": {
 "old_value": 5,
 "new_value": 6
 }
 },
 "id": 160103722
 }
}
Example webhook structure when a click is recorded
{
 "newsletter": {
 "id": 61471
 },
 "webhook": {
 "occured": "2023-04-12T17:38:24.969181",
 "id": 15631,
 "event": "newsletter_recipient_updated"
 },
 "recipient": {
 "blacklist_type": null,
 "updated_data": {
 "clicked_at": {
 "old_value": null,
 "new_value": "2023-04-12T17:38:24.958933"
 },
 "clicked_agent": {
 "old_value": null,
 "new_value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36"
 },
 "clicked": {
 "old_value": false,
 "new_value": true
 }
 },
 "id": 160103722
 }
}

Link click in an email

New webhook

POSThttps://api.onquanda.com/api/webhook/webhooks/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringtrueAddress the webhook is sent to, at most 1024 characters
eventstringtrueEvent type, here recipient_clicked
filtersobjectfalseEvent filters
headersobjectfalseCustom HTTP headers of the call, see Verifying the call origin
{
 "url": "URL adresa pro zasílání webhooku",
 "event": recipient_clicked,
}

Schema

{
 "url": {
 "type": "url",
 "required": true,
 "read_only": false,
 "label": "Vložte platnou URL",
 "max_length": 1024
 },
 "event": {
 "type": "choice",
 "required": true,
 "read_only": false,
 "label": "Zvolte událost",
 "choices": [
 {
 "value": "newsletter_newsletter_sent",
 "display_name": "Odeslání e-mailu"
 },
 {
 "value": "newsletter_recipient_updated",
 "display_name": "Změna stavu příjemce"
 },
 {
 "value": "recipient_clicked",
 "display_name": "Klik na odkaz v e-mailu"
 },
 {
 "value": "recipient_opened",
 "display_name": "Otevření e-mailu"
 },
 {
 "value": "recipient_unsubscribe",
 "display_name": "Odhlášení"
 },
 {
 "value": "questionnaire_sent",
 "display_name": "Uložení vyplněného dotazníku"
 }
 ]
 },
 "filters": {
 "type": "field",
 "required": false,
 "read_only": false,
 "label": "Filters"
 },
 "headers": {
 "type": "field",
 "required": false,
 "read_only": false,
 "label": "Headers"
 }
}

The optional "headers" field is described in Verifying the call origin. Header values are returned masked on read.

Response
201 Created Content-Type: application/json
{
 "id": 26428,
 "created": "2023-04-12T14:35:34.320552",
 "modified": "2023-04-12T14:35:34.320566",
 "url": "URL pro zasílání webhooku",
 "event": "recipient_clicked",
 "filters": {},
 "headers": {}
}

Verifying the call origin with a custom header

You can add the optional "headers" field to a webhook. Quanda adds these HTTP headers to every webhook call and you use them to verify that the call was sent by Quanda. A webhook without the "headers" field works exactly as before.

  1. Generate a random token of at least 32 characters, dedicated to Quanda only.
  2. When creating the webhook, send the token in the "headers" field. The address of a webhook with headers must start with https:// and have a valid certificate.
  3. On your side, compare the header value with the token on every call. Reject calls without the header or with a different value with status 401.
Example of a request body with a header
{
 "url": "https://api.example.com/quanda/webhook",
 "event": "recipient_clicked",
 "headers": {
 "X-Webhook-Token": "VELICETAJNYTOKEN"
 }
}
Example of the headers of a call delivered to the webhook url
POST /quanda/webhook HTTP/1.1
Host: api.example.com
Content-Type: application/json
X-Webhook-Token: VELICETAJNYTOKEN

The API returns the header value only masked, for example "****OKEN". The rules for names and values, error responses, token rotation and a verification example are described in Verifying the call origin.

Webhook detail

GEThttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
201 Created Content-Type: application/json
{
 "id": 26428,
 "created": "2023-04-12T14:35:34.320552",
 "modified": "2023-04-12T14:35:34.320566",
 "url": "URL pro zasílání webhooku",
 "event": "recipient_clicked",
 "filters": {},
 "headers": {}
}

Edit webhook

PUThttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringtrueAddress the webhook is sent to, at most 1024 characters
eventstringtrueEvent type, here recipient_clicked
filtersobjectfalseEvent filters
headersobjectfalseCustom HTTP headers of the call, see Verifying the call origin
{
 "url": "URL pro zasílání webhooku",
 "event": "recipient_clicked",
}
Response
200 OK Content-Type: application/json
{
 "id": 26429,
 "created": "2023-04-12T16:42:42.657397",
 "modified": "2023-04-12T16:46:20.523741",
 "url": "URL pro zasílání webhooku",
 "event": "recipient_clicked",
 "filters": {},
 "headers": {}
}

Delete webhook

DELETEhttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
204 No Content Content-Type: application/json

Structure sent to the webhook url after a click on a link in an email

Example
{
 "newsletter": {
 "id": 61471
 },
 "webhook": {
 "occured": "2023-04-13T11:27:59.071136",
 "id": 15633,
 "event": "recipient_clicked"
 },
 "contact": {
 "id": 5954884
 },
 "link": {
 "id": 1138717,
 "url": "http://www.quanda.cz?utm_source=Quanda&utm_medium=email&utm_campaign=18+zp%C5%AFsob%C5%AF%2C+jak+budovat+datab%C3%A1zi&utm_content=18+zp%C5%AFsob%C5%AF%2C+jak+budovat+vlastn%C3%AD+rozs%C3%A1hlou+datab%C3%A1zi"
 },
 "recipient": {
 "id": 160103855
 },
 "campaign": {
 "id": 43502
 },
 "timestamp": "2023-04-13T11:27:59.049783"
}

Email open

New webhook

POSThttps://api.onquanda.com/api/webhook/webhooks/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringtrueAddress the webhook is sent to, at most 1024 characters
eventstringtrueEvent type, here recipient_opened
filtersobjectfalseEvent filters
headersobjectfalseCustom HTTP headers of the call, see Verifying the call origin
{
 "url": "URL adresa pro zasílání webhooku",
 "event": recipient_opened,
}

Schema

{
 "url": {
 "type": "url",
 "required": true,
 "read_only": false,
 "label": "Vložte platnou URL",
 "max_length": 1024
 },
 "event": {
 "type": "choice",
 "required": true,
 "read_only": false,
 "label": "Zvolte událost",
 "choices": [
 {
 "value": "newsletter_newsletter_sent",
 "display_name": "Odeslání e-mailu"
 },
 {
 "value": "newsletter_recipient_updated",
 "display_name": "Změna stavu příjemce"
 },
 {
 "value": "recipient_clicked",
 "display_name": "Klik na odkaz v e-mailu"
 },
 {
 "value": "recipient_opened",
 "display_name": "Otevření e-mailu"
 },
 {
 "value": "recipient_unsubscribe",
 "display_name": "Odhlášení"
 },
 {
 "value": "questionnaire_sent",
 "display_name": "Uložení vyplněného dotazníku"
 }
 ]
 },
 "filters": {
 "type": "field",
 "required": false,
 "read_only": false,
 "label": "Filters"
 },
 "headers": {
 "type": "field",
 "required": false,
 "read_only": false,
 "label": "Headers"
 }
}

The optional "headers" field is described in Verifying the call origin. Header values are returned masked on read.

Response
201 Created Content-Type: application/json
{
 "id": 26428,
 "created": "2023-04-12T14:35:34.320552",
 "modified": "2023-04-12T14:35:34.320566",
 "url": "URL pro zasílání webhooku",
 "event": "recipient_opened",
 "filters": {},
 "headers": {}
}

Verifying the call origin with a custom header

You can add the optional "headers" field to a webhook. Quanda adds these HTTP headers to every webhook call and you use them to verify that the call was sent by Quanda. A webhook without the "headers" field works exactly as before.

  1. Generate a random token of at least 32 characters, dedicated to Quanda only.
  2. When creating the webhook, send the token in the "headers" field. The address of a webhook with headers must start with https:// and have a valid certificate.
  3. On your side, compare the header value with the token on every call. Reject calls without the header or with a different value with status 401.
Example of a request body with a header
{
 "url": "https://api.example.com/quanda/webhook",
 "event": "recipient_opened",
 "headers": {
 "X-Webhook-Token": "VELICETAJNYTOKEN"
 }
}
Example of the headers of a call delivered to the webhook url
POST /quanda/webhook HTTP/1.1
Host: api.example.com
Content-Type: application/json
X-Webhook-Token: VELICETAJNYTOKEN

The API returns the header value only masked, for example "****OKEN". The rules for names and values, error responses, token rotation and a verification example are described in Verifying the call origin.

Webhook detail

GEThttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
201 Created Content-Type: application/json
{
 "id": 26428,
 "created": "2023-04-12T14:35:34.320552",
 "modified": "2023-04-12T14:35:34.320566",
 "url": "URL pro zasílání webhooku",
 "event": "recipient_opened",
 "filters": {},
 "headers": {}
}

Edit webhook

PUThttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringtrueAddress the webhook is sent to, at most 1024 characters
eventstringtrueEvent type, here recipient_opened
filtersobjectfalseEvent filters
headersobjectfalseCustom HTTP headers of the call, see Verifying the call origin
{
 "url": "URL pro zasílání webhooku",
 "event": "recipient_opened",
}
Response
200 OK Content-Type: application/json
{
 "id": 26429,
 "created": "2023-04-12T16:42:42.657397",
 "modified": "2023-04-12T16:46:20.523741",
 "url": "URL pro zasílání webhooku",
 "event": "recipient_opened",
 "filters": {},
 "headers": {}
}

Delete webhook

DELETEhttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
204 No Content Content-Type: application/json

Structure sent to the webhook url after an email is opened

Example
{
 "newsletter": {
 "id": 61471
 },
 "webhook": {
 "occured": "2023-04-13T13:25:05.955656",
 "id": 15634,
 "event": "recipient_opened"
 },
 "contact": {
 "id": 5955025
 },
 "recipient": {
 "id": 160103875
 },
 "campaign": {
 "id": 43502
 },
 "timestamp": "2023-04-13T13:25:02"
}

Unsubscribe

New webhook

POSThttps://api.onquanda.com/api/webhook/webhooks/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringtrueAddress the webhook is sent to, at most 1024 characters
eventstringtrueEvent type, here recipient_unsubscribe
filtersobjectfalseEvent filters
headersobjectfalseCustom HTTP headers of the call, see Verifying the call origin
{
 "url": "URL adresa pro zasílání webhooku",
 "event": recipient_unsubscribe,
}

Schema

{
 "url": {
 "type": "url",
 "required": true,
 "read_only": false,
 "label": "Vložte platnou URL",
 "max_length": 1024
 },
 "event": {
 "type": "choice",
 "required": true,
 "read_only": false,
 "label": "Zvolte událost",
 "choices": [
 {
 "value": "newsletter_newsletter_sent",
 "display_name": "Odeslání e-mailu"
 },
 {
 "value": "newsletter_recipient_updated",
 "display_name": "Změna stavu příjemce"
 },
 {
 "value": "recipient_clicked",
 "display_name": "Klik na odkaz v e-mailu"
 },
 {
 "value": "recipient_opened",
 "display_name": "Otevření e-mailu"
 },
 {
 "value": "recipient_unsubscribe",
 "display_name": "Odhlášení"
 },
 {
 "value": "questionnaire_sent",
 "display_name": "Uložení vyplněného dotazníku"
 }
 ]
 },
 "filters": {
 "type": "field",
 "required": false,
 "read_only": false,
 "label": "Filters"
 },
 "headers": {
 "type": "field",
 "required": false,
 "read_only": false,
 "label": "Headers"
 }
}

The optional "headers" field is described in Verifying the call origin. Header values are returned masked on read.

Response
201 Created Content-Type: application/json
{
 "id": 26428,
 "created": "2023-04-12T14:35:34.320552",
 "modified": "2023-04-12T14:35:34.320566",
 "url": "URL pro zasílání webhooku",
 "event": "recipient_unsubscribe",
 "filters": {},
 "headers": {}
}

Verifying the call origin with a custom header

You can add the optional "headers" field to a webhook. Quanda adds these HTTP headers to every webhook call and you use them to verify that the call was sent by Quanda. A webhook without the "headers" field works exactly as before.

  1. Generate a random token of at least 32 characters, dedicated to Quanda only.
  2. When creating the webhook, send the token in the "headers" field. The address of a webhook with headers must start with https:// and have a valid certificate.
  3. On your side, compare the header value with the token on every call. Reject calls without the header or with a different value with status 401.
Example of a request body with a header
{
 "url": "https://api.example.com/quanda/webhook",
 "event": "recipient_unsubscribe",
 "headers": {
 "X-Webhook-Token": "VELICETAJNYTOKEN"
 }
}
Example of the headers of a call delivered to the webhook url
POST /quanda/webhook HTTP/1.1
Host: api.example.com
Content-Type: application/json
X-Webhook-Token: VELICETAJNYTOKEN

The API returns the header value only masked, for example "****OKEN". The rules for names and values, error responses, token rotation and a verification example are described in Verifying the call origin.

Webhook detail

GEThttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
201 Created Content-Type: application/json
{
 "id": 26428,
 "created": "2023-04-12T14:35:34.320552",
 "modified": "2023-04-12T14:35:34.320566",
 "url": "URL pro zasílání webhooku",
 "event": "recipient_unsubscribe",
 "filters": {},
 "headers": {}
}

Edit webhook

PUThttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringtrueAddress the webhook is sent to, at most 1024 characters
eventstringtrueEvent type, here recipient_unsubscribe
filtersobjectfalseEvent filters
headersobjectfalseCustom HTTP headers of the call, see Verifying the call origin
{
 "url": "URL pro zasílání webhooku",
 "event": "recipient_unsubscribe",
}
Response
200 OK Content-Type: application/json
{
 "id": 26429,
 "created": "2023-04-12T16:42:42.657397",
 "modified": "2023-04-12T16:46:20.523741",
 "url": "URL pro zasílání webhooku",
 "event": "recipient_unsubscribe",
 "filters": {},
 "headers": {}
}

Delete webhook

DELETEhttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
204 No Content Content-Type: application/json

Structure sent to the webhook url after a recipient unsubscribes

Example
{
 "newsletter": {
 "id": 61471
 },
 "webhook": {
 "occured": "2023-04-13T10:27:40.808893",
 "id": 15632,
 "event": "recipient_unsubscribe"
 },
 "contact": {
 "id": 2638657
 },
 "recipient": {
 "id": 160103854
 },
 "campaign": {
 "id": 43502
 },
 "timestamp": "2023-04-13T10:27:40.683674"
}

Completed survey saved

New webhook

POSThttps://api.onquanda.com/api/webhook/webhooks/
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringtrueAddress the webhook is sent to, at most 1024 characters
eventstringtrueEvent type, here questionnaire_sent
filtersobjectfalseEvent filters
headersobjectfalseCustom HTTP headers of the call, see Verifying the call origin
{
 "url": "URL adresa pro zasílání webhooku",
 "event": questionnaire_sent,
}

Schema

{
 "url": {
 "type": "url",
 "required": true,
 "read_only": false,
 "label": "Vložte platnou URL",
 "max_length": 1024
 },
 "event": {
 "type": "choice",
 "required": true,
 "read_only": false,
 "label": "Zvolte událost",
 "choices": [
 {
 "value": "newsletter_newsletter_sent",
 "display_name": "Odeslání e-mailu"
 },
 {
 "value": "newsletter_recipient_updated",
 "display_name": "Změna stavu příjemce"
 },
 {
 "value": "recipient_clicked",
 "display_name": "Klik na odkaz v e-mailu"
 },
 {
 "value": "recipient_opened",
 "display_name": "Otevření e-mailu"
 },
 {
 "value": "recipient_unsubscribe",
 "display_name": "Odhlášení"
 },
 {
 "value": "questionnaire_sent",
 "display_name": "Uložení vyplněného dotazníku"
 }
 ]
 },
 "filters": {
 "type": "field",
 "required": false,
 "read_only": false,
 "label": "Filters"
 },
 "headers": {
 "type": "field",
 "required": false,
 "read_only": false,
 "label": "Headers"
 }
}

The optional "headers" field is described in Verifying the call origin. Header values are returned masked on read.

Response
201 Created Content-Type: application/json
{
 "id": 26428,
 "created": "2023-04-12T14:35:34.320552",
 "modified": "2023-04-12T14:35:34.320566",
 "url": "URL pro zasílání webhooku",
 "event": "questionnaire_sent",
 "filters": {},
 "headers": {}
}

Verifying the call origin with a custom header

You can add the optional "headers" field to a webhook. Quanda adds these HTTP headers to every webhook call and you use them to verify that the call was sent by Quanda. A webhook without the "headers" field works exactly as before.

  1. Generate a random token of at least 32 characters, dedicated to Quanda only.
  2. When creating the webhook, send the token in the "headers" field. The address of a webhook with headers must start with https:// and have a valid certificate.
  3. On your side, compare the header value with the token on every call. Reject calls without the header or with a different value with status 401.
Example of a request body with a header
{
 "url": "https://api.example.com/quanda/webhook",
 "event": "questionnaire_sent",
 "headers": {
 "X-Webhook-Token": "VELICETAJNYTOKEN"
 }
}
Example of the headers of a call delivered to the webhook url
POST /quanda/webhook HTTP/1.1
Host: api.example.com
Content-Type: application/json
X-Webhook-Token: VELICETAJNYTOKEN

The API returns the header value only masked, for example "****OKEN". The rules for names and values, error responses, token rotation and a verification example are described in Verifying the call origin.

Webhook detail

GEThttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
201 Created Content-Type: application/json
{
 "id": 26428,
 "created": "2023-04-12T14:35:34.320552",
 "modified": "2023-04-12T14:35:34.320566",
 "url": "URL pro zasílání webhooku",
 "event": "questionnaire_sent",
 "filters": {},
 "headers": {}
}

Edit webhook

PUThttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}

Body

FieldTypeRequiredNote
urlstringtrueAddress the webhook is sent to, at most 1024 characters
eventstringtrueEvent type, here questionnaire_sent
filtersobjectfalseEvent filters
headersobjectfalseCustom HTTP headers of the call, see Verifying the call origin
{
 "url": "URL pro zasílání webhooku",
 "event": "questionnaire_sent",
}
Response
200 OK Content-Type: application/json
{
 "id": 26429,
 "created": "2023-04-12T16:42:42.657397",
 "modified": "2023-04-12T16:46:20.523741",
 "url": "URL pro zasílání webhooku",
 "event": "questionnaire_sent",
 "filters": {},
 "headers": {}
}

Delete webhook

DELETEhttps://api.onquanda.com/api/webhook/webhooks/{id}/
URI ParametersTypeRequiredRead_onlyNameNote
idintegerfalsetrueIDWebhook ID
Request

Headers

{
 "content-type": "application/json",
 "authorization": "Token 7654gftr43er56ttzhba7634kajrnvd4"
}
Response
204 No Content Content-Type: application/json

Structure sent to the webhook url when a completed survey is saved

Example
{
 "webhook": {
 "occured": "2023-04-13T14:21:33.059464",
 "id": 15635,
 "event": "questionnaire_sent"
 },
 "survey": {
 "name": "Spokojenost se supportem",
 "id": 86755
 },
 "respondent": {
 "id": 324179
 },
 "timestamp": "2023-04-13T14:21:32.811107"
}