> ## 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.

# Create DM conversation



## OpenAPI

````yaml developers/api-reference/openapi.json post /v1/dm/conversations
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/dm/conversations:
    post:
      tags:
        - Direct Messages
      summary: Create DM conversation
      operationId: createDmConversation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConversationBody'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DmConversationResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CreateConversationBody:
      type: object
      required:
        - userId
      properties:
        userId:
          type: string
          format: uuid
    DmConversationResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        recipientId:
          type: string
          format: uuid
        recipientUsername:
          type: string
        recipientDisplayName:
          type: string
        recipientAvatar:
          type: string
          nullable: true
        recipientStatus:
          type: string
        lastMessage:
          $ref: '#/components/schemas/DmMessageResponse'
          nullable: true
        unreadCount:
          type: integer
          format: int64
        createdAt:
          type: string
          format: date-time
    DmMessageResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        conversationId:
          type: string
          format: uuid
        senderId:
          type: string
          format: uuid
        content:
          type: string
        attachments:
          type: object
          nullable: true
        replyToId:
          type: string
          format: uuid
          nullable: true
        editedAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        senderName:
          type: string
        senderAvatar:
          type: string
          nullable: true
        senderBadges:
          type: array
          items:
            type: string
        reactions:
          type: object
    ApiError:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Unauthorized
      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

````