# Get an organization public key

From **GitHub v3 REST API**.

`GET /orgs/{org}/actions/secrets/public-key`

Gets your public key, which you need to encrypt secrets. You need to encrypt a secret before you can create or update secrets. You must authenticate using an access token with the `admin:org` scope to use this endpoint. GitHub Apps must have the `secrets` organization permission to use this endpoint.

## Parameters

### `org`

- Location: path
- Required: true
- Type: `string`

## Responses

### `200`

Response

### `application/json`

- Type: `object`

The public key used for setting Actions Secrets.

```json
{
  "key": "2Sg8iYjAxxmI2LvUXpJjkYrMxURPc8r+dB7TJyvv1234",
  "key_id": "012345678912345678"
}
```

```json
{"description":"The public key used for setting Actions Secrets.","properties":{"created_at":{"example":"2011-01-26T19:01:12Z","type":"string"},"id":{"example":2,"type":"integer"},"key":{"description":"The Base64 encoded public key.","example":"hBT5WZEj8ZoOv6TYJsfWq7MxTEQopZO5/IT3ZCVQPzs=","type":"string"},"key_id":{"description":"The identifier for the key.","example":"1234567","type":"string"},"title":{"example":"ssh-rsa AAAAB3NzaC1yc2EAAA","type":"string"},"url":{"example":"https://api.github.com/user/keys/2","type":"string"}},"required":["key_id","key"],"title":"ActionsPublicKey","type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/orgs/{org}/actions/secrets/public-key
```
