> ## 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.

# Get an opportunity



## OpenAPI

````yaml /openapi.json get /v1/opportunities/{opportunityId}
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/{opportunityId}:
    get:
      tags:
        - Opportunities
      summary: Get an opportunity
      parameters:
        - in: path
          name: opportunityId
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Opportunity'
          description: The opportunity.
        '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:
    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
    ErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/ApiError'
      required:
        - error
      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

````