Endpoint Structure
All endpoints follow this pattern:
https://app.kaana.com/api/{resource}Authentication
All endpoints require authentication. Include your API key:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
User
Get Current User
Get information about the authenticated user.
GET /api/user
Response:
{
"id": 123,
"username": "[email protected]",
"role": "admin",
"tenantId": 1
}Projects
List Projects
Get all projects you have access to.
GET /api/projects
Query Parameters:
Parameter | Type | Description |
status | string | Filter by status (active, completed, etc.) |
limit | number | Number of results to return |
offset | number | Pagination offset |
Response:
[
{
"id": 1,
"title": "Project Name",
"description": "Project description",
"status": "active",
"createdAt": "2024-01-15T10:30:00Z"
}
]
Get Project
Get a specific project by ID.
GET /api/projects/:id
Response:
{
"id": 1,
"title": "Project Name",
"description": "Full project description",
"status": "active",
"startDate": "2024-01-01",
"dueDate": "2024-06-30",
"phases": [...],
"milestones": [...]
}Create Project
Create a new project.
POST /api/projects
Request Body:
{
"title": "New Project",
"description": "Project description",
"startDate": "2024-01-01",
"dueDate": "2024-06-30"
}Response: Created project object
Update Project
Update an existing project.
PATCH /api/projects/:id
Request Body:
{
"title": "Updated Title",
"status": "completed"
}Delete Project
Delete a project.
DELETE /api/projects/:id
Tasks
List Project Tasks
Get all tasks for a project.
GET /api/projects/:projectId/tasks
Query Parameters:
Parameter | Type | Description |
status | string | Filter by status |
assigneeId | number | Filter by assignee |
phaseId | number | Filter by phase |
Create Task
Create a new task.
POST /api/projects/:projectId/tasks
Request Body:
{
"title": "Task title",
"description": "Task description",
"status": "not_started",
"priority": "medium",
"dueDate": "2024-03-15",
"assigneeId": 123
}Update Task
Update a task.
PATCH /api/projects/:projectId/tasks/:taskId
Request Body:
{
"status": "completed",
"completedAt": "2024-02-28T10:00:00Z"
}Delete Task
Delete a task.
DELETE /api/projects/:projectId/tasks/:taskId
Contacts
List Contacts
Get all contacts.
GET /api/contacts
Query Parameters:
Parameter | Type | Description |
type | string | Filter by type (internal, external, client, vendor) |
search | string | Search by name or email |
Get Contact
Get a specific contact.
GET /api/contacts/:id
Create Contact
Create a new contact.
POST /api/contacts
Request Body:
{
"fullName": "John Smith",
"email": "[email protected]",
"phone": "+1234567890",
"company": "Acme Corp",
"title": "Project Manager",
"type": "external"
}Update Contact
Update a contact.
PATCH /api/contacts/:id
Delete Contact
Delete a contact.
DELETE /api/contacts/:id
Organizations
List Organizations
Get all organizations.
GET /api/organizations
Get Organization
Get a specific organization.
GET /api/organizations/:id
Create Organization
Create a new organization.
POST /api/organizations
Request Body:
{
"name": "Acme Corporation",
"type": "client",
"website": "https://acme.com",
"industry": "Technology"
}Update Organization
Update an organization.
PATCH /api/organizations/:id
Delete Organization
Delete an organization.
DELETE /api/organizations/:id
Issues
List Issues
Get all issues.
GET /api/issues
Query Parameters:
Parameter | Type | Description |
status | string | Filter by status |
priority | string | Filter by priority |
groupId | number | Filter by issue group |
Get Issue
Get a specific issue.
GET /api/issues/:id
Create Issue
Create a new issue.
POST /api/issues
Request Body:
{
"title": "Issue title",
"description": "Detailed description",
"priority": "high",
"groupId": 1
}Update Issue
Update an issue.
PATCH /api/issues/:id
Delete Issue
Delete an issue.
DELETE /api/issues/:id
Documents
List Documents
Get all documents.
GET /api/documents
Get Document
Get a specific document.
GET /api/documents/:id
Upload Document
Upload a new document.
POST /api/documents
Content-Type: multipart/form-data
Form Fields:
file: The file to uploadname: Document namedescription: Description
Delete Document
Delete a document.
DELETE /api/documents/:id
Activities
List Activities
Get all activities.
GET /api/activities
Query Parameters:
Parameter | Type | Description |
projectId | number | Filter by project |
type | string | Filter by type (meeting, email, note, etc.) |
Create Activity
Log a new activity.
POST /api/activities
Request Body:
{
"title": "Client meeting",
"description": "Discussed project requirements",
"type": "meeting",
"date": "2024-02-15",
"projectId": 1
}Update Activity
Update an activity.
PATCH /api/activities/:id
Delete Activity
Delete an activity.
DELETE /api/activities/:id
Error Codes
Code | Meaning |
200 | Success |
201 | Created |
400 | Bad Request - Invalid input |
401 | Unauthorized - Authentication required |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource doesn't exist |
429 | Too Many Requests - Rate limited |
500 | Server error, something went wrong |
