openapi: 3.0.3
info:
  title: Cekat Open API
  description: 'Cekat Open API enables you to integrate your application with Cekat''s
    omnichannel conversational AI platform. Use these endpoints to manage WhatsApp
    inboxes, send template messages, manage CRM data, track orders, and more.


    ## Authentication

    Most endpoints require an `api_key` header with your Cekat API key. The `/register`
    endpoint uses `x-partner-api-key` for partner-level authentication.


    ## Base URL

    All endpoints are relative to `https://api.cekat.ai`.'
  version: 1.0.0
  contact:
    name: Cekat AI Support
    url: https://cekat.ai
servers:
- url: https://api.cekat.ai
  description: Production server
- url: http://localhost:3000
  description: Local development server
tags:
- name: Business
  description: Register and manage business accounts on the Cekat platform.
- name: Inboxes
  description: List and manage WhatsApp Business inboxes connected to your account.
- name: Templates
  description: Create, sync, send, and delete WhatsApp Business message templates.
- name: Integrations
  description: Manage third-party integrations connected to your Cekat workspace.
- name: Messages
  description: Send and retrieve WhatsApp messages and conversation history.
- name: New Open API
  description: Extended API endpoints for CRM, Orders, Campaigns, Conversations, Contacts,
    and Agents.
- name: General
  description: General business data endpoints.
components:
  securitySchemes:
    CekatApiKey:
      type: apiKey
      in: header
      name: api_key
      description: Your Cekat API key. Obtain this by calling `POST /register` or
        from your Cekat dashboard under Settings → API.
    PartnerApiKey:
      type: apiKey
      in: header
      name: x-partner-api-key
      description: Partner-level API key. Required only for the business registration
        endpoint.
  schemas:
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
          description: Indicates whether the request was successful.
        status_code:
          type: integer
          example: 400
          description: HTTP status code of the response.
        message:
          type: string
          example: Invalid request parameters.
          description: Human-readable error message.
    SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
          description: Indicates whether the request was successful.
        status_code:
          type: integer
          example: 200
          description: HTTP status code of the response.
