Spaces
Spaces Collection
Spaces are containers for content types and content, and API clients can fetch data from one or more spaces. You can be a member of multiple organizations, and owner and admin roles in the organization can create spaces in organizations.
When you sign up to Contentul for the first time, you create a new organization. When you’re invited to an existing organization, you become a member of that organization.
Note: If you have a single organization, any space you create will be automatically associated with that organization. If you’re an admin or an owner in multiple organizations you need to pass the ID of the organization with the X-Contentful-Organization header that you want to create the space in.
Note: If you are on our latest pricing model and have plans attached to your spaces, creating a new space via the API will assign the smallest available plan to it. If you’ve reached your limit of free spaces and have no payment details on file, you won’t be able to create more spaces until you add payment details.
Get all spaces an account has access to
Returns all spaces the account has access to.
By default, the response uses offset-based pagination (skip/limit). To switch to cursor-based pagination, pass cursor=true. The response will then include a pages object with next and prev URLs that can be used to navigate the result set.
If your account belongs to multiple organizations, you can scope the listing to a specific organization by passing the X-Contentful-Organization header. When omitted, spaces from all organizations the account has access to are returned.
You can search spaces by passing the query parameter. The query value is matched against the space ID (exact match) and the space name (partial match).
Create a new space, specifying attributes in the request body.
Space
Returns the specified space.
You can request additional license metadata by passing the include query parameter:
?include=sys.licensereturns the resolved license for the space inincludes.SpaceLicense, includingproductId,productName,isTrial, andexpiresAt.
The X-Contentful-Organization header is optional if an account belongs to one organization. Attributes are sent in the body of the request as a JSON payload, and you need to set the X-Contentful-Version to the Contentul API version you are using.
You delete an existing space by issuing a DELETE request to /spaces/ID. Deleting a space will remove all its resources, including content types, entries and assets. This action can not be undone.
Unarchive a space
Unarchive a space
Unarchive a space to make it active again. Pass a productId in the request body to assign a product license to the space upon unarchiving.
Space add-ons
Get space add-ons from a space
Get space add-ons from a specific space.
Allocate or deallocate space add-ons
Allocate or deallocate space add-ons to a space.
The allocation value is the final allocation amount, that can be increased/decreased depending on the current amount.
Client can send allocations for all resources (contentTypes, records, environments, or just a subset of them.)
Eligible licenses
Eligible licenses
Use this endpoint to list all eligible licenses for a given space under an organization. This will check if the space usage would fit into the licenses limits, and also check if entitlements bank can cover if shortage exists.