Projects API

Project API access follows the current Keito permissions and active project assignments of the user bound to the credential.

Visibility and Permissions

Identity Read Create Update, archive, restore Delete
Owner or Administrator All workspace projects Yes Yes Yes
Manager with Edit projects Actively assigned projects Yes Only assigned projects they manage No
Other active internal user Actively assigned projects No No No
Personal read-only sync key Assigned project list and item reads No No No

Changing a role, Manager permission, active assignment, or project-manager status takes effect on the next request. A missing, cross-workspace, or unassigned project returns 404, so callers cannot use the API to discover inaccessible records.

Rates, fees, budgets, task budgets, and internal costs are omitted unless the bound user has the corresponding financial visibility in Keito. Collection, item, and mutation responses use the same redaction.

List Projects

GET /api/v2/projects

Supported query parameters are is_active, client_id, updated_since, owner_id, page, and per_page. Personal read-only sync keys support is_active, owner_id, page, and per_page only.

curl "https://app.keito.ai/api/v2/projects?is_active=true&per_page=100" \
  -H "Authorization: Bearer $KEITO_API_KEY" \
  -H "Keito-Account-Id: $KEITO_ACCOUNT_ID"

Get a Project

GET /api/v2/projects/{id}

A successful item read returns an ETag for the exact permission-filtered representation. Financial-visibility changes therefore change the validator.

Create a Project

POST /api/v2/projects

client_id and name are required. You may also set owner_id, code, notes, dates, task_ids, and consistent billing and budget settings. Commercial properties require the same elevated billable-rate permission as the Keito interface.

curl -X POST "https://app.keito.ai/api/v2/projects" \
  -H "Authorization: Bearer $KEITO_API_KEY" \
  -H "Keito-Account-Id: $KEITO_ACCOUNT_ID" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: project-create-001" \
  --data '{"client_id":"client_id","name":"Example project","code":"EXAMPLE"}'

Omit task_ids to assign workspace default tasks, or pass an empty array to assign none. Cross-workspace or inactive relationship IDs are rejected. A successful create returns 201 Created, Location, and ETag.

Update, Archive, or Restore

PATCH /api/v2/projects/{id}

Owners and Administrators may update any visible project. A Manager needs Edit projects and must currently manage that project. Use is_active: false to archive and is_active: true to restore. Set owner_id to change the project owner, or null to clear it. The owner must be an active employee or contractor in the workspace.

curl -X PATCH "https://app.keito.ai/api/v2/projects/$PROJECT_ID" \
  -H "Authorization: Bearer $KEITO_API_KEY" \
  -H "Keito-Account-Id: $KEITO_ACCOUNT_ID" \
  -H "Content-Type: application/json" \
  -H 'If-Match: "etag-from-the-latest-read"' \
  -H "Idempotency-Key: project-update-001" \
  --data '{"name":"Updated project"}'

If-Match is optional for PATCH but strongly recommended. A stale value returns 412 Precondition Failed.

Permanently Delete a Project

DELETE /api/v2/projects/{id}

Permanent deletion is Owner/Administrator-only. The project must already be archived and the request must include the latest If-Match; missing or stale preconditions return 428 or 412. Keito removes project-bound time, expenses, assignments, tasks, and integration mappings while preserving historical invoice lines. Dependencies that cannot be preserved return 409.

Use a disposable project, archive it first, and confirm invoice-history requirements before testing deletion. Deletion cannot be undone.

Tasks and Project Task Budgets

Tasks are reusable across a workspace, while their budgets belong to a task’s assignment to a project. A workspace-global GET /api/v2/tasks omits budget. To return the active project-task assignment budget, pass project_id:

curl "https://app.keito.ai/api/v2/tasks?project_id=$PROJECT_ID&is_active=true" \
  -H "Authorization: Bearer $KEITO_API_KEY" \
  -H "Keito-Account-Id: $KEITO_ACCOUNT_ID"

Use project context when choosing a task for a time entry: Keito validates that the task is actively assigned to the selected project and may apply member-specific task restrictions. Personal read-only sync keys cannot call /api/v2/tasks; their fixed allowlist provides project directory reads only.

budget can be 0 or null. Keito omits it when there is no project context, the assignment is inactive or missing, or the caller cannot view that project’s budget. Nested project tasks follow the same rule. Detect support through project-task-budgets in X-Keito-Features.

To change a task’s budget, rate, or billable setting on a project, use Project Task Assignments.

