Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Create bucket

POST/v1/bucketsCreate bucket

Creates a new object-store bucket in the specified project.

Request body

application/json
object
branchGitNamestring

Git name of the branch to associate the bucket with. Mutually exclusive with branchId.

minLength 1

branchIdstring

ID of the branch to associate the bucket with. Mutually exclusive with branchGitName.

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

logicalIdstring

Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.

maxLength 255 · pattern ^[A-Za-z0-9][A-Za-z0-9._-]*$

namestring

Display name for the bucket. Generated if omitted.

maxLength 100 · minLength 1

projectIdstringrequired

ID of the project to create the bucket in

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

Example request
{
  "branchGitName": "string",
  "branchId": "string",
  "logicalId": "string",
  "name": "string",
  "projectId": "string"
}

Responses

201Created a new bucket.application/json
object
dataobjectrequired
Show child attributes
branchIdnull | stringrequired

pattern ^(br_)([cC][^\s-]{8,}|[a-z0-9]+)$

createdAtstring · date-timerequired
idstringrequired

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

logicalIdnull | stringrequired
namestringrequired
projectobjectrequired
Show child attributes
idstringrequired

pattern ^(proj_)([cC][^\s-]{8,}|[a-z0-9]+)$

namestringrequired
urlstring · urirequired
providerNamestringrequired
statusstringrequired
typestringrequired

const "bucket"

urlstring · urirequired
Example response
{
  "data": {
    "branchId": "string",
    "createdAt": "2026-06-09T00:00:00Z",
    "id": "string",
    "logicalId": "string",
    "name": "string",
    "project": {
      "id": "string",
      "name": "string",
      "url": "https://example.com"
    },
    "providerName": "string",
    "status": "string",
    "type": "bucket",
    "url": "https://example.com"
  }
}
400Invalid request parameters.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
403Actor does not have access to the specified project.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
404Project or branch not found.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
409A bucket with the same `logicalId` already exists on the branch.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
413Request body exceeds this endpoint's size cap.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu