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

# getOrCreateConversation

> Get or create a new [Conversation](#schema_conversation)



## OpenAPI

````yaml chat-openapi.json POST /conversations/get-or-create
openapi: 3.0.0
info:
  title: Chat API
  description: API for the Chat Integration
  version: 0.0.0
servers:
  - url: https://chat.botpress.cloud/{webhookUrl}
    variables:
      webhookUrl:
        default: your_default_webhook_url
        description: The webhook URL
security: []
paths:
  /conversations/get-or-create:
    post:
      tags:
        - Endpoints
      summary: Get Or Create Conversation
      description: Get or create a new [Conversation](#schema_conversation)
      operationId: getOrCreateConversation
      parameters:
        - name: x-user-key
          in: header
          description: Authentication Key
          required: true
          schema:
            type: string
      requestBody:
        description: Conversation data
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: Identifier of the [Conversation](#schema_conversation)
              required:
                - id
              title: getOrCreateConversationBody
              additionalProperties: false
      responses:
        '201':
          description: Returns a [Conversation](#schema_conversation)
          content:
            application/json:
              schema:
                type: object
                properties:
                  conversation:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Identifier of the [Conversation](#schema_conversation)
                      createdAt:
                        type: string
                        format: date-time
                        description: >-
                          Creation date of the
                          [Conversation](#schema_conversation) in ISO 8601
                          format
                      updatedAt:
                        type: string
                        format: date-time
                        description: >-
                          Updating date of the
                          [Conversation](#schema_conversation) in ISO 8601
                          format
                    required:
                      - id
                      - createdAt
                      - updatedAt
                    additionalProperties: false
                    x-readme-ref-name: Conversation
                required:
                  - conversation
                title: getOrCreateConversationResponse
                additionalProperties: false
        default:
          description: Returns a [Conversation](#schema_conversation)
          content:
            application/json:
              schema:
                type: object
                properties:
                  conversation:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Identifier of the [Conversation](#schema_conversation)
                      createdAt:
                        type: string
                        format: date-time
                        description: >-
                          Creation date of the
                          [Conversation](#schema_conversation) in ISO 8601
                          format
                      updatedAt:
                        type: string
                        format: date-time
                        description: >-
                          Updating date of the
                          [Conversation](#schema_conversation) in ISO 8601
                          format
                    required:
                      - id
                      - createdAt
                      - updatedAt
                    additionalProperties: false
                    x-readme-ref-name: Conversation
                required:
                  - conversation
                title: getOrCreateConversationResponse
                additionalProperties: false

````