Project Team (User Assignments)

Add, update, and remove the people assigned to a project. These endpoints follow Harvest’s user_assignments shape and the same rules as the project’s Team settings in Keito. Detect support through project-assignments-v1 in X-Keito-Features.

Method Endpoint Description
GET /api/v2/projects/{project_id}/user_assignments List the project team. Supports is_active, updated_since, page, and per_page.
POST /api/v2/projects/{project_id}/user_assignments Add a person to the project
GET /api/v2/projects/{project_id}/user_assignments/{id} Get one assignment
PATCH /api/v2/projects/{project_id}/user_assignments/{id} Update an assignment, or restore it with is_active: true
DELETE /api/v2/projects/{project_id}/user_assignments/{id} Remove a person from the project

Each assignment returns id, project, user, is_active, is_project_manager, can_track_time, can_view_project_financials, can_view_internal_costs, created_at, and updated_at. use_default_rates, hourly_rate, and budget are included only for callers who can see billable rates. Email addresses are never returned.

POST requires user_id, an active member of the workspace. You may also send is_project_manager, can_track_time, can_view_project_financials, can_view_internal_costs, and budget (person hour budget). PATCH accepts the same fields plus is_active.

On create, use_default_rates may be omitted or set to true; false returns 400 because custom person rates are set in the project editor. An inactive assignment with saved custom rates is not silently reset: restoring it through POST with use_default_rates: true returns 409. Omit that field to restore the assignment with its saved rate, or review its rates in Keito.

curl -X POST "https://app.keito.ai/api/v2/projects/$PROJECT_ID/user_assignments" \
  -H "Authorization: Bearer $KEITO_API_KEY" \
  -H "Keito-Account-Id: $KEITO_ACCOUNT_ID" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: team-add-001" \
  --data '{"user_id":"user_id"}'

DELETE deactivates the assignment, exactly like Remove in Keito. The person’s logged time and history are kept, and you can restore them with PATCH and is_active: true. Assignments are never permanently deleted through the API.

Owners and Administrators can change any field. A Manager with Edit projects who manages the project can add people with the default settings, remove or restore people who are not project managers, and change is_project_manager on an existing assignment only when the workspace lets project managers assign managers. Managers cannot change their own assignment. Everything else, including budget, the visibility flags, and adding someone as a project manager, is Administrator-only. Person hourly rates are read-only in the API because Keito manages them through rate history.

Project Task Assignments

Manage the tasks on a project and each task’s project-specific settings. These endpoints follow Harvest’s task_assignments shape.

Method Endpoint Description
GET /api/v2/projects/{project_id}/task_assignments List the project’s tasks. Supports is_active, updated_since, page, and per_page.
POST /api/v2/projects/{project_id}/task_assignments Assign an existing workspace task to the project
GET /api/v2/projects/{project_id}/task_assignments/{id} Get one task assignment
PATCH /api/v2/projects/{project_id}/task_assignments/{id} Update budget, hourly_rate, billable, or is_active
DELETE /api/v2/projects/{project_id}/task_assignments/{id} Remove a task from the project

Each task assignment returns id, project, task, is_active, created_at, and updated_at. billable and hourly_rate are included when the caller can see the project’s financials, and budget when the caller can see its budget.

curl -X PATCH "https://app.keito.ai/api/v2/projects/$PROJECT_ID/task_assignments/$TASK_ASSIGNMENT_ID" \
  -H "Authorization: Bearer $KEITO_API_KEY" \
  -H "Keito-Account-Id: $KEITO_ACCOUNT_ID" \
  -H "Content-Type: application/json" \
  -H 'If-Match: "etag-from-the-latest-read"' \
  -H "Idempotency-Key: task-budget-001" \
  --data '{"budget":40}'

Send null to clear hourly_rate or budget. A rate change applies to new time only; the API never reprices existing time entries. POST requires task_id and returns 409 if the task is already active on the project. To create a brand-new task on a project, use POST /api/v2/tasks with project_id.

DELETE works like Remove in Keito. If any time was logged against the task on this project, the assignment is archived ("outcome": "archived") and can be restored with PATCH and is_active: true. Only an assignment with no logged time is deleted ("outcome": "deleted").

Any change needs the same access as editing the project: an Owner or Administrator, or a Manager with Edit projects who manages the project. billable, hourly_rate, and budget also require billable-rate permission.

