Preo
  • Homepage
  • About
Apps
  • Dashboard
  • App Store
  • Google Play
Social
  • LinkedIn

© 2026 Preo ApS

  • Integration
  • API
Information
Auth
    Get user infoget
Editions
    List editionsgetCreate editionpostGet edition detailsgetUpdate editionpatchDuplicate editionpostGet edition field choicesgetRun edition healthcheckget
Orders
    List ordersgetRetrieve order detailsget
Purchases
    Retrieve purchase detailsgetCreate refund request for purchasepost
User
    List usersgetRetrieve usergetPartially update userpatch
Refunds
    Create refund request for purchasepostList refund requestsgetCreate refund requestpostRetrieve refund request detailsgetApprove refund requestpostReject refund requestpost
Files
    List filesgetUpload filepostGet file detailsgetDelete filedeleteUpdate file metadatapatch
Data Imports
    List data importsgetCreate data importpostGet data import detailsgetUpdate data importpatchCancel data importpostList column mappingsgetUpdate column mappingspatchPreview import ordersgetProcess column mappingspostList product mappingsgetUpdate product mappingspatchStart import processpostValidate column mappingspostImport external orderspost
Campaigns
    List campaignsgetCreate campaignpostRetrieve campaigngetDelete campaigndeleteUpdate campaignpatchCancel campaignpostSchedule campaignpostSend campaign nowpostGet campaign statsget
Consents
    List consentsgetCreate consentpostRetrieve consentgetDelete consentdeleteUpdate consentpatch
Email Messages
    List email messagesgetCreate email messagepostGet email message detailsgetDelete email messagedeleteUpdate email messagepatchAdopt template to editionpostDuplicate email messagepostPreview emailpostGet template variablesget
Segments
    List segmentsgetCreate segmentpostRetrieve segmentgetDelete segmentdeleteUpdate segmentpatchExport segment users as CSVgetRecalculate segmentpostReset stuck segment to draftpostGet CEL context schema and dynamic valuesgetValidate CEL expressionpost
Webhooks
    List webhook endpointsgetCreate webhook endpointpostRetrieve webhook endpointgetDelete webhook endpointdeleteUpdate webhook endpointpatchList deliveries for webhook endpointgetGet delivery detailgetRetry a failed deliverypostRotate webhook secretpost
Schemas
Preo API
Preo API

Email Messages

Endpoint

List email messages

GET
https://api.preo.dev
/v1/email-messages

List all email messages from accessible organizations. Optionally filter by organization_id, edition_id, type, or scope.

List email messages › query Parameters

edition_id
​string

Filter by specific edition (optional)

ordering
​string[] · style: form

Ordering

  • created - Created
  • -created - Created (descending)
  • modified - Modified
  • -modified - Modified (descending)
  • title - Title
  • -title - Title (descending)
Enum values:
-created
-modified
-title
created
modified
title
organization_id
​string

Filter by specific organization (optional)

page
​integer

A page number within the paginated result set.

page_size
​integer

Number of results to return per page (default: 100).

scope
​string

Filter by scope: platform, template, or edition (optional)

type
​string

Filter by message type (optional)

List email messages › Responses

200
count
​integer · required
​object[] · required
next
​string · uri
previous
​string · uri
GET/v1/email-messages
curl --request GET \ --url https://api.preo.dev/v1/email-messages
shell
Example Responses
{ "count": 123, "next": "http://api.example.org/accounts/?page=4", "previous": "http://api.example.org/accounts/?page=2", "results": [ { "id": "id", "title": "title", "type": "receipt", "scope": "platform", "template": "modern", "locked": true, "organization": { "id": "id", "name": "name", "slug": "slug", "avatar": { "thumbnail": "https://www.example.com/path/to/resource", "optimized": "https://www.example.com/path/to/resource", "large": "https://www.example.com/path/to/resource", "original": "https://www.example.com/path/to/resource" } }, "edition": { "id": "id", "full_name": "full_name", "slug": "slug", "start_date": "2024-08-25T15:00:00Z", "end_date": "2024-08-25T15:00:00Z", "timezone": "timezone", "is_draft": true, "published_at": "2024-08-25T15:00:00Z" }, "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z" } ] }
json
application/json

