---
title: "Update a license entry"
method: POST
path: "/license_updates"
tags: ["Licenses"]
---

# Update a license entry

`POST /license_updates`

## Request

- Base URL: `https://api.togai.com`
- URL: `https://api.togai.com/license_updates`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/togaihq/apis/togai-apis/docs/license_updates/post.ts> (a function with typed inputs; its response is checked against the schema)

This API let’s you to add a license entry

## Request body

- LicenseUpdateRequest: License update request
  - `licenseId` string, required: The license id for which the update is requested
  - `accountId` string, required: The account id for which the license is being updated
  - `updateType` 'RELATIVE' | 'ABSOLUTE', required: The type of update to be performed
  - `quantity` number, required: The quantity to be updated
  - `effectiveFrom` string, date-time: The effective from date for the update
  - `idempotencyKey` string: The idempotency key for uniqueness of the license update request
  - `metadata` object

## Response `200`

Success response

- LicenseUpdateResponse: License update
  - `licenseId` string, required
  - `accountId` string, required
  - `quantity` number, required: Absolute quantity of the license
  - `effectiveFrom` string, date-time, required
  - `metadata` object
  - `createdAt` string, date-time, required

## Other responses

- `400`: Bad request. Please check the response message for failure details.
- `401`: Credential is not valid. Please check the response message for failure details.
- `403`: Credential does not have access to add a license entry.
- `422`: Unable to process the query parameters provided. Please check our docs for the api limits - https://togai.io/docs/limits.
- `429`: Request throttled. Please check the response message on the failure details.
- `default`: Error response

## Changes

- **2024-07-11** `5abfbfe439be`: 1 breaking, 1 info
  - the `allOf[#/components/schemas/LicenseUpdate]/quantity` response's property type changed from `integer` to `number` for status `200`
  - the `quantity` request property type was generalized from `integer` to `number`
- **2024-01-05** `ea9c4628bfdb`: 2 info
  - added the new optional request property `metadata`
  - added the optional property `allOf[#/components/schemas/LicenseUpdate]/metadata` to the response with the `200` status
- **2023-11-03** `a6c96c5ec06e`: 1 info
  - added the new optional request property `idempotencyKey`
- **2023-09-25** `ae3b70608528`: 1 info
  - added the new optional request property `effectiveFrom`
- **2023-09-02** `6b13f6f47735`: 1 breaking, 4 warning
  - the `quantity` request property type changed from `number` to `integer`
  - removed the request property `effectiveFrom`
  - removed the request property `idempotencyKey`
  - removed the request property `metadata`
  - …1 more

[Operation history](https://skmtc.dev/togaihq/apis/togai-apis/changes/license_updates/post.md)

---

[API](https://skmtc.dev/togaihq/apis/togai-apis.md) - [All operations](https://skmtc.dev/togaihq/apis/togai-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/togaihq/apis/togai-apis/revisions/442f5d8f4aa0?raw)
