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

# Update an action

> Partially update an action's attributes (`title`, `body`, `priority`,
`due_at`) and assignee relationships. State transitions use the dedicated
close / reopen endpoints, not PATCH.




## OpenAPI

````yaml /api-reference/openapi.yaml patch /v3/actions/{action_id}
openapi: 3.1.0
info:
  contact:
    email: support@ctrl-hub.com
    name: Ctrl Hub
    url: https://www.ctrl-hub.com
  description: >
    Ctrl Hub is the all-in-one platform for high-risk industries like utilities,
    construction, infrastructure, and renewables. We help teams manage
    everything from risk assessments and HAVS exposure to vehicle and equipment
    checks, with a guaranteed minimum of 200% ROI.
  license:
    name: MIT License
    url: https://opensource.org/licenses/MIT
  summary: An API for managing your compliance and risk posture
  termsOfService: https://www.ctrl-hub.com/terms-conditions
  title: Ctrl Hub
  version: 1.0.0
servers:
  - description: Production
    url: https://api.ctrl-hub.com
  - description: Staging
    url: https://api.ctrl-hub.dev
  - description: Development
    url: https://api.ctrl-hub.run
security: []
tags:
  - description: |
      Actions are follow-ups assigned to users and teams, produced manually or
      by domain producers such as the data-capture workflow runner.
    name: Actions
  - description: |
      Audit events are the events that are logged by the system.
    name: Audit Events
  - description: |
      View the platform's health and availability.
    name: Status
  - description: >
      User-owned dashboards composed of cards on a fixed-slot bento layout.
      Cards come from a per-domain registry; the API stores their config as
      opaque JSON.
    name: Dashboards
  - description: |
      Manage appointments for work to be carried out with your customers
    name: Customer Appointments
  - description: |
      Manage interactions you have with your customers
    name: Customer Interactions
  - description: |
      Manage accounts for your customers
    name: Customer Accounts and Contacts
  - description: |
      Qualifications are the skills and knowledge that an organisation requires.
    name: Qualifications
  - description: |
      Workflows allow you to automate your processes.
    name: Workflows
  - description: |
      Manage documents
    name: Documents
  - description: |
      Manage documents
    name: Folders
  - description: |
      Manage documents
    name: Document Reviews
  - description: |
      Manage feature configurations for an organisation.
    name: Feature Configurations
  - description: |
      Equipment are the physical assets that an organisation manages.
    name: Equipment
  - description: >
      Locations are places an organisation manages, optionally classified by a
      location type.
    name: Locations
  - description: |
      Manage your forms and their schemas
    name: Forms, Schemas and Categories
  - description: |
      Create and view form submissions
    name: Submissions
  - description: |
      View the roles available in the system.
    name: IAM Roles
  - description: >
      IAM role groups can be assigned to principals to manage authorisation
      centrally.
    name: IAM Role Groups
  - description: |
      Manage service accounts which can access the API programmatically.
    name: Service Accounts
  - description: |
      Manage bridges between organisations.
    name: Bridges
  - description: |
      Manage settings for an organisation.
    name: Settings
  - description: |
      Manage teams within an organisation.
    name: Teams
  - description: |
      Manage job roles within an organisation.
    name: Job Roles
  - description: |
      Manage users and accounts.
    name: Users
  - description: |
      Invite and manage invitations to organisations.
    name: Invitations
  - description: >
      IAM grants are the asignment of roles or permissions to principals to
      manage resource access.
    name: IAM Grants
  - description: |
      View the permissions available in the system.
    name: IAM Permissions
  - description: |
      SSO providers are the identity providers for an organisation.
    name: SSO Providers
  - description: |
      Whoami returns information about the currently authenticated principal.
    name: Whoami
  - description: |
      Manage your images
    name: Images
  - description: >
      AI agent personas that synthesise data into role-specific intelligent
      briefings.
    name: Agents
  - description: |
      Briefings generated by AI agents, including reasoning traces.
    name: Briefings
  - description: >
      Organisations are the center point for most resources in the platform.
      Most other endpoints are subresources of an organisation.
    name: Organisations
  - description: |
      Permits managements, integrated with street manager.
    name: Permits
  - description: |
      Projects manage your work and governance.
    name: Projects
  - description: >
      Import templates allow users to save and reuse their CSV importer
      configuration as named templates.
    name: Import Templates
  - description: |
      Properties are the physical locations.
    name: Properties
  - description: |
      Search across schemes, work orders, and operations.
    name: Search
  - description: |
      Provides the API specification in JSON and YAML formats
    name: Specifications
  - description: |
      Streets are the physical roads.
    name: Streets
  - description: |
      Integration with street manager
    name: Street Manager
  - description: |
      Vehicles are the physical vehicles that an organisation manages.
    name: Vehicles
  - description: >
      Scheme contracts (also known as regions) group schemes allocated from the
      network to a contractor.
    name: Scheme Contracts
  - description: >
      Scheme shares allow you to share your schemes with other organisations
      across bridges.
    name: Scheme Shares
  - description: |
      Schemes are large programmes of work
    name: Schemes
  - description: |
      Work orders the component parts of a scheme.
    name: Work Orders
  - description: |
      Operations are the work to be carried out within work orders.
    name: Operations
