---
title: "Issue a short-lived Agent token"
method: POST
path: "/api/v1/agents/{agentId}/tokens"
---

# Issue a short-lived Agent token

`POST /api/v1/agents/{agentId}/tokens`

## Request

- Base URL: `https://workers.miniurl.com`
- URL: `https://workers.miniurl.com/api/v1/agents/{agentId}/tokens`
- Auth: HTTP bearer

## Path parameters

- `agentId` string, required

## Request body

- object
  - `scopes` string[]

## Response `201`

Short-lived access and refresh tokens

## Other responses

- `400`: Invalid input or malformed JSON
- `401`: Missing, invalid, expired, or wrong bearer token for this endpoint

---

[API](https://skmtc.dev/miniurl/apis/miniurl-agent-first-api.md) · [All operations](https://skmtc.dev/miniurl/apis/miniurl-agent-first-api/llms.txt) · [OpenAPI document](https://skmtc.dev/miniurl/apis/miniurl-agent-first-api/revisions/1d12196927db?raw)
