Import Activities
POST/api/crm/activities/import
Import past or planned activities from a CSV file (for example history from another CRM). The import runs immediately; valid rows are saved and invalid rows are reported without stopping the rest.
customers:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Authentication: Requires Bearer token with the customers scope and the crm_activities.import permission.
Request: multipart/form-data with file (required; .csv or .txt, max 10 MB, at most 5,000 rows). The first row must be the column headings; download Download Activity Import Template for an example.
Columns:
- type (required): visit, call, meeting, email, note or task
- customer (required): the customer's ID, or its exact name. A name shared by several active customers fails; use the ID. Archived customers fail
- date (required): YYYY-MM-DD or YYYY-MM-DD HH:MM (account timezone). A date-only row is all-day. A past date imports as completed, a future one as planned; a task is completed when its date is before today
- contact_email (optional): must be one of the customer's contacts
- subject (optional; cut to 250 characters), notes (optional)
- owner_email (optional): a user on the account (deactivated users included); defaults to you
- outcome (optional): an outcome key or label from CRM settings; used for visits, calls and meetings
Response data: imported, failed, errors (the first 200: row number in the file and message) and error_file_url (a CSV of the failed rows with an error column, kept for 24 hours; null when nothing failed). Imported activities have source import. Returns 422 when the file is missing, not a CSV, has no heading row, or has more than 5,000 rows.
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.