{"note":"OpenAPI conversion -- returning structured metadata","name":"netlify-com","description":"Netlify's API documentation","version":"2.52.0","base_url":"https://api.netlify.com/api/v1","endpoints":165,"raw":"@lap v0.3\n# Machine-readable API spec. Each @endpoint block is one API call.\n@api Netlify's API documentation\n@base https://api.netlify.com/api/v1\n@version 2.52.0\n@auth OAuth2\n@endpoints 165\n@hint download_for_search\n@toc sites(82), accounts(15), api(1), purge(1), deploys(9), builds(3), {account_id}(1), forms(1), hooks(7), oauth(3), deploy_keys(4), {account_slug}(7), billing(1), agent_runners(14), submissions(2), services(3), user(1), dns_zones(9), ai-gateway(1)\n\n@group sites\n@endpoint GET /sites\n@desc **Note:** Environment variable keys and values have moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [getEnvVars](#tag/environmentVariables/operation/getEnvVars) to retrieve site environment variables.\n@optional {name: any, filter: any, page: any, per_page: any}\n@returns(200) OK\n\n@endpoint POST /sites\n@desc **Note:** Environment variable keys and values have moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [createEnvVars](#tag/environmentVariables/operation/createEnvVars) to create environment variables for a site.\n@required {site: any}\n@optional {configure_dns: any}\n@returns(201) Created\n\n@endpoint GET /sites/{site_id}\n@desc **Note:** Environment variable keys and values have moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [getEnvVars](#tag/environmentVariables/operation/getEnvVars) to retrieve site environment variables.\n@optional {feature_flags: any}\n@returns(200) OK\n\n@endpoint PATCH /sites/{site_id}\n@desc **Note:** Environment variable keys and values have moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [updateEnvVar](#tag/environmentVariables/operation/updateEnvVar) to update a site's environment variables.\n@required {site: any}\n@returns(200) OK\n\n@endpoint DELETE /sites/{site_id}\n@returns(204) Deleted\n\n@endpoint POST /sites/{site_id}/ssl\n@desc Provisions or updates a TLS certificate for the site.\n@required {site_id: any}\n@optional {certificate: any # PEM-encoded certificate. Required when updating an existing certificate., key: any # PEM-encoded private key. Required when updating an existing certificate., ca_certificates: any # PEM-encoded CA certificate chain. Required when updating an existing certificate.}\n@returns(200) OK\n@errors {422: Unprocessable Entity. Returns errors such as: \"certificate parameter is required when updating an existing certificate\" (when updating without params), \"No custom domain configured\", or \"bad dns for custom domain\"}\n\n@endpoint GET /sites/{site_id}/ssl\n@required {site_id: any}\n@returns(200) OK\n\n@endpoint GET /sites/{site_id}/ssl/certificates\n@required {site_id: any, domain: any}\n@returns(200) Array of SNI Certificates\n@errors {404: Not Found, 422: Unprocessable Entity}\n\n@endgroup\n\n@group accounts\n@endpoint GET /accounts/{account_id}/env\n@desc Returns all environment variables for an account or site. An account corresponds to a team in the Netlify UI.\n@required {account_id: any # Scope response to account_id}\n@optional {context_name: any # Filter by deploy context, scope: any # Filter by scope, site_id: any # If specified, only return environment variables set on this site}\n@returns(200) OK\n\n@endpoint POST /accounts/{account_id}/env\n@desc Creates new environment variables. Granular scopes are available on Pro plans and above.\n@required {account_id: any # Scope response to account_id}\n@optional {env_vars: [map], site_id: any # If provided, create an environment variable on the site level, not the account level}\n@returns(201) OK\n\n@endgroup\n\n@group api\n@endpoint GET /api/v1/sites/{site_id}/env\n@desc Returns all environment variables for a site. This convenience method behaves the same as `getEnvVars` but doesn't require an `account_id` as input.\n@required {site_id: any # Scope response to site_id}\n@optional {context_name: any # Filter by deploy context, scope: any # Filter by scope}\n@returns(200) OK\n\n@endgroup\n\n@group accounts\n@endpoint GET /accounts/{account_id}/env/{key}\n@desc Returns an individual environment variable.\n@required {account_id: any # Scope response to account_id, key: any # The environment variable key (case-sensitive)}\n@optional {site_id: any # If provided, return the environment variable for a specific site (no merging is performed)}\n@returns(200) OK\n\n@endpoint PUT /accounts/{account_id}/env/{key}\n@desc Updates an existing environment variable and all of its values. Existing values will be replaced by values provided.\n@required {account_id: any # Scope response to account_id, key: any # The existing environment variable key name (case-sensitive)}\n@optional {env_var: map, site_id: any # If provided, update an environment variable set on this site}\n@returns(200) OK\n\n@endpoint PATCH /accounts/{account_id}/env/{key}\n@desc Updates or creates a new value for an existing environment variable.\n@required {account_id: any # Scope response to account_id, key: any # The existing environment variable key name (case-sensitive)}\n@optional {site_id: any # If provided, update an environment variable set on this site, env_var: map}\n@returns(201) Created (success)\n\n@endpoint DELETE /accounts/{account_id}/env/{key}\n@desc Deletes an environment variable\n@required {account_id: any # Scope response to account_id, key: any # The environment variable key (case-sensitive)}\n@optional {site_id: any # If provided, delete the environment variable from this site}\n@returns(204) No Content (success)\n\n@endpoint DELETE /accounts/{account_id}/env/{key}/value/{id}\n@desc Deletes a specific environment variable value.\n@required {account_id: any # Scope response to account_id, id: any # The environment variable value's ID, key: any # The environment variable key name (case-sensitive)}\n@optional {site_id: any # If provided, delete the value from an environment variable on this site}\n@returns(204) No Content (success)\n\n@endgroup\n\n@group sites\n@endpoint GET /sites/{site_id}/functions\n@required {site_id: any}\n@optional {filter: any}\n@returns(200) OK\n\n@endpoint GET /sites/{site_id}/forms\n@required {site_id: any}\n@returns(200) OK\n\n@endpoint DELETE /sites/{site_id}/forms/{form_id}\n@required {site_id: any, form_id: any}\n@returns(204) Deleted\n\n@endpoint GET /sites/{site_id}/submissions\n@required {site_id: any}\n@optional {page: any, per_page: any}\n@returns(200) OK\n\n@endpoint GET /sites/{site_id}/files\n@required {site_id: any}\n@returns(200) OK\n\n@endpoint GET /sites/{site_id}/assets\n@returns(200) OK\n\n@endpoint POST /sites/{site_id}/assets\n@required {name: any, size: any, content_type: any}\n@optional {visibility: any}\n@returns(201) Created\n\n@endpoint GET /sites/{site_id}/assets/{asset_id}\n@returns(200) OK\n\n@endpoint PUT /sites/{site_id}/assets/{asset_id}\n@required {state: any}\n@returns(200) Updated\n\n@endpoint DELETE /sites/{site_id}/assets/{asset_id}\n@returns(204) Deleted\n\n@endpoint GET /sites/{site_id}/assets/{asset_id}/public_signature\n@returns(200) OK\n\n@endpoint GET /sites/{site_id}/files/{file_path}\n@required {site_id: any, file_path: any}\n@returns(200) OK\n\n@endgroup\n\n@group purge\n@endpoint POST /purge\n@desc Purges cached content from Netlify's CDN. Supports purging by Cache-Tag.\n@required {payload: map}\n@returns(202) OK\n@errors {400: Invalid request parameters, 404: Site not found}\n\n@endgroup\n\n@group sites\n@endpoint GET /sites/{site_id}/snippets\n@returns(200) OK\n\n@endpoint POST /sites/{site_id}/snippets\n@required {snippet: map}\n@returns(201) OK\n\n@endpoint GET /sites/{site_id}/snippets/{snippet_id}\n@returns(200) OK\n\n@endpoint PUT /sites/{site_id}/snippets/{snippet_id}\n@required {snippet: map}\n@returns(204) No content\n\n@endpoint DELETE /sites/{site_id}/snippets/{snippet_id}\n@returns(204) No content\n\n@endpoint GET /sites/{site_id}/metadata\n@returns(200) OK\n\n@endpoint PUT /sites/{site_id}/metadata\n@required {metadata: map}\n@returns(204) No content\n\n@endpoint GET /sites/{site_id}/build_hooks\n@returns(200) OK\n\n@endpoint POST /sites/{site_id}/build_hooks\n@required {buildHook: map}\n@returns(201) Created\n\n@endpoint GET /sites/{site_id}/build_hooks/{id}\n@returns(200) OK\n\n@endpoint PUT /sites/{site_id}/build_hooks/{id}\n@required {buildHook: map}\n@returns(204) No content\n\n@endpoint DELETE /sites/{site_id}/build_hooks/{id}\n@returns(204) No content\n\n@endpoint GET /sites/{site_id}/deploys\n@optional {page: any, per_page: any}\n@returns(200) OK\n\n@endpoint POST /sites/{site_id}/deploys\n@required {deploy: map}\n@optional {title: any}\n@returns(200) OK\n\n@endpoint GET /sites/{site_id}/deploys/{deploy_id}\n@required {site_id: any, deploy_id: any}\n@returns(200) OK\n\n@endpoint PUT /sites/{site_id}/deploys/{deploy_id}\n@required {site_id: any, deploy_id: any, deploy: map}\n@optional {commit_ref: any}\n@returns(200) OK\n\n@endpoint DELETE /sites/{site_id}/deploys/{deploy_id}\n@required {deploy_id: any, site_id: any}\n@returns(204) No content\n\n@endgroup\n\n@group deploys\n@endpoint POST /deploys/{deploy_id}/cancel\n@required {deploy_id: any}\n@returns(201) Cancelled\n\n@endgroup\n\n@group sites\n@endpoint POST /sites/{site_id}/deploys/{deploy_id}/restore\n@required {site_id: any, deploy_id: any}\n@returns(201) Created\n\n@endpoint GET /sites/{site_id}/builds\n@optional {page: any, per_page: any}\n@returns(200) OK\n\n@endpoint POST /sites/{site_id}/builds\n@desc Runs a build for a site. The build will be scheduled to run at the first opportunity, but it might not start immediately if insufficient account build capacity is available.\n@optional {branch: any # If no branch is specified, it is treated as a production deploy If a branch IS specified and matches the main branch, it is also production If a branch is specified and doesn't match the main branch, it is a branch deploy, clear_cache: any # Whether to clear the build cache before building, image: any # The build image tag to use for the build, template_id: any # The build template to use for the build, title: any # The title of the build, zip: any # A zip file containing the site files to build. Only used with Content-Type 'multipart/form-data'. Alternatively, set Content-Type to 'application/zip' and send the zip as the raw request body (no 'zip' parameter needed).}\n@returns(200) OK\n@errors {400: Bad Request, 404: Not Found, 422: Unprocessable Entity}\n\n@endpoint GET /sites/{site_id}/deployed-branches\n@returns(200) OK\n\n@endpoint PUT /sites/{site_id}/unlink_repo\n@desc [Beta] Unlinks the repo from the site.\n@returns(200) OK\n@errors {404: Site not found}\n\n@endpoint PUT /sites/{site_id}/enable\n@desc Re-enables a site that was previously disabled by the user. Sites that were disabled for usage exceeded or marked as spam cannot be re-enabled via this endpoint.\n@returns(204) No content\n@errors {422: Cannot enable this site}\n\n@endpoint PUT /sites/{site_id}/disable\n@desc Disables a site, preventing it from serving content. The site can be re-enabled later using the enable endpoint.\n@required {reason: any # Reason for disabling the site}\n@returns(204) No content\n\n@endgroup\n\n@group builds\n@endpoint GET /builds/{build_id}\n@returns(200) OK\n\n@endpoint POST /builds/{build_id}/log\n@returns(204) No content\n\n@endpoint POST /builds/{build_id}/start\n@returns(204) No content\n\n@endgroup\n\n@group {account_id}\n@endpoint GET /{account_id}/builds/status\n@returns(200) OK\n\n@endgroup\n\n@group sites\n@endpoint GET /sites/{site_id}/dns\n@returns(200) OK\n\n@endpoint PUT /sites/{site_id}/dns\n@returns(200) OK\n\n@endpoint PUT /sites/{site_id}/rollback\n@returns(204) No content\n\n@endgroup\n\n@group deploys\n@endpoint GET /deploys/{deploy_id}\n@required {deploy_id: any}\n@returns(200) OK\n\n@endpoint DELETE /deploys/{deploy_id}\n@required {deploy_id: any}\n@returns(204) No content\n\n@endpoint PATCH /deploys/{deploy_id}/validations_report\n@desc Updates the deploy validations report for a deploy.\n@required {deploy_id: any # The ID of the deploy, report: map}\n@returns(200) OK\n\n@endpoint POST /deploys/{deploy_id}/lock\n@required {deploy_id: any}\n@returns(200) OK\n\n@endpoint POST /deploys/{deploy_id}/unlock\n@required {deploy_id: any}\n@returns(200) OK\n\n@endpoint PUT /deploys/{deploy_id}/files/{path}\n@required {deploy_id: any, path: any, file_body: str(binary)}\n@optional {size: any}\n@returns(200) OK\n\n@endpoint PUT /deploys/{deploy_id}/functions/{name}\n@required {deploy_id: any, name: any, file_body: str(binary)}\n@optional {runtime: any, invocation_mode: any, timeout: any, size: any, X-Nf-Retry-Count: any}\n@returns(200) OK\n\n@endgroup\n\n@group sites\n@endpoint PUT /sites/{site_id}/plugins/{package}\n@desc This is an internal-only endpoint.\n@required {site_id: any, package: any}\n@optional {plugin_params: map}\n@returns(200) OK\n\n@endpoint GET /sites/{site_id}/plugin_runs/latest\n@desc This is an internal-only endpoint.\n@required {site_id: any, packages: any}\n@optional {state: any}\n@returns(200) OK\n\n@endgroup\n\n@group deploys\n@endpoint POST /deploys/{deploy_id}/plugin_runs\n@desc This is an internal-only endpoint.\n@required {deploy_id: any}\n@optional {plugin_run: map}\n@returns(201) CREATED\n\n@endgroup\n\n@group forms\n@endpoint GET /forms/{form_id}/submissions\n@required {form_id: any}\n@optional {page: any, per_page: any}\n@returns(200) OK\n\n@endgroup\n\n@group hooks\n@endpoint GET /hooks\n@required {site_id: any}\n@returns(200) OK\n\n@endpoint POST /hooks\n@required {site_id: any, hook: map}\n@returns(201) OK\n\n@endpoint GET /hooks/{hook_id}\n@returns(200) OK\n\n@endpoint PUT /hooks/{hook_id}\n@required {hook: map}\n@returns(200) OK\n\n@endpoint DELETE /hooks/{hook_id}\n@returns(204) No content\n\n@endpoint POST /hooks/{hook_id}/enable\n@returns(200) OK\n\n@endpoint GET /hooks/types\n@returns(200) OK\n\n@endgroup\n\n@group oauth\n@endpoint POST /oauth/tickets\n@required {client_id: any}\n@optional {body: map}\n@returns(201) Created\n@errors {401: OAuth application not found, 422: Validation error}\n\n@endpoint GET /oauth/tickets/{ticket_id}\n@required {ticket_id: any}\n@returns(200) ok\n\n@endpoint POST /oauth/tickets/{ticket_id}/exchange\n@required {ticket_id: any}\n@returns(201) ok\n\n@endgroup\n\n@group deploy_keys\n@endpoint GET /deploy_keys\n@returns(200) OK\n\n@endpoint POST /deploy_keys\n@returns(201) Created\n\n@endpoint GET /deploy_keys/{key_id}\n@returns(200) OK\n\n@endpoint DELETE /deploy_keys/{key_id}\n@returns(204) Not Content\n\n@endgroup\n\n@group {account_slug}\n@endpoint POST /{account_slug}/sites\n@desc **Note:** Environment variable keys and values have moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [createEnvVars](#tag/environmentVariables/operation/createEnvVars) to create environment variables for a site.\n@required {account_slug: any}\n@optional {site: any, configure_dns: any}\n@returns(201) Created\n\n@endpoint GET /{account_slug}/sites\n@desc **Note:** Environment variable keys and values have moved from `build_settings.env` and `repo.env` to a new endpoint. Please use [getEnvVars](#tag/environmentVariables/operation/getEnvVars) to retrieve site environment variables.\n@required {account_slug: any}\n@optional {name: any, page: any, per_page: any}\n@returns(200) OK\n\n@endpoint GET /{account_slug}/members\n@returns(200) OK\n\n@endpoint POST /{account_slug}/members\n@required {accountAddMemberSetup: map}\n@returns(200) OK\n\n@endpoint GET /{account_slug}/members/{member_id}\n@returns(200) OK\n\n@endpoint PUT /{account_slug}/members/{member_id}\n@required {accountUpdateMemberSetup: map}\n@returns(200) OK\n\n@endpoint DELETE /{account_slug}/members/{member_id}\n@returns(204) Not Content\n\n@endgroup\n\n@group billing\n@endpoint GET /billing/payment_methods\n@returns(200) OK\n\n@endgroup\n\n@group accounts\n@endpoint GET /accounts/types\n@returns(200) OK\n\n@endpoint GET /accounts\n@optional {minimal: any}\n@returns(200) OK\n\n@endpoint POST /accounts\n@required {accountSetup: map}\n@returns(201) Created\n\n@endpoint GET /accounts/{account_id}\n@returns(200) OK\n\n@endpoint PUT /accounts/{account_id}\n@optional {accountUpdateSetup: map}\n@returns(200) OK\n\n@endpoint DELETE /accounts/{account_id}\n@returns(204) Not Content\n\n@endpoint GET /accounts/{account_id}/audit\n@optional {query: any, log_type: any, page: any, per_page: any}\n@returns(200) OK\n\n@endgroup\n\n@group agent_runners\n@endpoint GET /agent_runners\n@required {account_id: any, site_id: any}\n@optional {page: any, per_page: any, state: any, title: any, branch: any, result_branch: any, from: any, to: any}\n@returns(200) OK\n\n@endpoint POST /agent_runners\n@required {site_id: any}\n@optional {deploy_id: any, branch: any, prompt: any, agent: any, model: any, parent_agent_runner_id: any, dev_server_image: any, file_keys: any}\n@returns(200) OK\n@errors {404: Not Found, 422: Unprocessable Entity}\n\n@endpoint POST /agent_runners/upload_url\n@required {account_id: any, filename: any, content_type: any}\n@returns(200) OK\n@errors {400: Bad Request, 422: Unprocessable Entity}\n\n@endpoint GET /agent_runners/{agent_runner_id}\n@returns(200) OK\n\n@endpoint PATCH /agent_runners/{agent_runner_id}\n@returns(200) OK\n\n@endpoint DELETE /agent_runners/{agent_runner_id}\n@returns(202) Accepted\n\n@endpoint POST /agent_runners/{agent_runner_id}/archive\n@returns(202) Accepted\n@errors {404: Not Found, 422: Unprocessable Entity}\n\n@endpoint POST /agent_runners/{agent_runner_id}/pull_request\n@returns(200) OK\n@errors {400: Bad Request, 409: Conflict, 422: Unprocessable Entity}\n\n@endpoint POST /agent_runners/{agent_runner_id}/commit\n@required {target_branch: any}\n@returns(200) OK\n@errors {400: Bad Request, 409: Conflict, 422: Unprocessable Entity}\n\n@endpoint GET /agent_runners/{agent_runner_id}/sessions\n@optional {page: any, per_page: any, state: any, from: any, to: any, order_by: any}\n@returns(200) OK\n\n@endpoint POST /agent_runners/{agent_runner_id}/sessions\n@optional {prompt: any, agent: any, model: any, file_keys: any}\n@returns(200) OK\n@errors {404: Not Found, 422: Unprocessable Entity}\n\n@endpoint GET /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}\n@returns(200) OK\n\n@endpoint PATCH /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}\n@optional {is_published: any}\n@returns(200) OK\n\n@endpoint DELETE /agent_runners/{agent_runner_id}/sessions/{agent_runner_session_id}\n@returns(202) Accepted\n\n@endgroup\n\n@group submissions\n@endpoint GET /submissions/{submission_id}\n@optional {query: any, page: any, per_page: any}\n@returns(200) OK\n\n@endpoint DELETE /submissions/{submission_id}\n@returns(204) Deleted\n\n@endgroup\n\n@group sites\n@endpoint GET /sites/{site_id}/service-instances\n@returns(200) OK\n\n@endpoint POST /sites/{site_id}/services/{addon}/instances\n@required {config: map}\n@returns(201) Created\n\n@endpoint GET /sites/{site_id}/services/{addon}/instances/{instance_id}\n@returns(200) OK\n\n@endpoint PUT /sites/{site_id}/services/{addon}/instances/{instance_id}\n@required {config: map}\n@returns(204) No Content\n\n@endpoint DELETE /sites/{site_id}/services/{addon}/instances/{instance_id}\n@returns(204) Deleted\n\n@endgroup\n\n@group services\n@endpoint GET /services/\n@returns(200) services\n\n@endpoint GET /services/{addonName}\n@returns(200) services\n\n@endpoint GET /services/{addonName}/manifest\n@returns(201) retrieving from provider\n\n@endgroup\n\n@group user\n@endpoint GET /user\n@returns(200) OK\n\n@endgroup\n\n@group sites\n@endpoint POST /sites/{site_id}/traffic_splits\n@required {branch_tests: map}\n@returns(201) Created\n\n@endpoint GET /sites/{site_id}/traffic_splits\n@returns(200) split_tests\n\n@endpoint PUT /sites/{site_id}/traffic_splits/{split_test_id}\n@required {branch_tests: map}\n@returns(201) Created\n\n@endpoint GET /sites/{site_id}/traffic_splits/{split_test_id}\n@returns(200) split_test\n\n@endpoint POST /sites/{site_id}/traffic_splits/{split_test_id}/publish\n@returns(204) enable\n\n@endpoint POST /sites/{site_id}/traffic_splits/{split_test_id}/unpublish\n@returns(204) disabled\n\n@endgroup\n\n@group dns_zones\n@endpoint POST /dns_zones\n@required {DnsZoneParams: map}\n@returns(201) Created\n\n@endpoint GET /dns_zones\n@optional {account_slug: any}\n@returns(200) get all DNS zones the user has access to\n\n@endpoint GET /dns_zones/{zone_id}\n@returns(200) get a single DNS zone\n\n@endpoint DELETE /dns_zones/{zone_id}\n@returns(204) delete a single DNS zone\n\n@endpoint PUT /dns_zones/{zone_id}/transfer\n@returns(200) transfer a DNS zone to another account\n\n@endpoint GET /dns_zones/{zone_id}/dns_records\n@returns(200) get all DNS records for a single DNS zone\n\n@endpoint POST /dns_zones/{zone_id}/dns_records\n@required {dns_record: map}\n@returns(201) Created\n\n@endpoint GET /dns_zones/{zone_id}/dns_records/{dns_record_id}\n@returns(200) get a single DNS record\n\n@endpoint DELETE /dns_zones/{zone_id}/dns_records/{dns_record_id}\n@returns(204) record deleted\n\n@endgroup\n\n@group sites\n@endpoint GET /sites/{site_id}/dev_servers\n@optional {page: any, per_page: any}\n@returns(200) OK\n\n@endpoint POST /sites/{site_id}/dev_servers\n@optional {branch: any}\n@returns(200) OK\n\n@endpoint DELETE /sites/{site_id}/dev_servers\n@optional {branch: any}\n@returns(202) OK\n\n@endpoint GET /sites/{site_id}/dev_servers/{dev_server_id}\n@returns(200) OK\n\n@endpoint POST /sites/{site_id}/dev_servers/{dev_server_id}/activity\n@returns(200) OK\n\n@endpoint POST /sites/{site_id}/dev_servers/{dev_server_id}/state\n@required {body: map}\n@returns(200) OK\n@errors {409: Conflict}\n\n@endpoint GET /sites/{site_id}/dev_server_hooks\n@returns(200) OK\n\n@endpoint POST /sites/{site_id}/dev_server_hooks\n@required {devServerHook: map}\n@returns(201) Created\n\n@endpoint GET /sites/{site_id}/dev_server_hooks/{id}\n@returns(200) OK\n\n@endpoint PUT /sites/{site_id}/dev_server_hooks/{id}\n@required {devServerHook: map}\n@returns(204) No content\n\n@endpoint DELETE /sites/{site_id}/dev_server_hooks/{id}\n@returns(204) No content\n\n@endgroup\n\n@group ai-gateway\n@endpoint GET /ai-gateway/providers\n@returns(200) The mapping of providers and supported models\n\n@endgroup\n\n@group sites\n@endpoint GET /sites/{site_id}/ai-gateway/token\n@desc Returns an AI Gateway token for a specific site\n@returns(200) AI Gateway token for the site\n@errors {404: AI Gateway not available for this site}\n\n@endgroup\n\n@group accounts\n@endpoint GET /accounts/{account_id}/ai-gateway/token\n@desc Returns an AI Gateway token scoped to an account\n@returns(200) AI Gateway token for the account\n@errors {404: AI Gateway not available for this account}\n\n@endgroup\n\n@group sites\n@endpoint POST /sites/{site_id}/database\n@desc Creates a new database for the specified site. If a database already exists, returns the existing connection string. The database region defaults to the site's functions region if not specified.\n@optional {database: map}\n@returns(200) Database already exists\n@returns(201) Created\n\n@endpoint GET /sites/{site_id}/database\n@desc Returns the database connection string for the specified site.\n@returns(200) OK\n\n@endpoint DELETE /sites/{site_id}/database\n@desc Deletes the database and all associated branches and snapshots for the specified site.\n@returns(204) Deleted\n\n@endpoint POST /sites/{site_id}/database/branch\n@desc Creates a new database branch for a deploy. If a branch already exists for the specified deploy ID, returns the existing connection string.\n@required {branch: map}\n@returns(200) Branch already exists for this deploy\n@returns(201) Created\n\n@endpoint GET /sites/{site_id}/database/branch/{deploy_id}\n@desc Returns the database branch connection string for a specific deploy.\n@returns(200) OK\n@errors {404: Branch not found for this deploy}\n\n@endpoint DELETE /sites/{site_id}/database/branch/{deploy_id}\n@desc Deletes a database branch associated with a deploy.\n@returns(204) Deleted\n\n@endpoint POST /sites/{site_id}/database/snapshot\n@desc Creates a point-in-time snapshot of a database branch. Defaults to the production branch if no branch name is specified.\n@optional {snapshot: map}\n@returns(201) Created\n\n@endpoint GET /sites/{site_id}/database/snapshots\n@desc Returns all snapshots for the site's database.\n@returns(200) OK\n\n@endpoint DELETE /sites/{site_id}/database/snapshot/{snapshot_id}\n@desc Deletes a database snapshot.\n@returns(204) Deleted\n\n@endpoint POST /sites/{site_id}/database/snapshot/{snapshot_id}/restore\n@desc Restores a snapshot to a database branch. Defaults to the production branch if no branch_name is specified.\n@optional {restore: map}\n@returns(200) OK\n\n@endgroup\n\n@end\n"}