Home

Supabase Storage API

API documentation for Supabase Storage

Object

Delete an object

deleteapiv0/object/{bucketName}/{wildcard}

Path parameters

  • bucketName
    REQUIRED
    Example:avatars
  • *
    REQUIRED
    Example:folder/cat.png

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "message": {
7        "type": "string",
8        "example": "Successfully deleted"
9      }
10    }
11  }
12}

Update the object at an existing key

putapiv0/object/{bucketName}/{wildcard}

Path parameters

  • bucketName
    REQUIRED
    Example:avatars
  • *
    REQUIRED
    Example:folder/cat.png

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "Key": {
7        "type": "string",
8        "example": "projectref/avatars/folder/cat.png"
9      }
10    },
11    "required": [
12      "Key"
13    ]
14  }
15}

Upload a new object

postapiv0/object/{bucketName}/{wildcard}

Path parameters

  • bucketName
    REQUIRED
    Example:avatars
  • *
    REQUIRED
    Example:folder/cat.png

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "Key": {
7        "type": "string",
8        "example": "avatars/folder/cat.png"
9      }
10    },
11    "required": [
12      "Key"
13    ]
14  }
15}

Delete multiple objects

deleteapiv0/object/{bucketName}

Path parameters

  • bucketName
    REQUIRED
    Example:avatars

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "array",
5    "items": {
6      "type": "object",
7      "properties": {
8        "name": {
9          "type": "string"
10        },
11        "bucket_id": {
12          "type": "string"
13        },
14        "owner": {
15          "type": "string"
16        },
17        "id": {
18          "anyOf": [
19            {
20              "type": "string"
21            },
22            {
23              "type": "null"
24            }
25          ]
26        },
27        "updated_at": {
28          "anyOf": [
29            {
30              "type": "string"
31            },
32            {
33              "type": "null"
34            }
35          ]
36        },
37        "created_at": {
38          "anyOf": [
39            {
40              "type": "string"
41            },
42            {
43              "type": "null"
44            }
45          ]
46        },
47        "last_accessed_at": {
48          "anyOf": [
49            {
50              "type": "string"
51            },
52            {
53              "type": "null"
54            }
55          ]
56        },
57        "metadata": {
58          "anyOf": [
59            {
60              "type": "object",
61              "additionalProperties": true
62            },
63            {
64              "type": "null"
65            }
66          ]
67        },
68        "buckets": {
69          "type": "object",
70          "properties": {
71            "id": {
72              "type": "string"
73            },
74            "name": {
75              "type": "string"
76            },
77            "owner": {
78              "type": "string"
79            },
80            "public": {
81              "type": "boolean"
82            },
83            "created_at": {
84              "type": "string"
85            },
86            "updated_at": {
87              "type": "string"
88            }
89          },
90          "required": [
91            "id",
92            "name"
93          ],
94          "additionalProperties": false,
95          "example": {
96            "id": "bucket2",
97            "name": "bucket2",
98            "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
99            "created_at": "2021-02-17T04:43:32.770206+00:00",
100            "updated_at": "2021-02-17T04:43:32.770206+00:00"
101          }
102        }
103      },
104      "required": [
105        "name"
106      ],
107      "additionalProperties": false,
108      "title": "objectSchema",
109      "example": {
110        "name": "folder/cat.png",
111        "bucket_id": "avatars",
112        "owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
113        "id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
114        "updated_at": "2021-04-06T16:30:35.394674+00:00",
115        "created_at": "2021-04-06T16:30:35.394674+00:00",
116        "last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
117        "metadata": {
118          "size": 1234
119        }
120      }
121    }
122  }
123}

Retrieve an object

getapiv0/object/authenticated/{bucketName}/{wildcard}

Path parameters

  • bucketName
    REQUIRED
    Example:avatars
  • *
    REQUIRED
    Example:folder/cat.png

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Error response

