Yardstick Roles API

Role assignments and the v1 system role catalog.

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 6

GET /v1/roles List the v1 system roles and their permission matrix #
GET /v1/role_assignments List role assignments in the actor's organization #
POST /v1/role_assignments Grant a role at a scope #
GET /v1/role_assignments/{id} Get one role assignment #
PATCH /v1/role_assignments/{id} No-op-or-422: PATCH accepts the same body as POST but only succeeds if it… #
DELETE /v1/role_assignments/{id} Revoke a role assignment #

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-roles-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-roles-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Yardstick Team Roles API
  version: '2026-05-02'
  description: 'Operations tagged Roles 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: Roles
  description: Role assignments and the v1 system role catalog.
paths:
  /v1/roles:
    get:
      tags:
      - Roles
      summary: List the v1 system roles and their permission matrix
      operationId: listSystemRoles
      responses:
        '200':
          description: The 5 v1 system roles (admin, recruiter, department_lead, hiring_manager, interviewer).
          content:
            application/json:
              schema:
                type: object
                required:
                - data
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Role'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
    servers:
    - url: https://api.yardstick.team
      description: Production
  /v1/role_assignments:
    get:
      tags:
      - Roles
      summary: List role assignments in the actor's organization
      operationId: listRoleAssignments
      parameters:
      - name: user_id
        in: query
        schema:
          type: string
          pattern: ^per_[A-Z0-9]{26}$
      - name: role
        in: query
        schema:
          type: string
          enum:
          - admin
          - recruiter
          - department_lead
          - hiring_manager
      - name: cursor
        in: query
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 50
          default: 50
      responses:
        '200':
          description: Paginated role assignments.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleAssignmentList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
    post:
      tags:
      - Roles
      summary: Grant a role at a scope
      operationId: createRoleAssignment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - user
              - role
              - scope
              properties:
                user:
                  type: string
                  pattern: ^per_[A-Z0-9]{26}$
                role:
                  type: string
                  enum:
                  - admin
                  - recruiter
                  - department_lead
                  - hiring_manager
                scope:
                  $ref: '#/components/schemas/RoleAssignmentScope'
      responses:
        '201':
          description: Role assignment created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleAssignment'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
    servers:
    - url: https://api.yardstick.team
      description: Production
  /v1/role_assignments/{id}:
    parameters:
    - name: id
      in: path
      required: true
      schema:
        type: string
        pattern: ^rola_[A-Z0-9]{26}$
    get:
      tags:
      - Roles
      summary: Get one role assignment
      operationId: getRoleAssignment
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleAssignment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    patch:
      tags:
      - Roles
      summary: 'No-op-or-422: PATCH accepts the same body as POST but only succeeds if it…'
      operationId: patchRoleAssignment
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                user:
                  type: string
                  pattern: ^per_[A-Z0-9]{26}$
                role:
                  type: string
                  enum:
                  - admin
                  - recruiter
                  - department_lead
                  - hiring_manager
                scope:
                  $ref: '#/components/schemas/RoleAssignmentScope'
      responses:
        '200':
          description: No-op succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleAssignment'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
    delete:
      tags:
      - Roles
      summary: Revoke a role assignment
      operationId: deleteRoleAssignment
      responses:
        '204':
          description: Deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
    servers:
    - url: https://api.yardstick.team
      description: Production
components:
  schemas:
    RoleAssignmentList:
      type: object
      required:
      - data
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/RoleAssignment'
        next_cursor:
          type: string
    RoleAssignmentScope:
      oneOf:
      - type: object
        required:
        - type
        - id
        properties:
          type:
            type: string
            enum:
            - org
          id:
            type: string
            pattern: ^org_[A-Z0-9]{26}$
      - type: object
        required:
        - type
        - id
        properties:
          type:
            type: string
            enum:
            - department
          id:
            type: string
            pattern: ^dpt_[A-Z0-9]{26}$
      - type: object
        required:
        - type
        - id
        properties:
          type:
            type: string
            enum:
            - job
          id:
            type: string
            pattern: ^job_[A-Z0-9]{26}$
      discriminator:
        propertyName: type
    Role:
      type: object
      required:
      - id
      - label
      - description
      - scopes
      - permissions
      properties:
        id:
          type: string
          enum:
          - admin
          - recruiter
          - department_lead
          - hiring_manager
          - interviewer
        label:
          type: string
        description:
          type: string
        scopes:
          type: array
          items:
            type: string
            enum:
            - org
            - department
            - job
        permissions:
          type: object
          additionalProperties:
            type: string
            enum:
            - read
            - write
            - manage
          description: Map of resource → highest action the role holds. Resources are the locked v1 list documented in docs/product/roles-and-permissions/v1-decision-record.md Appendix A.
    RoleAssignment:
      type: object
      required:
      - id
      - user
      - role
      - scope
      - created_at
      properties:
        id:
          type: string
          pattern: ^rola_[A-Z0-9]{26}$
        user:
          type: string
          pattern: ^per_[A-Z0-9]{26}$
        role:
          type: string
          enum:
          - admin
          - recruiter
          - department_lead
          - hiring_manager
        scope:
          $ref: '#/components/schemas/RoleAssignmentScope'
        created_at:
          type: string
          format: date-time
        created_by:
          type:
          - string
          - 'null'
          pattern: ^per_[A-Z0-9]{26}$
  responses:
    Unauthorized:
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true
    UnprocessableEntity:
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true
    NotFound:
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true
    Forbidden:
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true
    BadRequest:
      description: Referenced by this document but never defined in it. API Evangelist added this empty placeholder so the document resolves; the shape is unknown and is NOT a claim about the API.
      x-ae-placeholder: true
  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)