Register an installation
curl --request PUT \
--url https://pushctl.com/api/v1/installations/{installationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": {
"identifier": "<string>"
}
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({provider: {identifier: '<string>'}})
};
fetch('https://pushctl.com/api/v1/installations/{installationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pushctl.com/api/v1/installations/{installationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'provider' => [
'identifier' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://pushctl.com/api/v1/installations/{installationId}"
payload = { "provider": { "identifier": "<string>" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "<string>",
"installation_id": "<string>",
"platform": "ios",
"provider_identifier_type": "apns_token",
"status": "active",
"permission": "unknown",
"device": {
"app_version": "<string>",
"os_version": "<string>",
"model": "<string>",
"locale": "<string>",
"timezone": "<string>"
},
"registered_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"identifier_updated_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"permission_updated_at": "2023-11-07T05:31:56Z",
"invalidated_at": "2023-11-07T05:31:56Z",
"invalid_reason": "<string>"
}
}{
"message": "Unauthenticated."
}{
"message": "This action is unauthorized."
}{
"message": "<string>",
"errors": {}
}Installations
Register an installation
Creates or replaces an installation and associates it with an optional external user.
PUT
/
api
/
v1
/
installations
/
{installationId}
Register an installation
curl --request PUT \
--url https://pushctl.com/api/v1/installations/{installationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"provider": {
"identifier": "<string>"
}
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({provider: {identifier: '<string>'}})
};
fetch('https://pushctl.com/api/v1/installations/{installationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pushctl.com/api/v1/installations/{installationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'provider' => [
'identifier' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://pushctl.com/api/v1/installations/{installationId}"
payload = { "provider": { "identifier": "<string>" } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"data": {
"id": "<string>",
"installation_id": "<string>",
"platform": "ios",
"provider_identifier_type": "apns_token",
"status": "active",
"permission": "unknown",
"device": {
"app_version": "<string>",
"os_version": "<string>",
"model": "<string>",
"locale": "<string>",
"timezone": "<string>"
},
"registered_at": "2023-11-07T05:31:56Z",
"last_seen_at": "2023-11-07T05:31:56Z",
"identifier_updated_at": "2023-11-07T05:31:56Z",
"user_id": "<string>",
"permission_updated_at": "2023-11-07T05:31:56Z",
"invalidated_at": "2023-11-07T05:31:56Z",
"invalid_reason": "<string>"
}
}{
"message": "Unauthenticated."
}{
"message": "This action is unauthorized."
}{
"message": "<string>",
"errors": {}
}Authorizations
Use an application-scoped token with the ability required by the endpoint.
Path Parameters
Stable client-generated installation identifier. Maximum 255 characters.
Maximum string length:
255Body
application/json
Available options:
ios, android Show child attributes
Show child attributes
Available options:
unknown, not_determined, authorized, provisional, ephemeral, denied Maximum string length:
255Example:
"user-123"
Show child attributes
Show child attributes
Response
Installation registered.
Show child attributes
Show child attributes
Was this page helpful?