All skills
Skillintermediate

API Reference

[Brief description of the API]

Claude Code Knowledge Pack7/10/2026

Overview

API Reference

Overview

[Brief description of the API]

Base URL: https://api.example.com
Current Version: v1
Format: JSON

Authentication

[How to authenticate]

Authorization: Bearer YOUR_API_KEY

See Authentication Guide for details.

Rate Limiting

[Rate limit policy]

Limits:

  • Requests per hour: [number]
  • Requests per day: [number]

Headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 742
X-RateLimit-Reset: 1641654000

Endpoints

[Resource Name]

List [Resources]

GET /api/[resource]

Retrieves a paginated list of [resources].

Query Parameters:

ParameterTypeRequiredDefaultDescription
pageintegerNo1Page number
limitintegerNo20Items per page
sortstringNocreated_atSort field
orderstringNodescSort order (asc/desc)

Response: 200 OK

{
  "data": [
    {
      "id": "123",
      "field": "value"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 100
  }
}

Example:

curl -H "Authorization: Bearer TOKEN" \\
  "https://api.example.com/api/resource?page=1&limit=10"

Errors:

  • 401 Unauthorized: Invalid or missing token
  • 429 Too Many Requests: Rate limit exceeded

Get [Resource]

GET /api/[resource]/:id

Retrieves a single [resource] by ID.

Path Parameters:

  • id (required): Resource ID

Response: 200 OK

{
  "id": "123",
  "field": "value",
  "created_at": "2025-01-10T14:30:00Z"
}

Example:

curl -H "Authorization: Bearer TOKEN" \\
  https://api.example.com/api/resource/123

Errors:

  • 401 Unauthorized: Invalid or missing token
  • 404 Not Found: Resource does not exist

Create [Resource]

POST /api/[resource]

Creates a new [resource].

Request Body:

{
  "field1": "value1",
  "field2": "value2"
}

Fields:

FieldTypeRequiredDescription
field1stringYesDescription
field2integerNoDescription

Response: 201 Created

{
  "id": "124",
  "field1": "value1",
  "field2": "value2",
  "created_at": "2025-01-10T14:30:00Z"
}

Example:

curl -X POST \\
  -H "Authorization: Bearer TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{"field1":"value1"}' \\
  https://api.example.com/api/resource

Errors:

  • 400 Bad Request: Invalid request body
  • 401 Unauthorized: Invalid or missing token
  • 422 Unprocessable Entity: Validation failed

Update [Resource]

PATCH /api/[resource]/:id

Updates an existing [resource].

Path Parameters:

  • id (required): Resource ID

Request Body:

{
  "field1": "new value"
}

Response: 200 OK

{
  "id": "123",
  "field1": "new value",
  "updated_at": "2025-01-10T15:00:00Z"
}

Example:

curl -X PATCH \\
  -H "Authorization: Bearer TOKEN" \\
  -H "Content-Type: application/json" \\
  -d '{"field1":"new value"}' \\
  https://api.example.com/api/resource/123

Errors:

  • 400 Bad Request: Invalid request body
  • 401 Unauthorized: Invalid or missing token
  • 404 Not Found: Resource does not exist
  • 422 Unprocessable Entity: Validation failed

Delete [Resource]

DELETE /api/[resource]/:id

Deletes a [resource].

Path Parameters:

  • id (required): Resource ID

Response: 204 No Content

Example:

curl -X DELETE \\
  -H "Authorization: Bearer TOKEN" \\
  https://api.example.com/api/resource/123

Errors:

  • 401 Unauthorized: Invalid or missing token
  • 404 Not Found: Resource does not exist

Error Responses

All error responses follow this format:

{
  "error": {
    "code": "ERROR_CODE",
    "message": "Human-readable message",
    "details": {
      "field": "Additional context"
    }
  }
}

Error Codes

CodeHTTP StatusDescription
UNAUTHORIZED401Invalid or missing authentication
FORBIDDEN403Insufficient permissions
NOT_FOUND404Resource not found
VALIDATION_ERROR422Request validation failed
RATE_LIMIT429Too many requests
SERVER_ERROR500Internal server error

Webhooks

[If applicable]

[Describe webhook system]

SDKs and Libraries

[If available]