API Endpoints

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.

#   Overview

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.

#   /push/send

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!"
}
      
KeyTypeRequired?DefaultDescription
appKeyStringYesYour APP Key
appSecretStringYesYour APP's Secret Key
targetArray of StringsYesAn array of target tokens that you want to receive the payload. Must always be an array or the request will be rejected.
payloadString|ObjectYesThe payload that you want delivered. Max 350 bytes in size.

E.g. Success Response:

{
  "id": "317c17d9",
  "status": "accepted"
}
      
KeyTypeRequired?DefaultDescription
idStringThe ID for that push request. Can be used later to check /push/status
statusStringaccepted or rejected

E.g. Error Response:

{
  "error": '"payload" exceeds maximum size of 350 bytes.'
}
      

#   /push/status

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

KeyTypeRequired?DefaultDescription
appKeyStringYesYour APP Key
idStringYesThe 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"
    }
  ]
}
      

#   /config/get

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

KeyTypeRequired?DefaultDescription
appKeyStringYesYour APP Key
configIdStringYesThe ID of the config you need to retrieve.

E.g. Request: https://api.electrolytic.app/config/get?appKey=<Your-API-Key>&configId=configId

Example Response
{
  "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.