Skip to content

Update a voice service

Request

Updates an existing service resource with the provided properties. Only the fields included in the request body will be modified; omitted fields remain unchanged.

To set a service as the default for the project, include "isDefault": true in the request. Note that each project can have only one default service. Setting a new default will automatically remove the default status from the previously designated service. "isDefault": false is invalid and will not be accepted by the API.

Security
BasicAuth or SinchOAuth2
Path
projectIdstring, (uuid)(Project ID)required

The ID of the project.

Example:5c5bf2b1-35ae-4825-ab89-457e07bb60e6
serviceIdstring, (uuid)(Service ID)required

The ID of the service.

Example:6e124178-c29d-46a5-943c-5c2ae544aade
Headers
Idempotency-Keystring, [ 16 .. 128 ] characters

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.

Bodyapplication/json
namestring, [ 1 .. 64 ] characters^\S+(\s+\S+)*$

Voice service name. No leading or trailing whitespaces allowed.

Example:"My Voice Service"
descriptionstring, <= 255 characters^\S+(\s+\S+)*$

Description of the service

Example:"This is a description of my voice service"
isDefaultboolean(Service Is Default)

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.

callBehaviorany(Call Behaviors)
curl -i -X PATCH \
  -u '<username>:<password>' \
  'https://voice.api.sinch.com/v2/projects/{projectId}/services/{serviceId}' \
  -H 'Content-Type: application/json' \
  -d '{
    "description": "Service with webhooks",
    "callBehavior": {
      "type": "WEBHOOK",
      "webhook": {
        "url": "https://example.com/webhook",
        "fallbackUrl": "https://example.com/fallback"
      }
    }
  }'

Responses

Service updated.

Bodyapplication/json
serviceIdstring, (uuid)(Service ID)required

The ID of the service used.

Example:"6e124178-c29d-46a5-943c-5c2ae544aade"
serviceSecretstring, (text)(Service Secret)required

The secret of the service used.

Example:"9+MXX5u6dky5aATA7ZfIRg=="
projectIdstring, (uuid)(Project ID)required

The Id of the project associated with the call.

Example:"5c5bf2b1-35ae-4825-ab89-457e07bb60e6"
createTimestring, (date-time)read-onlyrequired

Timestamp (RFC 3339) indicating when the service was created.

Example:"2026-07-01 00:00:00+00:00"
namestring, [ 1 .. 64 ] characters^\S+(\s+\S+)*$required

Voice service name. No leading or trailing whitespaces allowed.

Example:"My Voice Service"
isDefaultboolean(Service Is Default)required

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.

updateTimestring, (date-time)read-only

Timestamp (RFC 3339) indicating when the service was last updated.

Omitted if no updates were performed on this service.

Example:"2025-01-01 00:00:00+00:00"
descriptionstring

Description of the service

Example:"This is a description of my voice service"
callBehaviorany(Call Behaviors)
Response
{ "serviceId": "6e124178-c29d-46a5-943c-5c2ae544aade", "projectId": "5c5bf2b1-35ae-4825-ab89-457e07bb60e6", "createTime": "2025-01-01T00:00:00Z", "updateTime": "2025-06-01T09:15:00Z", "name": "My Voice Service", "description": "Updated service description", "isDefault": true, "callBehavior": { "type": "WEBHOOK", "webhook": { … } } }