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

# Create inbox embed

> Create an embeddable inbox access link.

The response includes `token` and `embed_url` once. Store the embed URL when you create it; list, get, and update responses omit the secret.




## OpenAPI

````yaml /api/platform/v1/openapi-platform.yaml post /inbox_embeds
openapi: 3.1.0
info:
  title: Kapso Platform API
  version: 0.2.0
  description: >
    Build WhatsApp messaging into your product. Manage customers, connect phone
    numbers, send broadcasts, and handle conversations.
servers:
  - url: https://api.kapso.ai/platform/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Customers
    description: Manage customer accounts
  - name: Setup Links
    description: WhatsApp onboarding via embedded signup
  - name: Phone Numbers
    description: Connect and manage WhatsApp numbers
  - name: Webhooks
    description: Subscribe to WhatsApp events
  - name: Display Names
    description: Update WhatsApp business display names
  - name: Broadcasts
    description: |
      Send template messages at scale

      **Alpha**: This API is in alpha and subject to change
  - name: Conversations
    description: Manage conversation state
  - name: Media
    description: Upload media files for WhatsApp messaging
  - name: Users
    description: Manage project team members
  - name: Inbox Embeds
    description: Create and manage embeddable inbox access links
  - name: Webhook Deliveries
    description: View webhook delivery attempts and their status
  - name: External API Logs
    description: View logs of external API calls made by the project
  - name: Provider Models
    description: List available AI provider models
  - name: WhatsApp Flows
    description: Build interactive WhatsApp Flows for surveys and forms
  - name: Contacts
    description: Manage WhatsApp contacts
paths:
  /inbox_embeds:
    post:
      tags:
        - Inbox Embeds
      summary: Create inbox embed
      description: >
        Create an embeddable inbox access link.


        The response includes `token` and `embed_url` once. Store the embed URL
        when you create it; list, get, and update responses omit the secret.
      operationId: createInboxEmbed
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InboxEmbedCreateRequest'
            examples:
              project:
                value:
                  inbox_embed:
                    name: Project inbox
                    scope_type: project
                    allowed_origins:
                      - https://app.example.com
              customer:
                value:
                  inbox_embed:
                    name: Customer inbox
                    scope_type: customer
                    scope_id: 550e8400-e29b-41d4-a716-446655440000
              phone_number:
                value:
                  inbox_embed:
                    name: Support number inbox
                    scope_type: phone_number
                    scope_id: '1234567890'
                    default_mode: system
      responses:
        '201':
          description: Inbox embed created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InboxEmbedCreatedResponse'
              examples:
                created:
                  value:
                    data:
                      id: 550e8400-e29b-41d4-a716-446655440000
                      name: Support number inbox
                      scope_type: phone_number
                      scope_id: '1234567890'
                      scope_name: +1 415 555 1234
                      assigned_user_id: null
                      assigned_user_name: null
                      status: active
                      allowed_origins:
                        - https://app.example.com
                      default_mode: system
                      expires_at: null
                      last_used_at: null
                      created_at: '2025-01-15T10:00:00Z'
                      updated_at: '2025-01-15T10:00:00Z'
                      token: inbox_token_example
                      embed_url: https://inbox.kapso.ai/embed/inbox_token_example
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    InboxEmbedCreateRequest:
      type: object
      required:
        - inbox_embed
      properties:
        inbox_embed:
          type: object
          required:
            - scope_type
          properties:
            name:
              type:
                - string
                - 'null'
            scope_type:
              type: string
              enum:
                - project
                - customer
                - phone_number
            scope_id:
              type:
                - string
                - 'null'
              description: >-
                Required for `customer` and `phone_number`; must be blank for
                `project`
            assigned_user_id:
              type:
                - string
                - 'null'
              format: uuid
            allowed_origins:
              type: array
              items:
                type: string
            default_mode:
              type: string
              enum:
                - system
                - light
                - dark
              default: system
            expires_at:
              type:
                - string
                - 'null'
              format: date-time
    InboxEmbedCreatedResponse:
      type: object
      required:
        - data
      properties:
        data:
          $ref: '#/components/schemas/InboxEmbedCreated'
    InboxEmbedCreated:
      allOf:
        - $ref: '#/components/schemas/InboxEmbed'
        - type: object
          required:
            - token
            - embed_url
          properties:
            token:
              type: string
              description: Raw inbox token. Returned only when the embed is created.
            embed_url:
              type: string
              format: uri
              description: Iframe URL. Returned only when the embed is created.
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    InboxEmbed:
      type: object
      required:
        - id
        - scope_type
        - status
        - allowed_origins
        - default_mode
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        name:
          type:
            - string
            - 'null'
        scope_type:
          type: string
          description: Public embed scope
          enum:
            - project
            - customer
            - phone_number
        scope_id:
          type:
            - string
            - 'null'
          description: >-
            Customer UUID for `customer`, WhatsApp `phone_number_id` for
            `phone_number`, null for `project`
        scope_name:
          type:
            - string
            - 'null'
          description: Human-readable customer or phone number label when available
        assigned_user_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Limits visible conversations to the active assignee
        assigned_user_name:
          type:
            - string
            - 'null'
        status:
          type: string
          enum:
            - active
            - revoked
        allowed_origins:
          type: array
          description: Origins allowed to embed the inbox. Empty means any origin.
          items:
            type: string
          example:
            - https://app.example.com
        default_mode:
          type: string
          enum:
            - system
            - light
            - dark
        expires_at:
          type:
            - string
            - 'null'
          format: date-time
        last_used_at:
          type:
            - string
            - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  responses:
    UnauthorizedError:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ValidationError:
      description: Request validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````