Builds a package from the selected assets and their dependencies, those left out or outside your roles as references.
const url = 'https://api.contentsurface.io/v1/admin/packages/export';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Client template","assets":["nod_01j9n4wqr0e00800000000000h","nod_01j9n4wqr0e008000000000002"],"references":["dty_01j9n4xfr0e008000000000001"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.contentsurface.io/v1/admin/packages/export \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Client template", "assets": [ "nod_01j9n4wqr0e00800000000000h", "nod_01j9n4wqr0e008000000000002" ], "references": [ "dty_01j9n4xfr0e008000000000001" ] }'Builds a configuration package: the selected assets and everything they require, each after its dependencies, references between assets by export key. A dependency named in references, and every dependency outside the caller’s roles (for a repository admin, the labels named in an ACL), travels as a reference: only what identifies it, matched at import to an existing object and never created there. Selected assets must be ones the caller’s roles cover (400 otherwise). Connection settings and mount point locations are exported as values and asked for again at import. The package holds source locations: treat the file as confidential configuration. Nothing changes in the tenant. Any admin role.
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”What to export.
object
The package’s name, such as Integrator template – SMB file server.
The selected assets’ IDs, as the asset graph lists them; what they require is added.
Dependencies to carry as references instead of in full, such as those already on the target: only what identifies them travels, and an import matches them to existing objects and never creates them. Dependencies outside the caller’s roles are always references.
Example
{ "name": "Client template", "assets": [ "nod_01j9n4wqr0e00800000000000h", "nod_01j9n4wqr0e008000000000002" ], "references": [ "dty_01j9n4xfr0e008000000000001" ]}Responses
Section titled “Responses”OK
A configuration package (docs/api/configuration-packages.md, “Package format”): a versioned JSON file holding the selected assets and everything they depend on, references between assets by export key. Never credentials, people or items.
object
Always contentsurface.package.
The format’s version: 2 since references (2026-11-21); this deployment reads versions 1 and 2.
A hash of the exporting tenant and the selected assets; the same selection exported again has the same key.
The package’s name, given at export.
When it was exported.
The assets, each after the assets it depends on.
One asset of a package.
object
Its export key: a hash of the exporting tenant and the object, stable across exports.
label, group, attribute, connection, documentType, relationDefinition, hierarchy, mountPoint, virtualFolder, mountFolder or settings.
Its name, for display.
The keys of the assets it refers to; they come before it.
What the asset is, by kind; references to other assets are their keys.
The values asked for again at import, as paths into data, such as settings.root or location.
True for a reference (format version 2): a dependency the exporter left out, or one outside their roles. data holds only what identifies it; an import matches it to an existing object and never creates or changes it.
Example
{ "format": "contentsurface.package", "formatVersion": 2, "packageKey": "c3b2a1908f7e6d5c4b3a291807f6e5d4", "name": "Client template", "exportedAt": "2026-11-03T15:12:00+00:00", "assets": [ { "key": "0a1b2c3d4e5f60718293a4b5c6d7e8f9", "kind": "label", "name": "Projects", "dependsOn": [], "data": { "name": "Projects", "connectorType": null, "connection": null, "location": null, "path": null, "from": null, "to": null, "dataType": null, "isInternal": null }, "placeholders": [], "reference": true }, { "key": "4f0c2d9e8a7b6c5d4e3f2a1b0c9d8e7f", "kind": "connection", "name": "File share", "dependsOn": [], "data": { "name": "File share", "description": "The company file server", "connectorType": "filesystem", "location": "onPrem", "settings": { "v": 1 } }, "placeholders": [], "reference": null }, { "key": "9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b", "kind": "mountPoint", "name": "Projects share", "dependsOn": [ "4f0c2d9e8a7b6c5d4e3f2a1b0c9d8e7f" ], "data": { "connection": "4f0c2d9e8a7b6c5d4e3f2a1b0c9d8e7f", "name": "Projects share", "description": null, "location": "\\\\files01\\projects" }, "placeholders": [ "location" ], "reference": null }, { "key": "1f2e3d4c5b6a79880716253443526170", "kind": "virtualFolder", "name": "Clients", "dependsOn": [ "0a1b2c3d4e5f60718293a4b5c6d7e8f9" ], "data": { "path": "Clients", "acl": [ "0a1b2c3d4e5f60718293a4b5c6d7e8f9" ] }, "placeholders": [], "reference": null }, { "key": "7a6b5c4d3e2f10293847566574839201", "kind": "mountFolder", "name": "Documents", "dependsOn": [ "1f2e3d4c5b6a79880716253443526170", "0a1b2c3d4e5f60718293a4b5c6d7e8f9", "9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b" ], "data": { "path": "Clients/Documents", "mountPoint": "9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b", "filters": { "v": 1, "extensions": { "exclude": [ "tmp" ] } }, "acl": null }, "placeholders": [], "reference": null } ]}The request is not valid: a malformed ID, body, filter or parameter.
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
For confirmation-required: what the change would affect, such as the users or folders losing access.
Example
{ "type": "urn:contentsurface:problem:validation-failed", "title": "The request is not valid.", "status": 400, "detail": "'nod_01j9n4xzr0e008000000000001' is not an exportable asset of this tenant for your roles.", "code": "validation-failed", "field": "assets"}No valid access token, or it no longer holds for the user (suspended, signed out, relation removed).
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
For confirmation-required: what the change would affect, such as the users or folders losing access.
Example
{ "type": "urn:contentsurface:problem:unauthorized", "title": "Not authenticated.", "status": 401, "detail": "A valid access token is required.", "code": "unauthorized"}Authenticated but not allowed: a missing scope or role, an impersonated token on an admin endpoint, or an inactive tenant.
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
For confirmation-required: what the change would affect, such as the users or folders losing access.
Example
{ "type": "urn:contentsurface:problem:role-required", "title": "Not allowed.", "status": 403, "detail": "This endpoint requires one of the roles: tenantAdmin, repositoryAdmin, userAdmin.", "code": "role-required"}Absent: not existing, in another tenant, or not readable by the caller — never distinguished.
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
For confirmation-required: what the change would affect, such as the users or folders losing access.
Example
{ "type": "urn:contentsurface:problem:not-found", "title": "Not found.", "status": 404, "detail": "The resource does not exist.", "code": "not-found"}Load protection: the tenant is making too many calls, or running too many searches or content streams, at once. Transient and never a quota; retry after Retry-After seconds.
RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.
object
urn:contentsurface:problem:{code}.
A short summary for people; may change.
The HTTP status code.
What happened in this case, for people; may change.
The stable, machine-readable reason, such as version-mismatch; branch on this.
For validation-failed: the request field that is not valid.
For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.
For confirmation-required: what the change would affect, such as the users or folders losing access.
Example
{ "type": "urn:contentsurface:problem:too-many-requests", "title": "Too many requests.", "status": 429, "detail": "The tenant is making more API calls than one replica serves at once; retry shortly.", "code": "too-many-requests", "retryAfter": 1}