PlunkPlunk
API ReferenceContacts

Create or update contact

Create a new contact or update existing (upsert by email)

POST
/contacts

Authorization

ApiKeyAuth

AuthorizationBearer <token>

API Key authentication. Secret keys (sk_*) are required for all endpoints except /v1/track. Public keys (pk_*) only work with the /v1/track endpoint for client-side event tracking. The project is automatically derived from the key.

In: header

Request Body

application/json

email*string
Formatemail
subscribed?boolean
Defaulttrue
data?

Response Body

application/json

application/json

curl -X POST "https://plunk-api.tophunting.ai/contacts" \  -H "Content-Type: application/json" \  -d '{    "email": "user@example.com",    "subscribed": true,    "data": {      "firstName": "John",      "lastName": "Doe",      "plan": "premium"    }  }'
{
  "id": "string",
  "email": "user@example.com",
  "subscribed": true,
  "data": {},
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "_meta": {
    "isNew": true,
    "isUpdate": true
  }
}
{
  "id": "string",
  "email": "user@example.com",
  "subscribed": true,
  "data": {},
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z",
  "_meta": {
    "isNew": true,
    "isUpdate": true
  }
}