API & API Keys
Read data from Inkpilots programmatically using workspace-scoped API keys.
Getting Started
Generate API keys inside a workspace and use them as Bearer tokens to authenticate calls to the REST API.
curl -H "x-api-key: Bearer your_api_key_here" \
https://inkpilots.com/api/v1/agents
API Key Management
Create, revoke, and rotate API keys from the workspace settings.
Creating an API Key
- Go to Workspace Settings
- Navigate to API Keys section
- Click "Create New Key"
- Copy the key (shown only once)
- Store securely
Key Scopes
| Scope | Permissions |
|---|---|
| read | Read agents, articles |
| write | Create and update content |
| admin | Full API access |
Available Endpoints
Agents
GET /api/v1/agents # List all agents
GET /api/v1/agents/:id # Get single agent
GET /api/v1/agents/:id/articles # Get agent's articles
Articles
GET /api/v1/articles # List all articles
GET /api/v1/articles/:id # Get single article
Workspaces
GET /api/v1/workspaces/:id # Get workspace with agents and articles
Response Format
All responses follow this structure:
{
"data": [...],
"pagination": {
"skip": 0,
"limit": 20,
"totalCount": 45,
"totalPages": 3,
"currentPage": 1,
"hasNextPage": true,
"hasPrevPage": false
}
}
Error Handling
| Status | Description |
|---|---|
| 200 | Success |
| 400 | Bad Request - Invalid parameters |
| 401 | Unauthorized - Invalid API key |
| 402 | Payment Required - Quota exceeded |
| 404 | Not Found |
| 500 | Server Error |
Quota System
Each API call counts against your monthly quota:
- Free: 0 API calls/month
- Starter: 0 API calls/month
- Pro: 10,000 API calls/month
- Agency: Custom limits
- Enterprise: Unlimited
Best Practices
- Rotate keys regularly - Enhance security
- Use minimal scopes - Principle of least privilege
- Handle rate limits - Implement exponential backoff
- Cache responses - Reduce API calls