> ## Documentation Index
> Fetch the complete documentation index at: https://docs.slog.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Unified cross-resource search

> Runs a single text query across tasks, projects, and milestones and returns one
mixed, ranked result set. Each result is tagged with its `type`.

The `q` parameter accepts the Slog search query syntax — a whitespace-separated
list of terms ANDed together, with `-` for negation and comma for OR-within-a-field.
Terms may be free-text keywords, `field:value` filters, or `is:`/`has:`/`no:`
aliases. A few examples:

```
is:open assignee:@me priority:>=high due:<=+7d
billing is:overdue
type:task is:blocked team:ENG no:assignee
ref:^ENG-
```

Type-specific fields implicitly narrow which kinds are searched (e.g. `priority:`
restricts to tasks). See the Search guide for the full grammar.




## OpenAPI

````yaml /api/openapi.yaml get /search
openapi: 3.1.0
info:
  title: Slog API
  version: 1.0.0
  description: >
    Slog is an AI-native project management tool. This reference covers the core
    REST API

    for managing tasks, projects, teams, milestones, workspaces, and invites.


    ## Authentication


    All authenticated endpoints accept either an **API key** (header
    `slog-api-key`) or a

    **Bearer token** (header `Authorization: Bearer <token>`). Tokens are
    returned by the

    signup, invite-redeem, and OAuth flows. API keys can be created in the Slog
    dashboard.


    ## Field selection


    Every list and get endpoint accepts a `fields` query parameter to control
    which fields

    are returned. Use comma-separated field names; nested objects can be
    selected with brace

    notation:


    ```

    fields=id,title,status,assignee{name,email}

    ```


    When omitted, a default set of fields is returned for each resource.


    ## Filtering


    List endpoints support structured filters using bracket notation:


    ```

    filter[eq][status]=TODO

    filter[contains][title]=auth

    filter[in][status]=TODO&filter[in][status]=IN_PROGRESS

    filter[gte][dueDate]=2026-01-01

    ```


    Supported operators: `eq`, `neq`, `gt`, `gte`, `lt`, `lte`, `contains`,
    `startsWith`, `in`.


    ## Sorting


    ```

    sort[createdAt]=desc

    sort[title]=asc

    ```


    ## Pagination


    List endpoints use cursor-based pagination. Pass the `nextCursor` from the
    previous

    response as the `cursor` parameter to fetch the next page. A `null`
    nextCursor means

    you've reached the end.
  contact:
    url: https://slog.ai
servers:
  - url: https://slog.ai
    description: Production
  - url: http://localhost:3020
    description: Local development
security:
  - ApiKey: []
  - BearerToken: []
tags:
  - name: Health
    description: Liveness check. No authentication required.
  - name: Authentication
    description: Sign up, log in, and inspect the current user.
  - name: Tasks
    description: >
      Tasks are the primary unit of work. They belong to a team and optionally
      to a project.

      Subtasks are created by setting `parentId` on the child task. Each task
      gets a

      human-readable reference code like `ENG-42` derived from its team prefix.
  - name: Projects
    description: Projects group related tasks within a team and can contain milestones.
  - name: Teams
    description: >
      Teams are the organizational unit that owns tasks and projects. Each team
      has a short

      prefix (e.g. `ENG`) used to generate task and project reference codes.
      Teams can be

      nested via `parentId`.
  - name: Milestones
    description: Milestones represent time-boxed goals. They live under a project.
  - name: Workspaces
    description: >-
      A workspace is the top-level container. Users belong to one or more
      workspaces.
  - name: Invites
    description: Invite new members to a workspace by email.
  - name: Agents
    description: Create and manage AI agent users within a workspace.
  - name: API Keys
    description: Manage API keys for the current user and their owned agents.
  - name: Fields
    description: >
      Custom field definitions for extending resource types. Built-in fields
      (id, title,

      status, etc.) are automatically included in list responses. Custom fields
      are

      workspace-scoped and can target one or more resource types.
  - name: Batch
    description: Fetch multiple resources in a single round-trip.
  - name: Search
    description: >
      Unified, cross-resource text search over tasks, projects, and milestones
      using a

      single human-friendly query syntax. See the Search guide for the full
      grammar.
  - name: Import/Export
    description: Export a resource to a portable format and import it back.
  - name: Comments
    description: Comments can be added to tasks, projects, or milestones.
  - name: Labels
    description: >-
      Labels are workspace-scoped tags that can be attached to tasks and
      projects.
  - name: Team Members
    description: Manage team membership and roles.
  - name: Users
    description: User accounts within the workspace.
