Export the org's definitions as a sendops.json bundle

Search Documentation

Search across all developer documentation

bundle

Export the org's definitions as a sendops.json bundle

GET /v1/export
Auth required

Returns the organization's managed definitions as a bundle: a sendops.json manifest plus the files it names — templates, segment .sendql predicates, workflow .flow sources, the list / topic / attribute / activity-property schema files, and the org's uploaded images.

Content is negotiated on Accept. Accept: application/zip returns a zip archive whose root is sendops.json (no wrapper directory — the archive is a directory a CI job can zip and push back unchanged). Anything else returns the JSON form, which inlines every file.

Deterministic. Two exports of an unchanged org are byte-identical: sorted ordering throughout, fixed zip timestamps, and .flow files rendered through the canonical formatter. An export is safe to commit on a schedule without producing a diff every night.

Scopes. Any one view scope is enough. Each section needs its kind's .view scope (api.templates.view, api.segments.view, api.lists.view, api.topics.view, api.attributes.view, api.activities.view, api.workflows.view, api.assets.view); a section the credential cannot read is omitted and named in omitted[] (or in the X-SendOps-Omitted response header, for the zip form) rather than failing the call. A credential with none of them gets 403.

Responses

Errors follow the RFC 7807 problem format — see the error reference.

200 The bundle. omitted[] names the kinds the credential could not read — empty means the bundle is the whole org. application/json
manifest object required

The sendops.json object.

files object required

Every UTF-8 text file, keyed by bundle-relative path.

images object optional

Binary files, standard base64.

omitted array<string> required

Kinds the credential could not read. Empty means the bundle is the whole org; non-empty means sections are missing because of the token, which is a different fact from the org not having them.

401 Missing, malformed, or unknown API key application/problem+json
403 Key lacks the required scope or plan limit violated application/problem+json
429 Per-org rate limit exceeded application/problem+json
500 Unexpected server-side failure. The code is internal_error. The request_id field can be quoted to SendOps support to investigate. application/problem+json