# Message

## Create a message within the ticket

<mark style="color:green;">`POST`</mark> `https://account.omnidesk.com/api/v2/message`

This endpoint creates a message for the ticket. You will need a ticketID of the ticket to place the message in. If you do not have a ticketId you might want to create a ticket first. The response of the ticket creation will contain a ticket ID integer.

#### Request Body

| Name     | Type              | Description                                                                                                   |
| -------- | ----------------- | ------------------------------------------------------------------------------------------------------------- |
| ticketID | integer           |                                                                                                               |
| type     | string            | `1,3,5,7,8,9,10,12,13 or calllog or contactform`                                                              |
| message  | string            |                                                                                                               |
| userID   | integer, optional | `A valid userID from the administrator user list. If omitted, the note will be assigned to 'Agent Anonymous'` |

{% tabs %}
{% tab title="200 Message successfully created." %}

```javascript
{
    "type": "result",
    "message": "Message has been sent and the ticket status was updated."
}
```

{% endtab %}

{% tab title="400 " %}

```
```

{% endtab %}
{% endtabs %}
