API Reference
Complete reference documentation for our API.
Authentication
Our API uses API keys for authentication. You can obtain an API key from your dashboard.
API Key Authentication
Pass your API key in the Authorization header.
curl -X GET "https://api.example.com/v1/items" \
-H "Authorization: Bearer YOUR_API_KEY"bash
Endpoints
List Items
Get a list of all items.
Endpoint
GET /v1/itemsbash
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| page | integer | Page number (default: 1) |
| limit | integer | Items per page (default: 10, max: 100) |
| sort | string | Sort field (e.g., "created_at") |
| order | string | Sort order ("asc" or "desc") |
Example Request
curl -X GET "https://api.example.com/v1/items?page=1&limit=10" \
-H "Authorization: Bearer YOUR_API_KEY"bash
Example Response
{
"data": [
{
"id": "item_1",
"name": "Item 1",
"description": "Description of Item 1",
"created_at": "2023-01-01T00:00:00Z",
"updated_at": "2023-01-01T00:00:00Z"
},
{
"id": "item_2",
"name": "Item 2",
"description": "Description of Item 2",
"created_at": "2023-01-02T00:00:00Z",
"updated_at": "2023-01-02T00:00:00Z"
}
],
"meta": {
"total": 42,
"page": 1,
"limit": 10,
"pages": 5
}
}json
Get Item
Get a specific item by ID.
Endpoint
GET /v1/items/:idbash
Path Parameters
| Parameter | Type | Description |
|---|---|---|
| id | string | Item ID |
Example Request
curl -X GET "https://api.example.com/v1/items/item_1" \
-H "Authorization: Bearer YOUR_API_KEY"bash
Example Response
{
"id": "item_1",
"name": "Item 1",
"description": "Description of Item 1",
"created_at": "2023-01-01T00:00:00Z",
"updated_at": "2023-01-01T00:00:00Z"
}json
Was this page helpful?
Last updated on 3/19/2025