POST/v2/projects/{projectId}/import

Prepare files for import

Prepares files for import into a project. Provide the files as multipart form data, and optionally use branch to select the target branch and structureDelimiter to define delimiters in keys imported from structured formats. Review the returned result, errors, and warnings before proceeding with the import.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

3 parameters · 1 body field
projectIdintegerrequired
The integer identifier of the project to prepare the files for.
structureDelimiterstringoptional
The delimiter used in imported key names when the files use a structured format such as JSON or YAML.
branchstringoptional
The branch into which the files will be imported. Omit to use the default branch.

Multipart form data containing the files to prepare for import.

filesarray<string>required
The files to prepare for import.

5 status codes
200Returns the import preparation result, including a result object and arrays of errors and warnings.
errorsarray<object>required
resultobjectoptional
warningsarray<object>required
400Returned when the request is invalid, including when the required files are missing.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when authentication is missing or invalid.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when the authenticated user lacks permission to import files into the project.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when the project cannot be found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 is returned when the request is invalid. A 401 is returned when authentication is missing or invalid. A 403 is returned when the authenticated user lacks permission to import files into the project, and a 404 is returned when the project cannot be found. The files body field is required and must contain the files to prepare. The projectId path parameter must identify the project.