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

# List opportunities

> Returns the organization's non-archived opportunities, most recently updated first.



## OpenAPI

````yaml /openapi.json get /v1/opportunities
openapi: 3.1.0
info:
  description: >-
    Trama's REST API. Authenticate with an organization API key, created under
    Settings → Developers, and send it as `Authorization: Bearer <key>` (or in
    the `x-api-key` header).


    Every key is bound to ONE organization: everything this API returns and
    everything it writes stays inside that organization, and no request ever
    names it.


    Errors always come back as `{ "error": { "code", "message" } }`. Branch on
    `code` — it is stable; the `message` text is not.
  title: Trama API
  version: 1.0.0
servers:
  - url: https://api.trama.so
security:
  - bearerAuth: []
  - apiKeyHeader: []
paths:
  /v1/opportunities:
    get:
      tags:
        - Opportunities
      summary: List opportunities
      description: >-
        Returns the organization's non-archived opportunities, most recently
        updated first.
      parameters:
        - description: How many items to return. Maximum 100.
          in: query
          name: limit
          required: false
          schema:
            default: 25
            description: How many items to return. Maximum 100.
            example: 25
            maximum: 100
            minimum: 1
            type: integer
        - description: How many items to skip from the beginning.
          in: query
          name: offset
          required: false
          schema:
            default: 0
            description: How many items to skip from the beginning.
            example: 0
            minimum: 0
            type:
              - integer
              - 'null'
        - description: Matches against the title, short reference and destination.
          in: query
          name: query
          required: false
          schema:
            description: Matches against the title, short reference and destination.
            minLength: 1
            type: string
        - in: query
          name: salesStage
          required: false
          schema:
            minLength: 1
            type: string
        - description: Id of a pipeline column, to fetch just that stage.
          in: query
          name: stageId
          required: false
          schema:
            description: Id of a pipeline column, to fetch just that stage.
            minLength: 1
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OpportunityList'
          description: The requested page.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The request is not valid.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The API key is missing or not valid.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The resource does not exist in this organization.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict with the current state of the resource.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: The API key exceeded its request limit. Retry later.
components:
  schemas:
    OpportunityList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Opportunity'
          type: array
        pagination:
          $ref: '#/components/schemas/Pagination'
      required:
        - data
        - pagination
      type: object
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
      type: object
    Opportunity:
      properties:
        budgetCurrency:
          type:
            - string
            - 'null'
        budgetMax:
          type:
            - number
            - 'null'
        budgetMin:
          type:
            - number
            - 'null'
        checkInDate:
          type:
            - string
            - 'null'
        createdAt:
          format: date-time
          type: string
        customerId:
          type:
            - string
            - 'null'
        customerName:
          type:
            - string
            - 'null'
        destination:
          type:
            - string
            - 'null'
        id:
          type: string
        lastActivityAt:
          format: date-time
          type:
            - string
            - 'null'
        nights:
          type:
            - integer
            - 'null'
        passengerCount:
          type:
            - integer
            - 'null'
        qualifiedAt:
          description: >-
            When the opportunity became qualified. Null means it never entered
            the pipeline.
          format: date-time
          type:
            - string
            - 'null'
        salesStage:
          type: string
        sellerMemberId:
          type:
            - string
            - 'null'
        sellerName:
          type:
            - string
            - 'null'
        shortRef:
          description: Short human-readable reference the agency uses to name it.
          type:
            - string
            - 'null'
        stage:
          description: >-
            Key of the pipeline column it currently sits in. This is the key,
            not a title: each agency renames its columns, so the key is the
            stable thing to branch on.
          type:
            - string
            - 'null'
        stageId:
          type:
            - string
            - 'null'
        temperature:
          type:
            - string
            - 'null'
        title:
          type:
            - string
            - 'null'
        updatedAt:
          format: date-time
          type: string
      required:
        - budgetCurrency
        - budgetMax
        - budgetMin
        - checkInDate
        - createdAt
        - customerId
        - customerName
        - destination
        - id
        - lastActivityAt
        - nights
        - passengerCount
        - qualifiedAt
        - salesStage
        - sellerMemberId
        - sellerName
        - shortRef
        - stage
        - stageId
        - temperature
        - title
        - updatedAt
      type: object
    Pagination:
      properties:
        limit:
          type: integer
        offset:
          type: integer
        total:
          type: integer
      required:
        - limit
        - offset
        - total
      type: object
    ApiError:
      properties:
        code:
          description: >-
            A stable, machine-readable code. Branch on this — the `message` text
            may change, the code will not.
          example: CATALOG_PRODUCT_NOT_FOUND
          type: string
        message:
          example: The catalog product does not exist.
          type: string
      required:
        - code
        - message
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: API key
      description: 'The organization API key, sent as `Authorization: Bearer <key>`.'
      scheme: bearer
      type: http
    apiKeyHeader:
      description: The same API key, sent in the `x-api-key` header.
      in: header
      name: x-api-key
      type: apiKey

````