v17

latestOpenAPI 3.0.1raw.githubusercontent.com2026-07-08165682.0 MB
BackupPolicies

Update a backup policy

Authorization

A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:

Service Token Accesses write_backups

OAuth Scopes

ResourceScopes
Organizationwrite_backups
Databasewrite_backups
patch/organizations/{organization}/databases/{database}/backup-policies/{id}

Path parameters

idstring required

The ID of the backup policy

organizationstring required

Organization name slug from list_organizations. Example: acme.

databasestring required

Database name slug from list_databases. Example: app-db.

Request body

namestring

The name of the backup policy

target'production' | 'development'

Whether the policy is for production or development branches

retention_valueinteger

A number value for the retention period of the backup policy

retention_unit'hour' | 'day' | 'week' | 'month' | 'year'

The unit for the retention period of the backup policy

frequency_valueinteger

A number value for the frequency of the backup policy

frequency_unit'hour' | 'day' | 'week' | 'month'

The unit for the frequency of the backup policy

schedule_timestring

The time of day that the backup is scheduled, in HH:MM format

schedule_dayinteger

Day of the week that the backup is scheduled. 0 is Sunday, 6 is Saturday

schedule_weekinteger

Week of the month that the backup is scheduled. 0 is the first week, 3 is the fourth week

Response

Returns the updated backup policy

idstring required

The ID of the backup policy

display_namestring required

The display name of the backup policy

namestring required

The name of the backup policy

target'production' | 'development' required

Whether the policy is for production or development branches

retention_valueinteger required

A number value for the retention period of the backup policy

retention_unitstring required

The unit for the retention period of the backup policy

frequency_valueinteger required

A number value for the frequency of the backup policy

frequency_unitstring required

The unit for the frequency of the backup policy

schedule_timestring required

The time of day that the backup is scheduled, in HH:MM format

schedule_dayinteger nullable required

Day of the week that the backup is scheduled. 0 is Sunday, 6 is Saturday

schedule_weekinteger nullable required

Week of the month that the backup is scheduled. 0 is the first week, 3 is the fourth week

created_atstring required

When the backup policy was created

updated_atstring required

When the backup policy was last updated

last_ran_atstring nullable required

When the backup was last run

next_run_atstring nullable required

When the backup will next run

requiredboolean required

Whether the policy is a required system backup