---
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

---

[API](https://skmtc.net/eyevinn/apis/strom-api.md) · [All operations](https://skmtc.net/eyevinn/apis/strom-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/eyevinn/strom-api/versions/c96558b86012/schema)
