Skip to main content
POST
/
contacts
curl --request POST \
  --url https://api.autosend.com/v1/contacts \
  --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 \
  --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"
  }
}
Use this API when you know the contact is new. Use Upsert Contact when the contact may already exist. It will create or update without throwing an error.

Authorizations

Authorizations
string | header
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

Contact information to create
email
string<email>
required
Valid email address (automatically normalized to lowercase)Example: "[email protected]"
firstName
string
Contact’s first nameExample: "John"
lastName
string
Contact’s last nameExample: "Doe"
userId
string
An optional reference field to store your application’s user ID. Use this to map your internal users to AutoSend contacts.Example: "user_12345"
listIds
array
IDs of the contact lists to add this contact to. You can find list IDs in your AutoSend Dashboard.Do not pass segment IDs here. Segments are computed automatically based on contact field values. Adding a contact to a list will also trigger any live automations associated with that list.Example: ["507f1f77bcf86cd799439011"]
customFields
object
Key-value pairs for custom contact attributes. There are four supported value types: string, number, boolean, and date. Learn more about custom fields.Example:
customFields: {
  "company": "Acme Corp",
  "isPremium": true,
  "loginCount": 42,
  "trialEndsAt": "2024-03-01"
}

Response

Contact created successfully
success
boolean
Indicates if the request was successfulExample: true
data
object