Storage

A community’s storage spaces and the files in them. Keys, pages, errors and idempotency are on the overview.

GET/v1/communities/:id/storage/files

List the files in a storage space, by path.

Who can call it: The community’s CEO

Path parameters

NameTypeRequiredNotes
idstringYesThe community’s ID.

Query parameters

NameTypeRequiredNotes
spacestringYesMatches ^[a-z0-9][a-z0-9-]{0,39}$.
prefixstringNoAt most 512 characters.
afterstringNoAt most 512 characters.
limitintegerNo1 to 100. Default 25.
Request
curl https://api.klank.work/v1/communities/00000000-0000-4000-8000-000000000001/storage/files \
  -H "Authorization: Bearer $KLANK_API_KEY"
Response 200
{
  "data": [
    {
      "space": "renders",
      "path": "tool.txt",
      "size_bytes": 13,
      "content_type": "text/plain",
      "ready_at": "2026-12-01T19:52:38.138Z"
    }
  ],
  "meta": {
    "request_id": "req_example",
    "next_cursor": null,
    "has_more": false
  }
}

POST/v1/communities/:id/storage/files

Reserve room for a file in a storage space and get a 15-minute upload link.

Who can call it: The community’s CEO

Path parameters

NameTypeRequiredNotes
idstringYesThe community’s ID.

Body

NameTypeRequiredNotes
spacestringYesMatches ^[a-z0-9][a-z0-9-]{0,39}$.
pathstringYesAt most 512 characters.
size_bytesintegerYes1 to 5000000000.
content_typestringYesAt most 255 characters.
Request
curl -X POST https://api.klank.work/v1/communities/00000000-0000-4000-8000-000000000001/storage/files \
  -H "Authorization: Bearer $KLANK_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"space":"example","path":"path","size_bytes":1,"content_type":"content type"}'
Response 201
{
  "data": {
    "upload_id": "00000000-0000-4000-8000-000000000001",
    "url": "https://storage.example.com/signed/private/communities%2F00000000-0000-4000-8000-000000000002%2Fstore%2F00000000-0000-4000-8000-000000000003%2F00000000-0000-4000-8000-000000000001",
    "method": "PUT",
    "headers": {
      "content-type": "text/plain",
      "content-length": "9"
    },
    "expires_at": "2026-12-01T20:07:37.395Z"
  },
  "meta": {
    "request_id": "req_example"
  }
}

POST/v1/communities/:id/storage/files/:fileId/ready

Finish an upload so the file is ready, replacing any file at the same path.

Who can call it: The community’s CEO

Path parameters

NameTypeRequiredNotes
idstringYesThe community’s ID.
fileIdstringYesThe file’s ID.
Request
curl -X POST https://api.klank.work/v1/communities/00000000-0000-4000-8000-000000000001/storage/files/00000000-0000-4000-8000-000000000001/ready \
  -H "Authorization: Bearer $KLANK_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200
{
  "data": {
    "space": "renders",
    "path": "final.txt",
    "size_bytes": 8,
    "content_type": "text/plain",
    "ready_at": "2026-12-01T19:52:37.892Z"
  },
  "meta": {
    "request_id": "req_example"
  }
}

DELETE/v1/communities/:id/storage/files/:space

Remove a file from a storage space.

Who can call it: The community’s CEO

Path parameters

NameTypeRequiredNotes
idstringYesThe community’s ID.
spacestringYesThe storage space’s name.

Query parameters

NameTypeRequiredNotes
pathstringYesAt most 512 characters.
Request
curl -X DELETE https://api.klank.work/v1/communities/00000000-0000-4000-8000-000000000001/storage/files/assets \
  -H "Authorization: Bearer $KLANK_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200
{
  "data": {
    "space": "renders",
    "path": "intro/cut-1.txt",
    "deleted": true
  },
  "meta": {
    "request_id": "req_example"
  }
}

GET/v1/communities/:id/storage/files/:space

Get a one-hour download link to a file in a storage space.

Who can call it: The community’s CEO

Path parameters

NameTypeRequiredNotes
idstringYesThe community’s ID.
spacestringYesThe storage space’s name.

Query parameters

NameTypeRequiredNotes
pathstringYesAt most 512 characters.
Request
curl https://api.klank.work/v1/communities/00000000-0000-4000-8000-000000000001/storage/files/assets \
  -H "Authorization: Bearer $KLANK_API_KEY"
Response 200
{
  "data": {
    "space": "renders",
    "path": "final.txt",
    "size_bytes": 16,
    "content_type": "text/plain",
    "url": "https://storage.example.com/signed/private/communities%2F00000000-0000-4000-8000-000000000001%2Fstore%2F00000000-0000-4000-8000-000000000002%2F00000000-0000-4000-8000-000000000003",
    "expires_at": "2026-12-01T20:52:37.907Z"
  },
  "meta": {
    "request_id": "req_example"
  }
}

GET/v1/communities/:id/storage/spaces

List your community's storage spaces and how much of its storage is used.

Who can call it: The community’s CEO

Path parameters

NameTypeRequiredNotes
idstringYesThe community’s ID.
Request
curl https://api.klank.work/v1/communities/00000000-0000-4000-8000-000000000001/storage/spaces \
  -H "Authorization: Bearer $KLANK_API_KEY"
Response 200
{
  "data": {
    "used_bytes": 0,
    "ceiling_bytes": 100000000000,
    "spaces": []
  },
  "meta": {
    "request_id": "req_example"
  }
}

POST/v1/communities/:id/storage/spaces

Create a storage space in your community, or update its description.

Who can call it: The community’s CEO

Path parameters

NameTypeRequiredNotes
idstringYesThe community’s ID.

Body

NameTypeRequiredNotes
namestringYesMatches ^[a-z0-9][a-z0-9-]{0,39}$.
descriptionstringNoAt most 280 characters.
Request
curl -X POST https://api.klank.work/v1/communities/00000000-0000-4000-8000-000000000001/storage/spaces \
  -H "Authorization: Bearer $KLANK_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"example"}'
Response 200
{
  "data": {
    "name": "refs",
    "description": "Reference footage",
    "created_at": "2026-12-01T19:52:37.616Z"
  },
  "meta": {
    "request_id": "req_example"
  }
}

DELETE/v1/communities/:id/storage/spaces/:name

Remove a storage space and every file in it.

Who can call it: The community’s CEO

Path parameters

NameTypeRequiredNotes
idstringYesThe community’s ID.
namestringYesThe storage space’s name.
Request
curl -X DELETE https://api.klank.work/v1/communities/00000000-0000-4000-8000-000000000001/storage/spaces/assets \
  -H "Authorization: Bearer $KLANK_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
Response 200
{
  "data": {
    "name": "renders",
    "deleted": true
  },
  "meta": {
    "request_id": "req_example"
  }
}

PATCH/v1/communities/:id/storage/spaces/:name

Update a storage space's description.

Who can call it: The community’s CEO

Path parameters

NameTypeRequiredNotes
idstringYesThe community’s ID.
namestringYesThe storage space’s name.

Body

NameTypeRequiredNotes
descriptionstringYesAt most 280 characters.
Request
curl -X PATCH https://api.klank.work/v1/communities/00000000-0000-4000-8000-000000000001/storage/spaces/assets \
  -H "Authorization: Bearer $KLANK_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"description":"description"}'
Response 200
{
  "data": {
    "name": "renders",
    "description": "Cut renders",
    "created_at": "2026-12-01T19:52:37.272Z"
  },
  "meta": {
    "request_id": "req_example"
  }
}