1{
2  "schema": {
3    "description": "Error response",
4    "type": "object",
5    "properties": {
6      "statusCode": {
7        "type": "string"
8      },
9      "error": {
10        "type": "string"
11      },
12      "message": {
13        "type": "string"
14      }
15    },
16    "required": [
17      "statusCode",
18      "error",
19      "message"
20    ],
21    "title": "errorSchema"
22  }
23}

Generate a presigned url to retrieve an object

postapiv0/object/sign/{bucketName}/{wildcard}

Path parameters

  • bucketName
    REQUIRED
    Example:avatars
  • *
    REQUIRED
    Example:folder/cat.png

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "signedURL": {
7        "type": "string",
8        "example": "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
9      }
10    },
11    "required": [
12      "signedURL"
13    ]
14  }
15}

Retrieve an object via a presigned URL

getapiv0/object/sign/{bucketName}/{wildcard}

Path parameters

  • bucketName
    REQUIRED
    Example:avatars
  • *
    REQUIRED
    Example:folder/cat.png

Responses

Error response

1{
2  "schema": {
3    "description": "Error response",
4    "type": "object",
5    "properties": {
6      "statusCode": {
7        "type": "string"
8      },
9      "error": {
10        "type": "string"
11      },
12      "message": {
13        "type": "string"
14      }
15    },
16    "required": [
17      "statusCode",
18      "error",
19      "message"
20    ],
21    "title": "errorSchema"
22  }
23}

Generate presigned urls to retrieve objects

postapiv0/object/sign/{bucketName}

Path parameters

  • bucketName
    REQUIRED
    Example:avatars

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "array",
5    "items": {
6      "type": "object",
7      "properties": {
8        "error": {
9          "error": [
10            "string",
11            "null"
12          ],
13          "example": "Either the object does not exist or you do not have access to it"
14        },
15        "path": {
16          "type": "string",
17          "example": "folder/cat.png"
18        },
19        "signedURL": {
20          "type": [
21            "null",
22            "string"
23          ],
24          "example": "/object/sign/avatars/folder/cat.png?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmwiOiJhdmF0YXJzL2ZvbGRlci9jYXQucG5nIiwiaWF0IjoxNjE3NzI2MjczLCJleHAiOjE2MTc3MjcyNzN9.s7Gt8ME80iREVxPhH01ZNv8oUn4XtaWsmiQ5csiUHn4"
25        }
26      },
27      "required": [
28        "error",
29        "path",
30        "signedURL"
31      ]
32    }
33  }
34}

Moves an object

postapiv0/object/move

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "message": {
7        "type": "string",
8        "example": "Successfully moved"
9      }
10    },
11    "required": [
12      "message"
13    ]
14  }
15}

Search for objects under a prefix

postapiv0/object/list/{bucketName}

