> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://contentful.com/developers/docs/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/_mcp/server. # Allocate or deallocate space add-ons PUT https://api.contentful.com/spaces/{space_id}/space_add_ons Content-Type: application/vnd.contentful.management.v1+json Sets the allocation of add-ons for a space. The value is the final amount (not a delta); partial resource subsets are accepted. Reference: https://contentful.com/developers/docs/references/content-management-api/spaces/allocate-space-add-ons ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `space_id` (string, required) — ID of the space in form of a string ### Headers - `X-Contentful-Version` (string, required) — Version header ### Body (application/vnd.contentful.management.v1+json) This endpoint expects a list of SpacesSpaceIdSpaceAddOnsPutRequestBodyContentApplicationVndContentfulManagementV1JsonSchemaItems. - `list of SpacesSpaceIdSpaceAddOnsPutRequestBodyContentApplicationVndContentfulManagementV1JsonSchemaItems` ## Response ### 200 OK - Request successful - `map from string to any` ## Types ### SpacesSpaceIdSpaceAddOnsPutRequestBodyContentApplicationVndContentfulManagementV1JsonSchemaItems - `add_on` (enum, optional) — Add-on type - Allowed values: `contentTypes`, `records`, `environments` - `allocation` (double, optional) — Total of allocation ## Examples **Request** ```json [ { "add_on": "contentTypes", "allocation": 1 } ] ``` **Response** ```json { "items": [ { "allocated": 0, "name": "environments", "sys": { "id": "", "organization": { "sys": { "id": "0D9ZC8rLWiw6x5qizZGiRs", "linkType": "Organization", "type": "Link" } }, "space": { "sys": { "id": "", "linkType": "Space", "type": "Link" } }, "type": "SpaceAddOn" }, "used": 0 } ], "limit": 100, "skip": 0, "sys": { "type": "Array" }, "total": 1 } ``` **SDK Code** ```android Android SDK currently doesn't implement this endpoint. ``` ```java Java SDK currently doesn't implement this endpoint. ``` ```kotlin Kotlin SDK currently doesn't implement this endpoint. ``` ```swift Swift We currently don't provide a CMA SDK for this platform. ``` ```javascript JavaScript import { createClient } from 'contentful-management' // Client init const client = contentful.createClient({ accessToken: '' }) const space = await client.space.get({ spaceId: '', }); const addons = await space.updateSpaceAddOnAllocations( [ { add_on: 'contentTypes', allocation: 10 }, { add_on: 'records', allocation: 1000 }, { add_on: 'environments', allocation: 1 } ] ); ``` ```js-legacy JavaScript (legacy) import { createClient } from 'contentful-management' const client = createClient({ accessToken: '' }, { type: 'legacy' }) client.getSpace('') .then((space) => { return space.updateSpaceAddOnAllocations([ { add_on: 'contentTypes', allocation: 10 }, { add_on: 'records', allocation: 1000 }, { add_on: 'environments', allocation: 1 } ]) }) .then((addon) => console.log(`Space add-ons allocated.`)) .catch(console.error) ``` ```php PHP SDK currently doesn't implement this endpoint. ``` ```ruby Ruby SDK currently doesn't implement this endpoint. ``` ```python Python SDK currently doesn't implement this endpoint. ``` ```.net .NET SDK currently doesn't implement this endpoint. ```