push

Embed
Preview of the card
<a href="https://hermeticor.com/docs/ref-push"><img src="https://hermeticor.com/docs/_api/public/orgs/5fcd8b3c-a27c-4688-972f-de710125592f/spaces/caf5dc05-15f7-4e0c-bdb8-ab29ede6211e/pages/01d5381a-8fd9-4459-a219-291e9fa5495a/social-card.svg?v=3e7ae33eec8b" alt="push" width="600" height="315"></a>
GEThttps://hermeticor.com/v1/push/stats

Push sends, deliveries, failures, opens and retired devices for a window

Parameters

fromstringquery
tostringquery

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/push/stats" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "sent": 0,
  "delivered": 0,
  "failed": 0,
  "blocked": 0,
  "opened": 0,
  "invalidTokens": 0,
  "blockReasons": [
    {
      "reason": "string",
      "count": 0
    }
  ],
  "sdkDelivered": 0,
  "converted": 0
}
Schema
sentintegerrequired
deliveredintegerrequired
failedintegerrequired
blockedintegerrequired
openedintegerrequired
invalidTokensintegerrequired
blockReasonsBlockReasonsItem[]required
Show child parameters
reasonstringrequired
countintegerrequired
sdkDeliveredinteger
convertedinteger
4XX Default Response
Example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  }
}
Schema
errorobjectrequired
Show child parameters
codestringrequired
messagestringrequired
detailsobject
5XX Default Response

Same as 4XX · GET /v1/push/stats

POSThttps://hermeticor.com/v1/push/test-send

Send a push template (with a flow step's extras) to a test profile's devices or one pasted device token, through the normal send checks

Request body

application/json
profileIdstring
pushTokenobject
Show child parameters
tokenstringrequired
vendorstringrequired
apns | fcm | expo | web_push
platformstringrequired
ios | android | web
appIdstring
templateIdstringrequired
pushobject
Show child parameters
imageUrlstring
urlstring
dataobject
badgeinteger
soundstring
ttlSecondsinteger
prioritystring
high | normal
collapseKeystring
iosobject
Show child parameters
titlestring
bodystring
imageUrlstring
urlstring
soundstring
badgeinteger
androidobject
Show child parameters
titlestring
bodystring
imageUrlstring
urlstring
soundstring
badgeinteger
webobject
Show child parameters
titlestring
bodystring
imageUrlstring
urlstring
soundstring
badgeinteger
connectionIdstring
purposestring
marketing | transactional | operational = marketing
{
  "profileId": "string",
  "pushToken": {
    "token": "string",
    "vendor": "apns",
    "platform": "ios",
    "appId": "string"
  },
  "templateId": "string",
  "push": {
    "imageUrl": "string",
    "url": "string",
    "data": {},
    "badge": 0,
    "sound": "string",
    "ttlSeconds": 0,
    "priority": "high",
    "collapseKey": "string",
    "ios": {
      "title": "string",
      "body": "string",
      "imageUrl": "string",
      "url": "string",
      "sound": "string",
      "badge": 0
    },
    "android": {
      "title": "string",
      "body": "string",
      "imageUrl": "string",
      "url": "string",
      "sound": "string",
      "badge": 0
    },
    "web": {
      "title": "string",
      "body": "string",
      "imageUrl": "string",
      "url": "string",
      "sound": "string",
      "badge": 0
    }
  },
  "connectionId": "string",
  "purpose": "marketing"
}

Code samples

cURL
curl -X POST "https://hermeticor.com/v1/push/test-send" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"profileId":"string","pushToken":{"token":"string","vendor":"apns","platform":"ios","appId":"string"},"templateId":"string","push":{"imageUrl":"string","url":"string","data":{},"badge":0,"sound":"string","ttlSeconds":0,"priority":"high","collapseKey":"string","ios":{"title":"string","body":"string","imageUrl":"string","url":"string","sound":"string","badge":0},"android":{"title":"string","body":"string","imageUrl":"string","url":"string","sound":"string","badge":0},"web":{"title":"string","body":"string","imageUrl":"string","url":"string","sound":"string","badge":0}},"connectionId":"string","purpose":"marketing"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "sent": 0,
  "blocked": 0,
  "jobIds": [
    "string"
  ]
}
Schema
sentintegerrequired
blockedintegerrequired
jobIdsstring[]required
4XX Default Response

Same as 4XX · GET /v1/push/stats

5XX Default Response

Same as 4XX · GET /v1/push/stats

GEThttps://hermeticor.com/v1/campaigns/{id}/push

A push campaign's title, body and extras (image, link, data, badge, sound, TTL, per-platform overrides)

Parameters

idstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/campaigns/{id}/push" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "templateId": "string",
  "title": "string",
  "body": "string",
  "extras": {
    "imageUrl": "string",
    "url": "string",
    "data": {},
    "badge": 0,
    "sound": "string",
    "ttlSeconds": 0,
    "priority": "high",
    "collapseKey": "string",
    "ios": {
      "title": "string",
      "body": "string",
      "imageUrl": "string",
      "url": "string",
      "sound": "string",
      "badge": 0
    },
    "android": {
      "title": "string",
      "body": "string",
      "imageUrl": "string",
      "url": "string",
      "sound": "string",
      "badge": 0
    },
    "web": {
      "title": "string",
      "body": "string",
      "imageUrl": "string",
      "url": "string",
      "sound": "string",
      "badge": 0
    }
  }
}
Schema
templateIdstringrequired
titlestringrequired
bodystringrequired
extrasobjectrequired
Show child parameters
imageUrlstring
urlstring
dataobject
badgeinteger
soundstring
ttlSecondsinteger
prioritystring
high | normal
collapseKeystring
iosobject
Show child parameters
titlestring
bodystring
imageUrlstring
urlstring
soundstring
badgeinteger
androidobject
Show child parameters
titlestring
bodystring
imageUrlstring
urlstring
soundstring
badgeinteger
webobject
Show child parameters
titlestring
bodystring
imageUrlstring
urlstring
soundstring
badgeinteger
4XX Default Response

Same as 4XX · GET /v1/push/stats

5XX Default Response

Same as 4XX · GET /v1/push/stats

PUThttps://hermeticor.com/v1/campaigns/{id}/push

Set the content of a draft push campaign

Parameters

idstringpathrequired

Request body

application/json
titlestringrequired
bodystringrequired
extrasobject
= {}
Show child parameters
imageUrlstring
urlstring
dataobject
badgeinteger
soundstring
ttlSecondsinteger
prioritystring
high | normal
collapseKeystring
iosobject
Show child parameters
titlestring
bodystring
imageUrlstring
urlstring
soundstring
badgeinteger
androidobject
Show child parameters
titlestring
bodystring
imageUrlstring
urlstring
soundstring
badgeinteger
webobject
Show child parameters
titlestring
bodystring
imageUrlstring
urlstring
soundstring
badgeinteger
{
  "title": "string",
  "body": "string",
  "extras": {}
}

Code samples

cURL
curl -X PUT "https://hermeticor.com/v1/campaigns/{id}/push" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"string","body":"string","extras":{}}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 200 · GET /v1/campaigns/{id}/push

4XX Default Response

Same as 4XX · GET /v1/push/stats

5XX Default Response

Same as 4XX · GET /v1/push/stats

GEThttps://hermeticor.com/v1/campaigns/{id}/push-stats

Push numbers of one campaign: sent, delivered, failed, opened, devices retired, and why sends were held back

Parameters

idstringpathrequired

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/campaigns/{id}/push-stats" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response

Same as 200 · GET /v1/push/stats

4XX Default Response

Same as 4XX · GET /v1/push/stats

5XX Default Response

Same as 4XX · GET /v1/push/stats

GEThttps://hermeticor.com/v1/push/live

Live notifications, newest first

Parameters

profileIdstringquery
statusstringquery
active | ended | blocked | failed
limitintegerquery
Page size; omitted returns the whole list
cursorstringquery
Opaque: the nextCursor of the previous page

Code samples

cURL
curl -X GET "https://hermeticor.com/v1/push/live" \
  -H "Authorization: Bearer $HERMETICOR_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Default Response
Example
{
  "items": [
    {
      "id": "string",
      "profileId": "string",
      "kind": "ios_live_activity",
      "activityType": "string",
      "attributes": {},
      "contentState": {},
      "status": "active",
      "purpose": "string",
      "updates": 0,
      "hasUpdateToken": true,
      "lastError": "string",
      "staleAt": "string",
      "endedAt": "string",
      "createdAt": "string",
      "updatedAt": "string"
    }
  ],
  "nextCursor": "string"
}
Schema
itemsPostV1PushLiveResponse[]required
Show child parameters
idstringrequired
profileIdstringrequired
kindstringrequired
ios_live_activity | android_ongoing
activityTypestringrequired
attributesobjectrequired
contentStateobjectrequired
statusstringrequired
active | ended | blocked | failed
purposestringrequired
updatesintegerrequired
hasUpdateTokenbooleanrequired
lastErrorstringrequired
staleAtstringrequired
endedAtstringrequired
createdAtstringrequired
updatedAtstringrequired
nextCursorstringrequired
4XX Default Response

Same as 4XX · GET /v1/push/stats

5XX Default Response

Same as 4XX · GET /v1/push/stats

Updated