Platform APIs Overview
Cloud-based REST APIs for managing the Kubiya platform resources
Platform APIs Overview
The Kubiya Platform APIs are cloud-based REST APIs that allow you to programmatically manage your Kubiya resources including agents (teammates), sources (tool collections), knowledge entries, tasks, and runners.
These APIs are different from the Agent Server APIs which are exposed by orchestration servers for direct agent interactions.
Base URL
All Platform APIs use the following base URL:
Authentication
All Platform API endpoints require authentication using a UserKey:
Available APIs
Tasks API
Execute and manage workflow tasks across your organization
Key endpoints:
GET /api/v1/tasks
- List all tasksPOST /api/v1/tasks
- Create a new taskPUT /api/v1/tasks/{taskId}/cancel
- Cancel running tasksGET /api/v1/tasks/{taskId}/logs
- View task execution logs
Runners API
Deploy and manage Kubernetes operators that execute workflows
Key endpoints:
GET /api/v3/runners
- List all runnersPOST /api/v3/runners/{runner}
- Restart a runnerGET /api/v3/runners/{runner}/health
- Check runner healthPOST /api/v3/runners/{runner}/helm
- Manage Helm integrations
Agents API
Create and manage AI teammates with custom tools and knowledge
Key endpoints:
GET /api/v1/agents
- List all agentsPOST /api/v1/agents
- Create a new agentPUT /api/v1/agents/{agentId}
- Update agent configurationGET /api/v1/agents/{agentId}/integrations
- Manage integrations
Sources API
Manage tool sources and repositories attached to agents
Key endpoints:
GET /api/v1/sources
- List all sourcesPOST /api/v1/sources
- Create a new sourcePUT /api/v1/sources/{sourceId}
- Sync source with repositoryGET /api/v1/sources/load
- Discover and load external sources
Knowledge API
Store and retrieve contextual information for enhanced agent performance
Key endpoints:
GET /api/v1/knowledge
- List all knowledge entriesPOST /api/v1/knowledge
- Create knowledge entryGET /api/v1/knowledge/search
- Search knowledge baseGET /api/v1/knowledge/{id}/versions
- View version history
Common Response Patterns
Success Responses
All successful API responses return appropriate HTTP status codes:
200
- Successful GET, PUT, DELETE operations201
- Successful POST operations (resource created)
Error Responses
All APIs follow a consistent error response format:
Common HTTP error codes:
400
- Bad Request (invalid parameters)401
- Unauthorized (invalid API key)403
- Forbidden (insufficient permissions)404
- Not Found (resource doesn’t exist)500
- Internal Server Error
Pagination
List endpoints that return large datasets use consistent pagination:
Quick Start Example
Here’s a complete example of creating and executing a task:
Rate Limits
The Platform APIs have the following rate limits:
Operation Type | Limit |
---|---|
Read operations (GET) | 1000 requests/minute |
Write operations (POST/PUT) | 200 requests/minute |
Delete operations | 50 requests/minute |
Task creation | 100 tasks/minute |
Search operations | 300 requests/minute |
API Versioning
The Platform APIs use path-based versioning:
/api/v1/
- Current stable version for most resources/api/v2/
- Enhanced version for specific resources (agents)/api/v3/
- Latest version for runners
When breaking changes are introduced, a new version path is created while maintaining backward compatibility for existing versions.
Best Practices
Error Handling
Always implement proper error handling:
Rate Limiting
Implement exponential backoff for rate-limited requests:
Pagination
Handle paginated responses properly:
Security
Keep API keys secure:
- Store in environment variables
- Use secrets management systems
- Rotate keys regularly
- Monitor API usage logs
Need Help?
Agent Server APIs
Direct orchestration server interactions
SDK Documentation
Official SDKs for Python, TypeScript, and Go
Examples
Real-world usage examples and tutorials
What’s Next?
- Set up authentication - Get your API key from the Kubiya dashboard
- Create your first agent - Use the Agents API to create a teammate
- Add knowledge - Enhance your agent with the Knowledge API
- Execute tasks - Run workflows using the Tasks API
- Monitor execution - Track performance with the Runners API