REST /api/v1/storage 6 endpoints
GET /api/v1/storage/api/v1/storage

List storage objects under a bucket/prefix. Calls listObjects(bucket, prefix).

Public

Response Example

{
  "data": [
    {
      "id": "obj_3b7c9a21",
      "bucket": "attachments",
      "path": "org_abc123/activities/act_4b2e1f89/session_notes.pdf",
      "name": "session_notes.pdf",
      "content_type": "application/pdf",
      "size": 204800,
      "created_at": "2026-03-15T09:12:34Z",
      "last_modified": "2026-03-15T09:12:34Z"
    },
    {
      "id": "obj_5e1d8f43",
      "bucket": "attachments",
      "path": "org_abc123/activities/act_4b2e1f89/progress_photo.jpg",
      "name": "progress_photo.jpg",
      "content_type": "image/jpeg",
      "size": 1572864,
      "created_at": "2026-03-18T11:45:00Z",
      "last_modified": "2026-03-18T11:45:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 2
  }
}
GET /api/v1/storage/api/v1/storage/:id

Get metadata for a specific stored object by internal object ID.

Public

Response Example

{
  "id": "obj_3b7c9a21",
  "bucket": "attachments",
  "path": "org_abc123/activities/act_4b2e1f89/session_notes.pdf",
  "name": "session_notes.pdf",
  "content_type": "application/pdf",
  "size": 204800,
  "created_at": "2026-03-15T09:12:34Z",
  "last_modified": "2026-03-15T09:12:34Z"
}
POST /api/v1/storage/api/v1/storage

Upload a binary object to a bucket path. Calls upload(bucket, path, bytes, contentType). Content-Type: multipart/form-data.

Public

Request Example

{
  "bucket": "attachments",
  "path": "org_abc123/activities/act_4b2e1f89/intake_form.pdf",
  "content_type": "application/pdf",
  "file": "<binary — multipart field, 87040 bytes>"
}

Response Example

{
  "id": "obj_9a4e2f17",
  "bucket": "attachments",
  "path": "org_abc123/activities/act_4b2e1f89/intake_form.pdf",
  "name": "intake_form.pdf",
  "content_type": "application/pdf",
  "size": 87040,
  "created_at": "2026-03-26T14:23:45Z",
  "last_modified": "2026-03-26T14:23:45Z"
}
PUT /api/v1/storage/api/v1/storage/:id

Replace/overwrite an existing stored object with new binary content. Calls upload() with upsert semantics.

Public

Request Example

{
  "content_type": "application/pdf",
  "file": "<binary — multipart field, 215040 bytes (updated version)>"
}

Response Example

{
  "id": "obj_3b7c9a21",
  "bucket": "attachments",
  "path": "org_abc123/activities/act_4b2e1f89/session_notes.pdf",
  "name": "session_notes.pdf",
  "content_type": "application/pdf",
  "size": 215040,
  "created_at": "2026-03-15T09:12:34Z",
  "last_modified": "2026-03-26T15:45:00Z"
}
DELETE /api/v1/storage/api/v1/storage/:id

Delete a stored object by ID. Calls delete(bucket, path).

Public

Response Example

{
  "success": true,
  "deleted_id": "obj_3b7c9a21",
  "bucket": "attachments",
  "path": "org_abc123/activities/act_4b2e1f89/session_notes.pdf"
}
POST /api/v1/storage/api/v1/storage/signed-urls

Generate a time-limited signed download URL for a stored object. Calls createSignedUrl(bucket, path, expiresIn).

Public

Request Example

{
  "bucket": "attachments",
  "path": "org_abc123/activities/act_4b2e1f89/session_notes.pdf",
  "expires_in": 3600
}

Response Example

{
  "signed_url": "https://xyz.supabase.co/storage/v1/object/sign/attachments/org_abc123/activities/act_4b2e1f89/session_notes.pdf?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "bucket": "attachments",
  "path": "org_abc123/activities/act_4b2e1f89/session_notes.pdf",
  "expires_in": 3600,
  "expires_at": "2026-03-26T15:23:45Z"
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}