Skip to main content
PUT
/
management
/
contacts
/
bulk
Upload Bulk Contacts
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. Use the full nested bulk body shown in the example or cURL snippet: { environmentId, contacts: [{ attributes: [{ attributeKey: { key, name }, value }] }] }. Each contact must include an email attribute inside its attributes array.

environmentId
string
required
contacts
object[]
required
Maximum array length: 250

Response

Contacts uploaded successfully.

data
object
required