---
title: "Set a per-flow OSC Personal Access Token"
method: PUT
path: "/api/osc/pat/{key}"
tags: ["System"]
---

# Set a per-flow OSC Personal Access Token

`PUT /api/osc/pat/{key}`

Registers a PAT for one credential key (the flow id). Flows resolve their own
PAT first, falling back to the default — isolating OSC tenants on a shared
instance. Held in memory only.

## Path parameters

- `key` string, required

## Request body

- SetOscPatRequest — Request to set the OSC Personal Access Token (PAT) at runtime. The PAT is used to mint short-lived Service Access Tokens for OSC-hosted services (e.g. a TAMS gateway). It is held in memory only — not persisted.
  - `pat` string, required — The OSC Personal Access Token.

## Response `200`

PAT updated

- OscAuthStatusResponse — Status of the OSC Personal Access Token configuration. Token values are never returned.
  - `configured` boolean, required — Whether the default (fallback) PAT is configured (via env var or the keyless API). Used for single-tenant deployments.
  - `keys` string[], required — Credential keys (flow ids) that have a per-flow PAT registered. Used to isolate OSC tenants on a shared Strom instance.

## Other responses

- `400` — Empty token

## Changes

> 25 revisions in range; 17 could not be searched.

- **2026-04-07** `1e67862a080e` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/eyevinn/apis/strom-api/changes/api/osc/pat/:key/put.md)

---

[API](https://skmtc.dev/eyevinn/apis/strom-api.md) · [All operations](https://skmtc.dev/eyevinn/apis/strom-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/eyevinn/strom-api/revisions/0df7ca64263f/schema)