All assignment endpoints return an ETag on item reads and accept If-Match and Idempotency-Key on writes. Projects you cannot see, and assignment IDs from another project or workspace, return 404. Personal read-only sync keys cannot call these endpoints.

Safe Retries and Request Rules

Mutation requests may include an Idempotency-Key containing 8–255 letters, numbers, dots, underscores, or hyphens. The same key, request, precondition, and authorization context replays the stored response for 24 hours. Reusing a key for different input, after a permission change, or while the original request is still running returns 409.

Bodies must be uncompressed UTF-8 application/json, are limited to 128 KiB, and use strict schemas. Unknown properties, empty updates, inconsistent billing settings, invalid date ranges, and out-of-range amounts are rejected. Responses are private, no-store.

Project templates

GET /api/v2/project_templates

Owners/Administrators and Managers with Edit projects can list workspace templates using page and per_page. Choose a returned ID as template_id when creating a project. The template list omits rates, fees and budgets; creating from it applies its configured settings through current permissions.

Review projects for archive

Method Endpoint Purpose
GET /api/v2/projects/archive_review Read inactive candidates, warning reasons and review timestamp
POST /api/v2/projects/archive_review/preflight Recheck up to 100 exact selected IDs and return a short-lived signed review token
POST /api/v2/projects/archive_review/archive Archive exactly the token-bound selection after explicit confirmation

Owners/Administrators see the workspace; Managers with Edit projects see only actively managed projects. Review filters include inactive_days, started_before, imported_only, client_id, search, readiness, page and per_page. Reading candidates changes nothing.

Preflight takes project_ids, criteria and reviewed_at. The archive request must supply the exact review_token, confirm_project_ids, confirm_archive: true, and warning acknowledgement when required. The token expires within 30 minutes and binds user, workspace, IDs and warnings. Activity and permission changes are rechecked before mutation. Inspect per-project outcomes; an archive can stop running timers while preserving project history. Never turn a candidate list into an automatic bulk archive without reviewing and explicitly confirming the exact selection. See OpenAPI for each strict payload.

Guarded MCP Record Maintenance

These POST aliases are the guarded record-maintenance transport used by compatible MCP connectors. They do not change ordinary REST permissions or imply that every connector has enabled the corresponding tools.

Endpoint Allowed operation
/api/v2/projects/{projectId}/mcp_update Rename, restore, or update the listed basic billing/budget fields; preserve ID and history
/api/v2/projects/{projectId}/user_assignments/mcp_add Add or restore ordinary tracking access for an explicit active workspace user
/api/v2/projects/{projectId}/user_assignments/{id}/mcp_remove Deactivate the exact person assignment, preserving history
/api/v2/projects/{projectId}/task_assignments/{id}/mcp_remove Archive an assignment with logged time, or remove an unused assignment; preserve the catalog task

Every request requires a single exact mcp_record_maintenance=true query parameter, a full-access credential with the existing role/project permissions, and an Idempotency-Key. Personal-sync and cost-rate automation keys are not admitted. For OAuth connections, the connector’s route and capability rules still apply.

For updates and removals, first read the exact project or assignment through its ordinary GET endpoint with mcp_record_maintenance=true. The authorized detail read advertises support with X-Keito-Mcp-Record-Maintenance: 1; an absent header is not permission to use another mutation. Echo that record’s current concrete ETag in If-Match, including an issued W/ compression prefix. Missing tags, wildcards and lists are refused. Assignment tag validation is a precheck, not an atomic compare-and-swap.

The add alias accepts only user_id and optional can_track_time: true; it does not grant manager, financial or internal-cost privileges. Restoring an inactive assignment with saved privileges is refused: manage that restore in Keito. An already active assignment conflicts. An ordinary inactive assignment whose tracking was disabled is restored with tracking enabled.

Project update accepts only name, is_active: true (restore), is_billable, is_fixed_fee, bill_by, hourly_rate, fee, budget_by, and budget, with existing financial checks. Generic archive and client moves are refused; use the archive review flow above. Removal is scoped to the exact project and assignment. See OpenAPI for strict field limits and outcomes.

Reuse an idempotency key only for the identical approved request; current authorization is checked on replay. A successful support read does not bind a later request to the same replica. Older replicas may return 404 or 405 before mutation: never fall back to an ordinary REST mutation. The client maintenance alias follows the same support, guard and retry requirements.

Keito is not affiliated with, endorsed or sponsored by Harvest or Bending Spoons.