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

# List approvals

> Runs waiting for a decision, oldest first, with what each would change. Filter by `status` (`waiting` unless
you say). Approving and rejecting happen in the Vortex IQ app only: an API credential never holds
`automations:approve`.

Needs the `automations:read` scope.



## OpenAPI

````yaml automations/api/openapi.json GET /v1/automations/approvals
openapi: 3.1.0
info:
  title: Vortex IQ Automations API
  version: 1.0.0
  description: >
    REST API for Vortex IQ Automations. List the templates your organisation can
    use, set automations up on your

    stores, schedule them, run them, and follow every run, from your own tools
    instead of the Automations screens.


    The API is served from `https://automations-api.vortexiq.ai`; the login that
    gives you a token is on

    `https://app.vortexiq.ai`. Every call acts as the person who logged in,
    within their organisation, and every

    answer is JSON. See [Authentication](/automations/api/authentication).
  contact:
    name: Vortex IQ Support
    url: https://www.vortexiq.ai/contact-us
servers:
  - url: https://automations-api.vortexiq.ai
    description: Vortex IQ Automations (production)
security:
  - bearerAuth: []
  - apiCredential: []
tags:
  - name: Authentication
    description: >-
      Exchange your identity and your organisation's API credential for a bearer
      token.
  - name: Templates & stores
    description: What you can set up, and what it can run on.
  - name: Automations
    description: Set automations up, read them and change them.
  - name: Automation controls
    description: Pause, resume, archive and restore.
  - name: Runs
    description: Run an automation now, follow a run, read the history.
  - name: Schedules & calendar
    description: Preview a schedule, list the coming runs, move or skip one.
  - name: Approvals
    description: >-
      The runs waiting for a decision. Deciding happens in the Vortex IQ app
      only.
  - name: Imported workflows
    description: >-
      Bring an n8n or Shopify Flow workflow in, see how it would run, and run it
      as your own automation.
  - name: Status
    description: >-
      Whether Automations are on for your organisation, and how the service is
      doing.
paths:
  /v1/automations/approvals:
    get:
      tags:
        - Approvals
      summary: List approvals
      description: >-
        Runs waiting for a decision, oldest first, with what each would change.
        Filter by `status` (`waiting` unless

        you say). Approving and rejecting happen in the Vortex IQ app only: an
        API credential never holds

        `automations:approve`.


        Needs the `automations:read` scope.
      operationId: listApprovals
      parameters:
        - name: status
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/ApprovalStatus'
            default: waiting
          description: Only approvals in this status (`waiting` unless you say).
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
          description: The page to read, from 1.
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
          description: Approvals a page, 1 to 100 (25 unless you say).
      responses:
        '200':
          description: A page of approvals.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - data
                  - contract_version
                properties:
                  success:
                    type: boolean
                    const: true
                  contract_version:
                    $ref: '#/components/schemas/ContractVersion'
                  data:
                    type: object
                    required:
                      - approvals
                      - page
                    properties:
                      approvals:
                        type: array
                        items:
                          $ref: '#/components/schemas/Approval'
                      page:
                        $ref: '#/components/schemas/PageInfo'
              example:
                success: true
                contract_version: 1
                data:
                  approvals: []
                  page:
                    page: 1
                    per_page: 2
                    total: 0
        '401':
          $ref: '#/components/responses/Unauthorised'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - bearerAuth:
            - automations:read
        - apiCredential:
            - automations:read
