push
POST
https://hermetica.15.204.158.166.sslip.io /client/push-tokens Register a device push token for a profile (iOS, Android, or a web push subscription)
Request body
application/json
dataobjectrequiredShow child parameters
typestringattributesobjectrequiredShow child parameters
tokenstringrequiredplatformstringrequiredvendorstringrequiredenablement_statusstringbackgroundstringdevice_metadataobjectprofileobjectrequired{
"data": {
"type": "push-token",
"attributes": {
"token": "string",
"platform": "ios",
"vendor": "apns",
"enablement_status": "AUTHORIZED",
"background": "AVAILABLE",
"device_metadata": {
"device_id": "string",
"klaviyo_sdk": "string",
"sdk_version": "string",
"device_model": "string",
"os_name": "string",
"os_version": "string",
"app_name": "string",
"app_version": "string",
"app_build": "string",
"app_id": "string",
"environment": "sandbox"
},
"profile": {
"data": {
"type": "profile",
"attributes": {
"email": "string",
"phone_number": "string",
"external_id": "string",
"anonymous_id": "string"
}
}
}
}
}
}Code samples
cURL
curl -X POST "https://hermetica.15.204.158.166.sslip.io/client/push-tokens" \
-H "Authorization: Bearer $SSLIP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"data":{"type":"push-token","attributes":{"token":"string","platform":"ios","vendor":"apns","enablement_status":"AUTHORIZED","background":"AVAILABLE","device_metadata":{"device_id":"string","klaviyo_sdk":"string","sdk_version":"string","device_model":"string","os_name":"string","os_version":"string","app_name":"string","app_version":"string","app_build":"string","app_id":"string","environment":"sandbox"},"profile":{"data":{"type":"profile","attributes":{"email":"string","phone_number":"string","external_id":"string","anonymous_id":"string"}}}}}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
202 Default Response
Example
{
"ok": true
}Schema
okbooleanrequired4XX Default Response
Example
{
"error": {
"code": "string",
"message": "string",
"details": {}
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredmessagestringrequireddetailsobjectPOST
https://hermetica.15.204.158.166.sslip.io /client/push-token-unregister Remove a device push token (logout)
Request body
application/json
dataobjectrequiredShow child parameters
typestringattributesobjectrequiredShow child parameters
tokenstringrequiredplatformstringvendorstringrequiredprofileobject{
"data": {
"type": "push-token-unregister",
"attributes": {
"token": "string",
"platform": "ios",
"vendor": "apns",
"profile": {
"data": {
"type": "profile",
"attributes": {
"email": "string",
"phone_number": "string",
"external_id": "string",
"anonymous_id": "string"
}
}
}
}
}
}Code samples
cURL
curl -X POST "https://hermetica.15.204.158.166.sslip.io/client/push-token-unregister" \
-H "Authorization: Bearer $SSLIP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"data":{"type":"push-token-unregister","attributes":{"token":"string","platform":"ios","vendor":"apns","profile":{"data":{"type":"profile","attributes":{"email":"string","phone_number":"string","external_id":"string","anonymous_id":"string"}}}}}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
GET
https://hermetica.15.204.158.166.sslip.io /client/push-config The workspace's VAPID public key, for browsers subscribing to web push
Parameters
company_idstringquerykstringqueryCode samples
cURL
curl -X GET "https://hermetica.15.204.158.166.sslip.io/client/push-config" \
-H "Authorization: Bearer $SSLIP_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"vapidPublicKey": "string"
}Schema
vapidPublicKeystringrequiredGET
https://hermetica.15.204.158.166.sslip.io /v1/push-tokens Registered devices, newest first; filter by profile, vendor or validity
Parameters
limitintegerquerycursorstringqueryprofileIdstringqueryvendorstringqueryvalidstringqueryCode samples
cURL
curl -X GET "https://hermetica.15.204.158.166.sslip.io/v1/push-tokens" \
-H "Authorization: Bearer $SSLIP_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"id": "string",
"profileId": "string",
"token": "string",
"platform": "ios",
"vendor": "apns",
"appId": "string",
"environment": "sandbox",
"enablementStatus": "AUTHORIZED",
"background": "AVAILABLE",
"deviceMetadata": {},
"lastSeenAt": "2024-01-01T00:00:00Z",
"invalidatedAt": "2024-01-01T00:00:00Z",
"invalidReason": "string",
"createdAt": "2024-01-01T00:00:00Z"
}
],
"nextCursor": "string"
}Schema
itemsobject[]requiredShow child parameters
idstringrequiredprofileIdstringrequiredtokenstringrequiredplatformstringrequiredvendorstringrequiredappIdstringrequiredenvironmentstringrequiredenablementStatusstringrequiredbackgroundstringrequireddeviceMetadataobjectrequiredlastSeenAtstringrequiredinvalidatedAtstringrequiredinvalidReasonstringrequiredcreatedAtstringrequirednextCursorstringrequiredPOST
https://hermetica.15.204.158.166.sslip.io /v1/push-tokens Register a device for a profile (server side; the SDKs use /client/push-tokens)
Request body
application/json
profileIdstringrequiredtokenstringrequiredplatformstringrequiredvendorstringrequiredappIdstringenvironmentstringenablementStatusstringbackgroundstringdeviceMetadataobject{
"profileId": "string",
"token": "string",
"platform": "ios",
"vendor": "apns",
"appId": "string",
"environment": "production",
"enablementStatus": "AUTHORIZED",
"background": "AVAILABLE",
"deviceMetadata": {}
}Code samples
cURL
curl -X POST "https://hermetica.15.204.158.166.sslip.io/v1/push-tokens" \
-H "Authorization: Bearer $SSLIP_API_KEY" \
-H "Content-Type: application/json" \
-d '{"profileId":"string","token":"string","platform":"ios","vendor":"apns","appId":"string","environment":"production","enablementStatus":"AUTHORIZED","background":"AVAILABLE","deviceMetadata":{}}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
201 Default Response
Example
{
"id": "string",
"profileId": "string",
"token": "string",
"platform": "ios",
"vendor": "apns",
"appId": "string",
"environment": "sandbox",
"enablementStatus": "AUTHORIZED",
"background": "AVAILABLE",
"deviceMetadata": {},
"lastSeenAt": "2024-01-01T00:00:00Z",
"invalidatedAt": "2024-01-01T00:00:00Z",
"invalidReason": "string",
"createdAt": "2024-01-01T00:00:00Z"
}Schema
idstringrequiredprofileIdstringrequiredtokenstringrequiredplatformstringrequiredvendorstringrequiredappIdstringrequiredenvironmentstringrequiredenablementStatusstringrequiredbackgroundstringrequireddeviceMetadataobjectrequiredlastSeenAtstringrequiredinvalidatedAtstringrequiredinvalidReasonstringrequiredcreatedAtstringrequiredGET
https://hermetica.15.204.158.166.sslip.io /v1/push-tokens/{id} One registered device; `profileId` names the profile it belongs to
Parameters
idstringpathrequiredCode samples
cURL
curl -X GET "https://hermetica.15.204.158.166.sslip.io/v1/push-tokens/{id}" \
-H "Authorization: Bearer $SSLIP_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
DELETE
https://hermetica.15.204.158.166.sslip.io /v1/push-tokens/{id} Delete a registered device
Parameters
idstringpathrequiredCode samples
cURL
curl -X DELETE "https://hermetica.15.204.158.166.sslip.io/v1/push-tokens/{id}" \
-H "Authorization: Bearer $SSLIP_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
GET
https://hermetica.15.204.158.166.sslip.io /v1/profiles/{id}/push-tokens The devices registered for one profile, including ones the provider rejected
Parameters
limitintegerqueryPage size; omitted returns the whole list
cursorstringqueryOpaque: the
nextCursor of the previous pageidstringpathrequiredCode samples
cURL
curl -X GET "https://hermetica.15.204.158.166.sslip.io/v1/profiles/{id}/push-tokens" \
-H "Authorization: Bearer $SSLIP_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
POST
https://hermetica.15.204.158.166.sslip.io /v1/push/vapid-keys Generate a VAPID key pair for a web push connection. The private key is returned once and is not stored here: put it in the connection.
Code samples
cURL
curl -X POST "https://hermetica.15.204.158.166.sslip.io/v1/push/vapid-keys" \
-H "Authorization: Bearer $SSLIP_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"publicKey": "string",
"privateKey": "string"
}Schema
publicKeystringrequiredprivateKeystringrequiredUpdated