Path parameters

  • bucketName
    REQUIRED
    Example:

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "array",
5    "items": {
6      "type": "object",
7      "properties": {
8        "name": {
9          "type": "string"
10        },
11        "bucket_id": {
12          "type": "string"
13        },
14        "owner": {
15          "type": "string"
16        },
17        "id": {
18          "anyOf": [
19            {
20              "type": "string"
21            },
22            {
23              "type": "null"
24            }
25          ]
26        },
27        "updated_at": {
28          "anyOf": [
29            {
30              "type": "string"
31            },
32            {
33              "type": "null"
34            }
35          ]
36        },
37        "created_at": {
38          "anyOf": [
39            {
40              "type": "string"
41            },
42            {
43              "type": "null"
44            }
45          ]
46        },
47        "last_accessed_at": {
48          "anyOf": [
49            {
50              "type": "string"
51            },
52            {
53              "type": "null"
54            }
55          ]
56        },
57        "metadata": {
58          "anyOf": [
59            {
60              "type": "object",
61              "additionalProperties": true
62            },
63            {
64              "type": "null"
65            }
66          ]
67        },
68        "buckets": {
69          "type": "object",
70          "properties": {
71            "id": {
72              "type": "string"
73            },
74            "name": {
75              "type": "string"
76            },
77            "owner": {
78              "type": "string"
79            },
80            "public": {
81              "type": "boolean"
82            },
83            "created_at": {
84              "type": "string"
85            },
86            "updated_at": {
87              "type": "string"
88            }
89          },
90          "required": [
91            "id",
92            "name"
93          ],
94          "additionalProperties": false,
95          "example": {
96            "id": "bucket2",
97            "name": "bucket2",
98            "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
99            "created_at": "2021-02-17T04:43:32.770206+00:00",
100            "updated_at": "2021-02-17T04:43:32.770206+00:00"
101          }
102        }
103      },
104      "required": [
105        "name"
106      ],
107      "additionalProperties": false,
108      "example": {
109        "name": "folder/cat.png",
110        "bucket_id": "avatars",
111        "owner": "317eadce-631a-4429-a0bb-f19a7a517b4a",
112        "id": "eaa8bdb5-2e00-4767-b5a9-d2502efe2196",
113        "updated_at": "2021-04-06T16:30:35.394674+00:00",
114        "created_at": "2021-04-06T16:30:35.394674+00:00",
115        "last_accessed_at": "2021-04-06T16:30:35.394674+00:00",
116        "metadata": {
117          "size": 1234
118        }
119      }
120    }
121  }
122}

Retrieve object info

getapiv0/object/info/authenticated/{bucketName}/{wildcard}

Path parameters

  • bucketName
    REQUIRED
    Example:avatars
  • *
    REQUIRED
    Example:folder/cat.png

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Error response

1{
2  "schema": {
3    "description": "Error response",
4    "type": "object",
5    "properties": {
6      "statusCode": {
7        "type": "string"
8      },
9      "error": {
10        "type": "string"
11      },
12      "message": {
13        "type": "string"
14      }
15    },
16    "required": [
17      "statusCode",
18      "error",
19      "message"
20    ],
21    "title": "errorSchema"
22  }
23}

Copies an object

postapiv0/object/copy

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "Key": {
7        "type": "string",
8        "example": "folder/destination.png"
9      }
10    },
11    "required": [
12      "Key"
13    ]
14  }
15}

Retrieve an object from a public bucket

getapiv0/object/public/{bucketName}/{wildcard}

Path parameters

  • bucketName
    REQUIRED
    Example:avatars
  • *
    REQUIRED
    Example:folder/cat.png

Responses

Error response

1{
2  "schema": {
3    "description": "Error response",
4    "type": "object",
5    "properties": {
6      "statusCode": {
7        "type": "string"
8      },
9      "error": {
10        "type": "string"
11      },
12      "message": {
13        "type": "string"
14      }
15    },
16    "required": [
17      "statusCode",
18      "error",
19      "message"
20    ],
21    "title": "errorSchema"
22  }
23}

Bucket

Create a bucket

postapiv0/bucket/

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "name": {
7        "type": "string",
8        "example": "avatars"
9      }
10    },
11    "required": [
12      "name"
13    ]
14  }
15}

Gets all buckets

getapiv0/bucket/

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "array",
5    "items": {
6      "type": "object",
7      "properties": {
8        "id": {
9          "type": "string"
10        },
11        "name": {
12          "type": "string"
13        },
14        "owner": {
15          "type": "string"
16        },
17        "public": {
18          "type": "boolean"
19        },
20        "created_at": {
21          "type": "string"
22        },
23        "updated_at": {
24          "type": "string"
25        }
26      },
27      "required": [
28        "id",
29        "name"
30      ],
31      "additionalProperties": false,
32      "title": "bucketSchema",
33      "example": {
34        "id": "bucket2",
35        "name": "bucket2",
36        "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
37        "created_at": "2021-02-17T04:43:32.770206+00:00",
38        "updated_at": "2021-02-17T04:43:32.770206+00:00"
39      }
40    },
41    "example": [
42      {
43        "id": "bucket2",
44        "name": "bucket2",
45        "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
46        "created_at": "2021-02-17T04:43:32.770206+00:00",
47        "updated_at": "2021-02-17T04:43:32.770206+00:00"
48      }
49    ]
50  },
51  "example": [
52    {
53      "id": "bucket2",
54      "name": "bucket2",
55      "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
56      "created_at": "2021-02-17T04:43:32.770206+00:00",
57      "updated_at": "2021-02-17T04:43:32.770206+00:00"
58    }
59  ]
60}

