menu_open Contacts API
Contacts in your application refer to the users who will receive emails.
A contact consists of an email address (designated by the email
field) and a set of arbitrary attributes used for audience management.
Example contact
{
"email": "someone@example.com",
"planId": "professional",
"lastSeen": "2024-01-11T15:18:59.937Z",
"country": "Germany"
}
Email addresses and attribute names are converted to a normalized format on our servers. This may cause them to appear slightly differently on your SendStreak dashboard. However, it should not affect your API calls as long as you consistently send them in the same way.
Create or update a contact
Creates or updates a contact. It is recommended to integrate this endpoint into your applicationās signup logic and call it whenever an attribute needs to be updated or deleted.
Endpoint
POST https://api.sendstreak.com/v1/contacts
Body
Field | Description | Required |
---|---|---|
email |
A valid email address. | yes |
any_attributes |
Possible additional attributes to store with the contact. Possible data types: string , number , boolean , ISODate |
no |
Curl example
curl --location 'https://api.sendstreak.com/v1/contacts' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--data-raw '{
"email": "someone@example.com",
"planId": "professional",
"lastSeen": "2024-01-11T15:18:59.937Z",
"country": "Germany"
}'
Delete a contact
This endpoint deletes a single contact. It is especially helpful for situations where a contact must be removed due to compliance requirements or for general housekeeping purposes.
Endpoint
DELETE https://api.sendstreak.com/v1/contacts/:email
Body
None
Curl example
curl --location --request DELETE 'https://api.sendstreak.com/v1/contacts/someone@example.com' \
--header 'Authorization: Bearer YOUR_API_KEY'