POST
/contacts/imports
Resend APICreate a contact import
- Base URL
- https://api.resend.com
- Auth
- Authorization: Bearer <RESEND_API_KEY>
- Last verified
- 2026-09-03 · upstream hash matched
Actions
Agents: curl -H "Accept: text/markdown" this URL
→ 211 tokens · Vary: Accept
→ 211 tokens · Vary: Accept
Critical gotchas
All requests must include a User-Agent header (e.g. User-Agent: my-app/1.0) or the API returns HTTP 403.
The to field is an array of strings, even when sending to a single recipient.
cURL
curl -X POST 'https://api.resend.com/contacts/imports' \ -H "Authorization: Bearer $RESEND_API_KEY" \ -H 'User-Agent: my-app/1.0' \ -F 'file=@sample.bin' \ -F 'column_map={"email":"Email","first_name":"First Name","last_name":"Last Name","unsubscribed":"Unsubscribed","properties":{"plan":{"column":"Plan","type":"string"}}}' \ -F 'on_conflict=skip' \ -F 'segments=[{"id":"78261eea-8f8b-4381-83c6-79fa7120f1cf"}]' \ -F 'topics=[{"id":"b6d24b8e-af0b-4c3c-be0c-359bbd97381e","subscription":"opt_in"}]'Get a free Resend API key → sponsored
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| file | body | string | Yes | CSV file to import. Maximum size is 50MB. |
| column_map | body | string | No | JSON-encoded object mapping contact fields and custom property keys to CSV column names. Supports `email`, `first_name`, `last_name`, `unsubscribed`, and `properties`. Custom property mappings can include `type` as `string`, `number`, or `boolean`; defaults to `string`. |
| on_conflict | body | string | No | Strategy to use when an imported contact already exists. |
| segments | body | string | No | JSON-encoded array of segments to add imported contacts to. |
| topics | body | string | No | JSON-encoded array of topic subscriptions to apply to imported contacts. Each `subscription` must be `opt_in` or `opt_out`. |
Response 200 OK
{
"object": "contact_import",
"id": "479e3145-dd38-476b-932c-529ceb705947"
}