Empty a bucket

postapiv0/bucket/{bucketId}/empty

Path parameters

  • bucketId
    REQUIRED
    Example:avatars

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "message": {
7        "type": "string",
8        "example": "Successfully emptied"
9      }
10    }
11  }
12}

Get details of a bucket

getapiv0/bucket/{bucketId}

Path parameters

  • bucketId
    REQUIRED
    Example:avatars

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "id": {
7        "type": "string"
8      },
9      "name": {
10        "type": "string"
11      },
12      "owner": {
13        "type": "string"
14      },
15      "public": {
16        "type": "boolean"
17      },
18      "created_at": {
19        "type": "string"
20      },
21      "updated_at": {
22        "type": "string"
23      }
24    },
25    "required": [
26      "id",
27      "name"
28    ],
29    "additionalProperties": false,
30    "example": {
31      "id": "bucket2",
32      "name": "bucket2",
33      "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
34      "created_at": "2021-02-17T04:43:32.770206+00:00",
35      "updated_at": "2021-02-17T04:43:32.770206+00:00"
36    }
37  },
38  "example": {
39    "id": "bucket2",
40    "name": "bucket2",
41    "owner": "4d56e902-f0a0-4662-8448-a4d9e643c142",
42    "created_at": "2021-02-17T04:43:32.770206+00:00",
43    "updated_at": "2021-02-17T04:43:32.770206+00:00"
44  }
45}

Update properties of a bucket

putapiv0/bucket/{bucketId}

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "message": {
7        "type": "string",
8        "example": "Successfully updated"
9      }
10    },
11    "required": [
12      "message"
13    ]
14  }
15}

Delete a bucket

deleteapiv0/bucket/{bucketId}

Path parameters

  • bucketId
    REQUIRED
    Example:avatars

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Successful response

1{
2  "schema": {
3    "description": "Successful response",
4    "type": "object",
5    "properties": {
6      "message": {
7        "type": "string",
8        "example": "Successfully deleted"
9      }
10    }
11  }
12}

Deprecated

Get object

getapiv0/object/{bucketName}/{wildcard}

Path parameters

  • bucketName
    REQUIRED
    Example:avatars
  • *
    REQUIRED
    Example:folder/cat.png

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Default Response

1{
2  "schema": {
3    "type": "object",
4    "properties": {
5      "statusCode": {
6        "type": "string"
7      },
8      "error": {
9        "type": "string"
10      },
11      "message": {
12        "type": "string"
13      }
14    },
15    "required": [
16      "statusCode",
17      "error",
18      "message"
19    ],
20    "title": "errorSchema"
21  }
22}

Retrieve object info

getapiv0/object/info/{bucketName}/{wildcard}

Path parameters

  • bucketName
    REQUIRED
    Example:avatars
  • *
    REQUIRED
    Example:folder/cat.png

Header parameters

  • authorizationrequired
    Example:Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24ifQ.625_WdcF3KHqz5amU0x2X5WWHP-OEs_4qj0ssLNHzTs

Responses

Default Response

1{
2  "schema": {
3    "type": "object",
4    "properties": {
5      "statusCode": {
6        "type": "string"
7      },
8      "error": {
9        "type": "string"
10      },
11      "message": {
12        "type": "string"
13      }
14    },
15    "required": [
16      "statusCode",
17      "error",
18      "message"
19    ],
20    "title": "errorSchema"
21  }
22}
Need some help?

Not to worry, our specialist engineers are here to help. Submit a support ticket through the Dashboard.