Creates a new voice service in the specified project.
Client-generated idempotency key to safely retry requests. The server uses this key to recognize retries of the same request. If a request with the same key is received within 10 minutes, the server returns the cached response from the original request. Using a random UUID (v4) is strongly recommended.
Voice service name. No leading or trailing whitespaces allowed.
Description of the service
Indicates whether this service is set as the default for the project. The default service is used when no specific service is specified in API requests. Note: when updating a service, this property cannot be set to false. In such case, a BadRequest will be returned by the API.
- Endpoint which enables consuming the Voice API globally - Redirected by Sinch to the closest region.https://voice.api.sinch.com/v2/projects/{projectId}/services
- North America 1 - Easthttps://us1.voice.api.sinch.com/v2/projects/{projectId}/services
- South America 1 - Easthttps://br1.voice.api.sinch.com/v2/projects/{projectId}/services
- Europe 1 - Centralhttps://eu1.voice.api.sinch.com/v2/projects/{projectId}/services
- Asia Pacific 1 - Southeasthttps://sg1.voice.api.sinch.com/v2/projects/{projectId}/services
- https://au1.voice.api.sinch.comhttps://au1.voice.api.sinch.com/v2/projects/{projectId}/services
curl -i -X POST \
-u '<username>:<password>' \
'https://voice.api.sinch.com/v2/projects/{projectId}/services' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: stringstringstri' \
-d '{
"description": "Service with webhooks",
"name": "Example service",
"callBehavior": {
"type": "WEBHOOK",
"webhook": {
"url": "https://example.com/webhook",
"fallbackUrl": "https://example.com/fallback"
}
}
}'Service created.
Timestamp (RFC 3339) indicating when the service was created.
Voice service name. No leading or trailing whitespaces allowed.
Indicates whether this service is set as the default for the project. The default service is used when no specific service is specified in API requests. Note: when updating a service, this property cannot be set to false. In such case, a BadRequest will be returned by the API.
Timestamp (RFC 3339) indicating when the service was last updated.
Omitted if no updates were performed on this service.
{ "serviceId": "6e124178-c29d-46a5-943c-5c2ae544aade", "projectId": "5c5bf2b1-35ae-4825-ab89-457e07bb60e6", "createTime": "2025-01-01T00:00:00Z", "name": "Example service", "description": "Service with webhooks", "isDefault": false, "callBehavior": { "type": "WEBHOOK", "webhook": { … } } }