API Reference

Overview

This reference provides detailed information about every endpoint, request and response format for the Acme API. Use the navigation on the left to explore resources.

Endpoints

GET /v1/users

Retrieve a list of users.

Query Parameters

{
    "page": "integer (optional) – page number",
    "limit": "integer (optional) – results per page"
}

Response

{
    "data": [
        {
            "id": "string",
            "name": "string",
            "email": "string",
            "created_at": "ISO8601 timestamp"
        }
    ],
    "meta": {
        "total": 120,
        "page": 1,
        "limit": 20
    }
}

Example (cURL)

curl -X GET "https://api.acme.com/v1/users?page=1&limit=20" \
  -H "Authorization: Bearer YOUR_TOKEN"

POST /v1/users

Create a new user.

Request Body

{
    "name": "string",
    "email": "string",
    "password": "string"
}

Response

{
    "id": "string",
    "name": "string",
    "email": "string",
    "created_at": "ISO8601 timestamp"
}

Example (fetch)

fetch('https://api.acme.com/v1/users', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'Authorization': 'Bearer YOUR_TOKEN'
    },
    body: JSON.stringify({
        name: 'Jane Doe',
        email: 'jane@example.com',
        password: 's3cr3t'
    })
}).then(r => r.json()).then(console.log);