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

# Top sales-outreach opportunities

> Highest-intent companies with a recommended person to contact, ranked by score. Optionally filter by time window, ICP ids, and account-list ids.



## OpenAPI

````yaml https://app.stairoids.com/api/docs/public post /public/v1/opportunities/top
openapi: 3.0.1
info:
  title: Stairoids API
  description: The Next Generation API
  version: '1.0'
servers:
  - url: http://app.stairoids.com/api
    description: Generated server url
security:
  - ApiKeyAuth: []
tags:
  - name: Public API - Funnel
    description: Funnel stages, distribution, and pipeline trend metrics.
  - name: Public API - Attribution
    description: Traffic sources, campaigns, and the accounts they drove.
  - name: Public API - Lead Scores
    description: Signal details and per-person scores.
  - name: Public API - Reference
    description: Your ICPs, personas, labels, account lists, and signal categories.
  - name: Public API - Activity
    description: Per-person and general (cross-company) signal feeds.
  - name: Public API - LinkedIn Ads
    description: LinkedIn ad campaigns, posts, likes, and company engagement.
  - name: Public API - Companies
    description: Search, look up, and read activity for scored companies.
  - name: Public API - Opportunities
    description: Your best outreach opportunities right now.
paths:
  /public/v1/opportunities/top:
    post:
      tags:
        - Public API - Opportunities
      summary: Top sales-outreach opportunities
      description: >-
        Highest-intent companies with a recommended person to contact, ranked by
        score. Optionally filter by time window, ICP ids, and account-list ids.
      operationId: getTopPublicOpportunities
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicTopOpportunitiesRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PublicPagePublicOpportunityDTO'
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CustomError'
        '402':
          description: Payment Required
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PlanLimitError'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AgencyLimitError'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/CustomError'
components:
  schemas:
    PublicTopOpportunitiesRequest:
      type: object
      properties:
        afterTime:
          type: integer
          description: >-
            Only count activity at/after this epoch-millis timestamp. 0 or null
            = all time.
          format: int64
          example: 0
        beforeTime:
          type: integer
          description: >-
            Only count activity before this epoch-millis timestamp. 0 or null =
            no upper bound.
          format: int64
          example: 0
        icpIds:
          type: array
          description: Restrict to these ICP ids. Null or empty = all ICPs.
          items:
            type: integer
            description: Restrict to these ICP ids. Null or empty = all ICPs.
            format: int64
        accountListIds:
          type: array
          description: Restrict to these account-list ids. Null or empty = all lists.
          items:
            type: integer
            description: Restrict to these account-list ids. Null or empty = all lists.
            format: int64
        page:
          type: integer
          description: Zero-based page index.
          format: int32
          example: 0
          default: 0
        size:
          type: integer
          description: Page size (clamped to 100).
          format: int32
          example: 20
          default: 20
      description: Request for the top sales-outreach opportunities.
    PublicPagePublicOpportunityDTO:
      type: object
      properties:
        data:
          type: array
          description: The items on this page.
          items:
            $ref: '#/components/schemas/PublicOpportunityDTO'
        page:
          type: integer
          description: Zero-based page index.
          format: int32
          example: 0
        size:
          type: integer
          description: Requested page size.
          format: int32
          example: 20
        totalElements:
          type: integer
          description: Total number of matching items across all pages.
          format: int64
          example: 137
        totalPages:
          type: integer
          description: Total number of pages.
          format: int32
          example: 7
      description: A page of results.
    CustomError:
      type: object
      properties:
        errorType:
          type: string
          enum:
            - EMAIL_ALREADY_EXISTS
            - INVALID_EMAIL
            - UNAUTHORIZED
            - UNEXPECTED_ERROR
            - WRONG_PASSWORD
            - STILL_GENERATING
            - MISSING_HEADERS
            - USER_NOT_FOUND
            - WEAK_PASSWORD
            - VALIDATION_ERROR
            - NOT_FOUND
            - PLAN_LIMIT_EXCEEDED
            - FEATURE_NOT_AVAILABLE
            - PAYMENT_ERROR
            - ACTIVE_SUBSCRIPTION_EXISTS
            - AGENCY_LIMIT_EXCEEDED
            - PAYMENT_METHOD_REQUIRED
            - BILLED_BY_AGENCY
            - PAYMENT_AUTHENTICATION_REQUIRED
            - PLAN_BELOW_RECOMMENDED
            - TRIAL_NOT_ELIGIBLE
    PlanLimitError:
      type: object
      properties:
        errorType:
          type: string
          enum:
            - EMAIL_ALREADY_EXISTS
            - INVALID_EMAIL
            - UNAUTHORIZED
            - UNEXPECTED_ERROR
            - WRONG_PASSWORD
            - STILL_GENERATING
            - MISSING_HEADERS
            - USER_NOT_FOUND
            - WEAK_PASSWORD
            - VALIDATION_ERROR
            - NOT_FOUND
            - PLAN_LIMIT_EXCEEDED
            - FEATURE_NOT_AVAILABLE
            - PAYMENT_ERROR
            - ACTIVE_SUBSCRIPTION_EXISTS
            - AGENCY_LIMIT_EXCEEDED
            - PAYMENT_METHOD_REQUIRED
            - BILLED_BY_AGENCY
            - PAYMENT_AUTHENTICATION_REQUIRED
            - PLAN_BELOW_RECOMMENDED
            - TRIAL_NOT_ELIGIBLE
        category:
          type: string
        currentUsage:
          type: integer
          format: int32
        limit:
          type: integer
          format: int32
        addOnSlug:
          type: string
        planSlug:
          type: string
        addOnPriceMonthly:
          type: integer
          format: int32
        upgradePlanSlug:
          type: string
        upgradePlanName:
          type: string
        upgradePlanPriceMonthly:
          type: integer
          format: int32
    AgencyLimitError:
      type: object
      properties:
        errorType:
          type: string
          enum:
            - EMAIL_ALREADY_EXISTS
            - INVALID_EMAIL
            - UNAUTHORIZED
            - UNEXPECTED_ERROR
            - WRONG_PASSWORD
            - STILL_GENERATING
            - MISSING_HEADERS
            - USER_NOT_FOUND
            - WEAK_PASSWORD
            - VALIDATION_ERROR
            - NOT_FOUND
            - PLAN_LIMIT_EXCEEDED
            - FEATURE_NOT_AVAILABLE
            - PAYMENT_ERROR
            - ACTIVE_SUBSCRIPTION_EXISTS
            - AGENCY_LIMIT_EXCEEDED
            - PAYMENT_METHOD_REQUIRED
            - BILLED_BY_AGENCY
            - PAYMENT_AUTHENTICATION_REQUIRED
            - PLAN_BELOW_RECOMMENDED
            - TRIAL_NOT_ELIGIBLE
        category:
          type: string
        currentUsage:
          type: integer
          format: int32
        limit:
          type: integer
          format: int32
    PublicOpportunityDTO:
      type: object
      properties:
        company:
          $ref: '#/components/schemas/PublicCompanyDTO'
        person:
          $ref: '#/components/schemas/PublicPersonDTO'
        personScore:
          type: integer
          description: That person's calculated score.
          format: int32
          example: 42
        funnelStageId:
          type: integer
          description: Current funnel-stage id for the company (for sort transparency).
          format: int64
          example: 12
      description: >-
        A top outreach opportunity: a high-intent company plus the best person
        to contact.
    PublicCompanyDTO:
      type: object
      properties:
        companyId:
          type: integer
          description: Company id. Use with GET /public/v1/companies/{companyId}.
          format: int64
          example: 4521
        name:
          type: string
          description: Company name.
          example: Acme Corp
        domain:
          type: string
          description: Primary domain.
          example: acme.com
        industry:
          type: string
          description: Industry.
          example: Software
        country:
          type: string
          description: Country.
          example: Netherlands
        city:
          type: string
          description: City.
          example: Amsterdam
        employeeCount:
          type: integer
          description: Employee count, if known.
          format: int32
          example: 250
        companySize:
          type: string
          description: LinkedIn-reported employee size bucket, if known.
          nullable: true
          example: 201-500
        linkedInUrl:
          type: string
          description: LinkedIn company URL.
          example: https://www.linkedin.com/company/acme
        totalScore:
          type: integer
          description: Total intent / lead score (higher = hotter).
          format: int32
          example: 87
        icpMatched:
          type: boolean
          description: Whether the company currently matches one of your ICPs.
          example: true
        icpId:
          type: integer
          description: Matched ICP id, if any.
          format: int64
          nullable: true
          example: 7
        icpName:
          type: string
          description: Matched ICP name, if any.
          nullable: true
          example: Mid-market SaaS
        rankedLeadScoreId:
          type: integer
          description: Ranked-lead-score row id (the lead-score record for this company).
          format: int64
          example: 55231
        logoUrl:
          type: string
          description: Company logo URL.
          nullable: true
        funnelStageId:
          type: integer
          description: Current funnel stage id.
          format: int64
          nullable: true
          example: 12
        funnelStage:
          type: string
          description: Current funnel stage name.
          nullable: true
          example: Hot
        labels:
          type: array
          description: Labels applied to this company.
          items:
            $ref: '#/components/schemas/PublicLabelDTO'
        latestActivityTimestamp:
          type: integer
          description: Last activity timestamp, epoch millis.
          format: int64
          nullable: true
          example: 1719500000000
      description: A company in your pipeline, with its current intent / lead score.
    PublicPersonDTO:
      type: object
      properties:
        publicIdentifier:
          type: string
          description: LinkedIn public identifier.
          nullable: true
          example: jane-doe-123
        name:
          type: string
          description: Full name.
          example: Jane Doe
        headline:
          type: string
          description: Headline / job title.
          example: VP of Marketing
        linkedInUrl:
          type: string
          description: LinkedIn profile URL.
          nullable: true
        profilePicture:
          type: string
          description: Profile image URL.
          nullable: true
      description: A person (LinkedIn profile).
    PublicLabelDTO:
      type: object
      properties:
        id:
          type: integer
          description: Label id.
          format: int64
          example: 5
        name:
          type: string
          description: Label name.
          example: Strategic
        color:
          type: string
          description: Hex color.
          example: '#73d89c'
        userGenerated:
          type: boolean
          description: True if user-created, false if system-generated.
          example: true
      description: A label that can be applied to companies.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: >-
        Your organization's public API key. Manage it at GET
        /api/user/public-api-key.
      name: X-Api-Key
      in: header

````