Skip to main content
POST
Create a contact attribute key

Authorizations

x-api-key
string
header
required

Use your Formbricks x-api-key to authenticate.

Body

application/json

The contact attribute key to create

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"

workspaceId
string
required

The ID of the Workspace this attribute belongs to

environmentId
string
required
deprecated

Deprecated alias for workspaceId.

Response

201 - application/json

Contact attribute key created successfully.

id
string

The ID of the contact attribute key

createdAt
string

The date and time the contact attribute key was created

Example:

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

updatedAt
string

The date and time the contact attribute key was last updated

Example:

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

isUnique
boolean

Whether the attribute must have unique values across contacts

Example:

false

key
string

The attribute identifier used in the system

Example:

"email"

name
string | null

Display name for the attribute

Example:

"Email Address"

description
string | null

Description of the attribute

Example:

"The user's email address"

type
enum<string>

Whether this is a default or custom attribute

Available options:
default,
custom
Example:

"custom"

workspaceId
string

The ID of the Workspace this attribute belongs to

environmentId
string
deprecated

Deprecated alias for workspaceId.