required:
  - invitation
type: object
properties:
  invitation:
    required:
      - recipientEmailAddress
      - role
    type: object
    properties:
      role:
        type: string
        enum:
          - organisation_admin
          - organisation_member
          - team_admin
          - team_member
          - mock_api_admin
          - mock_api_editor
          - mock_api_user
          - api_template_admin
          - api_template_editor
          - api_template_user
          - api_template_catalogue_admin
          - api_template_catalogue_editor
          - api_template_catalogue_user
          - data_source_admin
          - data_source_editor
          - data_source_user
          - key_admin
          - key_editor
          - key_user
        example: organisation_admin
        description: The role of the new user within the organisation.
      aclObjectId:
        type: string
        description: >
          The ACL ID of the entity to invite the user to join.
          The `role` field must be valid for the type of ACL entity the user is being invited to.
          For instance, if the ACL entity is a team, the provided `role` must be either `team_member` or `team_admin`.
          If null, the user is not invited to a particular entity, but simply to the organisation.
        example: 8ndxc
        nullable: true
      recipientEmailAddress:
        type: string
        example: docsmember2@example.com
        description: The email address of the user being invited.
