Stellar API Documentation
Learn how to use the Stellar API to build custom integrations and manage your content programmatically.
Introduction
The Stellar API is accessed by sending POST requests. You can use any programming language capable of making HTTP POST requests, such as PHP, Python, or JavaScript. This guide provides details on how to interact with the API effectively.
Request Format
To interact with the API, you must send properly formatted JSON data to the designated API endpoints.
API Endpoints
API requests should be sent to the following base URL:
https://YOURDOMAIN/api/v1/request=
Requesting a Token
To request an API token, make a POST request without an action. The API will return a token that can be used for subsequent requests.
{ "message": "Token is already created.", "token": "e3990215af5fadae9cdb7868473c08014497a1af", "last_access": "1427737602" }
Making API Requests
Once you have a token, you can start making requests to perform various actions, such as managing content and clients.
{ "params": { "whitelabel_id": "API_ID", "whitelabel_key": "API_KEY", "client_id": "CLIENT_ID", "client_key": "CLIENT_KEY", "token": "YOUR_TOKEN" }, "action": "ACTION_NAME" }
Error Handling
In the case of an invalid request, the API will return error messages formatted as JSON. The following are common error responses:
Invalid Action
{ "error": "bad request" }
Missing Parameters
{ "error": 1, "message": "Missing parameters", "missing_params": [ "category_id", "project_id", "processing_time" ] }
Code Examples
Below are some code wrappers you can use to interact with the Stellar API. These examples are intended for educational purposes. For production, please ensure your code is secure and tested.