> ## Documentation Index
> Fetch the complete documentation index at: https://prismspace-5c919a09.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel session

> Cancel a session (event_id, or schedule_id and date).



## OpenAPI

````yaml ankra/api-reference/openapi.json POST /cancel-session
openapi: 3.1.0
info:
  title: Ankra API
  version: 1.0.0
  description: >-
    Read and write an Ankra workspace from your games and scripts. Generate a
    key in Ankra's Settings › Developer.


    Every request sends the key as `Authorization: Bearer ws_…` and the
    workspace as `?workspace_id=`: the ID in the

    workspace's Ankra address, or its UUID. Each key works for its own workspace
    only.


    People are named by `roblox_user_id`. Parameters go in the query string for
    GET and DELETE, and in a JSON body

    otherwise. An action belonging to a module answers 403 while that module is
    turned off. Errors come back as

    `{ "error": "…" }`.
servers:
  - url: https://api.lumonol.co.uk/ankra
security:
  - apiKey: []
tags:
  - name: Workspace
    description: The workspace, its roles and its Roblox group.
  - name: Staff
    description: Members, the directory, ranks. Needs the staff module.
  - name: Labels
    description: Labels on staff. Needs the staff module.
  - name: Logbook
    description: Promotions, warnings and notes. Needs the staff module.
  - name: Time off
    description: Inactivity requests. Needs the staff module.
  - name: Activity
    description: In-game minutes and messages. Needs the activity module.
  - name: Sessions
    description: Scheduled sessions, their servers and roles. Needs the activity module.
  - name: Assignments
    description: Weekly assignments. Needs the assignments module.
  - name: Knowledge
    description: The knowledge base, read only. Needs the knowledge module.
  - name: Bans
    description: Game bans.
  - name: Orders
    description: Game orders.
paths:
  /cancel-session:
    post:
      tags:
        - Sessions
      summary: Cancel session
      description: Cancel a session (event_id, or schedule_id and date).
      operationId: cancel-session
      parameters:
        - $ref: '#/components/parameters/workspace_id'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              required: []
              properties:
                event_id:
                  type: string
                  format: uuid
                  description: The session's ID. Or send schedule_id and date instead.
                schedule_id:
                  type: string
                  format: uuid
                  description: >-
                    With date: the session type, for a session that has no
                    event_id yet.
                date:
                  type: string
                  format: date
                  description: 'With schedule_id: the day of the session, YYYY-MM-DD.'
                executor_roblox_user_id:
                  type: integer
                  description: >-
                    Roblox user ID of whoever did this in game. Recorded as the
                    actor when they are linked to someone in the workspace.
                actor_name:
                  type: string
                  description: The name to record as the actor. Defaults to "API".
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  event_id:
                    type: string
                    format: uuid
                  status:
                    type: string
                    const: cancelled
        '400':
          description: A parameter is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: The activity module is turned off for this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    workspace_id:
      name: workspace_id
      in: query
      required: true
      description: 'The workspace: the 24-character ID in its Ankra address, or its UUID.'
      schema:
        type: string
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          examples:
            - roblox_user_id is required
  responses:
    Unauthorized:
      description: The key is wrong, or is not for this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: ws_ key
      description: A workspace API key from Settings › Developer.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.