PUT
/
contact-attribute-keys
/
{id}
curl --request PUT \
  --url https://app.formbricks.com/api/v2/management/contact-attribute-keys/{id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "key": "email",
  "name": "Email Address",
  "description": "The user'\''s email address",
  "type": "custom",
  "environmentId": "<string>"
}'
{
  "id": "<string>",
  "createdAt": "2021-01-01T00:00:00.000Z",
  "updatedAt": "2021-01-01T00:00:00.000Z",
  "isUnique": false,
  "key": "email",
  "name": "Email Address",
  "description": "The user's email address",
  "type": "custom",
  "environmentId": "<string>"
}

Authorizations

x-api-key
string
header
required

Use your Formbricks x-api-key to authenticate.

Path Parameters

contactAttributeKeyId
string
required

Body

application/json
The contact attribute key to update

Input data for creating or updating a contact attribute

key
string
required

The attribute identifier used in the system

Example:

"email"

name
string | null
required

Display name for the attribute

Example:

"Email Address"

description
string | null
required

Description of the attribute

Example:

"The user's email address"

type
enum<string>
required

Whether this is a default or custom attribute

Available options:
default,
custom
Example:

"custom"

environmentId
string
required

The ID of the environment this attribute belongs to

Response

200 - application/json
Contact attribute key updated successfully.
id
string
required

The ID of the contact attribute key

createdAt
string
required

The date and time the contact attribute key was created

Example:

"2021-01-01T00:00:00.000Z"

updatedAt
string
required

The date and time the contact attribute key was last updated

Example:

"2021-01-01T00:00:00.000Z"

isUnique
boolean
required

Whether the attribute must have unique values across contacts

Example:

false

key
string
required

The attribute identifier used in the system

Example:

"email"

name
string | null
required

Display name for the attribute

Example:

"Email Address"

description
string | null
required

Description of the attribute

Example:

"The user's email address"

type
enum<string>
required

Whether this is a default or custom attribute

Available options:
default,
custom
Example:

"custom"

environmentId
string
required

The ID of the environment this attribute belongs to

Was this page helpful?