v8

latestOpenAPI 3.0.0Apache 2.0raw.githubusercontent.com2025-10-165266542.4 MB
DigitalOcean-public.v2-new_Spaces Keys

Create a New Spaces Access Key

To create a new Spaces Access Key, send a POST request to /v2/spaces/keys. At the moment, you cannot mix a fullaccess permission with scoped permissions. A fullaccess permission will be prioritized if fullaccess and scoped permissions are both added.

post/v2/spaces/keys

Request body

namestring

The access key's name.

access_keystring

The Access Key ID used to access a bucket.

created_atstring date-time

The date and time the key was created.

Example request

{
  "name": "my-access-key",
  "grants": [
    {
      "bucket": "my-bucket",
      "permission": "read"
    }
  ],
  "access_key": "DOACCESSKEYEXAMPLE",
  "created_at": "2018-07-19T15:04:16Z"
}

Response

A JSON response containing details about the new key.

Example response

{
  "key": {
    "secret_key": "DOSECRETKEYEXAMPLE",
    "name": "my-access-key",
    "grants": [
      {
        "bucket": "my-bucket",
        "permission": "read"
      }
    ],
    "access_key": "DOACCESSKEYEXAMPLE",
    "created_at": "2018-07-19T15:04:16Z"
  }
}