Import Cases
Definition
Current Case imports use multipart submission beneath the organization/project prefix:
The actual multipart boundary is generated by the client. This outline is not a JSON-row import contract.
POST /cases/imports
Content-Type: multipart/form-data
Idempotency-Key: <logical-command-key>
manifest: metadata.csv or metadata.jsonl
files: referenced file parts
Manifest and files
The manifest identifies Case input/material fields and relative file references. Preserve relative filenames or supported part metadata when attaching referenced bytes. Project Input Schema and the owning importer decide valid content.
Do not confuse file paths with artifact authority or rewrite canonical input into legacy metadata just because an older example used it.
Admission and status
Read the returned import identity and status through:
A successful request is not proof that all rows or files completed. Retain original content and the issued import ID until its outcome is known. A repeated POST idempotency key returns 409; it does not replay the original import receipt. If the response is lost before an ID is known, reconcile the uncertain import with your administrator or support before using another key.
The gateway reports unsupported content type, missing configuration and upstream failures through their actual HTTP/code/reason contracts. It does not silently substitute a local importer.
GET /cases/imports/{importId}
Submit a manifest
Prepare metadata.csv or metadata.jsonl and its files using the Project Input Schema. Preserve relative filenames in the multipart parts.
Use one application-owned key for this import. Let curl generate the multipart boundary. Omit files when there are no attachments. Retain the exact manifest and bytes. 202 returns the import result; inspect the issued import's row/file outcomes through its status route. Import Case Examples covers interactive mapping.
curl --fail-with-body \
--header "Authorization: Bearer ${TEAMMATELY_API_KEY}" \
--header "Idempotency-Key: ${IMPORT_OPERATION_KEY}" \
--form '[email protected]' \
--form 'files=@materials/reference.txt;filename=materials/reference.txt' \
"${PROJECT_URL}/cases/imports"
