Update a Collection

Update a Collection

This endpoint updates the name and slug of an existing collection.

Endpoint

[PUT]

/collections/{collection_slug}

Permissions

This endpoint requires a token with the admin ability.

Path Parameters

NameRequiredDescription
collection_slugYesThe current slug of the collection.

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
namestringYesThe new display name. Max 60 characters.
slugstringYesThe new slug. Must be unique per project. Max 60 characters.

Example Requests

axios.put('https://your-domain.com/api/collections/blog-posts', {
    name: 'Articles',
    slug: 'articles'
}, {
    headers: {
        'Accept': 'application/json',
        'Authorization': 'Bearer YOUR_API_TOKEN',
        'project-id': 'YOUR_PROJECT_UUID'
    }
});
use Illuminate\Support\Facades\Http;
 
$response = Http::withToken('YOUR_API_TOKEN')->withHeaders([
    'Accept' => 'application/json',
    'project-id' => 'YOUR_PROJECT_UUID'
])->put('https://your-domain.com/api/collections/blog-posts', [
    'name' => 'Articles',
    'slug' => 'articles'
]);
curl -X PUT "https://your-domain.com/api/collections/blog-posts" \
     -H "Accept: application/json" \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     -H "project-id: YOUR_PROJECT_UUID" \
     -H "Content-Type: application/json" \
     -d '{
         "name": "Articles",
         "slug": "articles"
     }'

Responses

200: Success

Returns the updated collection object.

{
    "data": {
        "uuid": "d8f7b5c1-e4a3-4b21-8e9f-a9c1e2b3d4f5",
        "name": "Articles",
        "slug": "articles",
        "is_singleton": false,
        "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 with the specified slug does not exist.

{
    "message": "Collection not found."
}

422: Unprocessable Entity

Returned for validation errors, such as a duplicate or reserved slug.

{
    "message": "The slug has already been taken.",
    "errors": {
        "slug": [
            "The slug has already been taken."
        ]
    }
}

Search documentation

Find guides and reference pages