API Endpoints
Welcome to theDocs API documentation! Below you will find information on how to interact with our API, including authentication, available endpoints, possible responses, and error codes.
Getting Started
To get started, you Don't need to authenticate by obtaining an API key. The key will be included in the headers of your requests.
Authentication
To access the API, you dont need authentication or API Key to use our API endpoints. You can start using our API by visiting our documentation. All API requests require the following base_url:
BASE_URL: https://thedocs.loma.com.ng/api.php/
Endpoints
Responses
API responses are returned in JSON format. Here's an example of a successful response:
{
"status": "success",
"data": {
"id": 1,
"name": "John Doe"
}
}
Users Response:
{
"status": "success",
"data": [
{
"id": "1",
"name": "John Doe",
"email": "john.doe@example.com",
"created_at": "2025-01-05 21:54:20"
}
],
"message": null
}
Posts Response:
{
"status": "success",
"data": [
{
"id": "1",
"title": "A Sample Post",
"body": "This is the content of the sample post.",
"created_at": "2025-01-05 21:55:57"
}
],
"message": null
}
Images Response:
{
"status": "success",
"data": [
{
"id": "1",
"url": "http://example.com/image1.jpg",
"description": "A beautiful sunset"
}
],
"message": null
}
Invalid Endpoint Response:
{
"status": "error",
"data": null,
"message": "Invalid endpoint"
}
Error Codes
400
- Bad Request401
- Unauthorized404
- Not Found500
- Internal Server Error