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

# List pending tool permission requests

> List the tool calls a thread's agent paused on that no one has allowed or denied yet, oldest first. Requires access to the project and to the thread.



## OpenAPI

````yaml /openapi.json get /projects/{projectId}/tool-permissions/pending
openapi: 3.1.1
info:
  title: Sazabi Public API
  version: 1.0.0
  description: >
    Public REST API for Sazabi. Authenticate using a secret API key in the
    Authorization header.


    ## Pagination


    This API uses two pagination strategies depending on the endpoint type:


    ### Cursor-Based Pagination (List Endpoints)


    List endpoints (threads, messages, keys) use cursor-based pagination for
    efficient, consistent results:


    - **Parameters**: `limit` (items per page, default 50, max 100), `cursor`
    (opaque pagination token)

    - **Response**: Includes `nextCursor` field - pass this as `cursor` in the
    next request

    - **End of results**: When `nextCursor` is `null`, there are no more results

    - **Example**: `GET
    /v1/threads?limit=20&cursor=01234567-89ab-cdef-0123-456789abcdef`


    ### Page-Based Pagination (Search Endpoints)


    Search endpoints use page-based pagination due to the underlying search
    engine:


    - **Parameters**: `limit` (items per page, default 20, max 100), `page`
    (1-indexed page number)

    - **Response**: Includes `pagination` object with `page`, `limit`,
    `totalResults`, `totalPages`

    - **Example**: `GET /v1/search/threads?q=error&limit=10&page=2`
servers:
  - url: https://api.sazabi.com/v1
    description: Production
security: []
paths:
  /projects/{projectId}/tool-permissions/pending:
    get:
      tags:
        - Tool permissions
      summary: List pending tool permission requests
      description: >-
        List the tool calls a thread's agent paused on that no one has allowed
        or denied yet, oldest first. Requires access to the project and to the
        thread.
      operationId: toolPermissions.listPending
      parameters:
        - name: projectId
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: Project whose allowlist to read.
        - name: threadId
          in: query
          required: true
          schema:
            type: string
            format: uuid
            description: Thread whose pending calls to read.
          allowEmptyValue: true
          allowReserved: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      type: object
                      properties:
                        threadId:
                          type: string
                          format: uuid
                        messageId:
                          type: string
                          description: The assistant message the call paused on.
                        toolCallId:
                          type: string
                          description: The paused tool call.
                        toolName:
                          type: string
                          description: The tool the agent asked to run.
                        rule:
                          type: string
                          description: >-
                            The rule an always-allow decision on this call would
                            add.
                        target:
                          type: string
                          description: >-
                            What the call runs within the tool: the bash
                            command, the MCP tool name, or the rule itself when
                            it does not parse.
                        connectionKey:
                          anyOf:
                            - type: string
                            - type: 'null'
                          description: >-
                            The MCP connection an `execute` call uses; null
                            otherwise.
                        createdAt:
                          type: string
                          format: date-time
                          description: When the call paused.
                      required:
                        - threadId
                        - messageId
                        - toolCallId
                        - toolName
                        - rule
                        - target
                        - connectionKey
                        - createdAt
                required:
                  - items

````

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