---
title: "Create an Agent Key for the calling user"
method: POST
path: "/v2/organizations/{organization_id}/access/agent-key"
tags: ["Organization Access V2"]
---

# Create an Agent Key for the calling user

`POST /v2/organizations/{organization_id}/access/agent-key`

Self-service: mints a read-only organization API key for the calling dashboard user, scoped to their own role and project restrictions. Scopes cannot be requested by the client. Used by the embedded Agent.

## Path parameters

- `organization_id` string, required — a string to be decoded into a number

## Response `200`

Success

- object
  - `id` integer, required — an integer
  - `name` string, required
  - `token` string, required
  - `created_at` string, required

## Other responses

- `400` — The request did not match the expected schema
- `401` — No API key was provided in the request
- `403` — The API key does not have permission to perform this action
- `429` — Too many requests have been made in a short period
- `500` — An unexpected error occurred on the server

---

[API](https://skmtc.dev/superwall/apis/superwall-api-v2.md) · [All operations](https://skmtc.dev/superwall/apis/superwall-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/superwall/superwall-api-v2/revisions/13937437c787/schema)
