Yardstick Opportunities API

Read-only enriched candidate/interview-cycle work views over applications, with next-action and dashboard deep-link helpers.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 4

GET /v1/opportunities List opportunities #
GET /v1/opportunities/{opportunity_id} Retrieve an opportunity #
GET /v1/opportunities/{opportunity_id}/actions/next_action Recommend the next action for an opportunity #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/yardstick-team:yardstick-team-opportunities-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

yardstick-team-opportunities-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Yardstick Team Opportunities API
  version: '2026-05-02'
  description: 'Operations tagged Opportunities across 2 of this provider''s published API definitions: api.yardstick.team_v1_openapi.json, yardstick-team-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.yardstick.team
  description: Production
security:
- bearerAuth: []
tags:
- name: Opportunities
  description: Read-only enriched candidate/interview-cycle work views over applications, with next-action and dashboard deep-link helpers.
paths:
  /v1/opportunities:
    get:
      operationId: listOpportunities
      summary: List opportunities
      description: 'List opportunities


        **Required scopes:** `opportunities:read`


        Read-only. Opportunities are enriched candidate and interview-cycle work views over applications and related context. Use them for queues, next actions, and dashboard handoff; do not use this resource to create candidates or mutate application state.


        **Example (curl):**


        ```bash

        curl ''https://api.yardstick.team/v1/opportunities?status=Applied&limit=20'' \

        -H ''Authorization: Bearer ys_sk_live_…''

        ```


        **Example (TypeScript):**


        ```ts

        await fetch("https://api.yardstick.team/v1/opportunities?status=Applied&limit=20", {

        headers: { Authorization: `Bearer ${process.env.YS_API_KEY}` },

        }).then((r) => r.json());

        ```'
      tags:
      - Opportunities
      deprecated: false
      security:
      - bearerAuth:
        - opportunities:read
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ListEnvelope'
                - type: object
                  properties:
                    data:
                      type: array
                      items:
                        $ref: '#/components/schemas/Opportunity'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Permission denied (scope or feature flag)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found. The error uses the resource-specific code and param names the exact body field or path parameter that referenced it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict (e.g. idempotency key reuse with different body)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: limit
        in: query
        required: false
        description: Page size (1-100, default 20).
        schema:
          type: integer
          minimum: 1
          maximum: 100
      - name: starting_after
        in: query
        required: false
        description: 'Cursor: id of the last record from the previous page.'
        schema:
          type: string
      - name: status
        in: query
        required: false
        description: Filter by application status.
        schema:
          type: string
      - name: stage
        in: query
        required: false
        description: Filter by application stage.
        schema:
          type: string
      - name: person_id
        in: query
        required: false
        description: Filter by canonical `per_...` person id.
        schema:
          type: string
      - name: application_id
        in: query
        required: false
        description: Filter by canonical `app_...` application id.
        schema:
          type: string
      - name: job_posting_id
        in: query
        required: false
        description: Filter by existing `jp_...` posting id.
        schema:
          type: string
      - name: created[gte]
        in: query
        required: false
        description: ISO-8601 UTC; only opportunities at or after this time.
        schema:
          type: string
          format: date-time
      - name: created[lte]
        in: query
        required: false
        description: ISO-8601 UTC; only opportunities at or before this time.
        schema:
          type: string
          format: date-time
      - name: X-Request-Id
        in: header
        required: false
        description: Optional caller-supplied request identifier. Values must match `^[A-Za-z0-9_-]{1,128}$`; a valid value is echoed in the response `X-Request-Id` header, otherwise the API generates one.
        schema:
          type: string
    servers:
    - url: https://api.yardstick.team
      description: Production
  /v1/opportunities/{opportunity_id}:
    get:
      operationId: retrieveOpportunitiesOpportunity_id
      summary: Retrieve an opportunity
      description: 'Retrieve an opportunity


        **Required scopes:** `opportunities:read`


        Read-only. The opportunity is the candidate/interview-cycle work view for an application; candidate creation and application-owned writes happen through People plus Applications.


        **Example (curl):**


        ```bash

        curl https://api.yardstick.team/v1/opportunities/opp_def456 \

        -H ''Authorization: Bearer ys_sk_live_…''

        ```


        **Example (TypeScript):**


        ```ts

        await fetch("https://api.yardstick.team/v1/opportunities/opp_def456", {

        headers: { Authorization: `Bearer ${process.env.YS_API_KEY}` },

        }).then((r) => r.json());

        ```'
      tags:
      - Opportunities
      deprecated: false
      security:
      - bearerAuth:
        - opportunities:read
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Opportunity'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Permission denied (scope or feature flag)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found. The error uses the resource-specific code and param names the exact body field or path parameter that referenced it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict (e.g. idempotency key reuse with different body)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: opportunity_id
        in: path
        required: true
        schema:
          type: string
      - name: X-Request-Id
        in: header
        required: false
        description: Optional caller-supplied request identifier. Values must match `^[A-Za-z0-9_-]{1,128}$`; a valid value is echoed in the response `X-Request-Id` header, otherwise the API generates one.
        schema:
          type: string
    servers:
    - url: https://api.yardstick.team
      description: Production
  /v1/opportunities/{opportunity_id}/actions/next_action:
    get:
      operationId: listOpportunitiesOpportunity_idActionsNext_action
      summary: Recommend the next action for an opportunity
      description: 'Recommend the next action for an opportunity


        **Required scopes:** `opportunities:read`, `tasks:read`


        Computes a recommendation envelope from the application''s current status and any open `user_tasks` rows. Returns `{ recommended_action_key, target_status, rationale, requires_approval, can_complete_via_api, cannot_complete_reason }`. When the application is in a terminal status (`Hired`, `Withdrawn`, `Offer Rejected`, `Disqualified`), all action fields are `null` and `cannot_complete_reason` is `TASK_TERMINAL`. Other `cannot_complete_reason` values are `NO_REGISTRY_ACTION` and `OWNED_BY_LATER_API_CHILD` (see `docs/api/tasks-api.md`). Requires both `opportunities:read` and `tasks:read` because the recommendation reads from `user_tasks` on the application''s behalf.


        **Example (curl):**


        ```bash

        curl https://api.yardstick.team/v1/opportunities/opp_def456/actions/next_action \

        -H ''Authorization: Bearer ys_sk_live_…''

        ```


        **Example (TypeScript):**


        ```ts

        await fetch(

        "https://api.yardstick.team/v1/opportunities/opp_def456/actions/next_action",

        { headers: { Authorization: `Bearer ${process.env.YS_API_KEY}` } },

        ).then((r) => r.json());

        ```'
      tags:
      - Opportunities
      deprecated: false
      security:
      - bearerAuth:
        - opportunities:read
        - tasks:read
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Permission denied (scope or feature flag)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found. The error uses the resource-specific code and param names the exact body field or path parameter that referenced it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict (e.g. idempotency key reuse with different body)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: opportunity_id
        in: path
        required: true
        schema:
          type: string
      - name: X-Request-Id
        in: header
        required: false
        description: Optional caller-supplied request identifier. Values must match `^[A-Za-z0-9_-]{1,128}$`; a valid value is echoed in the response `X-Request-Id` header, otherwise the API generates one.
        schema:
          type: string
    servers:
    - url: https://api.yardstick.team
      description: Production
  /v1/opportunities/{opportunity_id}/actions/deep_link:
    get:
      operationId: listOpportunitiesOpportunity_idActionsDeep_link
      summary: Resolve an opportunity to a dashboard deep link
      description: 'Resolve an opportunity to a dashboard deep link


        **Required scopes:** `opportunities:read`


        Returns `{ id, web_url, route, mode }` pointing at the dashboard `OpportunityDetailPage` for candidate/interview-cycle workflow. Opportunity dashboard URLs use `/opportunities/:id`; during the current compatibility window, `:id` may be the `opp_…` display id exposed by list/read responses or the raw application UUID returned by this deep-link endpoint. Application Review detail links use `/jobs/:jobId/review/:applicationId`. Mode-partitioned: a live token requesting a test opportunity returns `404 not_found`.


        **Example (curl):**


        ```bash

        curl https://api.yardstick.team/v1/opportunities/opp_def456/actions/deep_link \

        -H ''Authorization: Bearer ys_sk_live_…''

        ```


        **Example (TypeScript):**


        ```ts

        await fetch(

        "https://api.yardstick.team/v1/opportunities/opp_def456/actions/deep_link",

        { headers: { Authorization: `Bearer ${process.env.YS_API_KEY}` } },

        ).then((r) => r.json());

        ```'
      tags:
      - Opportunities
      deprecated: false
      security:
      - bearerAuth:
        - opportunities:read
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Authentication failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Permission denied (scope or feature flag)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Resource not found. The error uses the resource-specific code and param names the exact body field or path parameter that referenced it.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict (e.g. idempotency key reuse with different body)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      parameters:
      - name: opportunity_id
        in: path
        required: true
        schema:
          type: string
      - name: X-Request-Id
        in: header
        required: false
        description: Optional caller-supplied request identifier. Values must match `^[A-Za-z0-9_-]{1,128}$`; a valid value is echoed in the response `X-Request-Id` header, otherwise the API generates one.
        schema:
          type: string
    servers:
    - url: https://api.yardstick.team
      description: Production
