---
title: "Get secrets public key"
method: GET
path: "/secrets/public-key"
tags: ["Secrets"]
---

# Get secrets public key

`GET /secrets/public-key`

## Request

- Base URL: `https://cloud.laravel.com/api`
- URL: `https://cloud.laravel.com/api/secrets/public-key`
- Auth: HTTP bearer

Get the active public key for the organization.

The public key can be used to seal values before creating or update secrets.

## Response `200`

Generating the key pair on the fly must not turn this read into a 201.



`OrganizationKeyPairResource`

- object
  - `data` OrganizationKeyPairResource, required
    - `id` string, required
    - `type` 'organizationKeyPairs', required
    - `attributes` object
      - `public_key` string, required: A base64-encoded public key that can be used to seal values.

## Other responses

- `401`: An error
- `403`: Authorization error

---

[API](https://skmtc.dev/laravel/apis/laravel-cloud.md) - [All operations](https://skmtc.dev/laravel/apis/laravel-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/laravel/apis/laravel-cloud/revisions/af603f54ff33?raw)
