REST ClientProjects

rotate_signing_key

View as MarkdownOpen in Claude

projects.rotate_signing_key

Issue a new signing key for a project. The response is the only place the new key is returned.

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.

Parameters

id
strRequired

ID of the project whose key to rotate.

request_options
RequestOptions | NoneDefaults to None

Per-call timeout and retry overrides. See RequestOptions.

Returns

ProjectWithSigningKey — the project with its new signing key.

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

from signalwire.rest import RestClient
client = RestClient(
project="your-project-id",
token="your-api-token",
host="your-space.signalwire.com",
)
project = client.projects.rotate_signing_key("project-id")
print(project["id"])