---
title: "Create Bearer Token"
method: POST
path: "/agents/{agentKey}/bearerToken"
tags: ["Agents"]
---

# Create Bearer Token

`POST /agents/{agentKey}/bearerToken`

## Request

- Base URL: `https://eu-west-1.api.silverflow.com/v1`
- URL: `https://eu-west-1.api.silverflow.com/v1/agents/{agentKey}/bearerToken`
- Auth: one of:
  - HTTP basic
  - HTTP bearer
- TypeScript: <https://skmtc.dev/silverflow/apis/silverflow-api/docs/agents/:agentKey/bearerToken/post.ts> (a function with typed inputs; its response is checked against the schema)

Requires `agents:CreateBearerToken` permission.

## Path parameters

- `agentKey` string, required: Uniquely identifies an Agent

## Request body

- BearerTokenCreate
  - `expires` string, required: A duration expressed in ISO 8601 "period" format.
  - `scope` Scope
    - `merchantKey` string: Uniquely identifies a Merchant
  - `permissions` Permission[], required
  - `ipRanges` IpRange[]: A list of IP ranges

## Response `201`

The created Bearer Token

- BearerToken
  - `key` string, required: Uniquely identifies a Token
  - `token` string, required

## Other responses

- `400`: The request was malformed. See the response body for details
- `401`: Authentication information is missing or invalid
- `403`: The authenticated client is forbidden to make the request for the resource identified.
- `404`: The requested resource was not found
- `409`: The request could not be completed due to a conflict with the current state of the resources involved in the request.
- `429`: The number of requests (per minute) has exceeded the configured maximum

---

[API](https://skmtc.dev/silverflow/apis/silverflow-api.md) - [All operations](https://skmtc.dev/silverflow/apis/silverflow-api/llms.txt) - [OpenAPI document](https://skmtc.dev/silverflow/apis/silverflow-api/revisions/43ecbe4fd6ea?raw)
