🔮Byazma API v2
In this documentation, we describe the functionality of the public parts of the Byazma API.
General architecture
All requests are sent as POST in JSON format. The server also responds in JSON. There is only one endpoint and all parameters must be defined as json object in request body. Finally, for API verification, a checksum must be sent in the form of a header so that the server can respond to the request.
In the following, we will explain the details of these items.
API Keys
for API verification you need two keys:
API_KEY: your public api key.API_SECRET: use this private key to make a checksum.
API endpoint
https://byazma.ir/api/v2/API_KEYBody format
Every API action has a keyword, for example post for receiving content data. These keywords must be defined as a top-level json object in payload. you can also define multiple action in a single request, these actions will be in separate objects in respond body.
{
"post": {
...
},
"blog": {
...
}
}checksum
to create a checksum you must compute HMAC-SHA256 (in hex format) of your request body using your API_SECRET key and send it inbyazma-checksum header.
Respond Body
respond body will contains following objects.
status: general request statusbody(if status is 200) : contains all actions respond object.error(if status is not 200) : error string.
Last updated