cURL
Python
JavaScript
PHP
Go
Java
Ruby
curl --request POST \
--url https://api.autosend.com/v1/contacts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"email": "john.doe@example.com",
"firstName": "John",
"lastName": "Doe",
"userId": "user_12345",
"customFields": {
"company": "Acme Corp",
"role": "Developer",
"plan": "premium"
}
}'
{
"success" : true ,
"data" : {
"id" : "507f1f77bcf86cd799439011" ,
"email" : "john.doe@example.com" ,
"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"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Contact information to create
Valid email address (automatically normalized to lowercase) Example: "john.doe@example.com"
Contact’s first name Example: "John"
Contact’s last name Example: "Doe"
Your application’s user identifier Example: "user_12345"
Key-value pairs for custom contact attributes Example: {
"company" : "Acme Corp" ,
"role" : "Developer" ,
"plan" : "premium"
}
Response
Contact created successfully
Indicates if the request was successful Example: true
Contact ID Example: "507f1f77bcf86cd799439011"
Contact email address Example: "john.doe@example.com"
Contact’s first name Example: "John"
Contact’s last name Example: "Doe"
Your application’s user identifier Example: "user_12345"
Custom contact attributes Example: {
"company" : "Acme Corp" ,
"role" : "Developer" ,
"plan" : "premium"
}
Contact creation timestamp Example: "2024-01-15T10:30:00.000Z"
Contact last update timestamp Example: "2024-01-15T10:30:00.000Z"
Project ID that the contact belongs to Example: "229f1f77bcf86cd9273048038"