# at.happyproto.actor.acceptTerms

> Record that the caller accepted the beta terms in force for their account, with the exact wording they were shown. The dashboard calls it from the terms screen after sign-in. Accepting terms already accepted records nothing new. Each acceptance is kept, append-only. Customers and staff; anyone else is refused.

- Kind: procedure
- Authority: actor.happyproto.at
- Lexicon: 1
- Published by [happyproto.at](https://lexicon.garden/identity/did:plc:mo7vq4jbioxwafy5zkcc3eux), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.actor.acceptTerms)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.actor.acceptTerms/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.actor.acceptTerms/analytics)

## Procedure (`at.happyproto.actor.acceptTerms`)

Type: procedure · POST

### Input (application/json)

- `idempotencyKey` (string, required): A UUID the client generates once per acceptance and resends on every retry of it.
- `termsVersion` (string, required): The terms the caller accepted, as getTerms reported them. Anything but the terms in force is refused (TermsOutdated).
- `text` (string, required): The exact wording the caller accepted.
- `textVersion` (string, required): The version of the wording the caller was shown, chosen by the client.

### Output (application/json)

- `accepted` (boolean, required): Always true: the caller has now accepted termsVersion.
- `termsVersion` (string, required): The beta terms in force.

### Errors

- `AuthRequired`: This endpoint requires an authenticated caller.
- `InvalidRequest`: termsVersion, textVersion, text or idempotencyKey is missing or malformed, or the provisioner refused the request as malformed.
- `Forbidden`: The caller is neither a customer nor staff, or the provisioner refused them.
- `TermsRequired`: The wording or its version is blank.
- `TermsOutdated`: termsVersion is not the terms in force: the client is showing old terms, and should read getTerms again.
- `NotFound`: Passed through from the provisioner.
- `InvalidSlug`: Passed through from the provisioner.
- `SlugTaken`: Passed through from the provisioner.
- `NotEntitled`: Passed through from the provisioner.
- `InstanceLimit`: Passed through from the provisioner.
- `NoCapacity`: Passed through from the provisioner.
- `OperationInProgress`: Passed through from the provisioner.
- `Upstream`: The provisioner is unreachable, not configured, or answered with an error it does not explain to callers.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Record that the caller accepted the beta terms in force for their account, with the exact wording they were shown. The dashboard calls it from the terms screen after sign-in. Accepting terms already accepted records nothing new. Each acceptance is kept, append-only. Customers and staff; anyone else is refused.",
      "errors": [
        {
          "description": "This endpoint requires an authenticated caller.",
          "name": "AuthRequired"
        },
        {
          "description": "termsVersion, textVersion, text or idempotencyKey is missing or malformed, or the provisioner refused the request as malformed.",
          "name": "InvalidRequest"
        },
        {
          "description": "The caller is neither a customer nor staff, or the provisioner refused them.",
          "name": "Forbidden"
        },
        {
          "description": "The wording or its version is blank.",
          "name": "TermsRequired"
        },
        {
          "description": "termsVersion is not the terms in force: the client is showing old terms, and should read getTerms again.",
          "name": "TermsOutdated"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "NotFound"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "InvalidSlug"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "SlugTaken"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "NotEntitled"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "InstanceLimit"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "NoCapacity"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "OperationInProgress"
        },
        {
          "description": "The provisioner is unreachable, not configured, or answered with an error it does not explain to callers.",
          "name": "Upstream"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "idempotencyKey": {
              "description": "A UUID the client generates once per acceptance and resends on every retry of it.",
              "type": "string"
            },
            "termsVersion": {
              "description": "The terms the caller accepted, as getTerms reported them. Anything but the terms in force is refused (TermsOutdated).",
              "type": "string"
            },
            "text": {
              "description": "The exact wording the caller accepted.",
              "type": "string"
            },
            "textVersion": {
              "description": "The version of the wording the caller was shown, chosen by the client.",
              "type": "string"
            }
          },
          "required": [
            "termsVersion",
            "textVersion",
            "text",
            "idempotencyKey"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "accepted": {
              "description": "Always true: the caller has now accepted termsVersion.",
              "type": "boolean"
            },
            "termsVersion": {
              "description": "The beta terms in force.",
              "type": "string"
            }
          },
          "required": [
            "termsVersion",
            "accepted"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "at.happyproto.actor.acceptTerms",
  "lexicon": 1
}
```
