---
title: "Get a function's runtime key"
method: GET
path: "/functions/{id}/runtime-key"
tags: ["Functions"]
---

# Get a function's runtime key

`GET /functions/{id}/runtime-key`

## Request

- Base URL: `https://api.primitive.dev/v1`
- URL: `https://api.primitive.dev/v1/functions/{id}/runtime-key`
- Auth: HTTP bearer

Which key the function runs with (the organization's shared key or its own), the preset and permissions it is narrowed to, the secrets attached to it, and whether it is suspended and why. Never returns the key itself.

## Path parameters

- `id` string, uuid, required

## Response `200`

Get a function's runtime key

- object
  - `success` true, required
  - `data` GetFunctionRuntimeKeyResult, required
    - `mode` 'org_shared' | 'per_function', required
    - `preset` string, nullable, required
    - `permissions` string[], nullable, required
    - `mail_scope` unknown, required
    - `attached_secret_keys` string[], nullable, required
    - `key_prefix` string, nullable, required
    - `expires_at` string, nullable, required
    - `suspended_at` string, nullable, required
    - `suspended_reason` string, nullable, required
    - `function_bound_key` 'live' | 'revoked', nullable
    - `suspended_by` 'transfer' | 'access_decision' | 'owner_or_admin' | 'other', nullable
    - `stop_rank` 'owner' | 'admin', nullable
    - `key_suspension_reasons` string[]
    - `transfer_stop_placed` boolean

## Other responses

- `401`: Invalid or missing API key
- `403`: Authenticated caller lacks permission for the operation
- `404`: Resource not found
- `429`: Rate limit exceeded. The `ratelimit-*` headers describe the limiter that rejected this request, with its own limit and window, not the API budget that successful responses report. A limiter that reports only a wait sends `Retry-After` alone.

---

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