# POST /updates/terms

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the updates group.

Accept a version of the UrbeStack license terms

- Who may call it: administrator
- Token scope, any of: settings, all
- Answers: 200 OK

Accept the terms for the installed UrbeStack version or for the newer release offered to this server. Read the terms at /terms/N on the license server, where N is the terms version. A version outside the required integer range of 1 to 999999 returns HTTP 400.

UrbeStack records the current time and the administrator who made the request, then checks in with the license server immediately. The license server keeps the first acceptance it receives for each version. If the license server is unreachable, UrbeStack keeps the acceptance locally and sends it with the next license check.

Accepting the terms required by a waiting release clears that requirement. If the release is eligible for immediate automatic installation, UrbeStack schedules it for the next hourly update check. If an update is in progress, retry after it ends. The response contains the resulting status in updates and up to 50 entries in history, newest first.

## As a command

- [urbestack-terms-accept](https://urbestack.com/docs/commands/urbestack-terms-accept.md): Records who accepted a version of the license terms on this server and when.

## Request body

JSON.

- `version` (integer, 1 or more, required): License terms version to accept, from 1 to 999999. The update status shows the version awaiting acceptance as terms.wanted.

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
curl -sS -X POST "$API/updates/terms" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "version": 1
  }'
```

Response, 200 OK:

```
{
  "history": [
    {
      "actor": "text",
      "changelog": "text",
      "commands": [
        "text"
      ],
      "finished_at": "2026-09-09T10:15:04Z",
      "from": "text",
      "id": 1,
      "log": "",
      "message": "text",
      "phases": [
        {
          "at": "text",
          "phase": "text"
        }
      ],
      "result": "installed",
      "source": "timer",
      "started_at": "2026-09-09T10:15:01Z",
      "to": "text",
      "urgent": true
    }
  ],
  "updates": {
    "backups": {
      "hour": "text",
      "last_ended_at": "text"
    },
    "blocked": {
      "at": "text",
      "job": {},
      "runs": 1,
      "version": "0.0.1"
    },
    "check_error": "text",
    "check_refused": "text",
    "checked_at": "text",
    "copy_bytes": 1,
    "installed": "text",
    "installed_how": {
      "actor": "text",
      "at": "text",
      "by": "timer"
    },
    "installs_at": "text",
    "keys": [
      "text"
    ],
    "last": {
      "at": "text",
      "commands": [
        "text"
      ],
      "dismissed": true,
      "from": "text",
      "id": 1,
      "message": "text",
      "result": "installed",
      "source": "/old",
      "version": "0.0.1"
    },
    "next_ask": "text",
    "packages_dir": "text",
    "release": {
      "base": "text",
      "changelog": "text",
      "found_at": "text",
      "released": "text",
      "terms": 1,
      "urgent": true,
      "version": "0.0.1"
    },
    "rollback_ready": true,
    "running": {
      "job": {
        "id": 1,
        "progress": 100,
        "started_at": "2026-09-09T10:15:01Z",
        "type": "rebuild"
      },
      "phase": "preparing",
      "phases": [
        {
          "at": "text",
          "phase": "text"
        }
      ],
      "queued": 1,
      "since": "text",
      "version": "0.0.1"
    },
    "settings": {
      "automatic": true,
      "hour": "text",
      "urgent_automatic": true
    },
    "terms": {
      "accepted": {
        "at": "text",
        "by": "text",
        "version": 1
      },
      "installed": 1,
      "url": "text",
      "wanted": 1
    },
    "waiting": {
      "message": "text",
      "reason": "quiet-hour",
      "red": true,
      "since": "text"
    }
  }
}
```

## Errors

- 400: --version is required: the version of the license terms accepted
- 400: The time of the acceptance is in seconds since 1970
- 400: The version of the license terms is a whole number: 1, 2, ...
- 400: version is the number of the license terms accepted: 1, 2, ...
- 401: Authentication required
- 409: An update run is in progress
- 409: Version 
- 409: Version <st.terms>{version} of the license terms is accepted on this server already; version <v> is older and is not recorded over it