Create email message

POST
https://api.preo.dev
/v1/email-messages

Create a new email message. Content blocks can be added separately via the content endpoint.

Create email message › Request Body

Serializer for creating email messages
organization_id
​string · required
title
​string · maxLength: 200 · required
​object · required
type
​string · enum · required
  • receipt - Purchase receipt
  • receipt_online - Purchase receipt (online)
  • reminder - Purchase reminder
  • refund_confirmation - Refund confirmation
  • user_portal_access - User portal access
  • campaign - Campaign
  • other - Other
Enum values:
receipt
receipt_online
reminder
refund_confirmation
user_portal_access
campaign
other
edition_id
​string | null
scope
​string · enum
  • template - Template
  • edition - Edition
Enum values:
template
edition
Default: edition
template
​string · enum
  • modern - Modern
Enum values:
modern
Default: modern

Create email message › Responses

Serializer for detail view with nested modules
id
​string · readOnly · required
title
​string · maxLength: 200 · required
subject
​string · readOnly · required
type
​string · enum · required
  • receipt - Purchase receipt
  • receipt_online - Purchase receipt (online)
  • reminder - Purchase reminder
  • refund_confirmation - Refund confirmation
  • user_portal_access - User portal access
  • campaign - Campaign
  • other - Other
Enum values:
receipt
receipt_online
reminder
refund_confirmation
user_portal_access
campaign
other
​object · readOnly · required
​readOnly · required
​object[] · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
scope
​string · enum
  • platform - Platform
  • template - Template
  • edition - Edition
Enum values:
platform
template
edition
template
​string · enum
  • modern - Modern
Enum values:
modern
POST/v1/email-messages
curl --request POST \ --url https://api.preo.dev/v1/email-messages \ --header 'Content-Type: application/json' \ --data ' { "organization_id": "organization_id", "edition_id": "edition_id", "title": "title", "subject": { "key": "string" }, "type": "receipt", "scope": "edition", "template": "modern" } '
shell
Example Request Body
{ "organization_id": "organization_id", "edition_id": "edition_id", "title": "title", "subject": { "key": "string" }, "type": "receipt", "scope": "edition", "template": "modern" }
json
Example Responses
{ "id": "id", "title": "title", "subject": "subject", "type": "receipt", "scope": "platform", "template": "modern", "organization": { "id": "id", "name": "name", "slug": "slug", "avatar": { "thumbnail": "https://www.example.com/path/to/resource", "optimized": "https://www.example.com/path/to/resource", "large": "https://www.example.com/path/to/resource", "original": "https://www.example.com/path/to/resource" } }, "edition": { "id": "id", "full_name": "full_name", "slug": "slug", "start_date": "2024-08-25T15:00:00Z", "end_date": "2024-08-25T15:00:00Z", "timezone": "timezone", "is_draft": true, "published_at": "2024-08-25T15:00:00Z" }, "blocks": [ { "id": "id", "type": "rich_text", "data": { "key": {} } } ], "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z" }
json
application/json

Get email message details

GET
https://api.preo.dev
/v1/email-messages/{id}

Get detailed information about an email message including all content blocks.

Get email message details › path Parameters

id
​string · required

A unique value identifying this E-mail Message.

Get email message details › Responses

200
Serializer for detail view with nested modules
id
​string · readOnly · required
title
​string · maxLength: 200 · required
subject
​string · readOnly · required
type
​string · enum · required
  • receipt - Purchase receipt
  • receipt_online - Purchase receipt (online)
  • reminder - Purchase reminder
  • refund_confirmation - Refund confirmation
  • user_portal_access - User portal access
  • campaign - Campaign
  • other - Other
