rotateSigningKey

View as MarkdownOpen in Claude

Issue a new signing key for a project. The response includes the new key in signing_key; store it and update every service that validates webhook signatures with it.

Path parameters

idstringRequiredformat: "uuid"
The unique identifier of the project or subproject.

Response

idstringRequiredformat: "uuid"
The unique identifier of the project.
namestringRequired
The name of the project.
parent_project_idstring or nullRequiredformat: "uuid"
The unique identifier of the root project. `null` when this project is itself a root project.
subprojectbooleanRequired
`true` when this project is a subproject.
region_preferencestringRequired
The effective region preference for the project. Returned in all responses; it is not currently settable through this API.
protect_recordingsbooleanRequired
When enabled, recordings created within the project require authentication to access.
protect_message_mediabooleanRequired
When enabled, message media created within the project requires authentication to access.
protect_fax_mediabooleanRequired
When enabled, fax media created within the project requires authentication to access.
force_https_requestsbooleanRequired
When enabled, requests made to the project's webhooks and callbacks must use HTTPS.
created_atdatetimeRequired
The date and time when the project was created.
updated_atdatetimeRequired
The date and time when the project was last updated.
signing_keystringRequired
The project's signing key. Only returned on create and signing-key rotation responses; it cannot be retrieved through the API afterward.

Response Example

Response
{
"id": "8f14e45f-ceea-467d-9c2b-7a1d3a9b2c34",
"name": "Acme Staging",
"parent_project_id": "b3877739-5c7e-4d4f-9d1a-2f0c8c2f1a11",
"subproject": true,
"region_preference": "us-west",
"protect_recordings": false,
"protect_message_media": false,
"protect_fax_media": false,
"force_https_requests": true,
"created_at": "2024-05-06T12:20:00Z",
"updated_at": "2024-05-06T12:20:00Z",
"signing_key": "PSK_4d8c2b1a9f3e7c6d5b4a3e2f1d0c9b8a"
}

Example

import { RestClient } from "@signalwire/sdk";
const client = new RestClient({
project: "your-project-id",
token: "your-api-token",
host: "your-space.signalwire.com"
});
const rotated = await client.projects.rotateSigningKey("project-id");
console.log(rotated.signing_key);