Upload Leads Csv
Upload a CSV: detect encoding and delimiter, suggest a column mapping, preview 20 rows. Nothing is imported until `POST /imports/{id}/commit`.
API key access
leads:write scope with an API key (ro_pat_...). A signed-in session uses the caller's role./api/v1/imports/leadsAccess token from /api/v1/auth/login, or an API key (ro_pat_..., RO-176) from /api/v1/workspaces/current/api-keys: the key implies its workspace and needs the route's scope. MCP connectors (/api/v1/mcp only) may use an OAuth access token (ro_oat_..., RO-284).
In: header
Header Parameters
Id of the workspace to act on (must be a member).
CSV file, at most 10 MB and 20,000 rows
Response Body
curl -X POST "http://localhost:8000/api/v1/imports/leads" \ -H "X-Workspace-Id: string" \ -F file="string"{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"filename": "string",
"status": "previewed",
"encoding": "string",
"delimiter": "string",
"headers": [
"string"
],
"total_rows": 0,
"created_count": 0,
"updated_count": 0,
"skipped_count": 0,
"error_count": 0,
"suppressed_count": 0,
"mapping": [
{
"property1": null,
"property2": null
}
],
"options": {
"property1": null,
"property2": null
},
"created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
"created_at": "2019-08-24T14:15:22Z",
"started_at": "2019-08-24T14:15:22Z",
"completed_at": "2019-08-24T14:15:22Z",
"suggested_mapping": [
{
"column": 0,
"header": "string",
"field": {},
"custom_key": "string"
}
],
"sample_rows": [
{
"row": 0,
"cells": [
"string"
]
}
],
"default_country": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Get Import
Status, counts and the skipped/failed rows of an import.
Accept Invite
Join the invite's workspace with its role (signed-in users; an API key gets 403). The invite is used up. 409 if you're already a member (the invite stays open). Rate-limited like the preview. To sign up and join in one step, send `invite_token` to `/auth/signup`.