REST ClientProjects

create

View as MarkdownOpen in Claude

projects.create

Create a subproject under the authenticated root project.

Request

namestringRequired<=250 characters
The name of the subproject.
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.
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

All parameters are keyword-only.

name
strRequired

Display name for the subproject.

protect_recordings
bool | NoneDefaults to None

Require authentication to download call recordings.

protect_message_media
bool | NoneDefaults to None

Require authentication to download message media.

protect_fax_media
bool | NoneDefaults to None

Require authentication to download fax media.

force_https_requests
bool | NoneDefaults to None

Reject webhook URLs that aren’t HTTPS.

extras
Mapping[str, Any] | NoneDefaults to None

Additional request body fields merged into the payload as sent.

request_options
RequestOptions | NoneDefaults to None

Per-call timeout and retry overrides. See RequestOptions.

Returns

Project — the new subproject. The response also carries signing_key, which is returned only on creation and by rotate_signing_key, so store it now.

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",
)
sub = client.projects.create(
name="Bayview Taxi - staging",
protect_recordings=True,
force_https_requests=True,
)
print(sub["id"])