Credentially Stages API

Kanban placement stages — per-org column definitions for the placements board.

OpenAPI Specification

credentially-stages-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Credentially Public Compliance-packages Stages API
  description: Public API Proxy with Rate Limiting and Audit
  version: 2.0.0
servers:
- url: https://app.credentially.io/gateway
  description: Generated server url
tags:
- name: Stages
  description: Kanban placement stages — per-org column definitions for the placements board.
paths:
  /api/stages/{publicId}:
    put:
      tags:
      - Stages
      summary: Update a stage's mutable fields (rename / recolour / enable-disable)
      description: '


        **Rate Limit:** `update-stage` (25 req / 1s)'
      operationId: update
      parameters:
      - name: publicId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: X-API-Version
        in: header
        schema:
          type: string
          default: 2.0.0
          enum:
          - 2.0.0
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateStageRequest'
        required: true
      responses:
        '200':
          description: Stage updated.
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/StageResponse'
        '400':
          description: Validation failed (name blank, colour not hex)
        '404':
          description: Stage not found in this organisation
        '409':
          description: Name collides with an existing stage
        '429':
          description: Too many requests - the rate limit for this endpoint has been exceeded. Use the Retry-After header to determine when to retry.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                type: integer
                format: int32
                example: 1
      security:
      - bearer-key: []
  /api/stages/order:
    put:
      tags:
      - Stages
      summary: Reorder all stages
      description: 'Total reorder — the full left-to-right list of every stage public id in the org.


        **Rate Limit:** `reorder-stages` (25 req / 1s)'
      operationId: reorder
      parameters:
      - name: X-API-Version
        in: header
        schema:
          type: string
          default: 2.0.0
          enum:
          - 2.0.0
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReorderStagesRequest'
        required: true
      responses:
        '200':
          description: Stages reordered; returns the new order.
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/StageResponse'
        '400':
          description: Reorder list does not match the org's stages exactly
        '429':
          description: Too many requests - the rate limit for this endpoint has been exceeded. Use the Retry-After header to determine when to retry.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                type: integer
                format: int32
                example: 1
      security:
      - bearer-key: []
  /api/stages:
    get:
      tags:
      - Stages
      summary: List stages (ordered, with cap meta)
      description: '


        **Rate Limit:** `list-stages` (100 req / 1s)'
      operationId: list_4
      parameters:
      - name: X-API-Version
        in: header
        schema:
          type: string
          default: 2.0.0
          enum:
          - 2.0.0
      responses:
        '200':
          description: Stages listed.
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/StageListResponse'
        '401':
          description: Bearer token missing / invalid
        '429':
          description: Too many requests - the rate limit for this endpoint has been exceeded. Use the Retry-After header to determine when to retry.
          headers:
            Retry-After:
              description: Number of seconds to wait before retrying the request.
              schema:
                type: integer
                format: int32
                example: 1
      security:
      - bearer-key: []
components:
  schemas:
    ReorderStagesRequest:
      type: object
      properties:
        stageIds:
          type: array
          items:
            type: string
            format: uuid
          minItems: 1
      required:
      - stageIds
    Meta:
      type: object
      properties:
        maxPerOrg:
          type: integer
          format: int32
    UpdateStageRequest:
      type: object
      properties:
        name:
          type: string
          maxLength: 128
          minLength: 0
        colour:
          type: string
          minLength: 1
          pattern: ^#[0-9A-Fa-f]{6}$
        enabled:
          type: boolean
      required:
      - colour
      - enabled
      - name
    StageListResponse:
      type: object
      properties:
        stages:
          type: array
          items:
            $ref: '#/components/schemas/StageResponse'
        meta:
          $ref: '#/components/schemas/Meta'
    StageResponse:
      type: object
      properties:
        publicId:
          type: string
          format: uuid
        name:
          type: string
        colour:
          type: string
        enabled:
          type: boolean
        ordinal:
          type: integer
          format: int32
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
          format: uuid
        updatedAt:
          type: string
          format: date-time
        updatedBy:
          type: string
          format: uuid
  securitySchemes:
    bearer-key:
      type: http
      scheme: bearer
      bearerFormat: JWT