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

# Join via invite



## OpenAPI

````yaml developers/api-reference/openapi.json post /v1/invites/{code}/accept
openapi: 3.0.3
info:
  title: Magne API
  version: 1.0.0
  description: RESTful API for the Magne communication platform.
servers:
  - url: https://api.magne.app
    description: Production
security:
  - BearerAuth: []
tags:
  - name: Auth
    description: Registration, login, password reset, and token management
  - name: Servers
    description: Server CRUD and membership
  - name: Discovery
    description: Discover public servers
  - name: Channels
    description: Channel management within servers
  - name: Messages
    description: Send, list, edit, and delete messages
  - name: Pins
    description: Pin and unpin messages
  - name: Reactions
    description: Message reactions
  - name: Categories
    description: Server category management
  - name: Members
    description: Server member management
  - name: Bans
    description: Ban and unban server members
  - name: Roles
    description: Role CRUD and assignment
  - name: Invites
    description: Server invite management
  - name: Join Requests
    description: Manage server join requests
  - name: Profile
    description: User profiles and search
  - name: Badges
    description: Badge catalog and user badges
  - name: Friends
    description: Friend requests and management
  - name: Direct Messages
    description: DM conversations and messages
  - name: Calls
    description: Voice and video calls
  - name: E2EE Keys
    description: End-to-end encryption key management
  - name: Voice
    description: Voice channel participation and controls
  - name: Notifications
    description: User notification management
  - name: Webhooks
    description: Server webhook management
  - name: Music
    description: Music bot proxy controls
  - name: Game Index
    description: Game executable index contributions
  - name: Search
    description: Server-wide search
  - name: Channel Permissions
    description: Channel permission overrides
  - name: Media
    description: File uploads and link previews
  - name: Templates
    description: Import Discord server templates
paths:
  /v1/invites/{code}/accept:
    post:
      tags:
        - Invites
      summary: Join via invite
      operationId: joinViaInvite
      parameters:
        - name: code
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ServerResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    ServerResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        iconUrl:
          type: string
          nullable: true
        bannerUrl:
          type: string
          nullable: true
        description:
          type: string
          nullable: true
        ownerId:
          type: string
          format: uuid
        isPublic:
          type: boolean
        requireApproval:
          type: boolean
        entranceChannelId:
          type: string
          format: uuid
          nullable: true
        afkChannelId:
          type: string
          format: uuid
          nullable: true
        jtcChannelId:
          type: string
          format: uuid
          nullable: true
        tags:
          type: array
          items:
            type: string
        createdAt:
          type: string
          format: date-time
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Conflict:
      description: Conflict
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````