paths:
  /register:
    post:
      summary: Register Business
      tags:
      - Business
      operationId: Business_Register_Business
      description: Register a new business account and receive a Cekat API key. This
        is the first step for partners onboarding new clients onto the Cekat platform.
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                business_name:
                  description: The display name of your business on the Cekat platform.
                  type: string
                  example: testing
                email:
                  description: Business email address used for login and notifications.
                  type: string
                  example: testing@cekat.com
                phone_number:
                  description: Business phone number in international format, e.g.
                    `6285695209520`.
                  type: string
                  example: '6285695209520'
                password:
                  description: Password for the business account (min. 6 characters).
                  type: string
                  example: '123456'
                referral_code:
                  description: Partner referral code, e.g. `orderonline`. Required
                    if registering via a partner.
                  type: string
                  example: orderonline
                user_id:
                  description: External user ID from your platform (e.g. OrderOnline
                    user ID).
                  type: string
                  example: testing_id
                personal_access_key:
                  description: Personal access key from your external platform, used
                    for partner authentication.
                  type: string
                  example: testing_access_key
      responses:
        '201':
          description: Register Business
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  status_code:
                    type: integer
                    example: 201
                  cekat_api_key:
                    type: string
                    example: string api key
              example:
                success: true
                status_code: 201
                cekat_api_key: string api key
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - PartnerApiKey: []
  /inboxes:
    get:
      summary: Inboxes
      tags:
      - Inboxes
      operationId: Inboxes_Inboxes
      description: Retrieve all WhatsApp Business inboxes connected to your Cekat
        account. Each inbox represents a separate WhatsApp number.
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /templates:
    get:
      summary: Template
      tags:
      - Templates
      operationId: Templates_Template
      description: Retrieve all WhatsApp message templates associated with your business.
      parameters:
      - name: inbox_id
        in: query
        required: false
        description: UUID of the WhatsApp Business inbox this template belongs to.
          Obtainable via the `GET /inboxes` endpoint.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
    post:
      summary: Create template
      tags:
      - Templates
      operationId: Templates_Create_template
      description: Create a new WhatsApp Business message template. Templates must
        be approved by Meta before they can be sent.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  description: Unique snake_case name for the template, e.g. `promo_ramadan`.
                    Must match Meta's naming rules (lowercase, no spaces).
                  type: string
                  example: tanya_kabarnya
                category:
                  description: 'Template category. Accepted values: `AUTHENTICATION`,
                    `MARKETING`, or `UTILITY`. Most use cases fall under `MARKETING`.'
                  type: string
                  example: MARKETING
                language:
                  description: Language code accepted by Meta (e.g. `id` for Indonesian,
                    `en_US` for English US). See full list in the description.
                  type: string
                  example: id
                body:
                  description: 'Main text content of the template. Use `{{1}}`, `{{2}}`,
                    etc. to define dynamic variables. Example: `Halo {{1}}, ada promo
                    spesial untukmu!`'
                  type: string
                  example: Halo {{1}}, kamu apa kabarnya? Semoga baik-baik aja ya
                inbox_id:
                  description: UUID of the WhatsApp Business inbox this template belongs
                    to. Obtainable via the `GET /inboxes` endpoint.
                  type: string
                body_placeholder:
                  description: 'Example values for body variables in JSON array format.
                    Required if body contains `{{N}}` placeholders. Example: `["Jane",
                    "10"]`.'
                  type: string
                  example: '["Jane"]'
                file:
                  description: 'Optional header image file. Accepted formats: `jpeg`,
                    `jpg`, `png`.'
                  type: string
                  format: binary
              required:
              - name
              - category
              - language
              - body
              - inbox_id
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
    delete:
      summary: Delete template by wa_template_id
      tags:
      - Templates
      operationId: Templates_Delete_template_by_wa_template_id
      description: Delete a specific WhatsApp template by its `wa_template_id`.
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /templates/sync:
    post:
      summary: Template Sync
      tags:
      - Templates
      operationId: Templates_Template_Sync
      description: Synchronize WhatsApp templates from the Meta server to Cekat. Use
        this after creating or modifying templates directly in Meta Business Manager.
      parameters:
      - name: inbox_id
        in: query
        required: false
        description: UUID of the WhatsApp Business inbox this template belongs to.
          Obtainable via the `GET /inboxes` endpoint.
        schema:
          type: string
          example: '{{inbox_id}}'
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /templates/send:
    post:
      summary: Send template
      tags:
      - Templates
      operationId: Templates_Send_template
      description: Send an approved WhatsApp template message to a contact. Only templates
        with status `APPROVED` will be processed.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                wa_template_id:
                  type: string
                  example: ''
                  description: The WhatsApp template ID. Obtainable via `GET /templates`.
                inbox_id:
                  type: string
                  example: ''
                  description: UUID of the WhatsApp Business inbox this template belongs
                    to. Obtainable via the `GET /inboxes` endpoint.
                phone_number:
                  type: string
                  example: ''
                  description: Business phone number in international format, e.g.
                    `6285695209520`.
                phone_name:
                  type: string
                  example: ''
                  description: Display name of the recipient.
            example:
              wa_template_id: ''
              inbox_id: ''
              phone_number: ''
              phone_name: ''
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /integrations:
    get:
      summary: integration
      tags:
      - Integrations
      operationId: integrations_integration
      description: Retrieve all third-party integrations connected to your Cekat account.
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /integrations/delete:
    delete:
      summary: integration
      tags:
      - Integrations
      operationId: integrations_integration_2
      description: Remove a specific third-party integration from your Cekat account.
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /messages/whatsapp:
    post:
      summary: send wa message
      tags:
      - Messages
      operationId: Messages_send_wa_message
      description: Send a free-form WhatsApp message to a contact. Only available
        within the 24-hour customer service window.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                conversation_id:
                  type: string
                  example: ''
                  description: UUID of the conversation to retrieve messages from.
                receiver:
                  type: string
                  example: ''
                  description: The receiver value.
                message:
                  type: string
                  example: Haloooo bales dari api
                  description: Message content to send.
                media_type:
                  type: string
                  example: location
                  description: The media type value.
                location:
                  type: object
                  properties:
                    latitude:
                      type: string
                      example: '-6.2664324'
                    longitude:
                      type: string
                      example: '106.5917695'
                    name:
                      type: string
                      example: Namam lokasi
                    address:
                      type: string
                      example: addresss lokasi
                  description: The location value.
                header:
                  type: object
                  properties: {}
                  description: The header value.
                action:
                  type: object
                  properties:
                    name:
                      type: string
                      example: interactive_button
                    parameters:
                      type: object
                      properties:
                        display_text:
                          type: string
                          example: Chat Cust Service 12222
                        url:
                          type: string
                          example: test url
                  description: The action value.
            example:
              conversation_id: ''
              receiver: ''
              message: Haloooo bales dari api
              media_type: location
              location:
                latitude: '-6.2664324'
                longitude: '106.5917695'
                name: Namam lokasi
                address: addresss lokasi
              header: {}
              action:
                name: interactive_button
                parameters:
                  display_text: Chat Cust Service 12222
                  url: test url
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /messages:
    get:
      summary: get messages
      tags:
      - Messages
      operationId: Messages_get_messages
      description: Retrieve all messages in a specific conversation.
      parameters:
      - name: conversation_id
        in: query
        required: false
        description: UUID of the conversation to retrieve messages from.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /api/crm/boards:
    get:
      summary: boards
      tags:
      - New Open API
      operationId: New_Open_API_CRM_Open_API_Copy_boards
      description: List all CRM boards available in your workspace.
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /api/crm/boards/{id}:
    get:
      summary: board
      tags:
      - New Open API
      operationId: New_Open_API_CRM_Open_API_Copy_board
      description: Retrieve detailed information about a specific CRM board.
      parameters:
      - name: id
        in: path
        required: true
        description: UUID of the resource.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /api/crm/boards/{boardId}/columns/{columnId}:
    get:
      summary: column
      tags:
      - New Open API
      operationId: New_Open_API_CRM_Open_API_Copy_column
      description: Retrieve details of a specific column within a CRM board.
      parameters:
      - name: boardId
        in: path
        required: true
        description: UUID of the CRM board. Retrieve available boards via `GET /api/crm/boards`.
        schema:
          type: string
      - name: columnId
        in: path
        required: true
        description: UUID of the column within a board.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /api/crm/boards/{boardId}/columns/by-name:
    post:
      summary: column by name
      tags:
      - New Open API
      operationId: New_Open_API_CRM_Open_API_Copy_column_by_name
      description: Look up a column within a CRM board by its name instead of UUID.
      parameters:
      - name: boardId
        in: path
        required: true
        description: UUID of the CRM board. Retrieve available boards via `GET /api/crm/boards`.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  example: Status
                  description: Unique snake_case name for the template, e.g. `promo_ramadan`.
                    Must match Meta's naming rules (lowercase, no spaces).
            example:
              name: Status
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /api/crm/boards/{boardId}/items:
    get:
      summary: items
      tags:
      - New Open API
      operationId: New_Open_API_CRM_Open_API_Copy_items
      description: List all items (cards/leads) within a CRM board.
      parameters:
      - name: boardId
        in: path
        required: true
        description: UUID of the CRM board. Retrieve available boards via `GET /api/crm/boards`.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
    post:
      summary: item with values
      tags:
      - New Open API
      operationId: New_Open_API_CRM_Open_API_Copy_item_with_values
      description: Create a new item (lead/contact card) in a CRM board.
      parameters:
      - name: boardId
        in: path
        required: true
        description: UUID of the CRM board. Retrieve available boards via `GET /api/crm/boards`.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                item_name:
                  type: string
                  example: tes default item open api
                  description: The item name value.
                New Text:
                  type: string
                  example: test
                  description: The New Text value.
                New Agents:
                  type: array
                  items:
                    type: string
                    example: 90257483-4c57-4a4b-ab51-2c3972ed9dc8
                  description: The New Agents value.
            example:
              item_name: tes default item open api
              New Text: test
              New Agents:
              - 90257483-4c57-4a4b-ab51-2c3972ed9dc8
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
    delete:
      summary: items
      tags:
      - New Open API
      operationId: New_Open_API_CRM_Open_API_Copy_items_2
      description: Delete one or more items from a CRM board.
      parameters:
      - name: boardId
        in: path
        required: true
        description: UUID of the CRM board. Retrieve available boards via `GET /api/crm/boards`.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                item_ids:
                  type: array
                  items:
                    type: string
                    example: 36a06fc8-1822-4517-bf4f-4a6665cec044
                  description: The item ids value.
            example:
              item_ids:
              - 36a06fc8-1822-4517-bf4f-4a6665cec044
              - 663aa920-5041-41d9-87d6-ad793ef771e2
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
  /api/crm/boards/{boardId}/items/{id}:
    get:
      summary: item
      tags:
      - New Open API
      operationId: New_Open_API_CRM_Open_API_Copy_item
      description: Retrieve full details of a specific CRM item, including contact
        info, conversation data, and pipeline status.
      parameters:
      - name: boardId
        in: path
        required: true
        description: UUID of the CRM board. Retrieve available boards via `GET /api/crm/boards`.
        schema:
          type: string
      - name: id
        in: path
        required: true
        description: UUID of the resource.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /api/crm/boards/{boardId}/items/search:
    post:
      summary: items search
      tags:
      - New Open API
      operationId: New_Open_API_CRM_Open_API_Copy_items_search
      description: Search for items within a CRM board using filters.
      parameters:
      - name: boardId
        in: path
        required: true
        description: UUID of the CRM board. Retrieve available boards via `GET /api/crm/boards`.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                condition:
                  type: string
                  example: AND
                  description: The condition value.
                search:
                  type: array
                  items:
                    type: object
                    properties:
                      column_name:
                        type: string
                        example: Test References
                      operator:
                        type: string
                        example: equals
                      value:
                        type: array
                        items:
                          type: string
                          example: ec2e88e6-ada8-42ce-a246-287bf937fb4e
                  description: The search value.
            example:
              condition: AND
              search:
              - column_name: Test References
                operator: equals
                value:
                - ec2e88e6-ada8-42ce-a246-287bf937fb4e
                - 60fac3cc-2af6-4bcb-abb4-21094cce1892
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /api/crm/boards/{boardId}/items/{itemId}:
    put:
      summary: item with values
      tags:
      - New Open API
      operationId: New_Open_API_CRM_Open_API_Copy_item_with_values_2
      description: Update fields of an existing CRM item.
      parameters:
      - name: boardId
        in: path
        required: true
        description: UUID of the CRM board. Retrieve available boards via `GET /api/crm/boards`.
        schema:
          type: string
      - name: itemId
        in: path
        required: true
        description: UUID of the CRM item to update.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                item_name:
                  type: string
                  example: tes update
                  description: The item name value.
                Title:
                  type: string
                  example: '123'
                  description: The Title value.
                New Agents:
                  type: array
                  items: {}
                  description: The New Agents value.
            example:
              item_name: tes update
              Title: '123'
              New Agents: []
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
  /api/orders:
    post:
      summary: orders
      tags:
      - New Open API
      operationId: New_Open_API_Orders_Open_API_Copy_orders
      description: Create a new order record linked to a contact or conversation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                orders_products:
                  type: array
                  items:
                    type: object
                    properties:
                      product_id:
                        type: string
                        example: 5dc769c3-b7b0-4c13-a8f9-c6402197959f
                      product_name:
                        type: string
                        example: Meja
                      quantity:
                        type: integer
                        example: 2
                      price:
                        type: integer
                        example: 12901298
                  description: The orders products value.
                payment_method:
                  type: string
                  example: xendit
                  description: The payment method value.
                shipping_fee:
                  type: integer
                  example: 19000
                  description: The shipping fee value.
                discount:
                  type: integer
                  example: 9000
                  description: The discount value.
                vat:
                  type: integer
                  example: 10000
                  description: The vat value.
                conversation_id:
                  type: string
                  example: 7bedd2a0-aa76-4237-943c-9a5d58c53561
                  description: UUID of the conversation to retrieve messages from.
                contact_id:
                  type: string
                  example: ce7b9f99-ac01-4ba5-920b-027ae7315034
                  description: UUID of the contact.
                phone_number:
                  type: string
                  example: '623013186730'
                  description: Business phone number in international format, e.g.
                    `6285695209520`.
                display_name:
                  type: string
                  example: test
                  description: The display name value.
                email:
                  type: string
                  example: test
                  description: Business email address used for login and notifications.
                notes:
                  type: string
                  example: coba coba
                  description: Optional notes or remarks for the order.
                address:
                  type: string
                  example: jalan jalan ke pasar minggu
                  description: The address value.
            example:
              orders_products:
              - product_id: 5dc769c3-b7b0-4c13-a8f9-c6402197959f
                product_name: Meja
                quantity: 2
                price: 12901298
              - product_id: null
                product_name: Kursi
                quantity: 1
                price: 199000
              payment_method: xendit
              shipping_fee: 19000
              discount: 9000
              vat: 10000
              conversation_id: 7bedd2a0-aa76-4237-943c-9a5d58c53561
              contact_id: ce7b9f99-ac01-4ba5-920b-027ae7315034
              phone_number: '623013186730'
              display_name: test
              email: test
              notes: coba coba
              address: jalan jalan ke pasar minggu
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
    get:
      summary: orders
      tags:
      - New Open API
      operationId: New_Open_API_Orders_Open_API_Copy_orders_2
      description: Retrieve paginated list of orders.
      parameters:
      - name: order_status
        in: query
        required: false
        description: The order status value.
        schema:
          type: string
          example: pending
      - name: payment_status
        in: query
        required: false
        description: The payment status value.
        schema:
          type: string
          example: paid
      - name: start_date
        in: query
        required: false
        description: Filter start date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
      - name: end_date
        in: query
        required: false
        description: Filter end date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
      - name: search
        in: query
        required: false
        description: The search value.
        schema:
          type: string
          example: .com
      - name: sort_field
        in: query
        required: false
        description: The sort field value.
        schema:
          type: string
          example: created_at
      - name: sort_direction
        in: query
        required: false
        description: The sort direction value.
        schema:
          type: string
          example: desc
      - name: include_conv
        in: query
        required: false
        description: The include conv value.
        schema:
          type: string
          example: 'true'
      - name: inbox_id
        in: query
        required: false
        description: UUID of the WhatsApp Business inbox this template belongs to.
          Obtainable via the `GET /inboxes` endpoint.
        schema:
          type: string
      - name: page
        in: query
        required: false
        description: Page number for pagination. Starts at `1`.
        schema:
          type: string
          example: '1'
      - name: limit
        in: query
        required: false
        description: Number of records per page. Default varies by endpoint.
        schema:
          type: string
          example: '10'
      - name: product_ids
        in: query
        required: false
        description: The product ids value.
        schema:
          type: string
          example: '[]'
      - name: export_scope
        in: query
        required: false
        description: The export scope value.
        schema:
          type: string
          example: all_with_filters
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
  /api/orders/{id}:
    get:
      summary: order by id
      tags:
      - New Open API
      operationId: New_Open_API_Orders_Open_API_Copy_order_by_id
      description: Retrieve full details of a specific order by its UUID.
      parameters:
      - name: id
        in: path
        required: true
        description: UUID of the resource.
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
    put:
      summary: order
      tags:
      - New Open API
      operationId: New_Open_API_Orders_Open_API_Copy_order
      description: Update the status or details of an existing order.
      parameters:
      - name: id
        in: path
        required: true
        description: UUID of the resource.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                order_status:
                  type: string
                  example: pending
                  description: The order status value.
                payment_status:
                  type: string
                  example: pending
                  description: The payment status value.
                custom_invoice_url:
                  type: string
                  example: test ganti
                  description: The custom invoice url value.
                invoice_is_sent:
                  type: boolean
                  example: true
                  description: The invoice is sent value.
                address:
                  type: string
                  example: ruko hampton blok a no.10
                  description: The address value.
                notes:
                  type: string
                  example: karrrrr
                  description: Optional notes or remarks for the order.
            example:
              order_status: pending
              payment_status: pending
              custom_invoice_url: test ganti
              invoice_is_sent: true
              address: ruko hampton blok a no.10
              notes: karrrrr
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
  /api/messages:
    get:
      summary: get messages
      tags:
      - New Open API
      operationId: New_Open_API_Messages_get_messages
      description: Retrieve paginated messages with optional filters for date range
        and conversation.
      parameters:
      - name: conversation_id
        in: query
        required: false
        description: UUID of the conversation to retrieve messages from.
        schema:
          type: string
          example: tes
      - name: start_date
        in: query
        required: false
        description: Filter start date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-08-08'
      - name: end_date
        in: query
        required: false
        description: Filter end date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-08-08'
      - name: page
        in: query
        required: false
        description: Page number for pagination. Starts at `1`.
        schema:
          type: string
          example: '1'
      - name: limit
        in: query
        required: false
        description: Number of records per page. Default varies by endpoint.
        schema:
          type: string
          example: '10'
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
  /api/messages/summary/ai_credits:
    get:
      summary: get summary message with chat credit
      tags:
      - New Open API
      operationId: New_Open_API_Messages_get_summary_message_with_chat_credit
      description: Retrieve AI credit usage summary for messages within a specified
        date range.
      parameters:
      - name: conversation_id
        in: query
        required: false
        description: UUID of the conversation to retrieve messages from.
        schema:
          type: string
      - name: start_date
        in: query
        required: false
        description: Filter start date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-08-08'
      - name: end_date
        in: query
        required: false
        description: Filter end date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-08-12'
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
  /api/agents:
    get:
      summary: get agents
      tags:
      - New Open API
      operationId: New_Open_API_Agents_get_agents
      description: Retrieve all human agents in your Cekat workspace.
      parameters:
      - name: limit
        in: query
        required: false
        description: Number of records per page. Default varies by endpoint.
        schema:
          type: string
          example: '3'
      - name: page
        in: query
        required: false
        description: Page number for pagination. Starts at `1`.
        schema:
          type: string
          example: '2'
      - name: start_date
        in: query
        required: false
        description: Filter start date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-09-01'
      - name: end_date
        in: query
        required: false
        description: Filter end date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-09-19'
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
  /api/inboxes:
    get:
      summary: get inboxes
      tags:
      - New Open API
      operationId: New_Open_API_Inboxes_get_inboxes
      description: Retrieve paginated list of WhatsApp Business inboxes connected
        to your account.
      parameters:
      - name: limit
        in: query
        required: false
        description: Number of records per page. Default varies by endpoint.
        schema:
          type: string
          example: '3'
      - name: page
        in: query
        required: false
        description: Page number for pagination. Starts at `1`.
        schema:
          type: string
          example: '2'
      - name: start_date
        in: query
        required: false
        description: Filter start date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-09-01'
      - name: end_date
        in: query
        required: false
        description: Filter end date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-09-30'
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
  /api/campaigns:
    get:
      summary: get campaigns
      tags:
      - New Open API
      operationId: New_Open_API_Broadcasts_Campaigns_get_campaigns
      description: Retrieve paginated list of broadcast campaigns.
      parameters:
      - name: limit
        in: query
        required: false
        description: Number of records per page. Default varies by endpoint.
        schema:
          type: string
          example: '1'
      - name: page
        in: query
        required: false
        description: Page number for pagination. Starts at `1`.
        schema:
          type: string
          example: '1'
      - name: start_date
        in: query
        required: false
        description: Filter start date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-09-01'
      - name: end_date
        in: query
        required: false
        description: Filter end date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-09-30'
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
  /api/campaigns/{id}/messages:
    get:
      summary: get campaign message
      tags:
      - New Open API
      operationId: New_Open_API_Broadcasts_Campaigns_get_campaign_message
      description: Retrieve the individual messages sent as part of a specific campaign.
      parameters:
      - name: id
        in: path
        required: true
        description: UUID of the resource.
        schema:
          type: string
      - name: page
        in: query
        required: false
        description: Page number for pagination. Starts at `1`.
        schema:
          type: string
          example: '1'
      - name: limit
        in: query
        required: false
        description: Number of records per page. Default varies by endpoint.
        schema:
          type: string
          example: '2'
      - name: start_date
        in: query
        required: false
        description: Filter start date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
      - name: end_date
        in: query
        required: false
        description: Filter end date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
  /api/conversations/agent-assignments:
    get:
      summary: conversation agents assignments
      tags:
      - New Open API
      operationId: New_Open_API_Agent_Assignments_conversation_agents_assignments
      description: Retrieve conversation-to-agent assignment records.
      parameters:
      - name: limit
        in: query
        required: false
        description: Number of records per page. Default varies by endpoint.
        schema:
          type: string
          example: '3'
      - name: page
        in: query
        required: false
        description: Page number for pagination. Starts at `1`.
        schema:
          type: string
          example: '2'
      - name: start_date
        in: query
        required: false
        description: Filter start date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-09-01'
      - name: end_date
        in: query
        required: false
        description: Filter end date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-09-19'
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
  /api/agent_assignments:
    get:
      summary: get agent assignments
      tags:
      - New Open API
      operationId: New_Open_API_Agent_Assignments_get_agent_assignments
      description: Retrieve detailed agent assignment history with date range filtering.
      parameters:
      - name: limit
        in: query
        required: false
        description: Number of records per page. Default varies by endpoint.
        schema:
          type: string
          example: '1000'
      - name: page
        in: query
        required: false
        description: Page number for pagination. Starts at `1`.
        schema:
          type: string
          example: '1'
      - name: start_date
        in: query
        required: false
        description: Filter start date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-12-06'
      - name: end_date
        in: query
        required: false
        description: Filter end date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-12-08'
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
  /api/conversations:
    get:
      summary: get conversations
      tags:
      - New Open API
      operationId: New_Open_API_Conversations_get_conversations
      description: Retrieve paginated list of conversations across all inboxes.
      parameters:
      - name: limit
        in: query
        required: false
        description: Number of records per page. Default varies by endpoint.
        schema:
          type: string
          example: '1'
      - name: page
        in: query
        required: false
        description: Page number for pagination. Starts at `1`.
        schema:
          type: string
          example: '2'
      - name: start_date
        in: query
        required: false
        description: Filter start date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-09-01'
      - name: end_date
        in: query
        required: false
        description: Filter end date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-10-08'
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
  /api/conversations/{id}:
    put:
      summary: update conversation
      tags:
      - New Open API
      operationId: New_Open_API_Conversations_update_conversation
      description: Update conversation properties such as assignee, label, or resolution
        status.
      parameters:
      - name: id
        in: path
        required: true
        description: UUID of the resource.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                assigned_ai_agent:
                  type: string
                  example: 96a7a1c3-0754-4407-a86a-8b8727c8799c
                  description: The assigned ai agent value.
            example:
              assigned_ai_agent: 96a7a1c3-0754-4407-a86a-8b8727c8799c
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
  /api/contacts:
    get:
      summary: get contacts
      tags:
      - New Open API
      operationId: New_Open_API_Contacts_get_contacts
      description: Retrieve paginated list of contacts in your CRM.
      parameters:
      - name: limit
        in: query
        required: false
        description: Number of records per page. Default varies by endpoint.
        schema:
          type: string
          example: '2'
      - name: page
        in: query
        required: false
        description: Page number for pagination. Starts at `1`.
        schema:
          type: string
          example: '1'
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
  /api/templates:
    get:
      summary: get templates
      tags:
      - New Open API
      operationId: New_Open_API_Templates_get_templates
      description: Retrieve paginated list of WhatsApp message templates with optional
        date filtering.
      parameters:
      - name: page
        in: query
        required: false
        description: Page number for pagination. Starts at `1`.
        schema:
          type: string
          example: '1'
      - name: limit
        in: query
        required: false
        description: Number of records per page. Default varies by endpoint.
        schema:
          type: string
          example: '1'
      - name: start_date
        in: query
        required: false
        description: Filter start date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-10-01'
      - name: end_date
        in: query
        required: false
        description: Filter end date in `YYYY-MM-DD` format (Jakarta/WIB time, UTC+7).
        schema:
          type: string
          example: '2025-10-07'
      responses:
        '200':
          description: Successful response
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - BearerAuth: []
  /businesses:
    get:
      summary: Business data
      tags:
      - General
      operationId: Business_data
      description: Retrieve information about the current authenticated business account.
      responses:
        '200':
          description: Business data
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  status_code:
                    type: integer
                    example: 200
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        example: '12345'
                      created_at:
                        type: string
                        example: '2024-02-29 04:52:40.916283+00'
                      name:
                        type: string
                        example: business name
                      email:
                        type: string
                        example: business email
                      phone_num:
                        type: string
                        example: 088888888
                      package_type:
                        type: string
                        example: free
                      package_start_date:
                        type: string
                        example: '2024-09-03 10:51:25.529+00'
                      package_exp_date:
                        type: string
                        example: '2024-09-15 10:51:25.529+00'
                      is_expired:
                        type: boolean
                        example: false
                      total_used_chat_credit_per_month:
                        type: integer
                        example: 0
                      chat_credit_topup:
                        type: integer
                        example: 0
                      total_used_convo:
                        type: integer
                        example: 0
                      convo_credit_topup:
                        type: integer
                        example: 0
                      open_api_key:
                        type: string
                        example: api_key
              example:
                success: true
                status_code: 200
                data:
                  id: '12345'
                  created_at: '2024-02-29 04:52:40.916283+00'
                  name: business name
                  email: business email
                  phone_num: 088888888
                  package_type: free
                  package_start_date: '2024-09-03 10:51:25.529+00'
                  package_exp_date: '2024-09-15 10:51:25.529+00'
                  is_expired: false
                  total_used_chat_credit_per_month: 0
                  chat_credit_topup: 0
                  total_used_convo: 0
                  convo_credit_topup: 0
                  open_api_key: api_key
        '400':
          description: Bad request — check required fields and formats.
        '401':
          description: Unauthorized — API key is missing or invalid.
        '404':
          description: Resource not found.
      security:
      - CekatApiKey: []
