menu
Upsert a contact
Creates or updates a contact by email address in one idempotent call - wire it into signup and profile-update flows without existence checks. Any extra JSON fields are stored as custom attributes, ready for segmentation and template variables.
Endpoint
POST https://api.sendstreak.com/v2/accounts/{accountId}/contacts
All v2 endpoints require a bearer token - see Authentication.
Path parameters
| Parameter | Type | Description |
|---|---|---|
accountId | string | The account the request is scoped to. |
Request body
Email plus any custom attribute slug/value pairs.
| Field | Type | Required | Description |
|---|---|---|---|
email | string (email) | yes | The contact’s email address - the identity the upsert is keyed on. |
Additional fields are accepted as custom attributes.
Response
The upserted contact.
{
"_id": "665f0a2b1c9d440012ab34cd",
"email": "[email protected]",
"createDate": "2026-07-07T09:30:00.000Z",
"hardBounced": "2026-07-07T09:30:00.000Z",
"unsubscribeDate": "2026-07-07T09:30:00.000Z",
"topicUnsubscriptions": [
"6651dd2e4f9b110014ab90cd"
]
}
Errors
| Status | Description |
|---|---|
400 | The request body or parameters failed validation. |
401 | Missing or invalid token, or the token is not authorized for this account/user. |
See Errors and rate limits for what error responses look like.
Curl example
curl --location --request POST 'https://api.sendstreak.com/v2/accounts/YOUR_ACCOUNT_ID/contacts' \
--header 'Authorization: Bearer YOUR_API_TOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "[email protected]"
}'