Skip to main content
POST
/
contacts
/
email
Upsert Contact
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"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Contact information to create or update

email
string<email>
required

Valid email address (automatically normalized to lowercase)

firstName
string

Contact's first name

Example:

"John"

lastName
string

Contact's last name

Example:

"Doe"

userId
string

Your application's user identifier

Example:

"user_12345"

customFields
object

Key-value pairs for custom contact attributes

Example:
{
"company": "Acme Corp",
"role": "Developer",
"plan": "premium"
}

Response

200 - application/json

Contact created or updated successfully

success
boolean

Indicates if the request was successful

Example:

true

data
object