update

View as MarkdownOpen in Claude

Update a project’s name or protection settings. Pass the ID, then the typed body, which always includes name; the optional extras argument merges additional fields.

Path parameters

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

Request

namestringOptional<=250 characters
The name of the project.
protect_recordingsbooleanOptional
When enabled, recordings created within the project require authentication to access.
protect_message_mediabooleanOptional
When enabled, message media created within the project requires authentication to access.
protect_fax_mediabooleanOptional
When enabled, fax media created within the project requires authentication to access.
force_https_requestsbooleanOptional
When enabled, requests made to the project's webhooks and callbacks must use HTTPS.

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.

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"
}

Example

import { RestClient } from "@signalwire/sdk";
const client = new RestClient({
project: "your-project-id",
token: "your-api-token",
host: "your-space.signalwire.com"
});
const project = await client.projects.update("project-id", {
name: "Bayview Taxi Staging",
force_https_requests: true,
});