Usage

Organizations #

Organization endpoints

List all organizations #

GET https://api.supabase.com/v1/organizations

Responses

1{
2  "schema": {
3    "type": "array",
4    "items": {
5      "type": "object",
6      "properties": {
7        "id": {
8          "type": "string"
9        },
10        "name": {
11          "type": "string"
12        }
13      },
14      "required": [
15        "id",
16        "name"
17      ]
18    }
19  }
20}

Create an organization #

POST https://api.supabase.com/v1/organizations

Body Parameters

1{
2  "schema": {
3    "type": "object",
4    "properties": {
5      "name": {
6        "type": "string"
7      }
8    },
9    "required": [
10      "name"
11    ]
12  }
13}

Responses

1{
2  "schema": {
3    "type": "object",
4    "properties": {
5      "id": {
6        "type": "string"
7      },
8      "name": {
9        "type": "string"
10      }
11    },
12    "required": [
13      "id",
14      "name"
15    ]
16  }
17}

Projects #

Project endpoints

List all projects #

GET https://api.supabase.com/v1/projects

Responses

1{
2  "schema": {
3    "type": "array",
4    "items": {
5      "type": "object",
6      "properties": {
7        "id": {
8          "type": "string"
9        },
10        "organization_id": {
11          "type": "string"
12        },
13        "name": {
14          "type": "string"
15        },
16        "region": {
17          "type": "string"
18        },
19        "created_at": {
20          "type": "string"
21        }
22      },
23      "required": [
24        "id",
25        "organization_id",
26        "name",
27        "region",
28        "created_at"
29      ]
30    }
31  }
32}

Create a project #

POST https://api.supabase.com/v1/projects

Body Parameters

1{
2  "schema": {
3    "type": "object",
4    "properties": {
5      "db_pass": {
6        "type": "string"
7      },
8      "name": {
9        "type": "string"
10      },
11      "organization_id": {
12        "type": "string"
13      },
14      "plan": {
15        "type": "string",
16        "enum": [
17          "free",
18          "pro"
19        ]
20      },
21      "region": {
22        "type": "string",
23        "enum": [
24          "us-east-1",
25          "us-west-1",
26          "ap-southeast-1",
27          "ap-northeast-1",
28          "ap-northeast-2",
29          "ap-southeast-2",
30          "eu-west-1",
31          "eu-west-2",
32          "eu-central-1",
33          "ca-central-1",
34          "ap-south-1",
35          "sa-east-1"
36        ]
37      },
38      "kps_enabled": {
39        "type": "boolean"
40      }
41    },
42    "required": [
43      "db_pass",
44      "name",
45      "organization_id",
46      "plan",
47      "region"
48    ]
49  }
50}

Responses

1{
2  "schema": {
3    "type": "object",
4    "properties": {
5      "id": {
6        "type": "string"
7      },
8      "organization_id": {
9        "type": "string"
10      },
11      "name": {
12        "type": "string"
13      },
14      "region": {
15        "type": "string"
16      },
17      "created_at": {
18        "type": "string"
19      }
20    },
21    "required": [
22      "id",
23      "organization_id",
24      "name",
25      "region",
26      "created_at"
27    ]
28  }
29}

Create a function #

POST https://api.supabase.com/v1/projects/{ref}/functions

Path Parameters

  • refrequired

    Project ref

Responses

1{
2  "schema": {
3    "type": "object",
4    "properties": {
5      "id": {
6        "type": "string"
7      },
8      "slug": {
9        "type": "string"
10      },
11      "name": {
12        "type": "string"
13      },
14      "status": {
15        "enum": [
16          "ACTIVE",
17          "REMOVED",
18          "THROTTLED"
19        ],
20        "type": "string"
21      },
22      "version": {
23        "type": "number"
24      },
25      "created_at": {
26        "type": "number"
27      },
28      "updated_at": {
29        "type": "number"
30      },
31      "verify_jwt": {
32        "type": "boolean"
33      }
34    },
35    "required": [
36      "id",
37      "slug",
38      "name",
39      "status",
40      "version",
41      "created_at",
42      "updated_at"
43    ]
44  }
45}

List all functions #

GET https://api.supabase.com/v1/projects/{ref}/functions

Path Parameters

  • refrequired

    Project ref

Responses

