PUT
/
contacts
/
bulk
curl --request PUT \
  --url https://app.formbricks.com/api/v2/management/contacts/bulk \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "environmentId": "env_01h2xce9q8p3w4x5y6z7a8b9c0",
  "contacts": [
    {
      "attributes": [
        {
          "attributeKey": {
            "key": "email",
            "name": "Email Address"
          },
          "value": "john.doe@example.com"
        },
        {
          "attributeKey": {
            "key": "firstName",
            "name": "First Name"
          },
          "value": "John"
        },
        {
          "attributeKey": {
            "key": "lastName",
            "name": "Last Name"
          },
          "value": "Doe"
        }
      ]
    },
    {
      "attributes": [
        {
          "attributeKey": {
            "key": "email",
            "name": "Email Address"
          },
          "value": "jane.smith@example.com"
        },
        {
          "attributeKey": {
            "key": "firstName",
            "name": "First Name"
          },
          "value": "Jane"
        },
        {
          "attributeKey": {
            "key": "lastName",
            "name": "Last Name"
          },
          "value": "Smith"
        }
      ]
    }
  ]
}'
{
  "data": {
    "status": "<string>",
    "message": "<string>"
  }
}

Authorizations

x-api-key
string
header
required

Use your Formbricks x-api-key to authenticate.

Body

application/json

The contacts to upload. Each contact must include an 'email' attribute in their attributes array. The email is used as the unique identifier for the contact.

The body is of type object.

Response

200
application/json

Contacts uploaded successfully.

The response is of type object.