Skip to content

import_project

Import a Bridge Town project from a .btx archive file. Pass the staged_import_id UUID returned by POST /api/projects/imports/stage after uploading the archive. Returns: job_id (str) — import job UUID for polling via get_import; status (str) — queued/pending state; target_workspace_id (str) — destination workspace; target_repo_name (str|null) — destination project; message (str) — next action; duplicate_of (str|null) — idempotent prior job.

NameTypeRequiredDefaultDescription
archive_sourceAnnotated[str, Field(description='Opaque staged archive UUID returned by POST /api/projects/imports/stage. Must be a UUID string; filesystem paths, URLs, and basenames are not accepted.')]Yes
target_workspace_id`Annotated[strNone, Field(description=‘UUID of the target workspace to import into. Defaults to the current workspace.’)]`NoNone
options`Annotated[dict[str, Any]None, Field(description=‘Optional JSON object with import configuration (e.g. conflict resolution strategy, target branch).’)]`NoNone

Returns a structured object. Top-level fields:

  • job_id (string)
  • status (string)
  • target_workspace_id (string)
  • target_repo_name (string)
  • message (string)
  • duplicate_of (null)

See the response example below for the full payload shape.

{
"name": "import_project",
"arguments": {
"archive_source": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
"target_workspace_id": "dddddddd-dddd-dddd-dddd-dddddddddddd",
"options": {
"repo_name": "forecasts-imported",
"conflict_policy": "fail",
"idempotency_key": "forecasts-import-20260428"
}
}
}
{
"job_id": "cccccccc-cccc-cccc-cccc-cccccccccccc",
"status": "queued",
"target_workspace_id": "dddddddd-dddd-dddd-dddd-dddddddddddd",
"target_repo_name": "forecasts-imported",
"message": "Import queued.",
"duplicate_of": null
}
  • Module: Imports
  • Requires authentication via API token or Auth0 JWT.