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

# Create a conversation assignment

> Creates a new assignment for a WhatsApp conversation



## OpenAPI

````yaml api/legacy/openapi-whatsapp.yaml post /whatsapp_conversations/{whatsapp_conversation_id}/conversation_assignments
openapi: 3.0.3
info:
  title: Kapso External API - WhatsApp API
  description: >-
    API for programmatically interacting with Kapso agents, executions, and
    WhatsApp conversations. This specification includes only WhatsApp API
    endpoints.
  version: 1.0.0
  contact:
    name: Kapso Support
servers:
  - url: https://app.kapso.ai/api/v1
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /whatsapp_conversations/{whatsapp_conversation_id}/conversation_assignments:
    post:
      tags:
        - Conversation Assignments
      summary: Create a conversation assignment
      description: Creates a new assignment for a WhatsApp conversation
      operationId: createConversationAssignment
      parameters:
        - name: whatsapp_conversation_id
          in: path
          required: true
          description: ID of the WhatsApp conversation
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - conversation_assignment
              properties:
                conversation_assignment:
                  type: object
                  required:
                    - user_id
                  properties:
                    user_id:
                      type: string
                      format: uuid
                      description: ID of the user to assign the conversation to
                    notes:
                      type: string
                      description: Optional notes for the assignment
      responses:
        '201':
          description: Assignment created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ConversationAssignment'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Conversation or User not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            Validation error (e.g., user not in project, conversation already
            assigned)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ConversationAssignment:
      type: object
      properties:
        id:
          type: string
          format: uuid
        user_id:
          type: string
          format: uuid
        active:
          type: boolean
        notes:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
        created_by_user_id:
          type: string
          format: uuid
          nullable: true
    Error:
      type: object
      properties:
        error:
          type: string
          example: Resource not found
        status:
          type: integer
          example: 404
        message:
          type: string
          example: The requested resource could not be found
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key required for all endpoints

````