# Accept terms and conditions

> Record acceptance of the currently-in-effect terms and privacy version for this account.

Source: https://docs.stxapp.io/api/rest/account/accept-terms/

Record acceptance of the currently-in-effect terms and privacy version for this account. All three consents must be true or the request is a 400. Requires a `read_write` key.

```http
POST /api/v1/tnc/accept
```

Send it with your own demo key: [Try it](/quick-start/?op=tnc_accept_post#try-it).

:::tip[In the SDKs]
- TypeScript: [`STX.acceptTerms()`](/sdks/typescript/reference/stx/#acceptterms)
- Python: [`STX.accept_terms()`](/sdks/python/reference/stx/#accept_terms)
- C#: [`STXTermsAndConditionsService.AcceptTermsAndConditionsAsync()`](/sdks/csharp/reference/account/#stxtermsandconditionsservice)
:::

## Request body

| Field | Type | Required | Description |
|---|---|---|---|
| `accept_house_rules` | boolean,null | no | Acceptance of the house rules. Defaults to `accept_terms AND accept_privacy` when omitted. |
| `accept_privacy` | boolean | **yes** | Acceptance of the privacy policy. Must be true. |
| `accept_terms` | boolean | **yes** | Acceptance of the terms of use. Must be true. |
| `device_id` | string | **yes** | Identifier for the device recording the acceptance. |

## Responses

| Status | Description | Schema |
|---|---|---|
| `200` | Success | object |
| `400` | A parameter was missing or invalid. | Error |
| `401` | Missing, malformed or unrecognized signature, or a timestamp outside the 30-second window. Body: &#123;"error":"Missing or invalid API key credentials"&#125; | Error |
| `403` | This API key does not have write access. The account behind this key is not active, for example it is pending approval or suspended. Body: &#123;"error":"Your account is suspended. Contact support."&#125;, the message naming the account's status. | Error |
| `422` | The acceptance was not recorded: no terms are in effect, the terms changed since you read them, or a consent value was refused. The body's `error` says why. | Error |

## Example

Request:

```bash
curl --request POST \
  --url 'https://demo.stxapp.io/api/v1/tnc/accept' \
  --header 'X-STX-ACCESS-KEY: <key-id>' \
  --header 'X-STX-ACCESS-TIMESTAMP: <unix-ms>' \
  --header 'X-STX-ACCESS-SIGNATURE: <base64-ed25519>' \
  --header 'Content-Type: application/json' \
  --data '{
  "accept_house_rules": true,
  "accept_privacy": true,
  "accept_terms": true,
  "device_id": "my-device-001"
}'
```

Response `200`:

```json
{
  "message": "string"
}
```

### Response fields

| Field | Type | Description |
|---|---|---|
| `message` | string | Always `"Success"` when the acceptance was recorded. |
