## Import objects **post** `/v2/prism/{teamId}/contact/import` Import multiple objects in batch. Properties are keyed by slug. Automatically routes based on size: small batches complete synchronously and return 200 with the final `ImportJob`; large batches start an async job, return 202 with `status: processing` and a `Location` header, and can be polled via `GET /v2/prism/{teamId}/imports/{jobId}`. ### Path Parameters - `teamId: optional string` ### Header Parameters - `"Idempotency-Key": optional string` ### Body Parameters - `objects: array of PrismObjectProperties` Array of objects to import with property values keyed by slug - `default: optional map[unknown]` Properties keyed by property slug. Values can be strings, numbers, booleans, arrays, or null. For select/multiselect properties, values may be option slugs or option UUIDs on write; option slugs are returned on read. - `list: optional unknown` - `options: optional object { caseInsensitive, create_missing_options, crm_id, 4 more }` - `caseInsensitive: optional boolean` Whether deduplication should be case insensitive - `create_missing_options: optional boolean` When true, unknown values for select/multiselect properties are created as new options instead of failing the import - `crm_id: optional string` Deprecated alias for list_id. - `dedupe_by: optional string or array of string` Property slug to deduplicate on. A single-element array is also accepted; compound (multi-slug) dedupe is not supported yet and is rejected with guidance. - `string` - `array of string` - `list_id: optional string` App/CRM ID for context (optional) - `require_list_stage: optional boolean` Require app_stage for every row in the selected list. app_stage is a reserved list-scoped alias for native status. - `update_existing: optional boolean` Patch a deduplicated record with the supplied properties instead of skipping it. ### Returns - `job_id: string` Null for sync imports (results inlined). Set for async imports. - `status: "complete" or "processing" or "failed"` - `"complete"` - `"processing"` - `"failed"` - `total: number` Total number of rows in the import. - `created_at: optional string` - `error: optional object { code, message }` Set when status=failed; describes the job-level failure (not per-row). - `code: optional string` - `message: optional string` - `expires_at: optional string` - `failed: optional number` - `processed: optional number` Rows that have been attempted (succeeded + failed). - `results: optional array of object { id, created, error, 3 more }` Per-row outcomes. Always present for sync imports; populated for async imports once the job reaches `complete`. - `id: optional string` - `created: optional boolean` - `error: optional object { code, message }` - `code: optional string` - `message: optional string` - `existing: optional boolean` True if the row matched an existing record via the dedupe key. - `input_index: optional number` Zero-based position of this row in the request. - `updated: optional boolean` True if a matching record was updated. - `succeeded: optional number` - `updated_at: optional string` ### Example ```http curl https://developers.micro.so/v2/prism/$TEAM_ID/contact/import \ -H 'Content-Type: application/json' \ -H "x-api-key: $MICRO_API_KEY" \ -d '{ "objects": [ {} ] }' ``` #### Response ```json { "job_id": "job_id", "status": "complete", "total": 0, "created_at": "2019-12-27T18:11:19.117Z", "error": { "code": "code", "message": "message" }, "expires_at": "2019-12-27T18:11:19.117Z", "failed": 0, "processed": 0, "results": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "created": true, "error": { "code": "code", "message": "message" }, "existing": true, "input_index": 0, "updated": true } ], "succeeded": 0, "updated_at": "2019-12-27T18:11:19.117Z" } ```