Skip to content

Field Groups

List of valid attributes:

AttributeDescriptionSpecifics
account_idID of the account the group belongs to-
discarded_atDate of removalNull or timestamp, cannot be set
entity_typeType of entity the group is being attched toMust be set, currently only user supported
nameName of the group-
fields
field_typeType of the fieldMust be set, allowed values are text, textarea, email, number, decimal, tel, date, city, country, singleselect, multiselect, checkbox, url
nameName of the fieldMust be set
positionPosition of the field inside the groupMust be set, must be integer >= 0
hidden_for_userWhether the value of the field is visible to the user they belong to or notRequired, can be true or false
immutable_for_userWhether the values of the field can be updated by the user they belong to or notRequired, can be true or false
sensitiveWhether field is sensitive or notRequired, can be true or false
value_restrictionsAdditional restrictions for values of this fieldMust be set on type singleselect and multiselect, Must be blank in all other cases, When set it expects an object with the following keys allowed: in, Key in expects an array of strings

The following relationships can be included in requests:

RelationshipType
fieldshas many

Meta data: Permissions

GroupDescription
actionsContains permissions if current user can edit or delete the field group

Create

Example request:

{
"data": {
"type": "field_group",
"attributes": {
"name": "Address",
"entity_type": "user",
"fields": [
{
"field_type": "text",
"name": "Street",
"position": 0,
"hidden_for_user": false,
"immutable_for_user": false,
"sensitive": false
}
]
}
}
}

Example response:

{
"data": {
"id": "77b7aa3e-dcdd-4734-a077-1cddd2117bb8",
"type": "field_group",
"attributes": {
...
}
}
}

This endpoint creates a field_group.

HTTP Request

POST /api/v1/field_groups

Update

Example request:

{
"data": {
"type": "field_group",
"attributes": {
"name": "Updated Address",
"entity_type": "user",
"fields": [
{
"id": "b2cf4a60-2802-48c2-9759-b3b99e8699bb",
"field_type": "text",
"name": "Street",
"position": 0
}
]
}
}
}

Example response:

{
"data": {
"id": "77b7aa3e-dcdd-4734-a077-1cddd2117bb8",
"type": "field_group",
"attributes": {
...
}
}
}

This endpoint updates a field_group and its fields. In order to remove a field from the group, pass parameter "_delete": true within the attributes of the field to remove.

HTTP Request

PUT /api/v1/field_groups/:field_group_id

URL Parameters

ParameterDescription
field_group_id ID of the group to be updated

Show

Example response:

{
"data": {
"id": "34a895b6-4672-4c11-a9ed-8f7a82721f4e",
"type": "field_group",
"attributes": {
...
}
}
}

This endpoint returns a field_group.

HTTP Request

GET /api/v1/field_groups/:field_group_id

URL Parameters

ParameterDescription
field_group_idThe ID of the group to return

List

Example response:

{
"data": [
{
"id": "99ce3b35-06bf-425b-a512-080d8c2ddf51",
"type": "field_group",
"attributes": {
...
}
},
{
...
}
]
}

This endpoint returns all field_groups associated with an account.

HTTP Request

GET /api/v1/field_groups

Delete

Example response:

{
"data": {
"id": "77b7aa3e-dcdd-4734-a077-1cddd2117bb8",
"type": "field_group",
"attributes": {
...
}
}
}

This endpoint deletes a field_group, associated fields as well as field_values.

HTTP Request

DELETE /api/v1/field_groups/:field_group_id

URL Parameters

ParameterDescription
field_group_idID of the group to be deleted