1{
2  "schema": {
3    "type": "array",
4    "items": {
5      "type": "object",
6      "properties": {
7        "id": {
8          "type": "string"
9        },
10        "slug": {
11          "type": "string"
12        },
13        "name": {
14          "type": "string"
15        },
16        "status": {
17          "enum": [
18            "ACTIVE",
19            "REMOVED",
20            "THROTTLED"
21          ],
22          "type": "string"
23        },
24        "version": {
25          "type": "number"
26        },
27        "created_at": {
28          "type": "number"
29        },
30        "updated_at": {
31          "type": "number"
32        },
33        "verify_jwt": {
34          "type": "boolean"
35        }
36      },
37      "required": [
38        "id",
39        "slug",
40        "name",
41        "status",
42        "version",
43        "created_at",
44        "updated_at"
45      ]
46    }
47  }
48}

Retrieve a function #

GET https://api.supabase.com/v1/projects/{ref}/functions/{function_slug}

Path Parameters

  • refrequired

    Project ref
  • function_slugrequired

    Function slug

Responses

1{
2  "schema": {
3    "type": "object",
4    "properties": {
5      "id": {
6        "type": "string"
7      },
8      "slug": {
9        "type": "string"
10      },
11      "name": {
12        "type": "string"
13      },
14      "status": {
15        "enum": [
16          "ACTIVE",
17          "REMOVED",
18          "THROTTLED"
19        ],
20        "type": "string"
21      },
22      "version": {
23        "type": "number"
24      },
25      "created_at": {
26        "type": "number"
27      },
28      "updated_at": {
29        "type": "number"
30      },
31      "verify_jwt": {
32        "type": "boolean"
33      },
34      "body": {
35        "type": "string"
36      }
37    },
38    "required": [
39      "id",
40      "slug",
41      "name",
42      "status",
43      "version",
44      "created_at",
45      "updated_at"
46    ]
47  }
48}

Update a function #

PATCH https://api.supabase.com/v1/projects/{ref}/functions/{function_slug}

Path Parameters

  • refrequired

    Project ref
  • function_slugrequired

    Function slug

Responses

1{
2  "schema": {
3    "type": "object",
4    "properties": {
5      "id": {
6        "type": "string"
7      },
8      "slug": {
9        "type": "string"
10      },
11      "name": {
12        "type": "string"
13      },
14      "status": {
15        "enum": [
16          "ACTIVE",
17          "REMOVED",
18          "THROTTLED"
19        ],
20        "type": "string"
21      },
22      "version": {
23        "type": "number"
24      },
25      "created_at": {
26        "type": "number"
27      },
28      "updated_at": {
29        "type": "number"
30      },
31      "verify_jwt": {
32        "type": "boolean"
33      }
34    },
35    "required": [
36      "id",
37      "slug",
38      "name",
39      "status",
40      "version",
41      "created_at",
42      "updated_at"
43    ]
44  }
45}

Delete a function #

DELETE https://api.supabase.com/v1/projects/{ref}/functions/{function_slug}

Path Parameters

  • refrequired

    Project ref
  • function_slugrequired

    Function slug

Responses


List all secrets #

GET https://api.supabase.com/v1/projects/{ref}/secrets

Path Parameters

  • refrequired

    Project ref

Responses

1{
2  "schema": {
3    "type": "array",
4    "items": {
5      "type": "object",
6      "properties": {
7        "name": {
8          "type": "string"
9        },
10        "value": {
11          "type": "string"
12        }
13      },
14      "required": [
15        "name",
16        "value"
17      ]
18    }
19  }
20}

Bulk create secrets #

POST https://api.supabase.com/v1/projects/{ref}/secrets

Path Parameters

  • refrequired

    Project ref

Body Parameters

1{
2  "schema": {
3    "type": "array",
4    "items": {
5      "type": "object",
6      "properties": {
7        "name": {
8          "type": "string"
9        },
10        "value": {
11          "type": "string",
12          "pattern": "/^(?!SUPABASE_).*/"
13        }
14      },
15      "required": [
16        "name",
17        "value"
18      ]
19    }
20  }
21}

Responses


Bulk delete secrets #

DELETE https://api.supabase.com/v1/projects/{ref}/secrets

Path Parameters

  • refrequired

    Project ref

Body Parameters

1{
2  "schema": {
3    "type": "array",
4    "items": {
5      "type": "string"
6    }
7  }
8}

Responses

1{
2  "schema": {
3    "type": "object"
4  }
5}

Generate TypeScript types #

GET https://api.supabase.com/v1/projects/{ref}/types/typescript

Path Parameters

  • refrequired

    Project ref

Responses

1{
2  "schema": {
3    "type": "object",
4    "properties": {
5      "types": {
6        "type": "string"
7      }
8    },
9    "required": [
10      "types"
11    ]
12  }
13}