POST
/
v1
/
contacts
/
create
curl --request POST \
  --url https://app.loops.so/api/v1/contacts/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "email": "<string>",
  "firstName": "<string>",
  "lastName": "<string>",
  "source": "<string>",
  "subscribed": true,
  "userGroup": "<string>",
  "userId": "<string>"
}'
{
  "success": true,
  "id": "id_of_contact"
}

Request

Body

email
string
required

The contact’s email address.

firstName
string

The contact’s first name.

lastName
string

The contact’s last name.

source
string

A custom source value to replace the default “API”.

subscribed
boolean

Whether the contact will receive campaign and loops emails.

userGroup
string

You can use groups to segment users when sending emails. Currently a contact can only be in one user group.

userId
string

A unique user ID (for example, from an external application).

Custom properties

You can also include custom contact properties in your request body. Custom properties can be of type string, number, boolean or date (see allowed date formats).

For example, plan and dateJoined here are custom properties:

{
  "email": "[email protected]",
  "plan": "pro",
  "dateJoined": 1704711066
}

If the custom property doesn’t already exist in your account, you will recieve a 400 error.

Response

Success

success
boolean
required
id
string
required

The ID of the new contact.

Error

success
boolean
required
message
string
required

An error message.