ApiNotes API – API Documentation Example

This page is a live api documentation example built entirely with the ApiNotes editor. It demonstrates how a real-world REST API is documented — complete with authentication, endpoints, request/response samples, error codes, and more — all generated from an OpenAPI specification.

Introduction

Welcome to the ApiNotes API — a RESTful service for managing users, projects, and tasks within an organization. This example of api documentation showcases how ApiNotes transforms an OpenAPI spec into beautiful, interactive documentation your developers will love.

Whether you are looking for an api document template to follow for your own project or evaluating tools to learn how to create api documentation, this guide covers everything from authentication and endpoints to error handling, rate limits, webhooks, and SDK integrations.

The ApiNotes API follows REST conventions: it uses predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes and verbs. Every section below is a practical api documentation template you can replicate in minutes using the ApiNotes editor.

Try it yourself: Everything on this page was generated from a single OpenAPI spec using the ApiNotes editor. Upload your own spec to get an api documentation template like this in minutes.

Authentication

The ApiNotes API uses Bearer token authentication. Include your API key in the Authorization header with every request. You can generate API keys from the ApiNotes dashboard under Settings → API Keys.

cURL – Authentication
curl -X GET https://api.apinotes.example.com/v1/users \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
MethodHeaderDescription
Bearer TokenAuthorization: Bearer <key>Recommended for server-to-server calls. Tokens never expire but can be revoked.
OAuth 2.0Authorization: Bearer <access_token>Use for user-level access. Tokens expire after 1 hour and must be refreshed.

API Overview

The API is organized around REST principles. All requests and responses use JSON. This section provides a high-level overview — the kind of content an api documentation example always includes upfront so developers can orient themselves quickly.

Base URL

All API requests are made to the following base URL:

Base URL
https://api.apinotes.example.com/v1

Quick Start

Get up and running in three steps:

  1. Get your API key — Sign up at apinotes.example.com and navigate to Settings → API Keys.
  2. Make your first request — Use the cURL example below to list all users in your organization.
  3. Explore the endpoints — Browse the full endpoint reference below to see what's possible.
Quick Start – List Users
curl https://api.apinotes.example.com/v1/users?limit=5 \
  -H "Authorization: Bearer tf_live_abc123xyz"

Endpoints

The ApiNotes API exposes the following resource endpoints for user management. Each entry below follows the same pattern you would find in any professional api documentation template: HTTP method, path, description, parameters, and example request/response pairs.

List Users

GET/v1/users

Returns a paginated list of all users in your organization. Results are sorted by creation date (newest first). Use query parameters to filter and paginate.

Query Parameters

NameTypeRequiredDescription
pageintegerNoPage number (default: 1)
limitintegerNoResults per page (default: 20, max: 100)
rolestringNoFilter by role: admin, member, viewer
searchstringNoSearch by name or email (case-insensitive)

Example Request

cURL
curl https://api.apinotes.example.com/v1/users?page=1&limit=10&role=admin \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200 OK

