zkcloud-docs
Search…
Introduction

Introduction

The zkcloud api is build on HTTP. Our API is RESTful Api.

BaseURL

All API calls referenced in our documentation start with a base URL.It’s also important to note that our platform uses URI versioning for our API endpoints,
Our base URL is:
1
https://api.zkcloud.systems/
Copied!

Authentication

The zkcloud api use API Keys to authenticate all requests. You can view and manage your API Keys in the settings page.
Please keep it in a safe place so that it will not be published. If you don't need to use api keys, delete the api keys in the settings paes.
Authentication to the API is performed via bearer auth. use -H .
To test requests using your account, replace the <API_TOKEN> with your actual API key.
1
curl -H "Authorization: Bearer <API_TOKEN>"
Copied!

Versioning

We adopt media Type Versioning uses the Accept header of the request to specify the version. You add v=1 on the headers to request all apis.
1
curl -H "Accept: application/json;v=1" -H "Authorization: Bearer <API_TOKEN>" http://localhost:4000/proofs
Copied!

Date Format

JSON does not have a built-in date type, dates are passed as strings encoded according to RFC 2822#page-14.
1
'Sun, 03 Oct 2021 14:02:46 GMT'
Copied!

Status Codes

HTTP response status codes indicate whether a specific HTTP request has been successfully completed.
StatusCode
Description
200 - OK
API works well.
204 - No Content
No Content indicates that the server has successfully fulfilled the request and that there is no additional content to send in the response payload body.
401 - Unauthorized
Unauthorized Error is an HTTP response status code indicating that the request sent by the client could not be authenticated.
403 - Forbidden
Forbidden error is meaning access to the requested resource is forbidden.
404 - Not Found
The server can not find the requested resource.
429 - Too Many Requests
The user has sent too many requests in a given amount of time.
500, 502, 503, 504 - Server Errors
The server has encountered a situation it doesn't know how to handle.

Error Response

Error Reponse format is following.
1
{
2
"error": {
3
"message":"invalid token",
4
"type":"invalid_request_error"
5
}
6
}
Copied!
Error type means the type of errors in the server. Message means actual error message.
ErrorType
Description
api_error
API Error message, it means something went wrong with the API request.
invalid_request_error
Represents a validation error when users do not respond to mandatory questions.