Contacts
Export contacts (CSV)
Returns the workspace’s contacts as a CSV download. Owners and admins signed in to the app, and API keys (a read key is enough), can export; agents get 403. Each export is recorded in the audit log as export.contacts_csv.
- Bearer API key
- Scope:
read, write or admin - or app session
- Workspace:
X-Tenant-ID(optional with a key)
Headers
AuthorizationstringrequiredYour API key as
Bearer <key>. The wordBearerand the space are case-sensitive. Browser clients signed in to the app use the session cookie instead.X-Tenant-IDuuidoptionalWorkspace id. Optional with an API key (a key always acts in its own workspace); if you send it, it must match the key’s workspace. Required with a session cookie. You can pass
?tenant=<id>instead.
Response
Status codes
- 200OK. A UTF-8 CSV file of the contacts, sent as an attachment. The file name is in the
Content-Dispositionheader. - 401Unauthorized. The API key is unknown, revoked or expired (
invalid or expired API key), or there is no key and no signed-in session (unauthorized). - 402Payment required. Only when subscriptions are enforced and the workspace has no active subscription. The body includes
code: "payment_required". - 403Forbidden. The
X-Tenant-IDheader ortenantquery does not match the API key’s workspace (API key belongs to a different workspace), a signed-in user is not a member of the workspace (forbidden), or the key is limited to other IP addresses (this API key is not allowed from your IP address, withcode: "ip_not_allowed"). Agents signed in to the app cannot export contacts. - 500Server error. Something went wrong on our side. Retry with backoff.