JSON Response
{
  "data": [
    {
      "id": "usr_a1b2c3d4",
      "name": "Jane Cooper",
      "email": "[email protected]",
      "role": "admin",
      "avatar": "https://cdn.apinotes.example.com/avatars/jane.jpg",
      "createdAt": "2025-01-15T09:30:00Z",
      "lastLoginAt": "2026-02-16T14:22:10Z"
    },
    {
      "id": "usr_e5f6g7h8",
      "name": "Marcus Chen",
      "email": "[email protected]",
      "role": "member",
      "avatar": null,
      "createdAt": "2025-03-22T11:00:00Z",
      "lastLoginAt": "2026-02-15T08:45:33Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "total": 47,
    "totalPages": 5
  }
}

Get User by ID

GET/v1/users/:id

Retrieve detailed information about a single user by their unique identifier.

Path Parameters

NameTypeRequiredDescription
idstringYesThe user's unique ID (e.g. usr_a1b2c3d4)

Example Request

cURL
curl https://api.apinotes.example.com/v1/users/usr_a1b2c3d4 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200 OK

JSON Response
{
  "id": "usr_a1b2c3d4",
  "name": "Jane Cooper",
  "email": "[email protected]",
  "role": "admin",
  "avatar": "https://cdn.apinotes.example.com/avatars/jane.jpg",
  "projects": 12,
  "tasksCompleted": 348,
  "createdAt": "2025-01-15T09:30:00Z",
  "lastLoginAt": "2026-02-16T14:22:10Z",
  "settings": {
    "timezone": "America/New_York",
    "notifications": true,
    "theme": "dark"
  }
}

Create User

POST/v1/users

Creates a new user in your organization. The user will receive a welcome email with instructions to set their password.

Request Body

FieldTypeRequiredDescription
namestringYesFull name (2–100 characters)
emailstringYesValid email address (must be unique)
rolestringNoOne of admin, member, viewer. Default: member
teamIdstringNoAssign the user to a team on creation

Example Request

cURL
curl -X POST https://api.apinotes.example.com/v1/users \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Alex Rivera",
    "email": "[email protected]",
    "role": "member",
    "teamId": "team_frontend"
  }'

Response 201 Created

JSON Response
{
  "id": "usr_z9y8x7w6",
  "name": "Alex Rivera",
  "email": "[email protected]",
  "role": "member",
  "avatar": null,
  "createdAt": "2026-02-17T10:15:00Z",
  "lastLoginAt": null
}

Update User

PUT/v1/users/:id

Update one or more fields on an existing user. Only the fields you include in the request body will be changed — all other fields remain unchanged (partial update).

Example Request

cURL
curl -X PUT https://api.apinotes.example.com/v1/users/usr_a1b2c3d4 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "role": "admin", "name": "Jane M. Cooper" }'

Response 200 OK

Returns the full updated user object (same shape as Get User).

Delete User

DELETE/v1/users/:id

Permanently deletes a user from the organization. This action cannot be undone. All tasks assigned to the user will be unassigned.

Example Request

cURL
curl -X DELETE https://api.apinotes.example.com/v1/users/usr_a1b2c3d4 \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 204 No Content

An empty response body is returned on successful deletion.

Error Handling

The API uses standard HTTP status codes to indicate success or failure. When an error occurs, the response body contains a structured JSON object with a machine-readable code and a human-readable message. Proper error handling is a critical part of any api documentation example.

Status CodeMeaningDescription
200OKThe request succeeded.
201CreatedA new resource was created.
204No ContentThe resource was deleted successfully.
400Bad RequestThe request body is malformed or missing required fields.
401UnauthorizedNo valid API key was provided.
403ForbiddenThe API key doesn't have permission for this action.
404Not FoundThe requested resource does not exist.
422UnprocessableValidation failed (e.g. duplicate email).
429Too Many RequestsRate limit exceeded. See Rate Limits.
500Server ErrorAn unexpected error occurred on our end.

Error Response Format

JSON – Error Response
{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "The email address is already in use.",
    "details": [
      {
        "field": "email",
        "issue": "must be unique across the organization"
      }
    ]
  }
}

Pagination

All list endpoints return paginated results. The response includes a pagination object with the current page, limit, total count, and total pages. Use the page and limit query parameters to navigate through results.

Pagination Object
"pagination": {
  "page": 2,
  "limit": 20,
  "total": 147,
  "totalPages": 8
}
Tip: Set limit to the maximum value of 100 to minimize the number of API calls when syncing large datasets.

Rate Limits

To ensure fair usage and platform stability, the API enforces rate limits on all endpoints. If your limit is exceeded, you will receive a 429 Too Many Requests response. Rate limit headers are included in every response.

PlanRequests / minuteBurst limit
Free6010 / second
Pro60030 / second
Enterprise6,000100 / second

Rate Limit Headers

Response Headers
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 594
X-RateLimit-Reset: 1708185600

Webhooks

Webhooks let you receive real-time HTTP callbacks when events occur in your ApiNotes workspace. Instead of polling the API, register a URL and we'll POST event payloads to it. This is a powerful pattern commonly documented in any thorough api documentation example.

