# Platform

The platform namespace. A platform (your company) owns companies, and each company owns accounts (one per location). A platform API key (psk_...) creates and manages the accounts of its platform and the webhook endpoints that receive the events of all of them. Every other route acts on one account: send the Chaching-Account header with that account id. See the Platforms guide: https://chaching.redocly.app/developer-guide/platforms

 - [POST /platform/accounts](https://chaching.redocly.app/developer-guide/api/platform/platformaccountscontroller_create.md): Creates an account of the platform under a company, identified by your own external_id values. The company is created on first use and reused afterwards. Repeating a create with the same company exter
 - [GET /platform/accounts](https://chaching.redocly.app/developer-guide/api/platform/platformaccountscontroller_list.md): Lists the accounts of your platform, newest first (accounts removed by Chaching are not listed). Optionally filtered by external_id, company_external_id and status. Requires a platform key.
 - [GET /platform/accounts/{id}](https://chaching.redocly.app/developer-guide/api/platform/platformaccountscontroller_findone.md): Returns one account of the platform. Requires a platform key.
 - [PATCH /platform/accounts/{id}](https://chaching.redocly.app/developer-guide/api/platform/platformaccountscontroller_update.md): Updates the name and the time zone of an account of the platform. Only the fields sent change; a field left out keeps its value. A change of time zone applies to payment plans created afterwards; plan
 - [POST /platform/accounts/{id}/deactivate](https://chaching.redocly.app/developer-guide/api/platform/platformaccountscontroller_deactivate.md): Deactivates an account. A deactivated account accepts reads, payment plan cancellations, external payment plan payments (external: true), terminal updates, and resolving, canceling or force-closing te
 - [POST /platform/accounts/{id}/reactivate](https://chaching.redocly.app/developer-guide/api/platform/platformaccountscontroller_reactivate.md): Reactivates a deactivated account. Reactivating an active account changes nothing. Sends account.updated when the account changes state. Requires a platform key.
 - [POST /platform/webhook-endpoints](https://chaching.redocly.app/developer-guide/api/platform/platformwebhookendpointscontroller_create.md): Registers a URL of your server that receives the event types listed in enabled_events; ["*"] receives every event type, including event types added later. The endpoint receives the events of every acc
 - [GET /platform/webhook-endpoints](https://chaching.redocly.app/developer-guide/api/platform/platformwebhookendpointscontroller_list.md): A page of the webhook endpoints of the platform, newest first. Requires a platform key.
 - [GET /platform/webhook-endpoints/{id}](https://chaching.redocly.app/developer-guide/api/platform/platformwebhookendpointscontroller_retrieve.md): Retrieves one webhook endpoint of the platform. Requires a platform key.
 - [PATCH /platform/webhook-endpoints/{id}](https://chaching.redocly.app/developer-guide/api/platform/platformwebhookendpointscontroller_update.md): Changes the URL and the event types of a webhook endpoint. Send at least one of endpoint and enabled_events; a field you omit keeps its value. A sent enabled_events replaces the whole list. The status
 - [DELETE /platform/webhook-endpoints/{id}](https://chaching.redocly.app/developer-guide/api/platform/platformwebhookendpointscontroller_remove.md): Deletes a webhook endpoint and answers the endpoint as it was before the delete. Requires a platform key.
 - [POST /platform/webhook-endpoints/{id}/enable](https://chaching.redocly.app/developer-guide/api/platform/platformwebhookendpointscontroller_enable.md): Turns an inactive webhook endpoint back on, so it receives events again. There is no request body. Requires a platform key.
 - [POST /platform/webhook-endpoints/{id}/disable](https://chaching.redocly.app/developer-guide/api/platform/platformwebhookendpointscontroller_disable.md): Stops sending events to a webhook endpoint without deleting it. There is no request body. Requires a platform key.
 - [POST /platform/webhook-endpoints/{id}/rotate-secret](https://chaching.redocly.app/developer-guide/api/platform/platformwebhookendpointscontroller_rotatesecret.md): Creates a new signing secret for the endpoint and returns it once, in this response. For 24 hours every delivery carries one v1 signature for the new secret and one for the previous secret; after that
 - [GET /platform/webhook-endpoints/{id}/logs](https://chaching.redocly.app/developer-guide/api/platform/platformwebhookendpointscontroller_logs.md): A page of the deliveries of one webhook endpoint, newest first. Filter with search, a JSON object with any of event_id, event_type, status, response_status_code and created, for example search={"statu
 - [GET /platform/events](https://chaching.redocly.app/developer-guide/api/platform/platformeventscontroller_list.md): A page of the events of every account of the platform, newest first. Filter with search, a JSON object with any of created, event_type, delivery_success and account, for example search={"account":"acc
 - [GET /platform/webhook-deliveries](https://chaching.redocly.app/developer-guide/api/platform/platformwebhookdeliveriescontroller_list.md): A page of the deliveries of every webhook endpoint of the platform, across all its accounts, newest first. Each delivery shows the account it belongs to. Filter with search, a JSON object with any of
 - [GET /platform/webhook-deliveries/{id}](https://chaching.redocly.app/developer-guide/api/platform/platformwebhookdeliveriescontroller_retrieve.md): Retrieves one delivery of a platform webhook endpoint with the event payload and every attempt made to send it, oldest first. Attempts are kept for 30 days. Requires a platform key.
 - [POST /platform/webhook-deliveries/{id}/resend](https://chaching.redocly.app/developer-guide/api/platform/platformwebhookdeliveriescontroller_resend.md): Schedules one more attempt to send the delivery to its platform endpoint and answers 202 with the delivery, status pending, at once; the attempt runs within seconds. The attempt posts the same event b
