Skip to content

What importing a package would do, asset by asset, with the limit checks and an impact token. Changes nothing.

POST
/v1/admin/packages/import-plans
curl --request POST \
--url https://api.contentsurface.io/v1/admin/packages/import-plans \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "package": { "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 } ] }, "targetFolderId": "nod_01j9n4wqr0e008000000000006", "installation": "new", "connections": null, "placeholders": { "9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b": { "location": "\\\\files02\\projects" } }, "choices": null, "reason": null }'

Computes what importing a package would do, without changing anything: per asset create, update, unchanged, reference or blocked, with collisions (a same-named object not from this installation), objects changed locally since the last import, the values asked for again (connection settings, mount point locations), and the plan’s limits. Folders and mount points land below the target folder, in the installation named — a new one by default, so installing a package a second time creates its own copies. Imports add or update; they never delete. Send the same request with a reason to …/imports?confirm={impactToken} to apply it. A package of a newer format is refused (400 format-version). Any admin role: each asset whose kind the caller’s roles do not cover is blocked with role-required and the roles that may import it (settings: tenant admin; labels and groups: tenant or user admin; everything else: repository admin). A reference is matched to an existing object and used as it is, never created; one with no match is blocked with reference-not-found. Those assets and the ones depending on them (dependency) are listed in leftOut: they do not stop the import, and the rest can be applied. A target folder other than the root folder and a named installation need the repository admin role.

Media typeapplication/json
One of:
null

Example

{
"package": {
"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
}
]
},
"targetFolderId": "nod_01j9n4wqr0e008000000000006",
"installation": "new",
"connections": null,
"placeholders": {
"9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b": {
"location": "\\\\files02\\projects"
}
},
"choices": null,
"reason": null
}

OK

Media typeapplication/json

What an import would do, asset by asset. Nothing has changed yet.

object
packageKey
required

The package’s key.

string
packageName
required

The package’s name.

string
targetFolderId
required

The target folder (nod_…).

string
targetFolderPath
required

Its path.

string
installation
required

The installation this import creates or updates.

object
id
required

The installation updated (pki_…); null for a new one.

null | string
isNew
required

True when the import creates a new installation: its folders and mount points are new copies.

boolean
atTarget
required

The installations already at the target folder (pki_…), any of which may be named instead.

Array<string>
assets
required

Per asset, in the package’s order: what happens to it.

Array<object>

What happens to one asset.

object
key
required

The asset’s key.

string
kind
required

The asset’s kind.

string
name
required

Its name in the tenant after the import (a copy’s new name).

string
path
required

For a folder, its path in the tenant after the import.

null | string
action
required

create, update, unchanged, reference (a reference matched to an existing object, used as it is and never written) or blocked (listed in the plan’s blocked or leftOut).

string
targetId
required

The existing object it lands on; null when created.

null | string
flags
required

collision (a same-named object not from this installation), changedLocally (changed since the last import), reused (a reused connection, left as it is).

Array<string>
choice
required

The choice in force for a collision or a local change.

null | string
choices
required

The choices this asset offers; empty when there is nothing to choose.

Array<string>
notes
required

What the admin should know, such as a difference a re-import does not change.

Array<string>
placeholders
required

The values asked for again, prefilled with the package’s or the given values.

Array<object>

A value asked for again at import.

object
path
required

Its path in the asset’s data.

string
value
required

The value the import will write.

usedElsewhere
required

For an updated document type or relation definition: the mount folders outside this installation it also serves.

null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
requiredRoles

For an asset outside your roles: the roles that may import it (tenantAdmin, repositoryAdmin, userAdmin), any of them.

Array<string> | null
connections
required

Per connection asset: reuse or create, and the connections it could reuse.

Array<object>

A package connection’s landing.

object
key
required

The connection asset’s key.

string
name
required

Its name in the package.

string
connectorType
required

Its connector type.

string
mode
required

reuse or create.

string
connectionId
required

With reuse: the connection reused (cnx_…).

null | string
reusable
required

The tenant’s connections of the same connector type.

Array<object>

A connection that could be reused.

object
id
required

The connection (cnx_…).

string
name
required

Its name.

string
isReference

True when the package carries the connection as a reference: it can only be reused, never created.

boolean
blocked
required

What stops the import; it can be applied only when this is empty.

Array<object>

Something that stops the import.

object
key
required

The asset it concerns; null for the package as a whole.

null | string
code
required

plan-connector, plan-limit, data-type, invalid-settings, not-found, name-taken …; for an asset left out, role-required, reference-not-found or dependency.

string
detail
required

What is wrong and what to do.

string
requiredRoles

For role-required: the roles that may import the asset, any of them.

Array<string> | null
leftOut
required

Assets blocked without stopping the import, left out when it is applied: those outside your roles (role-required, naming the roles that may import them), references with nothing here to match (reference-not-found), and the assets depending on either (dependency).

Array<object>