Enum values:
receipt
receipt_online
reminder
refund_confirmation
user_portal_access
campaign
other
​object · readOnly · required
​readOnly · required
​object[] · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
scope
​string · enum
  • platform - Platform
  • template - Template
  • edition - Edition
Enum values:
platform
template
edition
template
​string · enum
  • modern - Modern
Enum values:
modern
GET/v1/email-messages/{id}
curl --request GET \ --url https://api.preo.dev/v1/email-messages/:id
shell
Example Responses
{ "id": "id", "title": "title", "subject": "subject", "type": "receipt", "scope": "platform", "template": "modern", "organization": { "id": "id", "name": "name", "slug": "slug", "avatar": { "thumbnail": "https://www.example.com/path/to/resource", "optimized": "https://www.example.com/path/to/resource", "large": "https://www.example.com/path/to/resource", "original": "https://www.example.com/path/to/resource" } }, "edition": { "id": "id", "full_name": "full_name", "slug": "slug", "start_date": "2024-08-25T15:00:00Z", "end_date": "2024-08-25T15:00:00Z", "timezone": "timezone", "is_draft": true, "published_at": "2024-08-25T15:00:00Z" }, "blocks": [ { "id": "id", "type": "rich_text", "data": { "key": {} } } ], "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z" }
json
application/json

Delete email message

DELETE
https://api.preo.dev
/v1/email-messages/{id}

Delete an email message and all its content blocks.

Delete email message › path Parameters

id
​string · required

A unique value identifying this E-mail Message.

Delete email message › Responses

No response body

No data returned
DELETE/v1/email-messages/{id}
curl --request DELETE \ --url https://api.preo.dev/v1/email-messages/:id
shell
Example Responses
No example specified for this content type

Update email message

PATCH
https://api.preo.dev
/v1/email-messages/{id}

Update email message metadata and optionally replace content blocks.

Update email message › path Parameters

id
​string · required

A unique value identifying this E-mail Message.

Update email message › Request Body

Serializer for updating email message metadata and optionally content blocks
title
​string · maxLength: 200
​object
type
​string · enum
  • receipt - Purchase receipt
  • receipt_online - Purchase receipt (online)
  • reminder - Purchase reminder
  • refund_confirmation - Refund confirmation
  • user_portal_access - User portal access
  • campaign - Campaign
  • other - Other
Enum values:
receipt
receipt_online
reminder
refund_confirmation
user_portal_access
campaign
other
scope
​string · readOnly
template
​string · enum
  • modern - Modern
Enum values:
modern
​object[]

Update email message › Responses

Serializer for detail view with nested modules
id
​string · readOnly · required
title
​string · maxLength: 200 · required
subject
​string · readOnly · required
type
​string · enum · required
  • receipt - Purchase receipt
  • receipt_online - Purchase receipt (online)
  • reminder - Purchase reminder
  • refund_confirmation - Refund confirmation
  • user_portal_access - User portal access
  • campaign - Campaign
  • other - Other
Enum values:
receipt
receipt_online
reminder
refund_confirmation
user_portal_access
campaign
other
​object · readOnly · required
​readOnly · required
​object[] · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
scope
​string · enum
  • platform - Platform
  • template - Template
  • edition - Edition
Enum values:
platform
template
edition
template
​string · enum
  • modern - Modern
