POST
/
contacts
Create a contact
curl --request POST \
  --url https://app.formbricks.com/api/v2/management/contacts \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "environmentId": "env_01h2xce9q8p3w4x5y6z7a8b9c0",
  "attributes": {
    "email": "john.doe@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "userId": "h2xce9q8p3w4x5y6z7a8b9c1"
  }
}'
{
  "id": "ctc_01h2xce9q8p3w4x5y6z7a8b9c2",
  "createdAt": "2023-01-01T12:00:00.000Z",
  "environmentId": "env_01h2xce9q8p3w4x5y6z7a8b9c0",
  "attributes": {
    "email": "john.doe@example.com",
    "firstName": "John",
    "lastName": "Doe",
    "userId": "h2xce9q8p3w4x5y6z7a8b9c1"
  }
}

Authorizations

x-api-key
string
header
required

Use your Formbricks x-api-key to authenticate.

Body

application/json

The contact to create. Must include an email attribute and all attribute keys must already exist in the environment.

The body is of type object.

Response

201 - application/json

Contact created successfully.

The response is of type object.