Skip to content

Applies an import plan in one transaction, confirmed by its impact token; 409 when the tenant changed since the plan.

POST
/v1/admin/packages/imports
curl --request POST \
--url 'https://api.contentsurface.io/v1/admin/packages/imports?confirm=Xq3vJm9KpL2wRt7YbN4cHd8sFg1eUa6o' \
--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": "Sales gets the client set-up" }'

Applies an import in one transaction: the request is the one the plan was computed from, with a reason, and ?confirm= carries the plan’s impactToken. The plan is computed again; when the tenant or a choice changed since, the call answers 409 confirmation-required with the new plan and token. A plan with anything in blocked answers 409 import-blocked; the assets in leftOut are skipped and the rest applied. References are never written. Nothing is crawled: connections arrive without credential and mount folders in Draft, and the setup checklist lists what is left. Every change is in the change log as Imported from package …. An installation is recorded only when the import places a folder or mount point. Any admin role, each for the asset kinds of their roles, as for the plan.

confirm
string

The plan’s impactToken.

Example

Xq3vJm9KpL2wRt7YbN4cHd8sFg1eUa6o
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": "Sales gets the client set-up"
}

OK

Media typeapplication/json

What an applied import did.

object
installationId
required

The installation created or updated (pki_…); null when the import placed no folder or mount point.

null | string
created
required

How many objects were created.

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

How many were updated.

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

How many were left as they were (references included).

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

How many were left out: outside your roles, unmatched references and what depends on them.

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

The plan that was applied, with the IDs of what was created.

Array<object>

One applied asset.

object
key
required

The asset’s key.

string
kind
required

Its kind.

string
name
required

Its name in the tenant.

string
action
required

create, update, unchanged, reference or blocked (left out).

string
targetId
required

The object in the tenant: the existing one, or the one created.

null | string

Example

{
"installationId": "pki_01j9n4xbr0e008000000000001",
"created": 3,
"updated": 0,
"unchanged": 2,
"leftOut": 0,
"plan": [
{
"key": "0a1b2c3d4e5f60718293a4b5c6d7e8f9",
"kind": "label",
"name": "Projects",
"action": "reference",
"targetId": "alb_01j9n4wfr0e008000000000002"
},
{
"key": "4f0c2d9e8a7b6c5d4e3f2a1b0c9d8e7f",
"kind": "connection",
"name": "File share",
"action": "unchanged",
"targetId": "cnx_01j9n4wzr0e008000000000001"
},
{
"key": "9e8d7c6b5a4f3e2d1c0b9a8f7e6d5c4b",
"kind": "mountPoint",
"name": "Projects share",
"action": "create",
"targetId": "mnt_01j9n4x3r0e008000000000002"
},
{
"key": "1f2e3d4c5b6a79880716253443526170",
"kind": "virtualFolder",
"name": "Clients",
"action": "create",
"targetId": "nod_01j9n4wqr0e00800000000000j"
},
{
"key": "7a6b5c4d3e2f10293847566574839201",
"kind": "mountFolder",
"name": "Documents",
"action": "create",
"targetId": "nod_01j9n4wqr0e00800000000000k"
}
]
}

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:body-required",
"title": "The request is not valid.",
"status": 400,
"detail": "A JSON request body is required.",
"code": "body-required"
}

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"
}

Conflicts with the current state, or needs confirmation (confirmation-required with impactToken).

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:import-blocked",
"title": "The request conflicts with the current state.",
"status": 409,
"detail": "The plan has blocked assets; resolve them and compute the plan again.",
"code": "import-blocked",
"blocked": [
{
"key": "4f0c2d9e8a7b6c5d4e3f2a1b0c9d8e7f",
"code": "plan-connector",
"detail": "The plan does not include the Salesforce connector.",
"requiredRoles": null
}
]
}

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
}