Update credential

POST /v1/Credentials/{Sid}

TODO: Resource-level docs

Path parameters

  • Sid string Required

    The Twilio-provided string that uniquely identifies the Credential resource to update.

Body

  • ApiKey string

    [GCM only] The Server key of your project from Firebase console under Settings / Cloud messaging.

  • [APN only] The URL-encoded representation of the certificate. Strip everything outside of the headers, e.g. -----BEGIN CERTIFICATE-----MIIFnTCCBIWgAwIBAgIIAjy9H849+E8wDQYJKoZIhvcNAQEFBQAwgZYxCzAJBgNV.....A==-----END CERTIFICATE-----

  • A descriptive string that you create to describe the resource. It can be up to 64 characters long.

  • [APN only] The URL-encoded representation of the private key. Strip everything outside of the headers, e.g. -----BEGIN RSA PRIVATE KEY-----MIIEpQIBAAKCAQEAuyf/lNrH9ck8DmNyo3fGgvCI1l9s+cmBY3WIz+cUDqmxiieR\n.-----END RSA PRIVATE KEY-----

  • Sandbox boolean

    [APN only] Whether to send the credential to sandbox APNs. Can be true to send to sandbox APNs or false to send to production.

  • Secret string

    [FCM only] The Server key of your project from Firebase console under Settings / Cloud messaging.

Responses

  • OK

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created the resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • date_created string(date-time) | null

      The RFC 2822 date and time in GMT when the resource was created

    • date_updated string(date-time) | null

      The RFC 2822 date and time in GMT when the resource was last updated

    • friendly_name string | null

      The string that you assigned to describe the resource

    • sandbox string | null

      [APN only] Whether to send the credential to sandbox APNs

    • sid string | null

      The unique string that identifies the resource

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^CR[0-9a-fA-F]{32}$.

    • type string | null

      The Credential type, one of gcm, fcm, or apn

      Values are gcm, apn, or fcm.

    • url string(uri) | null

      The absolute URL of the Credential resource

POST /v1/Credentials/{Sid}
curl \
 -X POST https://notify.twilio.com/v1/Credentials/{Sid} \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'ApiKey=string&Certificate=string&FriendlyName=string&PrivateKey=string&Sandbox=true&Secret=string'
Request example
{
  "ApiKey": "string",
  "Certificate": "string",
  "FriendlyName": "string",
  "PrivateKey": "string",
  "Sandbox": true,
  "Secret": "string"
}
Request examples
{
  "ApiKey": "string",
  "Certificate": "string",
  "FriendlyName": "string",
  "PrivateKey": "string",
  "Sandbox": true,
  "Secret": "string"
}
Response examples (200)
{
  "account_sid": "string",
  "date_created": "2023-05-04T09:42:00+00:00",
  "date_updated": "2023-05-04T09:42:00+00:00",
  "friendly_name": "string",
  "sandbox": "string",
  "sid": "string",
  "type": "gcm",
  "url": "https://example.com"
}
Response examples (200)
{
  "account_sid": "string",
  "date_created": "2024-05-04T09:42:00+00:00",
  "date_updated": "2024-05-04T09:42:00+00:00",
  "friendly_name": "string",
  "sandbox": "string",
  "sid": "string",
  "type": "gcm",
  "url": "https://example.com"
}