POST

/v1/contacts

Bearer*
curl --request POST \
  --url https://api.useplunk.com/v1/contacts \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: "application/json"' \
  --data '{
  "email": "<email>",
  "subscribed": false
}'

In most cases, it is recommended to use the track endpoint to create a contact. When a new contact tracks an event Plunk will automatically create the contact, thus saving you an API call.

Body

emailrequired
string

The email address of the contact.

subscribedrequired
boolean

Whether the contact is subscribed to marketing emails.

data
object

Metadata to store with the contact.

Headers

Content-Typerequired
string

application/json

Response

{
    "success": true,
    "id": "80d74d13-16eb-48c5-bc2b-aae6fd5865cc",
    "email": "hello@useplunk.com",
    "subscribed": true,
    "data": {
        "project": "Plunk"
    },
    "createdAt": "2021-01-01T00:00:00.000Z",
    "updatedAt": "2021-01-01T00:00:00.000Z"
}