---
title: "Create a scoped agent credential as the signed-in workspace owner; return its token once."
method: POST
path: "/v1/browser/service-credentials"
---

# Create a scoped agent credential as the signed-in workspace owner; return its token once.

`POST /v1/browser/service-credentials`

## Request

- Base URL: `http://127.0.0.1:8080`
- URL: `http://127.0.0.1:8080/v1/browser/service-credentials`
- Auth: HTTP bearer

## Headers

- `X-Likerts-Workspace` string, required

## Request body

- CredentialInput
  - `name` string, required
  - `scopes` OAuthScope[], required
  - `expiresAt` string, date-time, required

## Response `201`

Credential created; token returned once.

- IssuedServiceCredential
  - `credential` ServiceCredential, required
    - `id` string, uuid, required
    - `workspaceId` string, required
    - `name` string, required
    - `scopes` OAuthScope[], required
    - `expiresAt` string, date-time, required
    - `revoked` boolean, required
  - `token` string, required

## Other responses

- `400`: Invalid credential request.
- `401`: Invalid browser session.
- `403`: Owner access required.
- `413`: Request too large.
- `415`: JSON required.
- `429`: Admission or collection rate limit reached. Honor Retry-After in seconds; admission usually returns1, the collection minute window returns60.
- `500`: Internal failure.
- `503`: Distributed request admission is temporarily unavailable. No protected handler ran; honor Retry-After.

---

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