externalDocs:
  description: More documentation and resources
  url: https://docs.ctrl-hub.com
paths:
  /v3/actions/{action_id}:
    patch:
      tags:
        - Actions
      summary: Update an action
      description: >
        Partially update an action's attributes (`title`, `body`, `priority`,

        `due_at`) and assignee relationships. State transitions use the
        dedicated

        close / reopen endpoints, not PATCH.
      operationId: PatchAction
      parameters:
        - $ref: '#/components/parameters/action_id'
      requestBody:
        $ref: '#/components/requestBodies/PatchAction'
      responses:
        '200':
          $ref: '#/components/responses/PatchAction'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorised'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - Session: []
        - OAuth2: []
        - Cookie: []
components:
  parameters:
    action_id:
      name: action_id
      in: path
      required: true
      description: The unique identifier for the action.
      schema:
        type: string
        format: uuid
      example: ac0a0a0a-1111-4abc-8def-0a0a0a0a0001
  requestBodies:
    PatchAction:
      required: true
      description: >
        Partial update for an action. All fields are optional; only provided
        fields

        are updated. Edits attributes (`title`, `body`, `priority`, `due_at`)
        and the

        assignee relationships only. State transitions use the dedicated close /

        reopen endpoints, not PATCH.
      content:
        application/vnd.api+json:
          schema:
            type: object
            required:
              - data
            properties:
              data:
                type: object
                required:
                  - id
                  - type
                properties:
                  id:
                    type: string
                    format: uuid
                    description: The unique identifier of the action.
                  type:
                    type: string
                    const: actions
                  attributes:
                    type: object
                    properties:
                      title:
                        type: string
                        minLength: 1
                        maxLength: 255
                        description: The short, human-readable summary of what needs doing.
                      body:
                        type: string
                        description: The longer description of the action.
                      priority:
                        type: string
                        description: The urgency of the action.
                        enum:
                          - low
                          - normal
                          - high
                          - urgent
                      due_at:
                        type:
                          - string
                          - 'null'
                        format: date-time
                        description: >-
                          When the action is due. Send null to clear the due
                          date.
                  relationships:
                    type: object
                    properties:
                      assigned_users:
                        type: object
                        description: Replaces the set of users assigned to this action.
                        required:
                          - data
                        properties:
                          data:
                            type: array
                            items:
                              $ref: '#/components/schemas/UserRelationship'
                      assigned_teams:
                        type: object
                        description: Replaces the set of teams assigned to this action.
                        required:
                          - data
                        properties:
                          data:
                            type: array
                            items:
                              $ref: '#/components/schemas/TeamRelationship'
  responses:
    PatchAction:
      description: Action updated successfully.
      headers:
        Content-Type:
          $ref: '#/components/headers/content-type'
        Content-Length:
          $ref: '#/components/headers/content-length'
        X-Request-ID:
          $ref: '#/components/headers/x-request-id'
      content:
        application/vnd.api+json:
          schema:
            allOf:
              - type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/Action'
                  included:
                    $ref: '#/components/schemas/ActionIncludes'
              - $ref: '#/components/schemas/JSONAPI'
    BadRequest:
      description: >
        There was an error with the request - this could be due to an invalid
        body, query parameters,

        or headers that were sent to the API.
      headers:
        Content-Type:
          $ref: '#/components/headers/content-type'
        Content-Length:
          $ref: '#/components/headers/content-length'
        X-Request-ID:
          $ref: '#/components/headers/x-request-id'
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
          example:
            id: 98ca4a78-b66f-4234-9719-aaf832ee6669
            status: '400'
            title: A validation error was encountered
            source:
              parameter: include
            meta:
              resource: wrong_value
    Unauthorised:
      description: Authentication failed
      headers:
        Content-Type:
          $ref: '#/components/headers/content-type'
        Content-Length:
          $ref: '#/components/headers/content-length'
        X-Request-ID:
          $ref: '#/components/headers/x-request-id'
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
          example:
            id: 05fc9c8d-73b9-4697-9337-57f7a567a48f
            status: '401'
            title: You are not authorised to access this resource
            detail: In order to access this resource, you need the 'admin' role.
            code: AUTH.001
    NotFound:
      description: The requested resource could not be found
      headers:
        Content-Type:
          $ref: '#/components/headers/content-type'
        Content-Length:
          $ref: '#/components/headers/content-length'
        X-Request-ID:
          $ref: '#/components/headers/x-request-id'
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
          example:
            id: 7b4c8f12-3e9a-4d5b-8c6f-1a2b3c4d5e6f
            status: '404'
            title: Resource not found
            detail: The requested resource could not be found or does not exist.
            code: NOT_FOUND.001
    InternalServerError:
      description: There was a problem handling the request on the server side
      headers:
        Content-Type:
          $ref: '#/components/headers/content-type'
        Content-Length:
          $ref: '#/components/headers/content-length'
        X-Request-ID:
          $ref: '#/components/headers/x-request-id'
      content:
        application/vnd.api+json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  $ref: '#/components/schemas/Error'
          example:
            id: fe9d9a69-f0a7-4fdc-bb2c-176027f316c5
            status: '500'
            title: Internal Server Error
            detail: An unexpected error occurred on the server.
  schemas:
    UserRelationship:
      type: object
      description: Represents a relationship to a user
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the user
        type:
          type: string
          const: users
    TeamRelationship:
      type: object
      description: Represents a relationship to a team
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the team
        type:
          type: string
          const: teams
    Action:
      type: object
      description: >
        An action is a piece of work that needs doing, assigned to one or more
        users

        and/or teams. It has a lifecycle state (`open` / `closed`), a priority,
        an

        optional due date, and an optional polymorphic link back to whatever
        produced

        it (in v1, a form submission). Actions are produced both manually and by

        domain producers such as the data-capture workflow runner.


        The subject is optional. When present, exactly the relationship matching

        `subject_type` is populated (v1: `subject_type` is `form-submissions`,
        so

        `form_submission` is the populated relationship). Manual actions can
        have no

        subject at all.
      required:
        - id
        - type
        - attributes
        - meta
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the action.
        type:
          type: string
          const: actions
        attributes:
          $ref: '#/components/schemas/ActionAttributes'
        meta:
          $ref: '#/components/schemas/ActionMeta'
        relationships:
          $ref: '#/components/schemas/ActionRelationships'
    ActionIncludes:
      type: array
      description: Related resources that can be included when an action is returned.
      items:
        discriminator:
          propertyName: type
          mapping:
            users:
              $ref: '#/components/schemas/User'
            teams:
              $ref: '#/components/schemas/Team'
            form-submissions:
              $ref: '#/components/schemas/FormSubmission'
            job-roles:
              $ref: '#/components/schemas/JobRole'
        oneOf:
          - $ref: '#/components/schemas/User'
          - $ref: '#/components/schemas/Team'
          - $ref: '#/components/schemas/FormSubmission'
          - $ref: '#/components/schemas/JobRole'
    JSONAPI:
      type: object
      description: JSON API response object
      required:
        - jsonapi
      properties:
        jsonapi:
          type: object
          required:
            - version
          properties:
            version:
              type: string
              description: The version of the JSON API specification
              examples:
                - '1.0'
    Error:
      type: object
      description: An error response
      properties:
        id:
          description: >-
            A unique identifier for this particular occurrence of the problem.
            If you encounter this, please provide us with the error ID and we
            can investigate it on our side.
          type: string
          format: uuid
          examples:
            - 05fc9c8d-73b9-4697-9337-57f7a567a48f
        status:
          description: >-
            The status code for the error. This might not match the HTTP status
            code if there are more that one errors to return with different
            status codes.
          type: string
          examples:
            - '401'
            - '500'
        title:
          description: A human readable title for the error.
          type: string
          examples:
            - You are not authorised to access this resource
        detail:
          description: >-
            Where there is more detail that we can provide outside of the title,
            we will provide it here.
          type: string
          examples:
            - In order to access this resource, you need the 'admin' role.
        code:
          description: >-
            A unique code for the error that may help us to diagnose the issue.
            Not all errors have codes, so this is usually empty.
          type: string
          examples:
            - AUTH.001
        source:
          description: A JSON object containing additional information about the error.
          type: object
          properties:
            pointer:
              description: >-
                A JSON Pointer to the value in the request that caused the
                error.
              type: string
              examples:
                - /data/attributes/email
            parameter:
              description: >-
                A string indicating which query parameter in the request caused
                the error.
              type: string
              examples:
                - include
      required:
        - id
        - status
        - title
    ActionAttributes:
      type: object
      description: Attributes of an action.
      required:
        - title
        - priority
        - state
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 255
          description: The short, human-readable summary of what needs doing.
          examples:
            - Review submission for Scheme Alpha
        body:
          type: string
          description: |
            The longer description of the action. Rendered verbatim from the
            producer's configuration at create time.
          examples:
            - Submission
        priority:
          type: string
          description: The urgency of the action.
          enum:
            - low
            - normal
            - high
            - urgent
          default: normal
          examples:
            - high
        state:
          type: string
          description: The lifecycle state of the action.
          enum:
            - open
            - closed
          examples:
            - open
        close_reason:
          type:
            - string
            - 'null'
          description: |
            Why the action was closed. Null while the action is open. Set by the
            close endpoint and cleared by the reopen endpoint.
          enum:
            - completed
            - dismissed
            - superseded
            - null
          examples:
            - completed
        closed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: When the action was closed. Null while the action is open.
        subject_type:
          type:
            - string
            - 'null'
          description: >
            The kind of resource that produced or is linked to this action. Null
            for

            manual actions with no subject. When set, the matching relationship
            in

            `relationships` is populated (v1: `form-submissions` ->
            `form_submission`).
          enum:
            - form-submissions
            - null
          examples:
            - form-submissions
        due_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >
            When the action is due. Null if the action has no due date.
            Producers

            resolve relative due configuration (e.g. "+7D") to an absolute value
            at

            create time.
          examples:
            - '2026-06-05T17:00:00.000Z'
    ActionMeta:
      type: object
      description: Metadata for an action.
      required:
        - created_at
      properties:
        created_at:
          type: string
          format: date-time
          description: The date and time when the action was created.
        updated_at:
          type: string
          format: date-time
          description: The date and time when the action was last updated.
        deleted_at:
          type: string
          format: date-time
          description: The date and time when the action was soft-deleted, if applicable.
    ActionRelationships:
      type: object
      description: >
        Relationships for an action. `organisation` is always present.
        `assigned_users`

        and `assigned_teams` are to-many and either may be empty (but at least
        one

        assignee resolves across the two at create time). `form_submission`,

        `triggering_job_role`, and `closed_by` are optional to-one
        relationships,

        populated only when relevant (subject present, role-resolved assignees,

        closed action respectively).
      required:
        - organisation
      properties:
        organisation:
          type: object
          description: The organisation the action belongs to.
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/OrganisationRelationship'
        assigned_users:
          type: object
          description: The users this action is assigned to (snapshot at create time).
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/UserRelationship'
        assigned_teams:
          type: object
          description: >-
            The teams this action is assigned to. Membership is resolved at view
            time.
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/TeamRelationship'
        form_submission:
          type: object
          description: >-
            The form submission that produced this action (when subject_type is
            `form-submissions`).
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/FormSubmissionRelationship'
        triggering_job_role:
          type: object
          description: >
            The job role whose holders were resolved as assignees, when the
            action was

            created via the `job_role_holders_on_subject` resolver.
            Display-only; the

            assigned users/teams remain the source of truth for who can close
            it.
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/JobRoleRelationship'
        closed_by:
          type: object
          description: The user who closed the action. Absent while the action is open.
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/UserRelationship'
    User:
      type: object
      description: A user
      required:
        - id
        - type
        - attributes
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the user.
          examples:
            - 123e4567-e89b-12d3-a456-426614174000
        type:
          type: string
          const: users
        attributes:
          $ref: '#/components/schemas/UserAttributes'
        meta:
          $ref: '#/components/schemas/UserMeta'
        relationships:
          $ref: '#/components/schemas/UserRelationships'
    Team:
      type: object
      description: A team
      required:
        - id
        - type
        - attributes
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the team.
        type:
          type: string
          const: teams
        attributes:
          $ref: '#/components/schemas/TeamAttributes'
        meta:
          $ref: '#/components/schemas/TeamMeta'
        relationships:
          $ref: '#/components/schemas/TeamRelationships'
    FormSubmission:
      type: object
      description: A form submission
      required:
        - id
        - type
        - meta
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the form submission.
        type:
          type: string
          const: form-submissions
        meta:
          $ref: '#/components/schemas/FormSubmissionMeta'
        relationships:
          $ref: '#/components/schemas/FormSubmissionRelationships'
    JobRole:
      type: object
      description: An internal job role
      required:
        - id
        - type
        - attributes
        - meta
        - relationships
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the job role.
        type:
          type: string
          const: job-roles
        attributes:
          $ref: '#/components/schemas/JobRoleAttributes'
        meta:
          $ref: '#/components/schemas/JobRoleMeta'
        relationships:
          $ref: '#/components/schemas/JobRoleRelationships'
    OrganisationRelationship:
      type: object
      description: Represents a relationship to an organisation
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the organisation
        type:
          type: string
          const: organisations
    FormSubmissionRelationship:
      type: object
      description: Represents a relationship to a form submission
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the form submission
        type:
          type: string
          const: form-submissions
    JobRoleRelationship:
      type: object
      description: Represents a relationship to a job role
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the job role
        type:
          type: string
          const: job-roles
    UserAttributes:
      type: object
      description: Attributes for a user
      properties:
        email:
          type: string
          format: email
          description: The email address of the user.
          examples:
            - john.doe@example.com
        status:
          type: string
          enum:
            - active
            - inactive
            - pending
            - unknown
          description: >
            The membership status of this user in the organisation in the
            request URL.

            Only populated on org-scoped member endpoints; absent on global user

            endpoints.
          examples:
            - active
        identities:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                format: uuid
                description: The unique identifier for the identity.
                examples:
                  - 39ce13b8-1116-416a-ad5f-3c5edfd44f53
              platform:
                type: string
                description: The platform of the identity.
                examples:
                  - multi_tenant
              meta:
                type:
                  - object
                  - 'null'
                additionalProperties: true
                description: Additional metadata for the identity.
        profile:
          type: object
          properties:
            work:
              type: object
              properties:
                occupation:
                  type: string
                  description: The occupation of the user.
                  examples:
                    - Site Manager
                cscs:
                  type: string
                  description: The CSCS card number of the user.
                  examples:
                    - CSC123456
                eusr:
                  type: string
                  description: The EUSR card number of the user.
                  examples:
                    - EUR789123
                start_date:
                  type: string
                  format: date
                  description: The start date of the user's employment.
                  examples:
                    - '2020-03-01T00:00:00.000Z'
            personal:
              type: object
              properties:
                first_name:
                  type: string
                  description: The first name of the user.
                  examples:
                    - John
                last_name:
                  type: string
                  description: The last name of the user.
                  examples:
                    - Doe
                dob:
                  type: string
                  format: date
                  description: The date of birth of the user.
                  examples:
                    - '1985-06-15T00:00:00.000Z'
                username:
                  type: string
                  description: The username of the user.
                  examples:
                    - johndoe
            contact:
              type: object
              properties:
                mobile:
                  type: string
                  description: The mobile number of the user.
                  examples:
                    - +44 7700 900123
                landline:
                  type: string
                  description: The landline of the user.
                  examples:
                    - +44 20 7946 0958
            address:
              type: object
              properties:
                number:
                  type: string
                  description: The house number of the user's address.
                  default: ''
                  examples:
                    - '42'
                street:
                  type: string
                  description: The street of the user's address.
                  examples:
                    - High Street
                area:
                  type: string
                  description: The area of the user's address.
                  examples:
                    - Westminster
                town:
                  type: string
                  description: The town of the user's address.
                  examples:
                    - London
                county:
                  type: string
                  description: The county of the user's address.
                  examples:
                    - Greater London
                postcode:
                  type: string
                  description: The postcode of the user's address.
                  examples:
                    - SW1A 1AA
                country_code:
                  type: string
                  description: The country code of the user's address.
                  examples:
                    - GB
                what3words:
                  type: string
                  description: The what3words location of the user's address.
                  examples:
                    - filled.count.soap
            settings:
              type: object
              properties:
                preferred_language:
                  type: string
                  description: The preferred language of the user.
                  default: en-GB
                  examples:
                    - en-GB
                timezone:
                  type: string
                  description: The timezone of the user.
                  examples:
                    - Europe/London
    UserMeta:
      type: object
      description: Metadata for a user
      properties:
        managed_type:
          type: string
          enum:
            - none
            - scim
            - organisation
            - unknown
          description: How this user is managed.
    UserRelationships:
      type: object
      description: Relationships for a user
      properties:
        organisations:
          type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/OrganisationRelationship'
        teams:
          type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/TeamRelationship'
        managing_organisation:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/OrganisationRelationship'
    TeamAttributes:
      type: object
      description: Attributes for a team
      properties:
        name:
          type: string
          description: The name of the team.
          examples:
            - Customer Service Representatives
        description:
          type: string
          description: A description of the team.
          examples:
            - >-
              Team responsible for handling customer inquiries and support
              requests
    TeamMeta:
      type: object
      description: Meta information for a team
      properties:
        created_at:
          type: string
          format: date-time
          description: The creation time of the team.
          examples:
            - '2025-07-16T12:42:40.000Z'
        updated_at:
          type: string
          format: date-time
          description: The last update time of the team.
          examples:
            - '2025-07-16T12:42:44.000Z'
    TeamRelationships:
      type: object
      description: Relationships for a team
      properties:
        members:
          type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/UserRelationship'
        organisation:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/OrganisationRelationship'
        schemas:
          type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/FormSchemaRelationship'
    FormSubmissionMeta:
      type: object
      description: Metadata for a form submission
      required:
        - created_at
        - modified_at
        - counts
        - status
      properties:
        created_at:
          type: string
          format: date-time
          description: The date and time when the form submission was created
        modified_at:
          type: string
          format: date-time
          description: The date and time when the form submission was last modified
        status:
          type: string
          description: >
            The lifecycle status of the submission. A `draft` submission is
            partial and was saved

            without validation and stays out of the form's workflow; a
            `submitted` submission has

            been validated. A submission cannot return to draft once submitted.
          enum:
            - draft
            - submitted
        counts:
          type: object
          properties:
            contributors:
              type: integer
              description: The number of contributors to this form submission
              format: int64
              minimum: 0
              default: 0
            versions:
              type: integer
              description: The number of versions of this form submission
              format: int64
              minimum: 0
              default: 1
        workflow:
          type: object
          properties:
            current_step:
              type: object
              required:
                - id
                - type
              properties:
                id:
                  type: string
                  description: The step ID
                type:
                  type: string
                  description: The step type
                  enum:
                    - initial
                    - intermediate
                    - completed
                    - rejected
                    - cancelled
    FormSubmissionRelationships:
      type: object
      description: Relationships for a form submission
      properties:
        form:
          type: object
          properties:
            data:
              $ref: '#/components/schemas/FormRelationship'
        versions:
          type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/FormSubmissionVersionRelationship'
        scheme_shares:
          type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/SchemeShareRelationship'
        workflow:
          type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/WorkflowDefinitionRelationship'
        workflow_version:
          type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/WorkflowDefinitionVersionRelationship'
        workflow_instance:
          type: object
          required:
            - data
          properties:
            data:
              type: array
              items:
                $ref: '#/components/schemas/WorkflowInstanceRelationship'
    JobRoleAttributes:
      type: object
      description: Attributes of a job role.
      required:
        - name
        - description
        - applicable_subject_types
      properties:
        name:
          type: string
          description: The name of the job role.
        description:
          type: string
          description: A detailed description of the job role.
        shared:
          type: boolean
          description: >-
            Whether this job role and its requirements are visible to
            organisations connected via bridges.
          default: false
        alias:
          type: string
          description: |
            Optional presentation name shown when the role is rendered (e.g.
            governance pickers, role cards). Empty string means no alias;
            consumers fall back to `name`. The canonical `name` remains
            authoritative for competency workflows.
          default: ''
        applicable_subject_types:
          type: array
          description: |
            The kinds of governance subject this role may be assigned to via
            job-role-subject-assignments. Assignment creation is rejected for
            subjects whose type is not in this set.
          minItems: 1
          uniqueItems: true
          items:
            type: string
            enum:
              - schemes
              - work-orders
              - operations
          examples:
            - - schemes
              - work-orders
              - operations
    JobRoleMeta:
      type: object
      description: Metadata for a job role
      required:
        - created_at
      properties:
        created_at:
          type: string
          format: date-time
          description: The date and time when the job role was created
        updated_at:
          type: string
          format: date-time
          description: The date and time when the job role was updated
        deleted_at:
          type: string
          format: date-time
          description: The date and time when the job role was deleted
    JobRoleRelationships:
      type: object
      description: Relationships for a job role
      required:
        - organisation
      properties:
        organisation:
          type: object
          required:
            - data
          properties:
            data:
              $ref: '#/components/schemas/OrganisationRelationship'
        competency_requirement_specification:
          type: object
          required:
            - data
          properties:
            data:
              oneOf:
                - $ref: >-
                    #/components/schemas/CompetencyRequirementSpecificationRelationship
                - type: 'null'
        optional_competency_requirement_specification:
          type: object
          required:
            - data
          properties:
            data:
              oneOf:
                - $ref: >-
                    #/components/schemas/CompetencyRequirementSpecificationRelationship
                - type: 'null'
    FormSchemaRelationship:
      type: object
      description: Represents a relationship to a form schema
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the form schema
        type:
          type: string
          const: form-schemas
    FormRelationship:
      type: object
      description: Represents a relationship to a form
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the form
        type:
          type: string
          const: forms
    FormSubmissionVersionRelationship:
      type: object
      description: Represents a relationship to a form submission version
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the form submission version
        type:
          type: string
          const: form-submission-versions
    SchemeShareRelationship:
      type: object
      description: Represents a relationship to a scheme share
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the scheme share
        type:
          type: string
          const: scheme-shares
    WorkflowDefinitionRelationship:
      type: object
      description: Represents a relationship to a workflow definition
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the workflow definition
        type:
          type: string
          const: workflow-definitions
    WorkflowDefinitionVersionRelationship:
      type: object
      description: Represents a relationship to a workflow definition version
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the workflow definition version
        type:
          type: string
          const: workflow-definition-versions
    WorkflowInstanceRelationship:
      type: object
      description: Represents a relationship to a workflow instance
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the workflow instance
        type:
          type: string
          const: workflow-instances
    CompetencyRequirementSpecificationRelationship:
      type: object
      description: Represents a relationship to a competency requirement specification
      required:
        - id
        - type
      properties:
        id:
          type: string
          format: uuid
          description: The unique identifier of the competency requirement specification
        type:
          type: string
          const: competency-requirement-specifications
  headers:
    content-type:
      description: The content type of the response
      schema:
        type: string
      example: application/vnd.api+json
    content-length:
      description: The length of the response body in bytes
      schema:
        type: integer
        format: int32
      example: 1234
    x-request-id:
      description: >-
        An ID that can be provided when reporting bugs to help identify the
        issue
      schema:
        type: string
      example: 8470f56af4cf25e22be08e72c70dbbdc
  securitySchemes:
    Session:
      description: |
        Session token for authentication.
      in: header
      name: X-Session-Token
      type: apiKey
    OAuth2:
      description: |
        OAuth2 token for authentication.
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: https://auth.ctrl-hub.com/oauth2/token
      type: oauth2
    Cookie:
      description: |
        Cookie token for authentication.
      in: cookie
      name: ctrl_hub_session
      type: apiKey

````