---
title: "PATCH /extension/token/{id}"
method: PATCH
path: "/extension/token/{id}"
---

# PATCH /extension/token/{id}

`PATCH /extension/token/{id}`

## Request

- Base URL: `https://api.useanima.sh/v1`
- URL: `https://api.useanima.sh/v1/extension/token/{id}`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

## Path parameters

- `id` string, required: API key id of the extension token to update

## Request body

- object: Request body for updating an individual extension token
  - `authPolicy` 'session' | 'pre_approved' | 'prompt_owner': Updated auth policy for this token
  - `tokenTtl` '15m' | '1h' | 'session': Updated TTL for this token. Recomputes expiresAt from now.

## Response `200`

OK

- object: Updated extension token metadata
  - `id` string, required
  - `authPolicy` 'session' | 'pre_approved' | 'prompt_owner', required: How agents authenticate the browser extension
  - `tokenTtl` '15m' | '1h' | 'session', required: How long the extension auth token stays valid
  - `expiresAt` string, date-time, nullable, required

---

[API](https://skmtc.dev/useanima/apis/anima-api.md) · [All operations](https://skmtc.dev/useanima/apis/anima-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useanima/apis/anima-api/revisions/aaa148188980?raw)
