---
title: "Issue a scoped credential"
method: POST
path: "/account/projects/{project}/keys"
tags: ["account"]
---

# Issue a scoped credential

`POST /account/projects/{project}/keys`

## Request

- Base URL: `https://api.mapsource.io`
- URL: `https://api.mapsource.io/account/projects/{project}/keys`
- Auth: HTTP bearer

Issues a scoped API key with an optional service-account association and expiry. The secret is returned once.

When to use: Create a credential with permissions for a specific workload.

When not to use: Service-account credentials cannot issue additional credentials.

## Path parameters

- `project` string, required

## Request body

- object
  - `label` string: Credential label.
  - `scopes` unknown[]: Capability categories this key may use, or * for all. Defaults to *.
    - unknown
  - `serviceAccountId` string: Bind the key to an agent identity.
  - `expiresInDays` integer: Expire the key automatically.

## Response `200`

Issue a scoped credential

- object
  - `schema` string
  - `key` string: API key secret, returned only when issued.
  - `reveal` string
  - `credential` object

## Other responses

- `400`: Error with a stable machine code.
- `401`: Error with a stable machine code.
- `429`: Error with a stable machine code.
- `500`: Error with a stable machine code.

---

[API](https://skmtc.dev/mapsource/apis/mapsource-overpass-api.md) · [All operations](https://skmtc.dev/mapsource/apis/mapsource-overpass-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mapsource/apis/mapsource-overpass-api/revisions/8af8c2769e7b?raw)
