Scheduled Actions
Enables users to create actions that will be performed on an entity at given time in the future.
Currently supported entities and actions:
Find out more regarding entry publish in entry publish docs.
Availability
Scheduled action feature is globally available for all customers.
Notifications
If an entry fails to publish at the scheduled time due to validation errors, an email will be sent to the user that created the Scheduled Action informing that it failed.
Limitations
The current limit of scheduled actions in scheduled status is 500. Once it’s reached, no additional scheduled actions can be created.
In addition there is a limit of 200 scheduled actions that can be executed in a single minute.
The scheduled date for a scheduled action when creating or updating must be between the current time and up to 5 years in the future.
There is a limit of 200 entities when publishing an entity with references, e.g. a Compose page. The scheduled action will fail if the number of entities exceeds that limit.
Scheduled action schema
The scheduled action has the following properties:
Scheduled action status
Every scheduled action has a sys.status field. It contains one of the following values:
Once the scheduled action is created the status is set to scheduled. In case the scheduled action is canceled before the execution, the status is set to canceled.
Once the scheduled action was executed the status is set to succeeded in case of successful execution and to failed if any error happened during execution process.
Scheduled action payload
Payload is used to provide additional information about how the scheduled action will be executed. It supports the following properties:
Scheduled actions collection
For more information about scheduled actions in the web app, see our Help Center article.
Get all scheduled actions of an entry
Use this endpoint to get all the scheduled actions of an entry.
Collection filters
Scheduled actions collection supports fillowing filters:
Collection ordering
Scheduled actions collection supports fillowing ordering options:
Collection pagination
The scheduled actions collection endpoint implements cursor-based pagination.
The pages object contains the next key which contains the relative URL to the next batch of items.
The URL contains the same set of filters and limit as initially requested.
This key is presented only if there are available elements to be fetched that weren’t returned from the current request because of the requested limit.
The pages object also contains the prev key for every request after the initial request.
It contains the relative URL to the batch of items requested in the previous request.
The default page size if 100 and the maximum allowed limit is 1000.
Permissions
Any user can read all the scheduled actions in the entry.
Get a Scheduled Action
Use this method to fetch a single Scheduled Action.
Permissions
Any user with read access to the supported entities can fetch a given Scheduled Action.
Errors
- 404 Error is returned in case:
- The
sys.idis not found - Current user doesn’t have access to space
- User doesn’t have permissions to read the entity (Release, Entry or Asset) in the Scheduled Action
- The
Create a scheduled action
Use this endpoint to create a new scheduled action. When using this endpoint, an ID will be automatically generated for the created scheduled action and returned in the response.
There’s a limit of 200 scheduled actions in pending status per environment. An attempt to create more than 200 pending scheduled actions will result in an error.
Create a scheduled action for a compose page
Use this payload format when you want to create a scheduled action for an entry that belong to a content type with annotations. For example a Compose page.
Permissions
Any user with the ability to perform the specified scheduled action to the referenced content.
Errors
- 400 Error is returned in case:
- Enviroment is not found
- Exceeds pending actions limit
- The
payload.withReferencesis included for an entity without annotations
- 422 Invalid request payload input return in following cases:
- The body contains invalid payload
- The
scheduledFor.datetimeis in the past or is not corrent ISO format - The
scheduledFor.timezoneis not a valid IANA timezone identifier - The
actionis unsupported - The
payload.withReferencesis provided but it’s not in a valid format. Only forpublishaction
Update a scheduled action
Use this method to update a scheduled action’s time (at scheduledFor.datetime) or timezone (at scheduledFor.timezone).
Changes to fields outside of scheduledFor are currently not supported and will result in an HTTP 400 Bad Request.
Permissions
Any user with the ability to perform the specified scheduled action to the referenced content.
Errors
- 400 Error is returned in case:
- The version header is not provided
- Property outside of
scheduledFor.datetimeandscheduledFor.timezoneis changed - Scheduled action is not in status
scheduled - An action is already scheduled for the same date and time
entity.sys.idis invalid- Enviroment is not found
- Exceeds pending actions limit
- The
payload.withReferencesis included for an entity without annotations
- 409 Error is returned in case:
- Version number is not a number
- The version in the
X-Contentful-Versionheader doesn’t match the current scheduled action version
- 422 Invalid request payload input return in following cases:
- The body contains an invalid payload
- The
scheduledFor.datetimeis missing - The
scheduledFor.datetimeis in the past or is not a valid ISO 8601 time - The
scheduledFor.datetimeis greater than 5 years (60 months) ahead of the current time - The
scheduledFor.timezoneis not a valid IANA timezone identifier - The
payload.withReferencesis provided but it’s not in a valid format. Only forpublishaction
Cancel a scheduled action
Use this method to mark a scheduled action as canceled.
Permissions
Any user with publish access to an entry can set a scheduled action to canceled state.
Errors
- 400 Error is returned in case:
- The
sys.statusis not in ascheduledstate
- The