components:
  schemas:
    Opportunity:
      type: object
      properties:
        id:
          type: string
          description: Display id, e.g. `opp_<base32>`
        object:
          type: string
          enum:
          - opportunity
        livemode:
          type: boolean
        dashboard_url:
          type: string
          nullable: true
        application:
          type: object
          properties:
            id:
              type: string
              description: Canonical `app_...` application id.
            status:
              type: string
            stage:
              type: string
            created:
              type: string
              nullable: true
            updated:
              type: string
              nullable: true
          required:
          - id
          - status
          - stage
          - created
          - updated
          additionalProperties: false
        person:
          type: object
          properties:
            id:
              type: string
              description: Canonical `per_...` person id.
            name:
              type: string
              nullable: true
            email:
              type: string
              nullable: true
          required:
          - id
          - name
          - email
          additionalProperties: false
          nullable: true
        interview_plan:
          type: object
          properties:
            id:
              type: string
            title:
              type: string
              nullable: true
            role_name:
              type: string
              nullable: true
          required:
          - id
          - title
          - role_name
          additionalProperties: false
          nullable: true
        job_posting:
          type: object
          properties:
            id:
              type: string
            title:
              type: string
              nullable: true
            slug:
              type: string
              nullable: true
          required:
          - id
          - title
          - slug
          additionalProperties: false
          nullable: true
      required:
      - id
      - object
      - livemode
      - dashboard_url
      - application
      - person
      - interview_plan
      - job_posting
      additionalProperties: false
      description: Read-only opportunity view over an application and its related person, plan, and posting metadata. These views appear in the Yardstick app as Candidates.
    ListEnvelope:
      type: object
      properties:
        object:
          type: string
          enum:
          - list
        data:
          type: array
          items: {}
        has_more:
          type: boolean
      required:
      - object
      - data
      - has_more
      additionalProperties: false
      description: Cursor-paginated list envelope.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
              - invalid_request_error
              - authentication_error
              - permission_error
              - rate_limit_error
              - api_error
            code:
              type: string
            message:
              type: string
            param:
              type: string
            request_id:
              type: string
            details:
              type: object
              additionalProperties: {}
              description: Machine-readable specifics for offer document refusals only, such as the missing fill-ins of required_answers_missing or the clashing fill-in of fill_in_type_clash.
          required:
          - type
          - code
          - message
          - request_id
          additionalProperties: false
      required:
      - error
      additionalProperties: false
      description: Canonical API error envelope. Every 404 not-found response uses a resource-specific code and includes param with the exact body field or path parameter that referenced the unavailable resource. Use code and param for programmatic handling, and request_id for support; message text is not a stable contract.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Yardstick API tokens. Format: `ys_(sk|pk)_(live|test)_<32+ chars>`. **Secret keys** (`ys_sk_…`) are server-only — using one from a browser origin returns `secret_key_browser_denied`. **Publishable keys** (`ys_pk_…`) are browser-safe and restricted to intake-only person creation.'
x-refined-from:
- api.yardstick.team_v1_openapi.json
- yardstick-team-openapi.json
x-provenance:
  method: harvested
  publisher: Yardstick
  source: https://api.yardstick.team/v1/openapi.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)