Update a Field
This endpoint updates an existing field on a collection.
Endpoint
[PUT]
/collections/{collection_slug}/fields/{field_uuid}Permissions
This endpoint requires a token with the admin ability.
Path Parameters
| Name | Required | Description |
|---|---|---|
collection_slug | Yes | The slug of the collection. |
field_uuid | Yes | The UUID of the field to update. |
Headers
| Name | Required | Description |
|---|---|---|
Accept | Yes | Specifies the response content type. Must be application/json. |
Authorization | Yes | Required. Must be a Bearer token with admin scope. |
project-id | Yes | The unique identifier for the project. |
Body Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type | string | Yes | The field type. Max 60 characters. |
label | string | Yes | The display label. Max 60 characters. |
name | string | Yes | The field identifier in kebab-case. Must be unique within the collection and parent scope. Max 60 characters. |
description | string | No | A description or help text for the field. |
placeholder | string | No | Placeholder text for the field input. |
options | object | No | Field-specific options. |
validations | object | No | Validation rules for the field. |
parent_field_id | integer | No | The internal ID of a group field to nest this field under. |
Example Requests
const collectionSlug = 'blog-posts';
const fieldUuid = 'a1b2c3d4-0001-0000-0000-000000000001';
axios.put(`https://your-domain.com/api/collections/${collectionSlug}/fields/${fieldUuid}`, {
type: 'text',
label: 'Post Title',
name: 'title',
placeholder: 'Enter the post title',
validations: {
required: { status: true, message: 'Title is required' },
char_limit: { status: true, min: 1, max: 120 }
}
}, {
headers: {
'Accept': 'application/json',
'Authorization': 'Bearer YOUR_API_TOKEN',
'project-id': 'YOUR_PROJECT_UUID'
}
});use Illuminate\Support\Facades\Http;
$collectionSlug = 'blog-posts';
$fieldUuid = 'a1b2c3d4-0001-0000-0000-000000000001';
$response = Http::withToken('YOUR_API_TOKEN')->withHeaders([
'Accept' => 'application/json',
'project-id' => 'YOUR_PROJECT_UUID'
])->put("https://your-domain.com/api/collections/{$collectionSlug}/fields/{$fieldUuid}", [
'type' => 'text',
'label' => 'Post Title',
'name' => 'title',
'placeholder' => 'Enter the post title',
'validations' => [
'required' => ['status' => true, 'message' => 'Title is required'],
'char_limit' => ['status' => true, 'min' => 1, 'max' => 120],
],
]);curl -X PUT "https://your-domain.com/api/collections/blog-posts/fields/a1b2c3d4-0001-0000-0000-000000000001" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "project-id: YOUR_PROJECT_UUID" \
-H "Content-Type: application/json" \
-d '{
"type": "text",
"label": "Post Title",
"name": "title",
"placeholder": "Enter the post title"
}'Responses
200: Success
Returns the updated field object.
{
"uuid": "a1b2c3d4-0001-0000-0000-000000000001",
"type": "text",
"label": "Post Title",
"name": "title",
"description": null,
"placeholder": "Enter the post title",
"options": [],
"validations": {
"required": { "status": true, "message": "Title is required" },
"char_limit": { "status": true, "min": 1, "max": 120 }
},
"order": 1,
"parent_field_id": null,
"created_at": "2026-02-10T10:00:00.000000Z",
"updated_at": "2026-02-10T12:00:00.000000Z"
}403: Forbidden
Returned if the API token does not have the admin ability.
{
"message": "API token doesn't have the right abilities!"
}404: Not Found
Returned if the collection or the field does not exist.
{
"message": "Field not found."
}422: Unprocessable Entity
Returned for validation errors, such as a duplicate field name.
{
"message": "The name has already been taken.",
"errors": {
"name": [
"The name has already been taken."
]
}
}