Enum values:
modern
PATCH/v1/email-messages/{id}
curl --request PATCH \ --url https://api.preo.dev/v1/email-messages/:id \ --header 'Content-Type: application/json' \ --data ' { "title": "title", "subject": { "key": "string" }, "type": "receipt", "scope": "scope", "template": "modern", "blocks": [ { "id": "id", "type": "rich_text", "data": { "key": {} } } ] } '
shell
Example Request Body
{ "title": "title", "subject": { "key": "string" }, "type": "receipt", "scope": "scope", "template": "modern", "blocks": [ { "id": "id", "type": "rich_text", "data": { "key": {} } } ] }
json
Example Responses
{ "id": "id", "title": "title", "subject": "subject", "type": "receipt", "scope": "platform", "template": "modern", "organization": { "id": "id", "name": "name", "slug": "slug", "avatar": { "thumbnail": "https://www.example.com/path/to/resource", "optimized": "https://www.example.com/path/to/resource", "large": "https://www.example.com/path/to/resource", "original": "https://www.example.com/path/to/resource" } }, "edition": { "id": "id", "full_name": "full_name", "slug": "slug", "start_date": "2024-08-25T15:00:00Z", "end_date": "2024-08-25T15:00:00Z", "timezone": "timezone", "is_draft": true, "published_at": "2024-08-25T15:00:00Z" }, "blocks": [ { "id": "id", "type": "rich_text", "data": { "key": {} } } ], "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z" }
json
application/json

Adopt template to edition

POST
https://api.preo.dev
/v1/email-messages/{id}/adopt

Copy an organization-level template to an edition. This creates an edition-scoped copy with all content blocks. If the template type matches a known trigger type (receipt, refund), the edition's FK fields are auto-set and triggers are synced.

Adopt template to edition › path Parameters

id
​string · required

A unique value identifying this E-mail Message.

Adopt template to edition › Request Body

Serializer for adopting (copying) an org template to an edition
edition_id
​string · required

Target edition to adopt the template into

title
​string · maxLength: 200

New title (optional)

Adopt template to edition › Responses

Serializer for detail view with nested modules
id
​string · readOnly · required
title
​string · maxLength: 200 · required
subject
​string · readOnly · required
type
​string · enum · required
  • receipt - Purchase receipt
  • receipt_online - Purchase receipt (online)
  • reminder - Purchase reminder
  • refund_confirmation - Refund confirmation
  • user_portal_access - User portal access
  • campaign - Campaign
  • other - Other
Enum values:
receipt
receipt_online
reminder
refund_confirmation
user_portal_access
campaign
other
​object · readOnly · required
​readOnly · required
​object[] · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
scope
​string · enum
  • platform - Platform
  • template - Template
  • edition - Edition
Enum values:
platform
template
edition
template
​string · enum
  • modern - Modern
Enum values:
modern
POST/v1/email-messages/{id}/adopt
curl --request POST \ --url https://api.preo.dev/v1/email-messages/:id/adopt \ --header 'Content-Type: application/json' \ --data ' { "edition_id": "edition_id", "title": "title" } '
shell
Example Request Body
{ "edition_id": "edition_id", "title": "title" }
json
Example Responses
{ "id": "id", "title": "title", "subject": "subject", "type": "receipt", "scope": "platform", "template": "modern", "organization": { "id": "id", "name": "name", "slug": "slug", "avatar": { "thumbnail": "https://www.example.com/path/to/resource", "optimized": "https://www.example.com/path/to/resource", "large": "https://www.example.com/path/to/resource", "original": "https://www.example.com/path/to/resource" } }, "edition": { "id": "id", "full_name": "full_name", "slug": "slug", "start_date": "2024-08-25T15:00:00Z", "end_date": "2024-08-25T15:00:00Z", "timezone": "timezone", "is_draft": true, "published_at": "2024-08-25T15:00:00Z" }, "blocks": [ { "id": "id", "type": "rich_text", "data": { "key": {} } } ], "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z" }
json
application/json

Duplicate email message

POST
https://api.preo.dev
/v1/email-messages/{id}/duplicate

Create a copy of an email message. Optionally specify a target edition or create an organization-level copy.

Duplicate email message › path Parameters

id
​string · required

A unique value identifying this E-mail Message.

Duplicate email message › Request Body

Serializer for duplicate request
edition_id
​string | null

Target edition (optional, creates org-level copy if omitted)

title
​string · maxLength: 200

New title (optional)

Duplicate email message › Responses

