Creates a new mobile push credential
POST/mobile_push_credentials
Creates a new mobile push credential
Request
- application/json
Body
required
Mobile push credential parameters that need to be sent in the request
- Create iOS push credential request
- Create Android Push Credential Request
oneOf
Possible values: [ios
]
Type of mobile push credential. Should be ios
here
Certificate as received from APNs
Corresponding private key to the certificate as received from APNs
Alias to uniquely identify the credential
Possible values: [android
]
Type of mobile push credential. Should be android
here
Server key as received from Google firebase
Alias to uniquely identify the credential
Responses
200: Mobile push credential created
- application/json
- Schema
- Example (from schema)
Schema
data
object
Unique identifier of a push credential
Apple certificate for sending push notifications. For iOS only
Apple private key for a given certificate for sending push notifications. For iOS only
Google server key for sending push notifications. For Android only
Alias to uniquely identify a credential
Type of mobile push credential. Either ios
or android
ISO 8601 timestamp when the room was created
ISO 8601 timestamp when the room was updated.
{
"data": {
"id": "0ccc7b54-4df3-4bcb-a65a-3da1ecc997d7",
"certificate": "-----BEGIN CERTIFICATE----- MIIGVDCCBTKCAQEAsNlRJVZn9ZvXcECQm65czs... -----END CERTIFICATE-----",
"private_key": "-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAsNlRJVZn9ZvXcECQm65czs... -----END RSA PRIVATE KEY-----",
"server_key": "",
"alias": "LucyCredential",
"type": "ios",
"record_type": "push_credential",
"created_at": "2021-03-26T17:51:59.588408Z",
"updated_at": "2021-03-26T17:51:59.588408Z"
}
}
401: Unauthorized request
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
errors
Error[]
source
object
JSON pointer (RFC6901) to the offending entity.
Indicates which query parameter caused the error.
{
"errors": [
{
"code": 10015,
"title": "Bad Request",
"detail": "has already been taken",
"source": {
"pointer": "/mobile_push_credentials",
"parameter": "application_name"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}
422: Unable to process request
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
errors
Error[]
source
object
JSON pointer (RFC6901) to the offending entity.
Indicates which query parameter caused the error.
{
"errors": [
{
"code": 10015,
"title": "Bad Request",
"detail": "has already been taken",
"source": {
"pointer": "/mobile_push_credentials",
"parameter": "application_name"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}