API Documentation
Complete reference for the TESTAPIS REST API. No authentication required to read — sign up to start building.
Authentication
Use API keys for programmatic access. Include in the Authorization header: Authorization: Bearer YOUR_API_KEY Create API keys from your dashboard.
Public Collections
Read-only access without authentication.
List public collections:
GET http://localhost:3000/api/public
Get records from a public collection:
GET http://localhost:3000/api/public/{slug}?page=1&limit=20
Get a single record from a public collection:
GET http://localhost:3000/api/public/{slug}/{recordId}Private Collections
Requires authentication. Users can only access their own collections. Collection names must be unique per user.
List your collections:
GET http://localhost:3000/api/collection
Create a collection:
POST http://localhost:3000/api/collection
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{ "name": "My Collection", "description": "Optional description" }
Get a collection:
GET http://localhost:3000/api/collection/{collectionId}
Update a collection:
PATCH http://localhost:3000/api/collection/{collectionId}
{ "name": "New Name", "description": "Updated description" }
Delete a collection:
DELETE http://localhost:3000/api/collection/{collectionId}Records
List records:
GET http://localhost:3000/api/collection/{collectionId}/{slug}?page=1&limit=20
Create a record:
POST http://localhost:3000/api/collection/{collectionId}/{slug}
{ "data": { "name": "John", "age": 30 } }
Update a record (partial merge):
PATCH http://localhost:3000/api/collection/{collectionId}/{slug}/{recordId}
{ "data": { "age": 31 } }
Replace a record (full replace):
PUT http://localhost:3000/api/collection/{collectionId}/{slug}/{recordId}
{ "data": { "name": "Jane", "role": "admin" } }
Delete a record:
DELETE http://localhost:3000/api/collection/{collectionId}/{slug}/{recordId}Pagination
All list endpoints support pagination:
?page=1&limit=20
Response includes pagination metadata:
{
"data": [...],
"pagination": {
"page": 1,
"limit": 20,
"total": 100,
"totalPages": 5
}
}
Maximum page size: 100Errors
All errors follow this format:
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable message."
}
}
Common error codes:
- 401 UNAUTHORIZED — Missing or invalid authentication
- 403 FORBIDDEN — Access denied
- 403 COLLECTION_LIMIT_REACHED — Free plan limit (5 collections)
- 403 RECORD_LIMIT_REACHED — Free plan limit (50 records per collection)
- 400 BAD_REQUEST — Invalid input or validation error
- 404 NOT_FOUND — Resource not found
- 409 CONFLICT — Resource already exists
- 413 PAYLOAD_TOO_LARGE — Request body too large
- 429 RATE_LIMITED — Too many requestsRate Limits
Rate limits per minute: - Anonymous: 60 requests - Free: 120 requests - Pro: 600 requests When exceeded, returns 429 Too Many Requests.
Ready to get started?
Create a free account to build collections, manage records, and access the full API.