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

# Search inbox items

> Full-text search and filter the authenticated user's inbox items. Returns matchable-type aggregation counts. Use inboxStatus all for pending Inbox items, followed for followed Opportunities, or archived for dismissed items. Without an inboxStatus or state filter, active items include actioned items. Discover saved views through list_inbox_views, then pass inboxViewId. A view applies its saved filters, ordering and relative time window; only cursor and perPage may accompany inboxViewId. The user's default view is not applied implicitly. Continue with the returned cursor to retain the same relative time window across pages. A missing view or one owned by another user returns 404.




## OpenAPI

````yaml /openapi/tools-v1.yaml post /api/tools/v1/inbox_items/search
openapi: 3.1.0
info:
  title: Govly Tools API
  version: 1.0.0-alpha
  description: >
    ALPHA / UNSTABLE: This API is still in active development. Endpoint
    behavior, request fields, response fields, error codes, and operation names
    may change before the Tools API is declared stable.

    REST-callable tool surface for agent and automation workflows. Agents are
    the primary consumer, but integrations can be built on this API. Responses
    are JSON for typed clients; MCP tools may render action results into
    text-oriented formats separately.

    Validating requests: validate against this schema in your client before
    sending. Govly ignores a request field it does not recognize rather than
    rejecting it, so a misspelled filter name is not applied — the response
    returns 200 with a broader result set than you intended, and nothing marks
    the difference. Where a request body declares `additionalProperties: false`,
    strict client-side validation is what catches that. Fields sent with the
    wrong type are rejected with 400 on most endpoints; validate types in your
    client too rather than relying on it.

    Rate limits: each resource (for example awards, opportunities, or
    workspaces) allows 70 requests per minute per user. Exceeding it returns 429
    with the standard error envelope, `code: rate_limited`, and a `Retry-After`
    header. Keys sent in the `X-API-KEY` header are also subject to the
    Enterprise API limit of 300 requests per minute per key; see the Rate Limits
    page.
servers:
  - url: https://app.govly.com
security:
  - bearerApiKey: []
  - headerApiKey: []
tags:
  - name: Workflows
    description: Workflow reference file management.
  - name: Opportunities
    description: Search, fetch, and inspect Govly opportunity records.
  - name: Awards
    description: Search and inspect awarded government contracts.
  - name: Contacts
    description: Search and inspect government points of contact.
  - name: Signals
    description: Search clustered procurement and market intelligence signals.
  - name: Places
    description: Resolve place names to canonical Govly Place ids.
  - name: Product Catalogs
    description: List government contract price lists and search their line items.
  - name: Workspaces
    description: Create, update, and inspect opportunity workspaces.
  - name: Organization Users
    description: Discover the members of your organization and their account status.
  - name: Workspace Members
    description: Add users and teams to workspaces.
  - name: File Attachments
    description: >-
      Attach new or existing files through a signed Govly transfer or an
      authorized reference.
  - name: Workspace Attachments
    description: List and upload workspace attachments.
  - name: Workspace Comments
    description: Post comments to workspaces.
  - name: Organization Labels
    description: List, create, rename, recolor, and delete the organization's labels.
  - name: Record Labels
    description: >-
      Apply and remove the organization's labels on opportunities, awards,
      contacts, and workspaces.
  - name: Follows
    description: Follow opportunities and related workspace activity.
  - name: Shares
    description: Share opportunities, awards, and contacts with colleagues by email.
  - name: Saved Searches
    description: List saved opportunity searches and cached matches.
  - name: Documents
    description: >-
      Read document representations and request temporary original-file
      downloads.
  - name: Libraries
    description: Discover accessible Libraries and create additional Libraries.
  - name: Library Documents
    description: List and manage documents in a selected Library.
  - name: Quote Submissions
    description: >-
      Inspect quote submission requirements, submit quotes, and poll submission
      status.
  - name: Inbox
    description: Read and triage the authenticated user's matched inbox items.
