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

# TermsOfUseAcceptedUsers

## Introduction

`TermsOfUseAcceptedUsers` record that an authenticated [User](/api-reference/users.md) accepted a specific [TermsOfUse](/api-reference/legal/terms-of-use.md) version.

## Model Definition

**Attributes**

| Key               | Type                 | Description                            |
| ----------------- | -------------------- | -------------------------------------- |
| `id`              | `integer`            | Acceptance record ID.                  |
| `user_id`         | `integer`            | ID of the user who accepted the terms. |
| `terms_of_use_id` | `integer`            | Accepted terms of use ID.              |
| `created_at`      | `datetime` \| `null` | Time at which the terms were accepted. |

## List by TermsOfUse

List acceptance records for users who accepted one `TermsOfUse` version.

**Definition**

<mark style="color:green;">`GET`</mark> `/api/terms-of-use-accepted-users/{termsOfUse}`

**Route Parameters**

| Parameter    | Type      | Description      |
| ------------ | --------- | ---------------- |
| `termsOfUse` | `integer` | Terms of use ID. |

**Behavior**

The response contains at most one acceptance record per `user_id`.

**Example Request**

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

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

{% endtab %}
{% endtabs %}

**Example Response**

```json
[
  {
    "id": 1,
    "user_id": 3,
    "terms_of_use_id": 1,
    "created_at": "2026-08-07 09:15:00"
  },
  {
    "id": 2,
    "user_id": 4,
    "terms_of_use_id": 1,
    "created_at": "2026-08-07 10:45:00"
  }
]
```

## Accept

Accept one `TermsOfUse` version for the authenticated user.

**Definition**

<mark style="color:yellow;">`POST`</mark> `/api/terms-of-use-accepted-users`

**Request Keys**

| Key                 | Type      | Default | Description                |
| ------------------- | --------- | ------- | -------------------------- |
| `terms_of_use_id`\* | `integer` | -       | Terms of use ID to accept. |

Keys with `*` are required.

**Behavior**

* The authenticated user's ID is stored as `user_id`.
* Repeating the request returns the existing acceptance record instead of creating a duplicate.

**Example Request**

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

```php
$client = new GuzzleHttp\Client(['base_uri' => 'https://{tenant}.intratool.de']);
$response = $client->request('POST', '/api/terms-of-use-accepted-users', [
    'headers' => ['Authorization' => "Bearer {accessToken}"],
    'json' => [
        'terms_of_use_id' => 1
    ]
]);
```

{% endtab %}
{% endtabs %}

**Example Response**

```json
{
  "status": "success",
  "data": {
    "id": 1,
    "user_id": 3,
    "terms_of_use_id": 1,
    "created_at": "2026-08-07 09:15:00"
  }
}
```
