Update credential

POST /v1/Credentials/{Sid}

Path parameters

  • Sid string Required

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

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

application/x-www-form-urlencoded

Body

  • FriendlyName string

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

  • Certificate string

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

  • PrivateKey string

    [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.

  • ApiKey string

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

  • Secret string

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

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

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

      The unique string that we created to identify the Credential resource.

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

    • account_sid string | null

      The SID of the Account that created the Credential resource.

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

    • friendly_name string | null

      The string that you assigned to describe the resource.

    • type string

      The Credential type. Can be: gcm, fcm, or apn.

      Values are gcm, apn, or fcm.

    • sandbox string | null

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

    • date_created string(date-time) | null

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

    • date_updated string(date-time) | null

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

    • url string(uri) | null

      The absolute URL of the Credential resource.

POST /v1/Credentials/{Sid}
curl \
 --request POST 'https://notify.twilio.com/v1/Credentials/{Sid}' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'FriendlyName=Test+slow+create'
Request example
{"FriendlyName"=>"Test slow create"}
Response examples (200)
{
  "sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://notify.twilio.com/v1/Credentials/CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "type": "apn",
  "sandbox": "False",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "date_created": "2015-10-07T17:50:01Z",
  "date_updated": "2015-10-07T17:50:01Z",
  "friendly_name": "Test slow create"
}