Custom fields
Append specialized metadata to your content through user-defined fields.
This API provides structured ways to enrich your docs with extra attributes. You can create and manage custom fields to store additional data.
customFieldobjectrequired
Get a space custom fields
get
spaceIdstringrequired
The unique id of the space
curl -L \
--url 'https://api.gitbook.com/v1/spaces/{spaceId}/custom-fields' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
{
"customField": {
"id": "text",
"name": "text",
"title": "text",
"description": "text",
"type": "text",
"placeholder": "text",
"options": [
"text"
],
"createdAt": "2025-04-18T06:57:56.202Z",
"updatedAt": "2025-04-18T06:57:56.202Z",
"urls": {
"location": "https://example.com"
}
},
"value": "text"
}
]
Update a space custom fields
patch
spaceIdstringrequired
The unique id of the space
curl -L \
--request PATCH \
--url 'https://api.gitbook.com/v1/spaces/{spaceId}/custom-fields' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"values": {
"ANY_ADDITIONAL_PROPERTY": {
"value": "text"
}
}
}'
List all custom fields
get
organizationIdstringrequired
The unique id of the organization
pagestringoptional
Identifier of the page results to fetch.
limitnumber · max: 1000optional
The number of results per page
curl -L \
--url 'https://api.gitbook.com/v1/orgs/{organizationId}/custom-fields' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"next": {
"page": "text"
},
"count": 1,
"items": [
{
"id": "text",
"name": "text",
"title": "text",
"description": "text",
"type": "text",
"placeholder": "text",
"options": [
"text"
],
"createdAt": "2025-04-18T06:57:56.202Z",
"updatedAt": "2025-04-18T06:57:56.202Z",
"urls": {
"location": "https://example.com"
}
}
]
}
Create a custom field
post
organizationIdstringrequired
The unique id of the organization
namestring · min: 1 · max: 50required
Pattern: ^[a-z_\-0-9]+$
typestring · enumrequired
Options: text
, number
, boolean
, tags
, select:multi
, select:single
titlestring · max: 100optional
descriptionstring · max: 200optional
placeholderstring · max: 100optional
optionsstring[] · min: 1 · max: 50optional
curl -L \
--request POST \
--url 'https://api.gitbook.com/v1/orgs/{organizationId}/custom-fields' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"name": "text",
"type": "text",
"title": "text",
"description": "text",
"placeholder": "text",
"options": [
"text"
]
}'
{
"id": "text",
"name": "text",
"title": "text",
"description": "text",
"type": "text",
"placeholder": "text",
"options": [
"text"
],
"createdAt": "2025-04-18T06:57:56.202Z",
"updatedAt": "2025-04-18T06:57:56.202Z",
"urls": {
"location": "https://example.com"
}
}
Get a custom field by its name
get
organizationIdstringrequired
The unique id of the organization
fieldNamestringrequired
The name of the custom field
curl -L \
--url 'https://api.gitbook.com/v1/orgs/{organizationId}/custom-fields/{fieldName}' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
"id": "text",
"name": "text",
"title": "text",
"description": "text",
"type": "text",
"placeholder": "text",
"options": [
"text"
],
"createdAt": "2025-04-18T06:57:56.202Z",
"updatedAt": "2025-04-18T06:57:56.202Z",
"urls": {
"location": "https://example.com"
}
}
Delete a custom field
delete
organizationIdstringrequired
The unique id of the organization
fieldNamestringrequired
The name of the custom field
curl -L \
--request DELETE \
--url 'https://api.gitbook.com/v1/orgs/{organizationId}/custom-fields/{fieldName}' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
Update a custom field
patch
organizationIdstringrequired
The unique id of the organization
fieldNamestringrequired
The name of the custom field
titlestring · max: 100optional
descriptionstring · max: 200optional
placeholderstring · max: 100optional
optionsstring[] · min: 1 · max: 50optional
curl -L \
--request PATCH \
--url 'https://api.gitbook.com/v1/orgs/{organizationId}/custom-fields/{fieldName}' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--header 'Content-Type: application/json' \
--data '{
"title": "text",
"description": "text",
"placeholder": "text",
"options": [
"text"
]
}'
{
"id": "text",
"name": "text",
"title": "text",
"description": "text",
"type": "text",
"placeholder": "text",
"options": [
"text"
],
"createdAt": "2025-04-18T06:57:56.202Z",
"updatedAt": "2025-04-18T06:57:56.202Z",
"urls": {
"location": "https://example.com"
}
}