Something that stops the import.

object
key
required

The asset it concerns; null for the package as a whole.

null | string
code
required

plan-connector, plan-limit, data-type, invalid-settings, not-found, name-taken …; for an asset left out, role-required, reference-not-found or dependency.

string
detail
required

What is wrong and what to do.

string
requiredRoles

For role-required: the roles that may import the asset, any of them.

Array<string> | null
limits
required

The plan’s mount folder limit with the folders this import adds; Draft folders count.

object
maxMountFolders
required

The plan’s limit; null for none.

null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
mountFolders
required

The tenant’s mount folders now.

integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
newMountFolders
required

The mount folders the import adds, all in Draft.

integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
impactToken
required

Confirms this plan when applying; the tenant or a choice changing gives another plan and token.

string

Example

{
"packageKey": "c3b2a1908f7e6d5c4b3a291807f6e5d4",
"packageName": "Client template",
"targetFolderId": "nod_01j9n4wqr0e008000000000006",
"targetFolderPath": "/Sales",
"installation": {
"id": null,
"isNew": true,
"atTarget": []
},
"assets": [
{
"key": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
"kind": "label",
"name": "Projects",
"path": null,
"action": "reference",
"targetId": "alb_01j9n4wfr0e008000000000002",
"flags": [],
"choice": null,
"choices": [],
"notes": [
"A reference: the existing one is used as it is, and not changed."
],
"placeholders": [],
"usedElsewhere": null,
"requiredRoles": null
},
{
"key": "4f0c2d9e8a7b6c5d4e3f2a1b0c9d8e7f",
"kind": "connection",
"name": "File share",
"path": null,
"action": "unchanged",
"targetId": "cnx_01j9n4wzr0e008000000000001",
"flags": [
"reused"
],
"choice": null,
"choices": [],
"notes": [
"Reused as it is: its settings, credential and agents are not changed."
],
"placeholders": [],
"usedElsewhere": null,
"requiredRoles": null
},
{
"key": "9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b",
"kind": "mountPoint",
"name": "Projects share",
"path": null,
"action": "create",
"targetId": null,
"flags": [],
"choice": null,
"choices": [],
"notes": [
"Its location is checked when the connection is authorized: the setup checklist lists it."
],
"placeholders": [
{
"path": "location",
"value": "\\\\files02\\projects"
}
],
"usedElsewhere": null,
"requiredRoles": null
},
{
"key": "1f2e3d4c5b6a79880716253443526170",
"kind": "virtualFolder",
"name": "Clients",
"path": "/Sales/Clients",
"action": "create",
"targetId": null,
"flags": [],
"choice": null,
"choices": [],
"notes": [],
"placeholders": [],
"usedElsewhere": null,
"requiredRoles": null
},
{
"key": "7a6b5c4d3e2f10293847566574839201",
"kind": "mountFolder",
"name": "Documents",
"path": "/Sales/Clients/Documents",
"action": "create",
"targetId": null,
"flags": [],
"choice": null,
"choices": [],
"notes": [
"Arrives in Draft: nothing is scanned until it is activated."
],
"placeholders": [],
"usedElsewhere": null,
"requiredRoles": null
}
],
"connections": [
{
"key": "4f0c2d9e8a7b6c5d4e3f2a1b0c9d8e7f",
"name": "File share",
"connectorType": "filesystem",
"mode": "reuse",
"connectionId": "cnx_01j9n4wzr0e008000000000001",
"reusable": [
{
"id": "cnx_01j9n4wzr0e008000000000001",
"name": "File share"
}
],
"isReference": false
}
],
"blocked": [],
"leftOut": [],
"limits": {
"maxMountFolders": 25,
"mountFolders": 4,
"newMountFolders": 1
},
"impactToken": "Xq3vJm9KpL2wRt7YbN4cHd8sFg1eUa6o"
}

The request is not valid: a malformed ID, body, filter or parameter.

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

For confirmation-required: what the change would affect, such as the users or folders losing access.

Example

{
"type": "urn:contentsurface:problem:format-version",
"title": "The request is not valid.",
"status": 400,
"detail": "The package's format version is 3; this deployment reads version 2. Export it again from a tenant on this version.",
"code": "format-version",
"supportedVersion": 2
}

No valid access token, or it no longer holds for the user (suspended, signed out, relation removed).

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

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.

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

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.

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

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.

Media typeapplication/problem+json

RFC 9457 problem details. code is the stable reason; confirmation problems add impact and impactToken.

object
type

urn:contentsurface:problem:{code}.

string
title

A short summary for people; may change.

string
status

The HTTP status code.

integer
detail

What happened in this case, for people; may change.

string
code

The stable, machine-readable reason, such as version-mismatch; branch on this.

string
field

For validation-failed: the request field that is not valid.

string
impactToken

For confirmation-required: repeat the call with ?confirm={impactToken} to go ahead.

string
impact

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
}