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.
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 -X GET https://api.apinotes.example.com/v1/users \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"| Method | Header | Description |
|---|---|---|
| Bearer Token | Authorization: Bearer <key> | Recommended for server-to-server calls. Tokens never expire but can be revoked. |
| OAuth 2.0 | Authorization: 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:
https://api.apinotes.example.com/v1Quick Start
Get up and running in three steps:
- Get your API key — Sign up at
apinotes.example.comand navigate to Settings → API Keys. - Make your first request — Use the cURL example below to list all users in your organization.
- Explore the endpoints — Browse the full endpoint reference below to see what's possible.
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
/v1/usersReturns 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
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number (default: 1) |
limit | integer | No | Results per page (default: 20, max: 100) |
role | string | No | Filter by role: admin, member, viewer |
search | string | No | Search by name or email (case-insensitive) |
Example Request
curl https://api.apinotes.example.com/v1/users?page=1&limit=10&role=admin \
-H "Authorization: Bearer YOUR_API_KEY"Response 200 OK
{
"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
/v1/users/:idRetrieve detailed information about a single user by their unique identifier.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The user's unique ID (e.g. usr_a1b2c3d4) |
Example Request
curl https://api.apinotes.example.com/v1/users/usr_a1b2c3d4 \
-H "Authorization: Bearer YOUR_API_KEY"Response 200 OK
{
"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
/v1/usersCreates a new user in your organization. The user will receive a welcome email with instructions to set their password.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Full name (2–100 characters) |
email | string | Yes | Valid email address (must be unique) |
role | string | No | One of admin, member, viewer. Default: member |
teamId | string | No | Assign the user to a team on creation |
Example Request
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
{
"id": "usr_z9y8x7w6",
"name": "Alex Rivera",
"email": "[email protected]",
"role": "member",
"avatar": null,
"createdAt": "2026-02-17T10:15:00Z",
"lastLoginAt": null
}Update User
/v1/users/:idUpdate 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 -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
/v1/users/:idPermanently deletes a user from the organization. This action cannot be undone. All tasks assigned to the user will be unassigned.
Example Request
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 Code | Meaning | Description |
|---|---|---|
200 | OK | The request succeeded. |
201 | Created | A new resource was created. |
204 | No Content | The resource was deleted successfully. |
400 | Bad Request | The request body is malformed or missing required fields. |
401 | Unauthorized | No valid API key was provided. |
403 | Forbidden | The API key doesn't have permission for this action. |
404 | Not Found | The requested resource does not exist. |
422 | Unprocessable | Validation failed (e.g. duplicate email). |
429 | Too Many Requests | Rate limit exceeded. See Rate Limits. |
500 | Server Error | An unexpected error occurred on our end. |
Error Response Format
{
"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": {
"page": 2,
"limit": 20,
"total": 147,
"totalPages": 8
}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.
| Plan | Requests / minute | Burst limit |
|---|---|---|
| Free | 60 | 10 / second |
| Pro | 600 | 30 / second |
| Enterprise | 6,000 | 100 / second |
Rate Limit Headers
X-RateLimit-Limit: 600
X-RateLimit-Remaining: 594
X-RateLimit-Reset: 1708185600Webhooks
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
| Event | Description |
|---|---|
user.created | A new user was added to the organization. |
user.updated | A user's profile was modified. |
user.deleted | A user was permanently removed. |
task.completed | A task was marked as complete. |
project.archived | A project was archived. |
Webhook Payload Example
{
"event": "user.created",
"timestamp": "2026-02-17T10:15:00Z",
"data": {
"id": "usr_z9y8x7w6",
"name": "Alex Rivera",
"email": "[email protected]",
"role": "member"
}
}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)
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)
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.
- Use idempotency keys — For
POSTrequests, include anIdempotency-Keyheader to safely retry requests without creating duplicate resources. - Handle rate limits gracefully — Check
X-RateLimit-Remainingheaders and implement exponential backoff when you hit429responses. - Validate webhook signatures — Each webhook delivery includes an
X-ApiNotes-Signatureheader. Verify it using your webhook secret to prevent spoofed events. - Paginate large datasets — Never assume all results are in a single page. Always check
pagination.totalPagesand iterate. - 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:
project.archived event. 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.