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

# Cancel Invitation

> Cancel an invitation.

Deletes an invitation from the database. Only invitations belonging to
the current user's account can be cancelled.

Args:
    invitation_id: ID of the invitation to cancel.
    current_user: Authenticated user context.
    session: Database session.

Raises:
    HTTPException: 404 if invitation not found or doesn't belong to account.



## OpenAPI

````yaml delete /api/v1/invitations/{invitation_id}
openapi: 3.1.0
info:
  title: SnackBase
  description: Open-source Backend-as-a-Service (BaaS)
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/invitations/{invitation_id}:
    delete:
      tags:
        - invitations
      summary: Cancel Invitation
      description: |-
        Cancel an invitation.

        Deletes an invitation from the database. Only invitations belonging to
        the current user's account can be cancelled.

        Args:
            invitation_id: ID of the invitation to cancel.
            current_user: Authenticated user context.
            session: Database session.

        Raises:
            HTTPException: 404 if invitation not found or doesn't belong to account.
      operationId: cancel_invitation_api_v1_invitations__invitation_id__delete
      parameters:
        - name: invitation_id
          in: path
          required: true
          schema:
            type: string
            title: Invitation Id
      responses:
        '204':
          description: Successful Response
        '404':
          description: Invitation not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````