Create Push Credential

This operation creates Credentials for sending Push Notifications. A credential must always be registered under an App. If an App with the given `appName` already exists, the credential is added under the App. Otherwise, a new App with the given name is created. * There is a limit of 10 Apps per account * Creating a credential with a new `appName` while at the App limit will cause the creation to fail. * There is a limit of 10 Credentials per App * Creating a credential under an App that already has the maximum amount of credentials will cause the creation to fail.

Authentication

AuthorizationBasic

Basic authentication of the form Basic <account_id:auth_token>.

OR
AuthorizationBasic

Basic authentication of the form Basic <api_key:api_key_secret>.

Request

This endpoint expects an object.
credentialTypeenumRequired
The credential types available for PushNotifications.
Allowed values:
contentobjectRequired
Credential properties are specific to the channel type and provided by the vendor that supports it.
appNamestringRequiredformat: "^[a-z0-9_]+$"1-64 characters

The name of the App that this Credential will be associated with.

Twilio will automatically create a new Push Notification App on your behalf when you create a Credential with a new appName.

The first App created will automatically be assigned as the default App.

isDefaultbooleanOptionalDefaults 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
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error