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

Segments

Endpoint

List segments

GET
https://api.preo.dev
/v1/segments

Manage customer segments with CEL-based conditions.

List segments › query Parameters

communication_channel
​string · enum

Communication channel - filters users by delivery capability

  • any - Any available channel
  • email - Email (users with valid email addresses)
  • sms - SMS (users with valid phone numbers)
  • pass_push - Pass Push (users with active wallet passes)
Enum values:
any
email
pass_push
sms
communication_type
​string · enum

Type of communication - determines user eligibility for compliance

  • transactional - Transactional (service updates, receipts, etc.)
  • marketing - Marketing (promotions, campaigns - requires consent)
Enum values:
marketing
transactional
edition_id
​string
ordering
​string[] · style: form

Ordering

  • created - Created
  • -created - Created (descending)
  • modified - Modified
  • -modified - Modified (descending)
  • name - Name
  • -name - Name (descending)
  • user_count - User count
  • -user_count - User count (descending)
  • last_calculated - Last calculated
  • -last_calculated - Last calculated (descending)
Enum values:
-created
-last_calculated
-modified
-name
-user_count
created
last_calculated
modified
organization_id
​string
page
​integer

A page number within the paginated result set.

page_size
​integer

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

search
​string

Search by segment name

status
​string · enum

Current calculation status

  • draft - Draft
  • pending - Pending Calculation
  • processing - Processing
  • completed - Completed
  • failed - Failed
Enum values:
completed
draft
failed
pending
processing

List segments › Responses

