contacts

Create and update contacts from a CSV, sent as a multipart file or as JSON text.

A new address is created; on_conflict decides what happens to one already on the account. rejected lists every failed row with its reason. At most 1,000 data rows.

post/contacts/imports

Request

  • Base URL: https://api.agentisend.com
  • URL: https://api.agentisend.com/contacts/imports
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Makes this call safe to retry. Send the same key with the same body and the original response is replayed instead of the work happening twice. Keys are 1-256 characters and are remembered for 7 days. While the first attempt is still running, a second call with that key returns 409 idempotency_in_flight (Resend calls this concurrent_idempotent_requests); the same key with a different body returns 409 idempotency_payload_mismatch (Resend: invalid_idempotent_request). Resend-Idempotency-Key is accepted as the same header.

Resend-Idempotency-Keystring

Alias of Idempotency-Key. Idempotency-Key wins if both are sent.

Request body

csvstring

CSV text in a JSON body. The first row is the header and must include email.

filestring

The CSV, as the multipart file field. In a JSON body, the CSV text.

on_conflict'upsert' | 'skip'

What happens to a contact that already exists: skip (the default) leaves it unchanged, upsert updates it. New addresses are always created.

Response

Success

object'contact_import' required
idstring uuid required
status'queued' | 'in_progress' | 'completed' | 'failed' required
created_atstring date-time required
completed_atstring date-time nullable required

Changes

No recorded changes to this operation across all 1 revision of this API.