Supported Events

EventDescription
user.createdA new user was added to the organization.
user.updatedA user's profile was modified.
user.deletedA user was permanently removed.
task.completedA task was marked as complete.
project.archivedA project was archived.

Webhook Payload Example

JSON – Webhook Event
{
  "event": "user.created",
  "timestamp": "2026-02-17T10:15:00Z",
  "data": {
    "id": "usr_z9y8x7w6",
    "name": "Alex Rivera",
    "email": "[email protected]",
    "role": "member"
  }
}
Important: Your webhook endpoint must respond with a 200 OK within 5 seconds. If we receive no response or a non-2xx status code, we will retry delivery up to 5 times with exponential backoff.

SDKs & Libraries

Official client libraries are available for popular languages. Each SDK handles authentication, serialization, and error handling so you can focus on building.

Node.js

npm install @apinotes/sdk

Python

pip install apinotes-sdk

Go

go get github.com/apinotes/sdk-go

SDK Quick Example (Node.js)

JavaScript
import ApiNotes from '@apinotes/sdk';

const client = new ApiNotes({ apiKey: 'tf_live_abc123xyz' });

// List all admin users
const admins = await client.users.list({ role: 'admin' });
console.log(admins.data);

// Create a new user
const newUser = await client.users.create({
  name: 'Alex Rivera',
  email: '[email protected]',
  role: 'member'
});
console.log('Created:', newUser.id);

SDK Quick Example (Python)

Python
import apinotes

client = apinotes.Client(api_key="tf_live_abc123xyz")

# List users with pagination
users = client.users.list(page=1, limit=50)
for user in users["data"]:
    print(f"{user['name']} - {user['role']}")

# Get a specific user
user = client.users.get("usr_a1b2c3d4")
print(user["email"])

Versioning

The API uses URL-based versioning. The current version is v1. When breaking changes are introduced, a new version (e.g. v2) will be released and the previous version will be supported for at least 12 months.

Non-breaking changes — such as adding new optional fields to responses or new endpoints — are made without a version bump. We recommend that your client code ignores unknown JSON keys for forward compatibility.

Best Practices

Follow these recommendations to get the most out of the ApiNotes API. These tips apply to any integration and reflect the standards you'd see in a well-crafted api documentation template.

  1. Use idempotency keys — For POST requests, include an Idempotency-Key header to safely retry requests without creating duplicate resources.
  2. Handle rate limits gracefully — Check X-RateLimit-Remaining headers and implement exponential backoff when you hit 429 responses.
  3. Validate webhook signatures — Each webhook delivery includes an X-ApiNotes-Signature header. Verify it using your webhook secret to prevent spoofed events.
  4. Paginate large datasets — Never assume all results are in a single page. Always check pagination.totalPages and iterate.
  5. Keep API keys secure — Store keys in environment variables. Never commit them to source control or expose them in client-side code.

Changelog

Recent updates to the ApiNotes API:

Added New search query parameter on List Users endpoint.
Added Webhook support for project.archived event.
Improved Rate limit headers now included in all responses.
Fixed Resolved edge case where DELETE /users/:id returned 500 for already-deleted users.

Create Your Own API Documentation

This page is just one api documentation example of what you can build with ApiNotes. Whether you need a quick api document template for an internal service or a full public developer portal, our editor makes it easy to learn how to create api documentation that is clear, consistent, and beautiful.

Here's what the ApiNotes editor gives you out of the box:

📄

OpenAPI Import

Upload any OpenAPI 3.x spec and get instant, structured documentation with endpoints, schemas, and examples.

✏️

Rich Markdown Editor

Write guides, tutorials, and conceptual docs alongside your API reference with callouts, code blocks, and tables.

🚀

One-Click Publish

Publish your documentation to a custom domain with dark/light theme, search, and responsive design built in.

Ready to build your own?

Create a free api documentation template in minutes — no credit card required.

Open the Editor →