paths:
  /search:
    get:
      tags:
        - Search
      summary: Unified cross-resource search
      description: >
        Runs a single text query across tasks, projects, and milestones and
        returns one

        mixed, ranked result set. Each result is tagged with its `type`.


        The `q` parameter accepts the Slog search query syntax — a
        whitespace-separated

        list of terms ANDed together, with `-` for negation and comma for
        OR-within-a-field.

        Terms may be free-text keywords, `field:value` filters, or
        `is:`/`has:`/`no:`

        aliases. A few examples:


        ```

        is:open assignee:@me priority:>=high due:<=+7d

        billing is:overdue

        type:task is:blocked team:ENG no:assignee

        ref:^ENG-

        ```


        Type-specific fields implicitly narrow which kinds are searched (e.g.
        `priority:`

        restricts to tasks). See the Search guide for the full grammar.
      operationId: search
      parameters:
        - name: q
          in: query
          required: true
          schema:
            type: string
          description: The search query, in the Slog search query syntax.
          example: is:open assignee:@me priority:>=high
        - $ref: '#/components/parameters/LimitParam'
      responses:
        '200':
          description: A page of mixed search results.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
              example:
                results:
                  - type: task
                    id: task_01jqabcd1111
                    reference: ENG-1
                    title: Implement OAuth login
                    status: IN_PROGRESS
                    priority: HIGH
                  - type: project
                    id: proj_01jqproj0001
                    name: Platform v2
                    status: ACTIVE
                  - type: milestone
                    id: mile_01jqmile0001
                    name: v1 Launch
                    status: ACTIVE
                    dueDate: '2026-06-30'
                pagination:
                  limit: 50
                  nextCursor: null
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  parameters:
    LimitParam:
      name: limit
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 250
        default: 50
      description: Maximum number of results to return per page.
  schemas:
    SearchResponse:
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/SearchResultItem'
        pagination:
          $ref: '#/components/schemas/Pagination'
    SearchResultItem:
      description: >
        A single search hit. `type` discriminates the record kind; the remaining
        fields

        are that resource's default field set (which fields are present depends
        on the

        resource type).
      oneOf:
        - allOf:
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - task
            - $ref: '#/components/schemas/Task'
        - allOf:
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - project
            - $ref: '#/components/schemas/Project'
        - allOf:
            - type: object
              required:
                - type
              properties:
                type:
                  type: string
                  enum:
                    - milestone
            - $ref: '#/components/schemas/Milestone'
      discriminator:
        propertyName: type
    Pagination:
      type: object
      properties:
        limit:
          type: integer
          example: 50
        nextCursor:
          type: string
          nullable: true
          description: >-
            Pass this value as `cursor` to fetch the next page. `null` means no
            more pages.
          example: null
    ErrorBody:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: NOT_FOUND
            message:
              type: string
              example: Task not found
            details:
              type: object
              additionalProperties: true
              description: Additional error context, if any.
    Task:
      type: object
      properties:
        id:
          type: string
          description: Unique task ID (UPID).
          example: task_01jqabcd1111
        reference:
          type: string
          description: >-
            Human-readable reference code, e.g. `ENG-42`. Generated
            automatically from the team prefix.
          example: ENG-42
        title:
          type: string
          example: Implement OAuth login
        status:
          $ref: '#/components/schemas/TaskStatus'
        priority:
          allOf:
            - $ref: '#/components/schemas/TaskPriority'
          nullable: true
        description:
          type: string
          nullable: true
          description: Task description in Markdown.
          example: Support Google and GitHub as providers.
        dueDate:
          type: string
          format: date
          nullable: true
          example: '2026-06-15'
        teamId:
          type: string
          description: ID of the team that owns this task.
          example: team_01jqteam0001
        team:
          type: object
          nullable: true
          properties:
            id:
              type: string
              example: team_01jqteam0001
            name:
              type: string
              example: Engineering
            prefix:
              type: string
              example: ENG
        projectId:
          type: string
          nullable: true
          description: ID of the project this task belongs to, if any.
          example: proj_01jqproj0001
        parentId:
          type: string
          nullable: true
          description: >-
            ID of the parent task (for subtasks). Parent must be in the same
            team.
          example: null
        assigneeId:
          type: string
          nullable: true
          example: user_01jquser0001
        assignee:
          allOf:
            - $ref: '#/components/schemas/User'
          nullable: true
        labels:
          type: array
          items:
            $ref: '#/components/schemas/Label'
        createdAt:
          type: string
          format: date-time
          example: '2026-05-01T10:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-05-10T14:30:00.000Z'
    Project:
      type: object
      properties:
        id:
          type: string
          example: proj_01jqproj0001
        reference:
          type: string
          description: Human-readable reference code, e.g. `ENG-P1`.
          example: ENG-P1
        name:
          type: string
          example: Platform v2
        status:
          $ref: '#/components/schemas/ProjectStatus'
        description:
          type: string
          nullable: true
          example: Full rewrite of the platform backend.
        teamId:
          type: string
          example: team_01jqteam0001
        team:
          type: object
          nullable: true
          properties:
            id:
              type: string
              example: team_01jqteam0001
            name:
              type: string
              example: Engineering
            prefix:
              type: string
              example: ENG
        labels:
          type: array
          items:
            $ref: '#/components/schemas/Label'
        createdAt:
          type: string
          format: date-time
          example: '2026-04-01T08:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-05-01T12:00:00.000Z'
    Milestone:
      type: object
      properties:
        id:
          type: string
          example: mile_01jqmile0001
        reference:
          type: string
          description: Human-readable reference code.
          example: ENG-M1
        name:
          type: string
          example: Beta Launch
        status:
          $ref: '#/components/schemas/MilestoneStatus'
        description:
          type: string
          nullable: true
          example: First public beta release.
        startDate:
          type: string
          format: date
          nullable: true
          example: '2026-05-01'
        dueDate:
          type: string
          format: date
          nullable: true
          example: '2026-07-01'
        labels:
          type: array
          items:
            $ref: '#/components/schemas/Label'
        createdAt:
          type: string
          format: date-time
          example: '2026-04-01T08:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2026-05-01T10:00:00.000Z'
    TaskStatus:
      type: string
      enum:
        - TODO
        - IN_PROGRESS
        - IN_REVIEW
        - BLOCKED
        - DONE
        - CANCELLED
      description: Lifecycle status of a task.
    TaskPriority:
      type: string
      enum:
        - LOW
        - MEDIUM
        - HIGH
        - URGENT
      description: Priority level of a task.
    User:
      type: object
      properties:
        id:
          type: string
          description: Unique user ID (UPID).
          example: user_01jquser0001
        name:
          type: string
          example: Alex Johnson
        email:
          type: string
          format: email
          example: alex@example.com
        avatarUrl:
          type: string
          nullable: true
          example: null
        humanId:
          type: string
          nullable: true
          description: For agent users, the ID of the human who owns this agent.
          example: null
    Label:
      type: object
      properties:
        id:
          type: string
          example: label_01jqlabel001
        name:
          type: string
          example: bug
        color:
          type: string
          nullable: true
          description: Hex color string, e.g. `#EF4444`.
          example: '#EF4444'
    ProjectStatus:
      type: string
      enum:
        - PLANNING
        - ACTIVE
        - ON_HOLD
        - COMPLETED
        - CANCELLED
      description: Lifecycle status of a project.
    MilestoneStatus:
      type: string
      enum:
        - PLANNING
        - ACTIVE
        - COMPLETED
        - CANCELLED
      description: Lifecycle status of a milestone.
  responses:
    BadRequest:
      description: Bad request — missing or invalid input.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            error:
              code: BAD_REQUEST
              message: teamId is required
    Unauthorized:
      description: Missing or invalid authentication credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorBody'
          example:
            error:
              code: UNAUTHORIZED
              message: Authentication required
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: slog-api-key
      description: >
        API key obtained from the Slog dashboard or returned by the
        signup/invite-redeem

        flows. Pass as the `slog-api-key` header.
    BearerToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        JWT obtained from an OAuth callback or the CLI device-flow. Pass as
        `Authorization: Bearer <token>`.

````