For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SDKsHelp CenterLog inSign up
    • Overview
  • Getting Started
    • API Mechanics
    • Quickstart
  • Guides
    • Communications API
    • Troubleshooting
    • Events
    • Changelog
  • Comms API Reference
      • Summary
      • GETList Device Registrations
      • POSTRegister Device for Push Notifications
      • GETGet a single Device Registration
      • DELDelete a Device Registration
      • GETList Push Notifications
      • POSTSend Push Notifications
      • GETFetch a Push Notification
      • GETList Push Notification Operations
      • GETFetch a Push Notification Operation
      • GETList Push Credentials
      • POSTCreate Push Credential
      • GETFetch a Push Credential
      • DELDelete a Push Credential
      • PATCHUpdate a Push Credential
      • GETList Push Notification Apps
      • GETFetch a Push Notification App
      • PATCHUpdate a Push Notification App
      • GETList Users
      • GETFetch a User
      • DELDelete a User
LogoLogo
SDKsHelp CenterLog inSign up
Comms API ReferencePush Notifications

Update a Push Credential

PATCH
https://comms.twilio.com/preview/PushNotifications/Credentials/:credentialId
PATCH
/preview/PushNotifications/Credentials/:credentialId
$curl -X PATCH 'https://comms.twilio.com/preview/PushNotifications/Credentials/comms_credential_01h9krwprkeee8fzqspvwy6nq8' \
>--header 'Content-Type: application/json' \
>--data '{
> "isDefault": true,
> "tags": {
> "environment": "production",
> "region": "us-east-1"
> }
>}'\
>-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN
1{
2 "resourceId": "comms_credential_02k8mnsqv7xj4b9r5t6wz1y3a",
3 "resourceLocation": "https://comms.twilio.com/v1/PushNotifications/Credentials/comms_credential_02k8mnsqv7xj4b9r5t6wz1y3a"
4}
This operation partially updates a Push Credential.
Was this page helpful?
Previous

List Push Notification Apps

Next
Built with

Authentication

AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

OR
AuthorizationBasic

Basic authentication of the form Basic <base64(username:password)>.

Path parameters

credentialIdstringRequired

Request

This endpoint expects an object.
isDefaultbooleanRequiredDefaults to false

Use this Credential as the default for the Push Notification App for the given credentialType to send Push Notifications. If a Credential of the given type doesn’t already exist, this Credential automatically becomes the default.

Response headers

Locationstring

The location (uri) of the resource identified by Resource-Id.

Response

The request was accepted and a resource ID is available to check the result. The response body contains the resource ID and link to the resource.
resourceIdstring
The Resource ID is an identifier for the resource that was created or updated in response to the request.
resourceLocationstringformat: "uri"

The location (uri) of the resource identified by Resource-Id.

Errors

400
Bad Request Error
404
Not Found Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error