Update a Field

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

NameRequiredDescription
collection_slugYesThe slug of the collection.
field_uuidYesThe UUID of the field to update.

Headers

NameRequiredDescription
AcceptYesSpecifies the response content type. Must be application/json.
AuthorizationYesRequired. Must be a Bearer token with admin scope.
project-idYesThe unique identifier for the project.

Body Parameters

NameTypeRequiredDescription
typestringYesThe field type. Max 60 characters.
labelstringYesThe display label. Max 60 characters.
namestringYesThe field identifier in kebab-case. Must be unique within the collection and parent scope. Max 60 characters.
descriptionstringNoA description or help text for the field.
placeholderstringNoPlaceholder text for the field input.
optionsobjectNoField-specific options.
validationsobjectNoValidation rules for the field.
parent_field_idintegerNoThe 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."
        ]
    }
}

Search documentation

Find guides and reference pages