Serializer for detail view with nested modules
id
​string · readOnly · required
title
​string · maxLength: 200 · required
subject
​string · readOnly · required
type
​string · enum · required
  • receipt - Purchase receipt
  • receipt_online - Purchase receipt (online)
  • reminder - Purchase reminder
  • refund_confirmation - Refund confirmation
  • user_portal_access - User portal access
  • campaign - Campaign
  • other - Other
Enum values:
receipt
receipt_online
reminder
refund_confirmation
user_portal_access
campaign
other
​object · readOnly · required
​readOnly · required
​object[] · readOnly · required
created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
scope
​string · enum
  • platform - Platform
  • template - Template
  • edition - Edition
Enum values:
platform
template
edition
template
​string · enum
  • modern - Modern
Enum values:
modern
POST/v1/email-messages/{id}/duplicate
curl --request POST \ --url https://api.preo.dev/v1/email-messages/:id/duplicate \ --header 'Content-Type: application/json' \ --data ' { "edition_id": "edition_id", "title": "title" } '
shell
Example Request Body
{ "edition_id": "edition_id", "title": "title" }
json
Example Responses
{ "id": "id", "title": "title", "subject": "subject", "type": "receipt", "scope": "platform", "template": "modern", "organization": { "id": "id", "name": "name", "slug": "slug", "avatar": { "thumbnail": "https://www.example.com/path/to/resource", "optimized": "https://www.example.com/path/to/resource", "large": "https://www.example.com/path/to/resource", "original": "https://www.example.com/path/to/resource" } }, "edition": { "id": "id", "full_name": "full_name", "slug": "slug", "start_date": "2024-08-25T15:00:00Z", "end_date": "2024-08-25T15:00:00Z", "timezone": "timezone", "is_draft": true, "published_at": "2024-08-25T15:00:00Z" }, "blocks": [ { "id": "id", "type": "rich_text", "data": { "key": {} } } ], "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z" }
json
application/json

Preview email

POST
https://api.preo.dev
/v1/email-messages/{id}/preview

Render email preview with optional mock context data. Returns HTML output suitable for displaying in an iframe or preview pane.

Preview email › path Parameters

id
​string · required

A unique value identifying this E-mail Message.

Preview email › Request Body

Serializer for preview request
mode
​string · enum
  • mjml - mjml
  • html - html
Enum values:
mjml
html
Default: mjml
​

Language code to render the preview in (e.g. 'da', 'en'). Uses default if not set.

  • en - en
  • da - da
  • se - se
  • pl - pl
  • nl - nl
​object

Mock context for template variables

​object[]

Optional blocks to preview without saving

​object

Optional subject override for preview

Preview email › Responses

Serializer for preview response
html
​string · required
subject
​string · required
POST/v1/email-messages/{id}/preview
curl --request POST \ --url https://api.preo.dev/v1/email-messages/:id/preview \ --header 'Content-Type: application/json' \ --data ' { "mode": "mjml", "language": "en", "context": { "key": {} }, "blocks": [ { "id": "id", "type": "rich_text", "data": { "key": {} } } ], "subject": { "key": "string" } } '
shell
Example Request Body
{ "mode": "mjml", "language": "en", "context": { "key": {} }, "blocks": [ { "id": "id", "type": "rich_text", "data": { "key": {} } } ], "subject": { "key": "string" } }
json
Example Responses
{ "html": "html", "subject": "subject" }
json
application/json

Get template variables

GET
https://api.preo.dev
/v1/email-messages/template-variables

Get available template variables that can be used in email content.

Get template variables › Responses

200
Serializer for template variables response
​object[] · required
GET/v1/email-messages/template-variables
curl --request GET \ --url https://api.preo.dev/v1/email-messages/template-variables
shell
Example Responses
{ "categories": [ { "name": "name", "variables": [ { "variable": "variable", "description": "description" } ] } ] }
json
application/json

ConsentsSegments