200
count
​integer · required
​object[] · required
next
​string · uri
previous
​string · uri
GET/v1/segments
curl --request GET \ --url https://api.preo.dev/v1/segments
shell
Example Responses
{ "count": 123, "next": "http://api.example.org/accounts/?page=4", "previous": "http://api.example.org/accounts/?page=2", "results": [ { "id": "id", "organization_id": "organization_id", "edition_id": "edition_id", "consent_id": "consent_id", "name": "name", "description": "description", "status": "draft", "communication_type": "transactional", "communication_channel": "any", "user_count": 0, "last_calculated": "2024-08-25T15:00:00Z", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z" } ] }
json
application/json

Create segment

POST
https://api.preo.dev
/v1/segments

Manage customer segments with CEL-based conditions.

Create segment › Request Body

organization_id
​string · required
name
​string · maxLength: 255 · required

Human-readable segment name

edition_id
​string | null
consent_id
​string | null
description
​string

Optional description of the segment

communication_type
​string · enum

Type of communication - determines user eligibility for compliance

  • transactional - Transactional (service updates, receipts, etc.)
  • marketing - Marketing (promotions, campaigns - requires consent)
Enum values:
transactional
marketing
communication_channel
​string · enum

Communication channel - filters users by delivery capability

  • any - Any available channel
  • email - Email (users with valid email addresses)
  • sms - SMS (users with valid phone numbers)
  • pass_push - Pass Push (users with active wallet passes)
Enum values:
any
email
sms
pass_push
condition
​string

CEL expression to evaluate segment membership

Create segment › Responses

id
​string · readOnly · required
organization_id
​string | null · readOnly · required
edition_id
​string | null · readOnly · required
consent_id
​string | null · readOnly · required
name
​string · maxLength: 255 · required

Human-readable segment name

created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
description
​string

Optional description of the segment

status
​string · enum

Current calculation status

  • draft - Draft
  • pending - Pending Calculation
  • processing - Processing
  • completed - Completed
  • failed - Failed
Enum values:
draft
pending
processing
completed
failed
communication_type
​string · enum

Type of communication - determines user eligibility for compliance

  • transactional - Transactional (service updates, receipts, etc.)
  • marketing - Marketing (promotions, campaigns - requires consent)
Enum values:
transactional
marketing
communication_channel
​string · enum

Communication channel - filters users by delivery capability

  • any - Any available channel
  • email - Email (users with valid email addresses)
  • sms - SMS (users with valid phone numbers)
  • pass_push - Pass Push (users with active wallet passes)
Enum values:
any
email
sms
pass_push
user_count
​integer · min: 0 · max: 2147483647

Cached count of users in segment for performance

last_calculated
​string | null · date-time

When segment was last calculated

condition
​string

CEL expression to evaluate segment membership

calculation_duration
​string | null

How long the last calculation took

error_message
​string

Error details if calculation failed

POST/v1/segments
curl --request POST \ --url https://api.preo.dev/v1/segments \ --header 'Content-Type: application/json' \ --data ' { "organization_id": "organization_id", "edition_id": "edition_id", "consent_id": "consent_id", "name": "name", "description": "description", "communication_type": "transactional", "communication_channel": "any", "condition": "condition" } '
shell
Example Request Body
{ "organization_id": "organization_id", "edition_id": "edition_id", "consent_id": "consent_id", "name": "name", "description": "description", "communication_type": "transactional", "communication_channel": "any", "condition": "condition" }
json
Example Responses
{ "id": "id", "organization_id": "organization_id", "edition_id": "edition_id", "consent_id": "consent_id", "name": "name", "description": "description", "status": "draft", "communication_type": "transactional", "communication_channel": "any", "user_count": 0, "last_calculated": "2024-08-25T15:00:00Z", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "condition": "condition", "calculation_duration": "calculation_duration", "error_message": "error_message" }
json
application/json

Retrieve segment

GET
https://api.preo.dev
/v1/segments/{id}

Manage customer segments with CEL-based conditions.

Retrieve segment › path Parameters

id
​string · required

A unique value identifying this Customer Segment.

Retrieve segment › Responses

200
id
​string · readOnly · required
organization_id
​string | null · readOnly · required
edition_id
​string | null · readOnly · required
consent_id
​string | null · readOnly · required
name
​string · maxLength: 255 · required

Human-readable segment name

created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
description
​string

Optional description of the segment

status
​string · enum

Current calculation status

  • draft - Draft
  • pending - Pending Calculation
  • processing - Processing
  • completed - Completed
  • failed - Failed
Enum values:
draft
pending
processing
completed
failed
communication_type
​string · enum

Type of communication - determines user eligibility for compliance

  • transactional - Transactional (service updates, receipts, etc.)
  • marketing - Marketing (promotions, campaigns - requires consent)
Enum values:
transactional
marketing
communication_channel
​string · enum

Communication channel - filters users by delivery capability

  • any - Any available channel
  • email - Email (users with valid email addresses)
  • sms - SMS (users with valid phone numbers)
  • pass_push - Pass Push (users with active wallet passes)
Enum values:
any
email
sms
pass_push
user_count
​integer · min: 0 · max: 2147483647

Cached count of users in segment for performance

last_calculated
​string | null · date-time

When segment was last calculated

condition
​string

CEL expression to evaluate segment membership

calculation_duration
​string | null

How long the last calculation took

error_message
​string

Error details if calculation failed

GET/v1/segments/{id}
curl --request GET \ --url https://api.preo.dev/v1/segments/:id
shell
Example Responses
{ "id": "id", "organization_id": "organization_id", "edition_id": "edition_id", "consent_id": "consent_id", "name": "name", "description": "description", "status": "draft", "communication_type": "transactional", "communication_channel": "any", "user_count": 0, "last_calculated": "2024-08-25T15:00:00Z", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "condition": "condition", "calculation_duration": "calculation_duration", "error_message": "error_message" }
json
application/json

Delete segment

DELETE
https://api.preo.dev
/v1/segments/{id}

Manage customer segments with CEL-based conditions.

Delete segment › path Parameters

id
​string · required

A unique value identifying this Customer Segment.

Delete segment › Responses

No response body

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

Update segment

PATCH
https://api.preo.dev
/v1/segments/{id}

Manage customer segments with CEL-based conditions.

Update segment › path Parameters

id
​string · required

A unique value identifying this Customer Segment.

Update segment › Request Body

name
​string · maxLength: 255

Human-readable segment name

description
​string

Optional description of the segment

edition_id
​string | null
consent_id
​string | null
communication_type
​string · enum

Type of communication - determines user eligibility for compliance

  • transactional - Transactional (service updates, receipts, etc.)
  • marketing - Marketing (promotions, campaigns - requires consent)
Enum values:
transactional
marketing
communication_channel
​string · enum

Communication channel - filters users by delivery capability

  • any - Any available channel
  • email - Email (users with valid email addresses)
  • sms - SMS (users with valid phone numbers)
  • pass_push - Pass Push (users with active wallet passes)
Enum values:
any
email
sms
pass_push
condition
​string

CEL expression to evaluate segment membership

Update segment › Responses

200
id
​string · readOnly · required
organization_id
​string | null · readOnly · required
edition_id
​string | null · readOnly · required
consent_id
​string | null · readOnly · required
name
​string · maxLength: 255 · required

Human-readable segment name

created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
description
​string

Optional description of the segment

status
​string · enum

Current calculation status

  • draft - Draft
  • pending - Pending Calculation
  • processing - Processing
  • completed - Completed
  • failed - Failed
Enum values:
draft
pending
processing
completed
failed
communication_type
​string · enum

Type of communication - determines user eligibility for compliance

  • transactional - Transactional (service updates, receipts, etc.)
  • marketing - Marketing (promotions, campaigns - requires consent)
Enum values:
transactional
marketing
communication_channel
​string · enum

Communication channel - filters users by delivery capability

  • any - Any available channel
  • email - Email (users with valid email addresses)
  • sms - SMS (users with valid phone numbers)
  • pass_push - Pass Push (users with active wallet passes)
Enum values:
any
email
sms
pass_push
user_count
​integer · min: 0 · max: 2147483647

Cached count of users in segment for performance

last_calculated
​string | null · date-time

When segment was last calculated

condition
​string

CEL expression to evaluate segment membership

calculation_duration
​string | null

How long the last calculation took

error_message
​string

Error details if calculation failed

PATCH/v1/segments/{id}
curl --request PATCH \ --url https://api.preo.dev/v1/segments/:id \ --header 'Content-Type: application/json' \ --data ' { "name": "name", "description": "description", "edition_id": "edition_id", "consent_id": "consent_id", "communication_type": "transactional", "communication_channel": "any", "condition": "condition" } '
shell
Example Request Body
{ "name": "name", "description": "description", "edition_id": "edition_id", "consent_id": "consent_id", "communication_type": "transactional", "communication_channel": "any", "condition": "condition" }
json
Example Responses
{ "id": "id", "organization_id": "organization_id", "edition_id": "edition_id", "consent_id": "consent_id", "name": "name", "description": "description", "status": "draft", "communication_type": "transactional", "communication_channel": "any", "user_count": 0, "last_calculated": "2024-08-25T15:00:00Z", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "condition": "condition", "calculation_duration": "calculation_duration", "error_message": "error_message" }
json
application/json

Export segment users as CSV

GET
https://api.preo.dev
/v1/segments/{id}/export

Manage customer segments with CEL-based conditions.

Export segment users as CSV › path Parameters

id
​string · required

A unique value identifying this Customer Segment.

Export segment users as CSV › Responses

200
string · binary
GET/v1/segments/{id}/export
curl --request GET \ --url https://api.preo.dev/v1/segments/:id/export
shell
Example Responses
<binary>
csv
text/csv

Recalculate segment

POST
https://api.preo.dev
/v1/segments/{id}/recalculate

Manage customer segments with CEL-based conditions.

Recalculate segment › path Parameters

id
​string · required

A unique value identifying this Customer Segment.

Recalculate segment › Responses

200
id
​string · readOnly · required
organization_id
​string | null · readOnly · required
edition_id
​string | null · readOnly · required
consent_id
​string | null · readOnly · required
name
​string · maxLength: 255 · required

Human-readable segment name

created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
description
​string

Optional description of the segment

status
​string · enum

Current calculation status

  • draft - Draft
  • pending - Pending Calculation
  • processing - Processing
  • completed - Completed
  • failed - Failed
Enum values:
draft
pending
processing
completed
failed
communication_type
​string · enum

Type of communication - determines user eligibility for compliance

  • transactional - Transactional (service updates, receipts, etc.)
  • marketing - Marketing (promotions, campaigns - requires consent)
Enum values:
transactional
marketing
communication_channel
​string · enum

Communication channel - filters users by delivery capability

  • any - Any available channel
  • email - Email (users with valid email addresses)
  • sms - SMS (users with valid phone numbers)
  • pass_push - Pass Push (users with active wallet passes)
Enum values:
any
email
sms
pass_push
user_count
​integer · min: 0 · max: 2147483647

Cached count of users in segment for performance

last_calculated
​string | null · date-time

When segment was last calculated

condition
​string

CEL expression to evaluate segment membership

calculation_duration
​string | null

How long the last calculation took

error_message
​string

Error details if calculation failed

POST/v1/segments/{id}/recalculate
curl --request POST \ --url https://api.preo.dev/v1/segments/:id/recalculate
shell
Example Responses
{ "id": "id", "organization_id": "organization_id", "edition_id": "edition_id", "consent_id": "consent_id", "name": "name", "description": "description", "status": "draft", "communication_type": "transactional", "communication_channel": "any", "user_count": 0, "last_calculated": "2024-08-25T15:00:00Z", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "condition": "condition", "calculation_duration": "calculation_duration", "error_message": "error_message" }
json
application/json

Reset stuck segment to draft

POST
https://api.preo.dev
/v1/segments/{id}/reset

Manage customer segments with CEL-based conditions.

Reset stuck segment to draft › path Parameters

id
​string · required

A unique value identifying this Customer Segment.

Reset stuck segment to draft › Responses

200
id
​string · readOnly · required
organization_id
​string | null · readOnly · required
edition_id
​string | null · readOnly · required
consent_id
​string | null · readOnly · required
name
​string · maxLength: 255 · required

Human-readable segment name

created
​string · date-time · readOnly · required
modified
​string · date-time · readOnly · required
description
​string

Optional description of the segment

status
​string · enum

Current calculation status

  • draft - Draft
  • pending - Pending Calculation
  • processing - Processing
  • completed - Completed
  • failed - Failed
Enum values:
draft
pending
processing
completed
failed
communication_type
​string · enum

Type of communication - determines user eligibility for compliance

  • transactional - Transactional (service updates, receipts, etc.)
  • marketing - Marketing (promotions, campaigns - requires consent)
Enum values:
transactional
marketing
communication_channel
​string · enum

Communication channel - filters users by delivery capability

  • any - Any available channel
  • email - Email (users with valid email addresses)
  • sms - SMS (users with valid phone numbers)
  • pass_push - Pass Push (users with active wallet passes)
Enum values:
any
email
sms
pass_push
user_count
​integer · min: 0 · max: 2147483647

Cached count of users in segment for performance

last_calculated
​string | null · date-time

When segment was last calculated

condition
​string

CEL expression to evaluate segment membership

calculation_duration
​string | null

How long the last calculation took

error_message
​string

Error details if calculation failed

POST/v1/segments/{id}/reset
curl --request POST \ --url https://api.preo.dev/v1/segments/:id/reset
shell
Example Responses
{ "id": "id", "organization_id": "organization_id", "edition_id": "edition_id", "consent_id": "consent_id", "name": "name", "description": "description", "status": "draft", "communication_type": "transactional", "communication_channel": "any", "user_count": 0, "last_calculated": "2024-08-25T15:00:00Z", "created": "2024-08-25T15:00:00Z", "modified": "2024-08-25T15:00:00Z", "condition": "condition", "calculation_duration": "calculation_duration", "error_message": "error_message" }
json
application/json

Get CEL context schema and dynamic values

GET
https://api.preo.dev
/v1/segments/cel-context

Manage customer segments with CEL-based conditions.

Get CEL context schema and dynamic values › query Parameters

organization_id
​string · required

Organization ID

edition_id
​string

Edition ID (optional)

Get CEL context schema and dynamic values › Responses

200
​object · required
​object[] · required
​object[] · required
​object · required
GET/v1/segments/cel-context
curl --request GET \ --url 'https://api.preo.dev/v1/segments/cel-context?organization_id=%3Cstring%3E'
shell
Example Responses
{ "schema": { "key": { "type": "type", "description": "description", "fields": { "key": {} } } }, "functions": [ { "name": "name", "syntax": "syntax", "description": "description", "example": "example" } ], "examples": [ { "description": "description", "expression": "expression" } ], "dynamic_values": { "editions": [ { "slug": "slug", "full_name": "full_name" } ], "categories": [ { "id": "id", "name": "name" } ], "products": [ { "id": "id", "name": "name", "variants": [ { "id": "id", "name": "name" } ], "category_ids": [ "string" ] } ], "vendors": [ { "id": "id", "name": "name" } ], "locations": [ { "id": "id", "name": "name" } ], "product_types": [ "string" ], "purchase_statuses": [ "string" ], "marketing_consents": [ { "id": "id", "title": "title" } ] } }
json
application/json

Validate CEL expression

POST
https://api.preo.dev
/v1/segments/validate-cel

Manage customer segments with CEL-based conditions.

Validate CEL expression › Request Body

condition
​string · required

Validate CEL expression › Responses

200
valid
​boolean · required
error
​string | null · required
POST/v1/segments/validate-cel
curl --request POST \ --url https://api.preo.dev/v1/segments/validate-cel \ --header 'Content-Type: application/json' \ --data ' { "condition": "condition" } '
shell
Example Request Body
{ "condition": "condition" }
json
Example Responses
{ "valid": true, "error": "error" }
json
application/json

Email MessagesWebhooks