Projects
Access project information and manage project-level settings.
Projects Endpoints
Projects are containers for tickets. Each organization can have multiple projects, and each project can have its own API token for external integrations.
List Projects
Retrieve a list of all projects in an organization.
GET /api/v1/mcp/organizations/:organization_id/projects
Response
{
"projects": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Web Application",
"code": "WEB",
"description": "Main web application project",
"tickets_count": 42,
"open_tickets_count": 12,
"created_at": "2024-01-01T00:00:00Z"
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"name": "Mobile App",
"code": "MOB",
"description": "iOS and Android mobile application",
"tickets_count": 28,
"open_tickets_count": 5,
"created_at": "2024-01-05T00:00:00Z"
}
]
}
Get Organizations
Before listing projects, you need to know the organization ID. Use this endpoint to list all organizations you have access to.
GET /api/v1/mcp/organizations
Response
{
"organizations": [
{
"id": "770e8400-e29b-41d4-a716-446655440002",
"name": "Acme Corp",
"slug": "acme-corp"
}
]
}
Project Tokens
Each project can have its own API token for creating tickets. This is useful for integrating with external services or CI/CD pipelines.
Generate Token (via UI)
- Navigate to the project settings
- Click "Generate API Token"
- Copy the token (it's only shown once)
Using Project Tokens
Project tokens can only be used to create tickets in that specific project. Include the token in the Authorization header:
Authorization: Bearer proj_your_project_token
Example Workflow
1. List Organizations
curl -X GET "https://bugto.me/api/v1/mcp/organizations" \
-H "Authorization: Bearer pk_your_api_token"
2. List Projects in Organization
curl -X GET "https://bugto.me/api/v1/mcp/organizations/770e8400.../projects" \
-H "Authorization: Bearer pk_your_api_token"
3. List Tickets in Project
curl -X GET "https://bugto.me/api/v1/mcp/organizations/770e8400.../tickets?project_id=550e8400..." \
-H "Authorization: Bearer pk_your_api_token"