Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

On this pageOverview

Create bucket key

POST/v1/buckets/{bucketId}/keys

Creates a new access key for the given bucket. The secretAccessKey field is returned exactly once in this response and is never stored — copy it immediately.

AuthorizationBearer <token>

OAuth2 authentication

In: header

Scope: workspace:admin, offline_access

bucketId*string

Match^(bkt_)?([cC][^\s-]{8,}|[a-z0-9]+)$

application/json

TypeScript Definitions

Use the request body type in TypeScript.

curl -X POST "https://example.com/v1/buckets/string/keys" \
  -H "Content-Type: application/json" \
  -d '{
    "role": "read"
  }'
{
  "data": {
    "id": "string",
    "type": "bucketKey",
    "name": "string",
    "valueHint": "string",
    "role": "read",
    "createdAt": "2019-08-24T14:15:22Z",
    "secretAccessKey": "string",
    "accessKeyId": "string",
    "endpoint": "string",
    "bucketName": "string"
  }
}
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu