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

# List messages waiting for approval

> Drafts waiting for a decision, oldest first.



## OpenAPI

````yaml /api/openapi.json get /workflow-runs/pending-approvals
openapi: 3.1.0
info:
  title: B2B Signals API
  version: '1.0'
  description: >-
    Add people, run campaigns and read results from your own tools. Every
    request needs your API key in the `X-API-Key` header.
servers:
  - url: https://api.b2bsignals.ai/api/v1
security:
  - apiKey: []
tags:
  - name: Add people
    description: >-
      Send people in from your own tools, one at a time or up to 100 per
      request.
  - name: People
    description: >-
      Read and change the people in your workspace. In API paths and fields, a
      person is a `lead`.
  - name: Notes and tasks
    description: Notes on a person, and follow-up tasks.
  - name: Lists
    description: >-
      Named groups of people you can add to a campaign. In API paths, a list is
      a `lead-list`.
  - name: Campaigns
    description: >-
      Read, start, pause and report on campaigns. In API paths and fields, a
      campaign is a `workflow`.
  - name: Campaign people
    description: >-
      One person's place in one campaign. In API paths and fields, that is a
      `workflow-run`.
  - name: Approvals
    description: Messages waiting for a yes or no before they go out.
  - name: Inbox
    description: Read conversations and keep them organized.
  - name: Do not contact
    description: People and companies that must never be contacted.
  - name: Senders
    description: >-
      The LinkedIn accounts that send for your workspace. In API paths, a sender
      is a `connected-account`.
  - name: Webhooks
    description: Send events to your own tools.
  - name: Integrations
    description: See which outside tools are connected, and send people to them.
  - name: Reports
    description: The numbers behind Reports, and exports.
  - name: Watchlists
    description: Read the companies and people you watch.
  - name: Search
    description: Search across people, campaigns, lists and watchlists.
paths:
  /workflow-runs/pending-approvals:
    get:
      tags:
        - Approvals
      summary: List messages waiting for approval
      description: Drafts waiting for a decision, oldest first.
      operationId: get_workflow_runs_pending_approvals
      parameters:
        - name: skip
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
          description: How many rows to skip. Starts at 0.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 200
            minimum: 1
            default: 50
          description: How many rows to return in one page.
        - name: workflow_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
          description: Only this campaign.
        - name: run_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
        - name: feed
          in: query
          required: false
          schema:
            enum:
              - all
              - follow_up
              - first_touch
            type: string
            default: all
        - name: sort
          in: query
          required: false
          schema:
            enum:
              - created_at
              - rank
            type: string
            default: created_at
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PendingApprovalItem'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          description: The request did not pass validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PendingApprovalItem:
      properties:
        run_id:
          type: string
          format: uuid
        workflow_id:
          type: string
          format: uuid
        workflow_name:
          type: string
        campaign_status:
          type: string
          default: active
        sends_after_resume:
          type: boolean
          default: false
        send_mode:
          type: string
          default: auto
        approval_mode:
          type: string
          default: step
        planned_steps:
          anyOf:
            - items:
                $ref: '#/components/schemas/PlannedStep'
              type: array
            - type: 'null'
        status:
          type: string
        lead_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        person_name:
          anyOf:
            - type: string
            - type: 'null'
        name_unresolved:
          type: boolean
          default: false
        name_changed_after_draft:
          type: boolean
          default: false
        person_title:
          anyOf:
            - type: string
            - type: 'null'
        company_name:
          anyOf:
            - type: string
            - type: 'null'
        person_linkedin_url:
          anyOf:
            - type: string
            - type: 'null'
        avatar_url:
          anyOf:
            - type: string
            - type: 'null'
        fit_score:
          anyOf:
            - type: integer
            - type: 'null'
        language:
          anyOf:
            - type: string
            - type: 'null'
        lead_context:
          anyOf:
            - $ref: '#/components/schemas/LeadContext'
            - type: 'null'
        signal_type:
          anyOf:
            - type: string
            - type: 'null'
        signal_label:
          anyOf:
            - type: string
            - type: 'null'
        signal_evidence:
          anyOf:
            - $ref: '#/components/schemas/SignalEvidence'
            - type: 'null'
        is_follow_up:
          type: boolean
          default: false
        suggested_action:
          anyOf:
            - $ref: '#/components/schemas/SuggestedAction'
            - type: 'null'
        draft_message:
          anyOf:
            - type: string
            - type: 'null'
        draft_node_id:
          anyOf:
            - type: string
            - type: 'null'
        message_kind:
          anyOf:
            - type: string
            - type: 'null'
        next_step_summary:
          anyOf:
            - type: string
            - type: 'null'
        next_step:
          anyOf:
            - $ref: '#/components/schemas/NextStepInfo'
            - type: 'null'
        touch_action:
          anyOf:
            - type: string
            - type: 'null'
        touch_suggested:
          type: boolean
          default: false
        step_index:
          anyOf:
            - type: integer
            - type: 'null'
        step_total:
          anyOf:
            - type: integer
            - type: 'null'
        sender_name:
          anyOf:
            - type: string
            - type: 'null'
        sender_capacity_remaining:
          anyOf:
            - type: integer
            - type: 'null'
        sender_capacity_total:
          anyOf:
            - type: integer
            - type: 'null'
        sender_needs_reconnect:
          type: boolean
          default: false
        sender_status_reason:
          anyOf:
            - type: string
            - type: 'null'
        sender_invites_paused_until:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        has_prior_send:
          type: boolean
          default: false
        note_sent:
          anyOf:
            - type: boolean
            - type: 'null'
        note_status_text:
          anyOf:
            - type: string
            - type: 'null'
        note_cap:
          anyOf:
            - type: integer
            - type: 'null'
        text_char_cap:
          anyOf:
            - type: integer
            - type: 'null'
        company_cap_conflict:
          anyOf:
            - $ref: '#/components/schemas/CompanyCapConflict'
            - type: 'null'
        created_at:
          type: string
          format: date-time
        awaiting_since:
          type: string
          format: date-time
      type: object
      required:
        - run_id
        - workflow_id
        - workflow_name
        - status
        - lead_id
        - person_name
        - person_title
        - company_name
        - person_linkedin_url
        - signal_type
        - signal_label
        - draft_message
        - draft_node_id
        - message_kind
        - created_at
        - awaiting_since
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    PlannedStep:
      properties:
        node_id:
          type: string
        node_type:
          type: string
        label:
          type: string
        action_detail:
          anyOf:
            - type: string
            - type: 'null'
        draft_text:
          anyOf:
            - type: string
            - type: 'null'
        wait_value:
          anyOf:
            - type: integer
            - type: 'null'
        wait_unit:
          anyOf:
            - type: string
            - type: 'null'
        already_executed:
          type: boolean
          default: false
        branch:
          anyOf:
            - type: string
            - type: 'null'
        note_sent:
          anyOf:
            - type: boolean
            - type: 'null'
        note_status_text:
          anyOf:
            - type: string
            - type: 'null'
        char_cap:
          anyOf:
            - type: integer
            - type: 'null'
        is_drafted:
          anyOf:
            - type: boolean
            - type: 'null'
        wait_text:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - node_id
        - node_type
        - label
    LeadContext:
      properties:
        industry:
          anyOf:
            - type: string
            - type: 'null'
        company_size:
          anyOf:
            - type: string
            - type: 'null'
        location:
          anyOf:
            - type: string
            - type: 'null'
        tagline:
          anyOf:
            - type: string
            - type: 'null'
        company_description:
          anyOf:
            - type: string
            - type: 'null'
        person_fit:
          anyOf:
            - $ref: '#/components/schemas/LeadPersonFit'
            - type: 'null'
        icp_badges:
          items:
            type: string
          type: array
        pains:
          items:
            type: string
          type: array
        recent_signals:
          items:
            $ref: '#/components/schemas/RecentSignalItem'
          type: array
      type: object
    SignalEvidence:
      properties:
        post_url:
          anyOf:
            - type: string
            - type: 'null'
        post_text:
          anyOf:
            - type: string
            - type: 'null'
        post_author:
          anyOf:
            - type: string
            - type: 'null'
        engagement_type:
          anyOf:
            - type: string
            - type: 'null'
        reaction_type:
          anyOf:
            - type: string
            - type: 'null'
        comment_text:
          anyOf:
            - type: string
            - type: 'null'
        engaged_at:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    SuggestedAction:
      properties:
        type:
          type: string
          enum:
            - comment_on_post
            - react_to_post
            - reference_job_change
            - reference_hiring
            - reference_watcher_signal
            - check_in
        text:
          type: string
        reference_url:
          anyOf:
            - type: string
            - type: 'null'
        reference_date:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - type
        - text
    NextStepInfo:
      properties:
        label:
          type: string
        wait_text:
          anyOf:
            - type: string
            - type: 'null'
      type: object
      required:
        - label
    CompanyCapConflict:
      properties:
        colleague_name:
          anyOf:
            - type: string
            - type: 'null'
        colleague_status:
          type: string
          enum:
            - contacted
            - waiting
        cap:
          type: integer
      type: object
      required:
        - colleague_status
        - cap
    Error:
      type: object
      required:
        - detail
      properties:
        detail:
          description: A message, or an object with a `code` and a `message`.
          anyOf:
            - type: string
            - type: object
              properties:
                code:
                  type: string
                message:
                  type: string
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
        input: {}
        ctx:
          type: object
      type: object
      required:
        - loc
        - msg
        - type
    LeadPersonFit:
      properties:
        score:
          anyOf:
            - type: integer
            - type: 'null'
        reason:
          anyOf:
            - type: string
            - type: 'null'
      type: object
    RecentSignalItem:
      properties:
        label:
          anyOf:
            - type: string
            - type: 'null'
        type:
          anyOf:
            - type: string
            - type: 'null'
        source:
          anyOf:
            - type: string
            - type: 'null'
        processed_at:
          anyOf:
            - type: string
            - type: 'null'
      type: object
  responses:
    Unauthorized:
      description: The key is missing or not valid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The key cannot do this, or your plan does not include it. `detail` says
        which.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your workspace's API key. It starts with `b2b_sk_`.

````

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