Creates a new contact or updates an existing contact if the email already exists.
curl --request POST \
--url https://api.autosend.com/v1/contacts/email \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"userId": "user_12345",
"customFields": {
"company": "Acme Corp",
"role": "Developer",
"plan": "premium"
}
}'
{
"success": true,
"data": {
"id": "507f1f77bcf86cd799439011",
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"userId": "user_12345",
"customFields": {
"company": "Acme Corp",
"role": "Developer",
"plan": "premium"
},
"updatedAt": "2024-01-15T10:30:00.000Z",
"createdAt": "2024-01-15T10:30:00.000Z",
"projectId": "229f1f77bcf86cd9273048038"
}
}
Documentation Index
Fetch the complete documentation index at: https://docs.autosend.com/llms.txt
Use this file to discover all available pages before exploring further.
curl --request POST \
--url https://api.autosend.com/v1/contacts/email \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"userId": "user_12345",
"customFields": {
"company": "Acme Corp",
"role": "Developer",
"plan": "premium"
}
}'
{
"success": true,
"data": {
"id": "507f1f77bcf86cd799439011",
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"userId": "user_12345",
"customFields": {
"company": "Acme Corp",
"role": "Developer",
"plan": "premium"
},
"updatedAt": "2024-01-15T10:30:00.000Z",
"createdAt": "2024-01-15T10:30:00.000Z",
"projectId": "229f1f77bcf86cd9273048038"
}
}
<token>, where <token> is your auth token."[email protected]""John""Doe""user_12345"["507f1f77bcf86cd799439011"]string, number, boolean, and date. Learn more about custom fields.Show child attributes
customFields: {
"company": "Acme Corp",
"isPremium": true,
"loginCount": 42,
"trialEndsAt": "2024-03-01"
}
trueShow child attributes
"507f1f77bcf86cd799439011""[email protected]""John""Doe""user_12345"Show child attributes
customFields: {
"company": "Acme Corp",
"role": "Developer",
"plan": "premium"
}
"2024-01-15T10:30:00.000Z""2024-01-15T10:30:00.000Z""229f1f77bcf86cd9273048038"["507f1f77bcf86cd799439011"]curl --request POST \
--url https://api.autosend.com/v1/contacts/email \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"userId": "user_12345",
"customFields": {
"company": "Acme Corp",
"role": "Developer",
"plan": "premium"
}
}'
{
"success": true,
"data": {
"id": "507f1f77bcf86cd799439011",
"email": "[email protected]",
"firstName": "John",
"lastName": "Doe",
"userId": "user_12345",
"customFields": {
"company": "Acme Corp",
"role": "Developer",
"plan": "premium"
},
"updatedAt": "2024-01-15T10:30:00.000Z",
"createdAt": "2024-01-15T10:30:00.000Z",
"projectId": "229f1f77bcf86cd9273048038"
}
}