components:
  schemas:
    ApprovalStatus:
      type: string
      enum:
        - waiting
        - approved
        - rejected
        - expired
    ContractVersion:
      type: integer
      minimum: 1
      description: >-
        The version of the API this answer follows. It changes only for a
        breaking change.
    Approval:
      type: object
      required:
        - id
        - run_id
        - automation_id
        - kind
        - prompt
        - preview
        - request_hash
        - status
        - decided_by
        - decided_at
        - comment
        - expires_at
        - created_at
      properties:
        id:
          $ref: '#/components/schemas/Id'
        run_id:
          $ref: '#/components/schemas/Id'
        automation_id:
          $ref: '#/components/schemas/Id'
        kind:
          type: string
          enum:
            - store_change
            - input
            - sends
            - checkpoint
          description: >-
            `sends`: a workflow run's collected sends. `checkpoint`: those and a
            change a later step needs.
        prompt:
          type: string
        preview:
          $ref: '#/components/schemas/ApprovalPreview'
        request_hash:
          type: string
          description: >-
            A hash of exactly what will be applied, which the Vortex IQ app
            sends back when someone decides.
        status:
          $ref: '#/components/schemas/ApprovalStatus'
        decided_by:
          type:
            - integer
            - 'null'
          description: The id of the person who decided.
        decided_at:
          oneOf:
            - $ref: '#/components/schemas/Timestamp'
            - type: 'null'
        comment:
          type:
            - string
            - 'null'
        expires_at:
          $ref: '#/components/schemas/Timestamp'
        created_at:
          $ref: '#/components/schemas/Timestamp'
    PageInfo:
      type: object
      required:
        - page
        - per_page
        - total
      properties:
        page:
          type: integer
          minimum: 1
        per_page:
          type: integer
          minimum: 1
        total:
          type: integer
          minimum: 0
    Id:
      type: string
      description: A public id (a ULID).
      pattern: ^[0-9A-HJKMNP-TV-Z]{26}$
    ApprovalPreview:
      type: object
      description: Exactly what will happen if approved.
      required:
        - content
        - changes
        - ai_read
        - measured_checks
        - ai_review
      properties:
        content:
          description: >-
            The prepared content (a draft, a list of edits), redacted for
            display. An object here has whatever keys the program gave it.
          type:
            - object
            - array
            - string
            - 'null'
          additionalProperties: true
        changes:
          type: array
          description: The named operations, one per object.
          items:
            type: object
            required:
              - operation
              - object_type
              - object_ref
              - object_label
            properties:
              operation:
                type: string
              object_type:
                type: string
              object_ref:
                type: string
              object_label:
                type: string
        ai_read:
          type: array
          description: What the AI read, as labels and counts.
          items:
            type: object
            required:
              - what
              - count
            properties:
              what:
                type: string
              count:
                type: integer
                minimum: 0
        measured_checks:
          type: array
          description: Deterministic checks with values.
          items:
            type: object
            required:
              - name
              - passed
              - value
            properties:
              name:
                type: string
              passed:
                type: boolean
              value:
                type:
                  - string
                  - number
                  - 'null'
        ai_review:
          type: array
          description: >-
            Judgements made by a reviewing skill. Labelled "AI review" on
            screen, never "measured".
          items:
            type: object
            required:
              - skill
              - passed
              - warnings
            properties:
              skill:
                type: string
              passed:
                type: boolean
              warnings:
                type: array
                items:
                  type: string
    Timestamp:
      type: string
      format: date-time
      description: A time in UTC (ISO 8601).
    ErrorResponse:
      type: object
      required:
        - success
        - message
        - contract_version
      properties:
        success:
          type: boolean
          const: false
        contract_version:
          $ref: '#/components/schemas/ContractVersion'
        message:
          type: string
          description: Plain words saying what happened and what to do.
        code:
          type: string
          description: >-
            A stable code to act on, such as `wrong_state`, `stale_version` or
            `allowance_spent`.
        errors:
          type: object
          description: Field name to messages, for 422.
          additionalProperties:
            type: array
            items:
              type: string
  responses:
    Unauthorised:
      description: >-
        The token is missing, has expired, or is no longer valid (for example,
        the API credential was rotated or disabled). The answer carries
        `WWW-Authenticate`; log in again for a new token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: >-
        Your token is valid but may not do this: it lacks the scope, the
        operation is not part of the Automations API, or Automations are
        switched off for your organisation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationFailed:
      description: The request was not valid; `errors` names the fields.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    TooManyRequests:
      description: >-
        Too many calls in a minute from you or your organisation; nothing was
        done. `Retry-After` says how many seconds to wait.
      headers:
        Retry-After:
          schema:
            type: integer
            minimum: 1
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        A bearer token from [Login](/automations/api/login), sent as
        `Authorization: Bearer <token>`. Valid for 60 minutes; it acts as the
        person named at login, within their organisation, and never approves.
        Rotating or disabling the organisation's API credential ends every token
        made with it on its next call. See
        [Authentication](/automations/api/authentication).
    apiCredential:
      type: oauth2
      description: >-
        Your organisation's API credential, exchanged at
        [Login](/automations/api/login) for the bearer token above: an OAuth 2.0
        client-credentials request, with the `username`, `email` and
        `organization_name` of the person the token acts as sent as extra
        fields, as Postman's OAuth 2.0 helper can send them. The token never
        holds `automations:approve`.
      flows:
        clientCredentials:
          tokenUrl: https://app.vortexiq.ai/v2/api/automations/login
          scopes:
            automations:read: >-
              Read automations, templates, stores, runs, the calendar, approvals
              and imports.
            automations:write: >-
              Set automations up, change, pause, resume, archive, restore and
              run them; move and skip coming runs; keep and delete imports.

````

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