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

# Query Issues

> Retrieve issues matching a natural-language query with optional project and person filters. Unlike search, which ranks results by semantic relevance, query returns the issues that match the given criteria.

**Authentication behavior:**
- **Personal Access Token (PAT) keys**: Requests are attributed to the key's user
- **Organization-wide API keys**: Requests are attributed to the organization




## OpenAPI

````yaml https://getunblocked.com/api/v1/public-api.json post /context/query/issues
openapi: 3.0.3
info:
  contact:
    email: help@getunblocked.com
    name: Unblocked
  description: >
    The Unblocked Public API offers seamless collection for managing custom data
    sources through a structured set of endpoints.

    It allows users to create collections and organize and upload documents.


    # Base URL

    The base URL for all requests is:


    ```jsx

    https://getunblocked.com/api/v1

    ```


    # Authentication

    Authentication requires an API key, obtainable from the web dashboard,

    which must be included in the `Authorization` request header for all
    endpoints.


    ```bash

    curl -X GET https://getunblocked.com/api/v1/collections \
         -H "Authorization: Bearer YOUR_API_KEY"
    ```


    # Rate Limits & Quotas


    **Resource Limits:**

    - Collections: Maximum 25 per team

    - Request Size: Maximum 10MB per request

    - Pagination: 1-200 items per page (default: 25)


    **Answers API:**

    - Daily Limit: 1000 questions per day per organization

    - Quota Reset: Midnight PST

    - Exceeding the limit returns a 429 Too Many Requests error


    **Field Constraints:**

    - Collection name: 1-32 characters

    - Collection description: 1-4096 characters
  title: Unblocked Public API Reference
  version: v1
  x-logo:
    url: https://avatars.githubusercontent.com/u/91906527?s=300
    altText: Unblocked
servers:
  - url: https://getunblocked.com/api/v1
security:
  - ApiKeyBearerAuth: []
tags:
  - description: >
      A collection in Unblocked allows you to organize related documents from
      various data sources, such as customer support tools, knowledge bases, and
      internal wikis, which are not natively supported by Unblocked.


      You can create multiple collections to manage documents from different
      sources.


      You have the ability to list, create, update, and delete them as needed.


      Deleting a collection will also remove all the associated documents.
    name: Collections
  - description: >
      A document contains content that Unblocked uses to answer questions. Each
      document is associated with a collection, so you must create a collection
      before adding documents. Documents used to provide answers will appear as
      references in the Unblocked interface.


      You can create and delete documents as needed.
    name: Documents
  - description: >
      Ask Unblocked questions and retrieve answers asynchronously. Submit a
      question using the PUT endpoint and poll for the response using the GET
      endpoint.
    name: Answers
  - description: >
      Retrieve context from the data sources connected to Unblocked, including
      code, pull requests, issues, messages, and documentation.


      Research produces a synthesized answer with supporting sources. Search
      endpoints return relevant sources from a single content space. Query
      endpoints return the issues or pull requests matching a natural-language
      query with optional filters. The get endpoint retrieves URL content
      directly.


      **Authentication behavior:**

      - **Personal Access Token (PAT) keys**: Requests are attributed to the
      key's user

      - **Organization-wide API keys**: Requests are attributed to the
      organization
    name: Context
paths:
  /context/query/issues:
    post:
      tags:
        - Context
      summary: Query Issues
      description: >
        Retrieve issues matching a natural-language query with optional project
        and person filters. Unlike search, which ranks results by semantic
        relevance, query returns the issues that match the given criteria.


        **Authentication behavior:**

        - **Personal Access Token (PAT) keys**: Requests are attributed to the
        key's user

        - **Organization-wide API keys**: Requests are attributed to the
        organization
      operationId: contextQueryIssues
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContextQueryIssuesRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContextQueryResponse'
          description: OK
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ContextForbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    ContextQueryIssuesRequest:
      properties:
        query:
          description: >
            Natural-language description of the issues to retrieve. Criteria
            such as

            status, priority, labels, or time range are expressed in the query
            text,

            including references to people and their role (for example, reported
            by

            or assigned to). Project scoping is provided separately via the
            `projects`

            field.
          minLength: 1
          type: string
        projects:
          description: >
            Project names or keys that scope the query. The meaning depends on
            the

            provider: Jira project names or keys, GitHub repository names,
            Linear

            team names or keys, or Asana project names. Each value is resolved

            against all connected providers and applied as a filter. When
            omitted or

            empty, all accessible projects are searched.
          items:
            type: string
          type: array
        userName:
          description: >
            Name, display name, or username of a person referenced by the query.
            The

            value is resolved to a known identity before the query runs; the
            literal

            value `me` resolves to the user associated with the API key.
          type: string
      required:
        - query
      type: object
    ContextQueryResponse:
      properties:
        sources:
          description: The issues or pull requests matching the query criteria.
          items:
            $ref: '#/components/schemas/ContextSource'
          type: array
      required:
        - sources
      type: object
    ContextSource:
      description: A piece of content retrieved from a data source connected to Unblocked.
      properties:
        content:
          description: The text content of the source, in Markdown format.
          type: string
        title:
          description: Human-readable title of the source.
          type: string
        url:
          description: Link to the source in its originating system.
          format: uri
          type: string
        sourceType:
          description: >
            The category of content a context source belongs to. Known values
            are

            `code`, `pull_request`, `issue`, `message`, and `documentation`.
            Additional

            source types may be introduced over time; clients should tolerate

            unrecognized values.
          type: string
        provider:
          description: >
            Identifier of the provider the source originates from. Values are

            camelCase identifiers rather than display names (for example,
            `github`,

            `jira`, `azureDevOps`).
          example: github
          type: string
      required:
        - content
      type: object
    PublicApiError:
      properties:
        status:
          description: The HTTP status code
          example: 400
          type: integer
      required:
        - status
      type: object
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiError'
      description: Bad Request - Invalid or missing required fields
    Unauthorized:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiError'
      description: Unauthorized - Invalid or missing API token
    ContextForbidden:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiError'
      description: >-
        Forbidden - Context API is not available on the organization's current
        plan
    InternalServerError:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PublicApiError'
      description: Internal Server Error
  securitySchemes:
    ApiKeyBearerAuth:
      bearerFormat: Unblocked API Key
      description: The API key to authenticate requests. Obtainable from the web dashboard.
      scheme: bearer
      type: http

````