Search API

Full-text search across the tasks and projects you have access to. Results are always scoped to the companies you are a member of, and internal tasks are excluded for users who are not part of the owning agency.

Search

GET /api/v1/search

Query Parameters

Parameter Type Required Description
q string Yes The search query (1–255 characters)
type string No Comma-separated resource types to search: step, project. Defaults to step,project
company_id integer No Restrict results to a single company you belong to
limit integer No Maximum results per type (1–50). Defaults to 10

Example Request

GET /api/v1/search?q=homepage&type=step,project&limit=5
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json

Example Response

{
  "data": [
    {
      "type": "step",
      "id": 123,
      "title": "Design homepage wireframe",
      "completed": false,
      "phase": { "id": 456, "title": "Design Phase" },
      "project": { "id": 789, "title": "Website Redesign" }
    },
    {
      "type": "project",
      "id": 789,
      "title": "Website Redesign",
      "client": { "id": 101, "title": "Acme Corporation" }
    }
  ],
  "meta": {
    "query": "homepage",
    "types": ["step", "project"],
    "count": 2
  }
}

Result Types

Each result includes a type discriminator. The remaining fields depend on the type:

Type Fields
step id, title, completed, phase (id, title), project (id, title)
project id, title, client (id, title)

Notes

  • Passing a company_id you are not a member of returns 403 Forbidden.
  • The limit applies per type, so a search across both types can return up to 2 × limit results.
  • For agent (OAuth) tokens, this endpoint requires the search scope. See Authentication.