# Create a conversation

Create a new conversation by making an HTTP POST request

<mark style="color:green;">`POST`</mark> `https://api.userdesk.io/v1/chatbot/:chabot_id/conversation`

Create a new conversation for a specific chatbot.

*The fields marked with <mark style="color:red;">`*`</mark> are mandatory*

#### Headers

| Name                                            | Type   | Description                       |
| ----------------------------------------------- | ------ | --------------------------------- |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer \<your\_chatbot\_api\_key> |

#### Request Body

| Name      | Type   | Description       |
| --------- | ------ | ----------------- |
| userName  | String | Name of the user  |
| userEmail | String | Email of the user |

{% tabs %}
{% tab title="200: OK Conversation successfully created" %}

```json
{
  "success": true,
  "conversationId": "7bb301ad-e691-4341-8afb-b4407c4ffdf2",
  "response": "Hello, how can I help you?"
}
```

{% endtab %}

{% tab title="401: Unauthorized Missing API Key" %}

{% endtab %}

{% tab title="401: Unauthorized Wrong API Key" %}

{% endtab %}

{% tab title="403: Forbidden Access to this chatbot is denied" %}

{% endtab %}

{% tab title="500: Internal Server Error An error occurred on the server" %}

{% endtab %}
{% endtabs %}

If the request is successful, the response includes the `conversationId` and the first message from the Chatbot, if configured.

```json
{
  "success": true,
  "conversationId": "7bb301ad-e691-4341-8afb-b4407c4ffdf2",
  "response": "Hello, how can I help you?"
}
```
