Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

Create a new contact

POST/contactsCreate a new contact

Request body

application/json
objectCreateContactOptions
audience_idstring

Unique identifier of the audience to which the contact belongs.

emailstringrequired

Email address of the contact.

first_namestring

First name of the contact.

last_namestring

Last name of the contact.

propertiesobject

A map of custom property keys and values to create.

segmentsarray of string

Array of segment IDs to add the contact to.

Show child attributes
topicsarray of object

Array of topic subscriptions for the contact.

Show child attributes
Show array items
idstring

The topic ID.

subscriptionstring

The subscription status for this topic.

one of "opt_in", "opt_out"

unsubscribedboolean

The Contact's global subscription status. If set to true, the contact will be unsubscribed from all Broadcasts.

Example request
{
  "audience_id": "78261eea-8f8b-4381-83c6-79fa7120f1cf",
  "email": "steve.wozniak@gmail.com",
  "first_name": "Steve",
  "last_name": "Wozniak",
  "properties": {
    "additionalProp1": null
  },
  "segments": [
    "string"
  ],
  "topics": [
    {
      "id": "string",
      "subscription": "opt_in"
    }
  ],
  "unsubscribed": false
}

Responses

201OKapplication/json
objectCreateContactResponseSuccess
idstring

Unique identifier for the created contact.

objectstring

Type of the response object.

Example response
{
  "id": "479e3145-dd38-476b-932c-529ceb705947",
  "object": "contact"
}
Documentation menu