paths:
  /api/tools/v1/inbox_items/search:
    post:
      tags:
        - Inbox
      summary: Search inbox items
      description: >
        Full-text search and filter the authenticated user's inbox items.
        Returns matchable-type aggregation counts. Use inboxStatus all for
        pending Inbox items, followed for followed Opportunities, or archived
        for dismissed items. Without an inboxStatus or state filter, active
        items include actioned items. Discover saved views through
        list_inbox_views, then pass inboxViewId. A view applies its saved
        filters, ordering and relative time window; only cursor and perPage may
        accompany inboxViewId. The user's default view is not applied
        implicitly. Continue with the returned cursor to retain the same
        relative time window across pages. A missing view or one owned by
        another user returns 404.
      operationId: search_inbox_items
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              properties:
                query:
                  type: string
                cursor:
                  type: string
                  description: >-
                    Opaque cursor from the previous response's meta.nextCursor.
                    Omit for the first page.
                perPage:
                  type: integer
                  default: 25
                  maximum: 100
                inboxViewId:
                  type: string
                  pattern: ^(team_view|[1-9][0-9]{0,18})$
                  description: >-
                    Saved view ID from list_inbox_views, or team_view for All
                    Results. Cannot be combined with explicit filters or sort.
                inboxStatus:
                  type: string
                  enum:
                    - all
                    - followed
                    - archived
                  description: >-
                    all selects pending items; followed selects followed
                    Opportunities; archived selects dismissed items. Takes
                    precedence over state when both are supplied.
                sort:
                  type: string
                  enum:
                    - ranked_score
                    - created_at
                    - deadline_at
                sortDirection:
                  type: string
                  enum:
                    - asc
                    - desc
                state:
                  type: array
                  items:
                    type: string
                    enum:
                      - unread
                      - seen
                      - actioned
                      - dismissed
                matchableType:
                  type: array
                  items:
                    type: string
                    enum:
                      - Opp
                      - Award
                      - ProcurementSignal::Cluster
                recordType:
                  type: array
                  items:
                    type: string
                sourceType:
                  type: string
                  enum:
                    - govly_ai
                    - saved_search
                  description: >-
                    Saved-search origin IDs are ignored when sourceType is
                    govly_ai.
                market:
                  type: string
                  enum:
                    - all
                    - fed
                    - sled
                  description: >-
                    Market scope within the caller's access. all leaves the
                    market unrestricted.
                states:
                  type: array
                  items:
                    type: string
                  description: US state abbreviations for SLED matches, such as CA or CO.
                recordPublicEntityIds:
                  type: array
                  items:
                    $ref: '#/components/schemas/InboxFilterId'
                  description: >-
                    Include canonical PublicEntity buyer IDs and their
                    descendants. Applies to Opportunities and linked SLED
                    Signals.
                recordPublicEntityIdsNone:
                  type: array
                  items:
                    $ref: '#/components/schemas/InboxFilterId'
                  description: >-
                    Exclude canonical PublicEntity buyer IDs and their
                    descendants. Applies to Opportunities and linked SLED
                    Signals.
                keywords:
                  type: array
                  items:
                    type: string
                  description: >-
                    Match any phrase across title, description, buyer names, and
                    identifier. At most 20 distinct nonblank phrases.
                oppSearchIds:
                  type: array
                  items:
                    $ref: '#/components/schemas/InboxFilterId'
                  description: >-
                    Opportunity saved-search origin IDs. Combined with
                    signalSavedSearchIds using OR.
                signalSavedSearchIds:
                  type: array
                  items:
                    $ref: '#/components/schemas/InboxFilterId'
                  description: >-
                    Signal saved-search origin IDs. Combined with oppSearchIds
                    using OR.
                naicsCodes:
                  type: array
                  items:
                    type: string
                createdAfter:
                  type: string
                createdBefore:
                  type: string
                deadlineAtFrom:
                  type: string
                deadlineAtTo:
                  type: string
      responses:
        '200':
          description: Matching inbox items
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                  - aggregations
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/InboxItem'
                  meta:
                    $ref: '#/components/schemas/InboxSearchMeta'
                  aggregations:
                    $ref: '#/components/schemas/InboxAggregations'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '422':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    InboxFilterId:
      description: >-
        Positive canonical ID at most 9223372036854775807. Strings preserve
        precision for large IDs.
      anyOf:
        - type: string
          pattern: ^[1-9][0-9]{0,18}$
        - type: integer
          minimum: 1
          maximum: 9223372036854776000
    InboxItem:
      type: object
      required:
        - id
        - matchableId
        - matchableType
        - state
        - origins
      properties:
        id:
          type: string
        matchableId:
          type: string
        matchableType:
          type: string
          enum:
            - Opp
            - Award
            - ProcurementSignal::Cluster
        state:
          type: string
          enum:
            - unread
            - seen
            - actioned
            - dismissed
        feedback:
          type: string
          enum:
            - followed
            - dismissed
            - bad_fit
        feedbackReason:
          type: string
          enum:
            - bad_fit
            - irrelevant
            - cannot_bid
            - bad_timing
            - other
        title:
          type: string
        description:
          type: string
        fitReason:
          type: string
        fitScore:
          type: number
        sourceType:
          type: string
          enum:
            - govly_ai
            - saved_search
          description: How the item first reached the inbox.
        identifier:
          type: string
        recordType:
          type: string
        deadlineAt:
          type: string
          format: date-time
        postedOrAwardedDate:
          type: string
          format: date
        publicEntityNames:
          type: array
          items:
            type: string
        isoCode:
          type: string
        naicsCodes:
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
        highlight:
          type: object
          description: Per-field search highlights. Only present on search results.
          additionalProperties:
            type: string
        origins:
          type: array
          description: Every source that surfaced this (deduped) item.
          items:
            $ref: '#/components/schemas/InboxItemOrigin'
    InboxSearchMeta:
      type: object
      required:
        - total
        - nextCursor
      properties:
        total:
          type: integer
          description: Total matching items (capped at 10000 by the search index).
        nextCursor:
          type:
            - string
            - 'null'
    InboxAggregations:
      type: object
      required:
        - matchableType
      properties:
        matchableType:
          type: object
          description: Count of matching items per matchable type.
          additionalProperties:
            type: integer
    InboxItemOrigin:
      type: object
      required:
        - sourceType
      properties:
        sourceType:
          type: string
          enum:
            - govly_ai
            - saved_search
        savedSearchId:
          type: string
        savedSearchName:
          type: string
    ErrorEnvelope:
      type: object
      required:
        - errors
      properties:
        errors:
          type: array
          items:
            type: object
            required:
              - status
              - code
              - title
              - detail
            properties:
              status:
                type: string
              code:
                type: string
              title:
                type: string
              detail:
                type: string
              source:
                type: object
                properties:
                  pointer:
                    type: string
    RateLimitError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
  responses:
    Error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    RateLimited:
      description: >
        Too many requests. Two limiters can produce this status and they use
        different bodies. The per-user limit of 70 requests per minute for each
        resource returns the standard error envelope with `code: rate_limited`
        and a `Retry-After` header. Keys sent in the `X-API-KEY` header are also
        subject to the Enterprise API limit of 300 requests per minute per key,
        which returns the plain `error` form with `Retry-After` and the
        `X-RateLimit-*` headers. Clients should accept either body.
      headers:
        Retry-After:
          description: Seconds to wait before retrying.
          schema:
            type: string
      content:
        application/json:
          schema:
            oneOf:
              - $ref: '#/components/schemas/ErrorEnvelope'
              - $ref: '#/components/schemas/RateLimitError'
  securitySchemes:
    bearerApiKey:
      type: http
      scheme: bearer
      bearerFormat: API key
    headerApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.