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

Files

Endpoint

Media file upload and management with metadata support.


List files

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

List files for an organization. Optionally filter by tags, file name, or date range. Results can be ordered by created_at, updated_at, or file_name.

List files › query Parameters

organization_id
​string · required

Organization to list files from

file_name
​string

Filter by file name (case-insensitive contains)

ordering
​string

Order by: created_at, -created_at, updated_at, -updated_at, file_name, -file_name

page
​integer

A page number within the paginated result set.

page_size
​integer

Number of results to return per page.

tags
​string

Comma-separated list of tags (e.g., 'product,event')

List files › Responses

200
count
​integer · required
​object[] · required
next
​string · uri
previous
​string · uri
available_tags
​string[]

All available tags from accessible files

GET/v1/files
curl --request GET \ --url 'https://api.preo.dev/v1/files?organization_id=%3Cstring%3E'
shell
Example Responses
{ "count": 123, "next": "http://api.example.org/accounts/?page=4", "previous": "http://api.example.org/accounts/?page=2", "results": [ { "api_id": "api_id", "file_name": "file_name", "organization_id": "organization_id", "image": { "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" }, "file_url": "file_url", "image_alt_text": "image_alt_text", "caption": "caption", "copyright": "copyright", "tags": [ "string" ], "created_at": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z" } ], "available_tags": [ "string" ] }
json
application/json

Upload file

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

Upload a new file. Supports both multipart/form-data and base64 JSON uploads. Use 'file' field for multipart upload, or 'file_base64' for base64 upload. organization_id is required. Tags can be optionally specified.

Upload file › Request Body

Serializer for uploading files. Supports both multipart and base64 uploads.
api_id
​string · readOnly · required
organization_id
​string · required
file
​string · uri · writeOnly
file_base64
​string · writeOnly
file_name
​string
tags
​string[]

Upload file › Responses

Serializer for file detail view with usage information.
api_id
​string · readOnly · required
file_name
​string · maxLength: 1000 · required
organization_id
​string | null · readOnly · required
​object · readOnly · required
file_url
​string · readOnly · required
created_at
​string · date-time · readOnly · required
updated_at
​string · date-time · readOnly · required
​object · readOnly · required

Models and instances using this file

image_alt_text
​string · maxLength: 1000
caption
​string · maxLength: 1000
copyright
​string · maxLength: 1000
tags
​string[]
POST/v1/files
curl --request POST \ --url https://api.preo.dev/v1/files \ --header 'Content-Type: application/json' \ --data ' { "api_id": "api_id", "file": "https://www.example.com/path/to/resource", "file_base64": "file_base64", "file_name": "file_name", "organization_id": "organization_id", "tags": [ "string" ] } '
shell
Example Request Body
{ "api_id": "api_id", "file": "https://www.example.com/path/to/resource", "file_base64": "file_base64", "file_name": "file_name", "organization_id": "organization_id", "tags": [ "string" ] }
json
Example Responses
{ "api_id": "api_id", "file_name": "file_name", "organization_id": "organization_id", "image": { "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" }, "file_url": "file_url", "image_alt_text": "image_alt_text", "caption": "caption", "copyright": "copyright", "tags": [ "string" ], "created_at": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z", "usage": { "key": [ { "id": "id", "name": "name", "model": "model" } ] } }
json
application/json

Get file details

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

Get detailed information about a file, including where it's being used.

Get file details › path Parameters

id
​string · required

A unique value identifying this File.

Get file details › Responses

200
Serializer for file detail view with usage information.
api_id
​string · readOnly · required
file_name
​string · maxLength: 1000 · required
organization_id
​string | null · readOnly · required
​object · readOnly · required
file_url
​string · readOnly · required
created_at
​string · date-time · readOnly · required
updated_at
​string · date-time · readOnly · required
​object · readOnly · required

Models and instances using this file

image_alt_text
​string · maxLength: 1000
caption
​string · maxLength: 1000
copyright
​string · maxLength: 1000
tags
​string[]
GET/v1/files/{id}
curl --request GET \ --url https://api.preo.dev/v1/files/:id
shell
Example Responses
{ "api_id": "api_id", "file_name": "file_name", "organization_id": "organization_id", "image": { "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" }, "file_url": "file_url", "image_alt_text": "image_alt_text", "caption": "caption", "copyright": "copyright", "tags": [ "string" ], "created_at": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z", "usage": { "key": [ { "id": "id", "name": "name", "model": "model" } ] } }
json
application/json

Delete file

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

Delete a file. If the file is in use, the request will fail unless 'force=true' is provided. When force=true, the file will be deleted even if it's in use (use with caution).

Delete file › path Parameters

id
​string · required

A unique value identifying this File.

Delete file › query Parameters

force
​boolean

Force deletion even if file is in use (default: false)

Delete file › Responses

No response body

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

Update file metadata

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

Update file metadata such as alt-text, caption, copyright, and tags.

Update file metadata › path Parameters

id
​string · required

A unique value identifying this File.

Update file metadata › Request Body

Serializer for updating file metadata (alt-text, caption, copyright, tags).
image_alt_text
​string · maxLength: 1000
caption
​string · maxLength: 1000
copyright
​string · maxLength: 1000
tags
​string[]

Update file metadata › Responses

200
Serializer for file detail view with usage information.
api_id
​string · readOnly · required
file_name
​string · maxLength: 1000 · required
organization_id
​string | null · readOnly · required
​object · readOnly · required
file_url
​string · readOnly · required
created_at
​string · date-time · readOnly · required
updated_at
​string · date-time · readOnly · required
​object · readOnly · required

Models and instances using this file

image_alt_text
​string · maxLength: 1000
caption
​string · maxLength: 1000
copyright
​string · maxLength: 1000
tags
​string[]
PATCH/v1/files/{id}
curl --request PATCH \ --url https://api.preo.dev/v1/files/:id \ --header 'Content-Type: application/json' \ --data ' { "image_alt_text": "image_alt_text", "caption": "caption", "copyright": "copyright", "tags": [ "string" ] } '
shell
Example Request Body
{ "image_alt_text": "image_alt_text", "caption": "caption", "copyright": "copyright", "tags": [ "string" ] }
json
Example Responses
{ "api_id": "api_id", "file_name": "file_name", "organization_id": "organization_id", "image": { "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" }, "file_url": "file_url", "image_alt_text": "image_alt_text", "caption": "caption", "copyright": "copyright", "tags": [ "string" ], "created_at": "2024-08-25T15:00:00Z", "updated_at": "2024-08-25T15:00:00Z", "usage": { "key": [ { "id": "id", "name": "name", "model": "model" } ] } }
json
application/json

RefundsData Imports