> For the complete documentation index, see [llms.txt](https://docs.api.intratool.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.api.intratool.de/api-reference/forms/form-messages.md).

# FormMessages

## Introduction

`FormMessages` are persisted submissions of [Forms](/api-reference/forms/forms.md).

The generated `body` field uses the shared [Rich Text](/introduction/rich-text.md) HTML format.

## Model Definition

**Alias**

`formMessage`

**Capabilities**

* [Translations](/introduction/resource-capabilities/translations.md) - Localizes `subject` and `body`; examples use `en-US`.
* [URL Context](/introduction/resource-capabilities/url-context.md) - Returns the stable submitted-form URL.

**Relations**

| Key                 | Relation                                                         | Type       | Relation Field(s) |
| ------------------- | ---------------------------------------------------------------- | ---------- | ----------------- |
| `form`              | [Form](/api-reference/forms/forms.md)                            | Belongs to | `form_id`         |
| `formMessageFields` | [FormMessageFields](/api-reference/forms/form-message-fields.md) | Has many   | `form_message_id` |
| `user`              | [User](/api-reference/users.md)                                  | Belongs to | `user_id`         |
| `department`        | [Department](/api-reference/departments.md)                      | Belongs to | `department_id`   |

## List

List visible `FormMessages`.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/forms/messages`

**Request Keys**

| Key         | Type      | Default           | Description                                                         |
| ----------- | --------- | ----------------- | ------------------------------------------------------------------- |
| `selects`   | `string`  | All fields        | Comma-separated fields to return.                                   |
| `relations` | `string`  | Default relations | Pipe-separated relations to include.                                |
| `limit`     | `integer` | No limit          | Maximum number of messages.                                         |
| `filters`   | `object`  | No filters        | [Value filters](/introduction/query-manipulation/value-filters.md). |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/forms/messages', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 140,
    "user_id": 7,
    "group_account_user_id": null,
    "department_id": 6,
    "form_id": 21,
    "lang_id": "en-US",
    "subject": "New employee feedback",
    "body": "<p><strong>Full name:</strong> Ada Lovelace</p><p><strong>Message:</strong> More mentoring sessions.</p>",
    "sent_from_public": false,
    "distribution_success": true,
    "hash": "mN",
    "created_at": "2026-08-06 12:00:00",
    "updated_at": "2026-08-06 12:00:00"
  },
  {
    "id": 141,
    "user_id": 8,
    "group_account_user_id": 8,
    "department_id": 9,
    "form_id": 22,
    "lang_id": "en-US",
    "subject": "New equipment request",
    "body": "<p><strong>Device:</strong> Developer laptop</p><p><strong>Urgency:</strong> High</p>",
    "sent_from_public": true,
    "distribution_success": false,
    "hash": "nP",
    "created_at": "2026-08-06 12:15:00",
    "updated_at": "2026-08-06 12:15:00"
  }
]
```

## Show

Show one visible `FormMessage`.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/forms/messages/{formMessage}`

**Route Parameters**

| Parameter     | Type      | Description      |
| ------------- | --------- | ---------------- |
| `formMessage` | `integer` | Form message ID. |

**Request Keys**

| Key         | Type     | Default           | Description                          |
| ----------- | -------- | ----------------- | ------------------------------------ |
| `selects`   | `string` | All fields        | Comma-separated fields to return.    |
| `relations` | `string` | Default relations | Pipe-separated relations to include. |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('GET', '/api/forms/messages/140', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "id": 140,
  "user_id": 7,
  "group_account_user_id": null,
  "department_id": 6,
  "form_id": 21,
  "lang_id": "en-US",
  "subject": "New employee feedback",
  "body": "<p><strong>Full name:</strong> Ada Lovelace</p><p><strong>Message:</strong> More mentoring sessions.</p>",
  "sent_from_public": false,
  "distribution_success": true,
  "hash": "mN",
  "created_at": "2026-08-06 12:00:00",
  "updated_at": "2026-08-06 12:00:00"
}
```

## Delete

Delete an existing `FormMessage`.

**Definition**

<mark style="color:red;">`DELETE`</mark> `/api/forms/messages/{formMessage}`

**Route Parameters**

| Parameter     | Type      | Description      |
| ------------- | --------- | ---------------- |
| `formMessage` | `integer` | Form message ID. |

**Example Request**

{% tabs %}
{% tab title="PHP" %}

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('DELETE', '/api/forms/messages/140', [
    'headers' => ['Authorization' => "Bearer {accessToken}"]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": null
}
```
