Create an import

Uploads a file and imports it into the branch as an asynchronous job (multipart upload, plain form fields). Send the file in the file field. A file whose name ends in .zip is an archive: every file inside it is imported under its path in the archive, skipping hidden files (names starting with a dot) and empty entries. Any other file is imported as the single file it is, including documents such as DOCX or PPTX that are ZIP containers internally. path is the folder the file, or every file of the archive, is imported into; without it they are imported at the project root. language_code is the language of the file, or of every file of the archive; without it, the language is detected from each file's name and path. Returns 202 with the import; poll it at the URL in the Location header while QUEUED or PROCESSING. SUCCEEDED is full success; PARTIALLY_SUCCEEDED means some work failed. Inspect status_details and entries before retrying failed or partial work. Requires branch-level resource management permission. Use the same Idempotency-Key when retrying an upload whose response was lost to recover the original import instead of scheduling another one.

Recipes
📥
Import a file (API V2)
Open Recipe
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
^prb_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$

Public id that is created from the type prefix of the corresponding resource and its UUID. I.e : For a project branch, a valid value would be : prb_0197c8f2-5a6b-7cde-8f12-3456789abcde

Body Params
file
required

The file to import. A file whose name ends in .zip is imported as an archive of files.

string
length ≤ 4096

Folder the file, or every file of an archive, is imported into (e.g. src/i18n/de). Omit it to import at the project root. Must be a relative POSIX path of at most 4096 characters: .. segments, absolute paths, drive letters and segments longer than 255 characters are rejected.

string

Language of the file, or of every file of an archive; one of the supported locales. Omit it to detect the language from each file's name and path.

Headers
string
length between 1 and 255

Optional unique key for best-effort POST retry protection. Redis reserves the key, the request runs with ordinary service transactions, then the successful response is cached separately for 24 hours by default. There is no request-wide transaction or atomic commit between the operation and its replay result. A matching cached response is replayed verbatim with Idempotent-Replayed: true. Redis loss/eviction or retention expiry can remove protection and allow re-execution. Uploads and chunked bodies are covered; multipart boundaries and JSON property order may differ. Retries still pass validation and current authorization; a later 403/404 does not undo the original operation. A changed payload returns 422 idempotency_key_mismatch. A recent active reservation returns 409 idempotency_key_in_use with Retry-After. A retry with an unresolved key, including an unfinished reservation older than 5 minutes, returns 409 idempotency_outcome_unknown without Retry-After. This timeout does not release the reservation or permit re-execution while it is retained. Inspect the affected resource before starting a new operation; do not blindly reuse an unresolved key after expiry. A 4xx rejection releases the reservation, allowing the same key to be retried after correcting the cause. A 5xx or interruption after execution starts leaves it unresolved. An unavailable reservation store returns 503 before execution; an oversized request returns 413. Cache-save failure or a response over the cache limit preserves the original success status, headers and body; only future retries become unresolved. When idempotency is explicitly disabled by server configuration, the header is ignored and requests execute normally without retry protection. Use a new unique key for each intended operation.

string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json