Skip to main content
POST
AhaSend Go SDK
The AhaSend API creates or updates 1 to 1,000 contacts in one request, and answers when the work is done. Access requires contacts:write. Matching and fields:
  • Each entry needs email. The API trims it and changes it to lowercase, then updates the contact with that address, or creates one.
  • On an update, a field that you leave out or send as null does not change. On a create, such a field gets the same default as in Create Contact.
  • attributes is merged into the stored attributes, and a null value removes that key. See Attributes.
Results:
  • data gives one result for each entry, in the order of the request. position is the index of the entry. outcome is created, updated or failed, and a failed entry has a reason.
  • created, updated and failed count the results.
  • An entry that fails does not stop the other entries.
  • When two or more entries have the same email address after it is trimmed and changed to lowercase, all of them fail.
  • An empty data array, more than 1,000 entries or a malformed body is refused with 400 for the whole request.
The contacts are not added to a list. To add them, use Batch Add List Contacts. Pacing: 1,000 is a limit, not a target. Measure how long a batch takes with real data. Send the next batch only after the previous response arrives, and send smaller batches or wait longer when the time grows. After a 429, wait before you continue. The API does not promise a fixed throughput. See API rate limits. This operation accepts an Idempotency-Key header. The changes and the stored response are saved together. A retry with the same key replays the 200 or the 400 for 24 hours. See Idempotency.

Authorizations

Authorization
string
header
required

API key for authentication. Non-empty Security Requirement values are AhaSend API-key roles. Roles listed within one requirement object are jointly required; separate requirement objects are alternatives.

Headers

Idempotency-Key
string

Optional idempotency key for safe request retries. Must be a unique string for each logical request. An identical request with a completed stored outcome returns the original status and body. An in-progress execution returns 409, a changed method/path/body returns 422, and a released 5xx execution may run again. Keys for non-secret responses expire after 24 hours. API-key create responses include a one-time secret_key, so successful encrypted replay responses for those operations expire after 5 minutes.

Maximum string length: 255

Path Parameters

account_id
string<uuid>
required

Body

application/json
data
object[]
required
Required array length: 1 - 1000 elements

Response

Ordered per-contact outcomes

object
enum<string>
required
Available options:
list
created
integer
required
Required range: x >= 0
updated
integer
required
Required range: x >= 0
failed
integer
required
Required range: x >= 0
data
object[]
required