Call'em when you need'em.
You can create a free account or log in if you already have one and get your API key.
Our API domain is always going to be api.electrolytic.app, unless noted otherwise with any endpoint.
At the moment, we have following endpoints
Please use https protocol with all the calls.
Send a push notification to users or connected devices.
URL: api.electrolytic.app/push/send
Method: POST
Request Format: JSON body
Response: JSON
E.g. Request body:
{
"appKey": "<Your-API-Key>",
"appSecret": "APP-SECRET",
"target": ["e1ad9a4eca0c1d7ae02d052401"],
"payload": "hola, here's a push!"
}
| Key | Type | Required? | Default | Description |
|---|---|---|---|---|
appKey | String | Yes | | Your APP Key |
appSecret | String | Yes | | Your APP's Secret Key |
target | Array of Strings | Yes | | An array of target tokens that you want to receive the payload. Must always be an array or the request will be rejected. |
payload | String|Object | Yes | | The payload that you want delivered. Max 350 bytes in size. |
E.g. Success Response:
{
"id": "317c17d9",
"status": "accepted"
}
| Key | Type | Required? | Default | Description |
|---|---|---|---|---|
id | String | | The ID for that push request. Can be used later to check /push/status | |
status | String | | accepted or rejected |
E.g. Error Response:
{
"error": '"payload" exceeds maximum size of 350 bytes.'
}
This endpoint can be used to check the status of any push notification, was it delivered or not, when was it delivered, etc.
URL: api.electrolytic.app/push/status
Method: GET
Request Format: URL Query
Response: JSON
| Key | Type | Required? | Default | Description |
|---|---|---|---|---|
appKey | String | Yes | | Your APP Key |
id | String | Yes | | The ID of the push you received from the /push/send call. |
E.g. Request: https://api.electrolytic.app/push/status?appKey=<Your-API-Key>&id=pushId
{
"result": [
{
"delivered": true,
"cancelled": false,
"deliveredAt": 1613036435874,
"payload": "hola, here's a push!",
"target": "e1ad9a4eca0c1d7ae02d052401"
}
]
}
You can call this endpoint to get any config. You don't need to call it on the client-side because the SDK has a built-in electrolytic.configs.get() method.
URL: api.electrolytic.app/config/get
Method: GET
Request Format: URL Query
Response: JSON
| Key | Type | Required? | Default | Description |
|---|---|---|---|---|
appKey | String | Yes | | Your APP Key |
configId | String | Yes | | The ID of the config you need to retrieve. |
E.g. Request: https://api.electrolytic.app/config/get?appKey=<Your-API-Key>&configId=configId
{
"id": "mdsome3u48hkajdo93",
"name": "first config",
"version": 2,
"config": {
"my": "value",
"another": "value here"
}
}
For any issues, suggestions or questions regarding the docs, please use this repo.