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
oneOf
Responses
200: Mobile push credential created
- application/json
401: Unauthorized request
- application/json
422: Unable to process request
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/mobile_push_credentials' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"type": "ios",
"certificate": "-----BEGIN CERTIFICATE----- MIIGVDCCBTKCAQEAsNlRJVZn9ZvXcECQm65czs... -----END CERTIFICATE-----",
"private_key": "-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAsNlRJVZn9ZvXcECQm65czs... -----END RSA PRIVATE KEY-----",
"alias": "LucyIosCredential"
}'
Response samples
{
"data": {
"id": "0ccc7b54-4df3-4bcb-a65a-3da1ecc997d7",
"certificate": "-----BEGIN CERTIFICATE----- MIIGVDCCBTKCAQEAsNlRJVZn9ZvXcECQm65czs... -----END CERTIFICATE-----",
"private_key": "-----BEGIN RSA PRIVATE KEY----- MIIEpQIBAAKCAQEAsNlRJVZn9ZvXcECQm65czs... -----END RSA PRIVATE KEY-----",
"project_account_json_file": {
"private_key": "BBBB0J56jd8kda:APA91vjb11BCjvxx3Jxja...",
"client_email": "account@customer.org"
},
"alias": "LucyCredential",
"type": "ios",
"record_type": "push_credential",
"created_at": "2021-03-26T17:51:59.588408Z",
"updated_at": "2021-03-26T17:51:59.588408Z"
}
}
{
"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"
}
}
]
}
{
"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"
}
}
]
}