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

# Create BYOA

> Creates a new Bring Your Own Agent (BYOA)

This endpoint lets you create a new Bring Your Own Agent (BYOA).

See [BYOA Agent](../concepts/bring-your-own-agent.mdx) for more information.


## OpenAPI

````yaml api-reference/openapi.json post /api/v1/agents/byoa/
openapi: 3.0.3
info:
  title: Wassist API
  version: 1.0.0
  description: API for building WhatsApp AI agents
servers:
  - url: https://backend.wassist.app
    description: Production
  - url: http://localhost:8050
    description: Development
security: []
tags:
  - name: Agents
    description: Create and manage AI agents
  - name: Conversations
    description: Chat conversations and messages
  - name: WhatsApp
    description: WhatsApp Business account management
  - name: Contacts
    description: Contact management
  - name: Integrations
    description: Third-party integrations
paths:
  /api/v1/agents/byoa/:
    post:
      tags:
        - api
      description: >-
        Create a Bring Your Own Agent (BYOA) agent.


        This creates a proxy agent that forwards all messages to your webhook
        URL.

        Your external agent processes messages and returns responses via the
        callback URL.
      operationId: api_v1_agents_byoa_create
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBYOAAgentInput'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Agent'
          description: ''
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreateBYOAAgentInput:
      type: object
      description: Input serializer for creating a Bring Your Own Agent (BYOA) agent.
      properties:
        webhookUrl:
          type: string
          description: The webhook URL where messages will be forwarded
      required:
        - webhookUrl
    Agent:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          maxLength: 255
        description:
          type: string
        systemPrompt:
          type: string
        firstMessage:
          type: string
        profilePicture:
          type: string
          readOnly: true
        icebreakers: {}
        tools:
          type: array
          items:
            $ref: '#/components/schemas/AgentTool'
          readOnly: true
        documents:
          type: array
          items:
            $ref: '#/components/schemas/AgentDocument'
          readOnly: true
        memoryKeys:
          type: array
          items:
            $ref: '#/components/schemas/AgentMemoryKey'
          readOnly: true
        wakeUpConfigs:
          type: array
          items:
            $ref: '#/components/schemas/AgentWakeUpConfig'
          readOnly: true
        outboundTriggers:
          type: array
          items:
            $ref: '#/components/schemas/AgentOutboundTrigger'
          readOnly: true
        websiteTools:
          type: array
          items:
            $ref: '#/components/schemas/AgentWebsiteTool'
          readOnly: true
        imageGenerateTools:
          type: array
          items:
            $ref: '#/components/schemas/AgentImageGenerateTool'
          readOnly: true
        handoffTools:
          type: array
          items:
            $ref: '#/components/schemas/AgentHandoffTool'
          readOnly: true
        mcpConfigs:
          type: array
          items:
            $ref: '#/components/schemas/AgentMcpConfig'
          readOnly: true
        paywallConfig:
          type: string
          readOnly: true
        adConfig:
          type: string
          readOnly: true
        creditSettings:
          type: string
          readOnly: true
        voiceCallConfig:
          type: string
          readOnly: true
        owner:
          type: string
          readOnly: true
        sharings:
          type: string
          readOnly: true
        phoneNumbers:
          type: array
          items:
            $ref: '#/components/schemas/AgentWhatsAppPhoneNumber'
          readOnly: true
        totalMessages:
          type: string
          readOnly: true
        totalSessions:
          type: string
          readOnly: true
        connectUrl:
          type: string
          readOnly: true
        ownerActive:
          type: string
          readOnly: true
        createdAt:
          type: string
          format: date-time
          readOnly: true
      required:
        - adConfig
        - connectUrl
        - createdAt
        - creditSettings
        - documents
        - firstMessage
        - handoffTools
        - id
        - imageGenerateTools
        - mcpConfigs
        - memoryKeys
        - name
        - outboundTriggers
        - owner
        - ownerActive
        - paywallConfig
        - phoneNumbers
        - profilePicture
        - sharings
        - systemPrompt
        - tools
        - totalMessages
        - totalSessions
        - voiceCallConfig
        - wakeUpConfigs
        - websiteTools
    AgentTool:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          maxLength: 255
        description:
          type: string
        apiSchema: {}
        active:
          type: boolean
        creditCost:
          type: integer
      required:
        - apiSchema
        - creditCost
        - description
        - id
        - name
    AgentDocument:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          maxLength: 255
        file:
          type: string
          readOnly: true
        status:
          type: string
          readOnly: true
      required:
        - file
        - id
        - name
        - status
    AgentMemoryKey:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        key:
          type: string
          maxLength: 255
        type:
          type: string
          maxLength: 255
        initialValue:
          type: string
        whenToUpdate:
          type: string
      required:
        - id
        - initialValue
        - key
        - type
        - whenToUpdate
    AgentWakeUpConfig:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        description:
          type: string
        enabled:
          type: boolean
        forceMessage:
          type: boolean
      required:
        - description
        - forceMessage
        - id
    AgentOutboundTrigger:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        url:
          type: string
          readOnly: true
        secret:
          type: string
          maxLength: 255
        enabled:
          type: boolean
        templateId:
          type: string
        templateName:
          type: string
      required:
        - id
        - templateId
        - templateName
        - url
    AgentWebsiteTool:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        url:
          type: string
          format: uri
          maxLength: 200
        prompt:
          type: string
        active:
          type: boolean
      required:
        - id
        - prompt
        - url
    AgentImageGenerateTool:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        name:
          type: string
          maxLength: 255
        description:
          type: string
        prompt:
          type: string
        active:
          type: boolean
        creditCost:
          type: integer
      required:
        - creditCost
        - id
        - prompt
    AgentHandoffTool:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        parentAgentId:
          type: string
          format: uuid
        childAgentId:
          type: string
          format: uuid
        childAgentName:
          type: string
          readOnly: true
        description:
          type: string
        active:
          type: boolean
      required:
        - childAgentId
        - childAgentName
        - description
        - id
        - parentAgentId
    AgentMcpConfig:
      type: object
      properties:
        id:
          type: string
          format: uuid
          readOnly: true
        connectorId:
          type: string
          format: uuid
        connectorName:
          type: string
          readOnly: true
        toolWhitelist: {}
      required:
        - connectorId
        - connectorName
        - id
        - toolWhitelist
    AgentWhatsAppPhoneNumber:
      type: object
      properties:
        whatsappPhoneNumberId:
          type: string
        whatsappBusinessAccountId:
          type: string
          readOnly: true
        wabaId:
          type: string
          readOnly: true
        phoneNumber:
          type: string
          readOnly: true
      required:
        - phoneNumber
        - wabaId
        - whatsappBusinessAccountId
        - whatsappPhoneNumberId
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key authentication. Pass your API key in the X-API-Key header.

````