---
title: "Create a credential; secret shown once"
method: POST
path: "/api/control/credentials"
tags: ["Durable control"]
---

# Create a credential; secret shown once

`POST /api/control/credentials`

## Request

- Base URL: `https://oyabrowser.com`
- URL: `https://oyabrowser.com/api/control/credentials`
- Auth: HTTP bearer

Requires an administrator credential.

## Request body

- object
  - `role` 'viewer' | 'operator' | 'administrator'
  - `label` string
  - `expiresAt` integer

## Response `200`

Success

- object

## Other responses

- `401`: Invalid or revoked credential
- `403`: Insufficient role
- `409`: Lifecycle, idempotency, or control lease conflict
- `503`: Storage or session owner unavailable

---

[API](https://skmtc.dev/oyabrowser/apis/oya-browser-api.md) · [All operations](https://skmtc.dev/oyabrowser/apis/oya-browser-api/llms.txt) · [OpenAPI document](https://skmtc.dev/oyabrowser/apis/oya-browser-api/revisions/748c4b34f8e4?raw)
