Skip to main content

Usage

Organizations

Organization endpoints

List all organizations

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

Responses

{
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
]
}
}
}

Create an organization

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

Body Parameters

{
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
}
},
"required": [
"name"
]
}
}

Responses

{
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"id",
"name"
]
}
}

Projects

Project endpoints

List all projects

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

Responses

{
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"organization_id": {
"type": "string"
},
"name": {
"type": "string"
},
"region": {
"type": "string"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"organization_id",
"name",
"region",
"created_at"
]
}
}
}

Create a project

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

Body Parameters

{
"schema": {
"type": "object",
"properties": {
"db_pass": {
"type": "string"
},
"name": {
"type": "string"
},
"organization_id": {
"type": "string"
},
"plan": {
"type": "string",
"enum": [
"free",
"pro"
]
},
"region": {
"type": "string",
"enum": [
"us-east-1",
"us-west-1",
"ap-southeast-1",
"ap-northeast-1",
"ap-northeast-2",
"ap-southeast-2",
"eu-west-1",
"eu-west-2",
"eu-central-1",
"ca-central-1",
"ap-south-1",
"sa-east-1"
]
},
"kps_enabled": {
"type": "boolean"
}
},
"required": [
"db_pass",
"name",
"organization_id",
"plan",
"region"
]
}
}

Responses

{
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"organization_id": {
"type": "string"
},
"name": {
"type": "string"
},
"region": {
"type": "string"
},
"created_at": {
"type": "string"
}
},
"required": [
"id",
"organization_id",
"name",
"region",
"created_at"
]
}
}

List all functions

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

Path Parameters

  • refrequired

    Project ref

Responses

{
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"enum": [
"ACTIVE",
"REMOVED",
"THROTTLED"
],
"type": "string"
},
"version": {
"type": "number"
},
"created_at": {
"type": "number"
},
"updated_at": {
"type": "number"
},
"verify_jwt": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"name",
"status",
"version",
"created_at",
"updated_at"
]
}
}
}

Create a function

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

Path Parameters

  • refrequired

    Project ref

Body Parameters

{
"schema": {
"type": "object",
"properties": {
"slug": {
"type": "string",
"pattern": "/^[A-Za-z0-9_-]+$/"
},
"name": {
"type": "string"
},
"body": {
"type": "string"
},
"verify_jwt": {
"type": "boolean"
}
},
"required": [
"slug",
"name",
"body"
]
}
}

Responses

{
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"enum": [
"ACTIVE",
"REMOVED",
"THROTTLED"
],
"type": "string"
},
"version": {
"type": "number"
},
"created_at": {
"type": "number"
},
"updated_at": {
"type": "number"
},
"verify_jwt": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"name",
"status",
"version",
"created_at",
"updated_at"
]
}
}

Retrieve a function

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

Path Parameters

  • refrequired

    Project ref
  • function_slugrequired

    Function slug

Responses

{
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"enum": [
"ACTIVE",
"REMOVED",
"THROTTLED"
],
"type": "string"
},
"version": {
"type": "number"
},
"created_at": {
"type": "number"
},
"updated_at": {
"type": "number"
},
"verify_jwt": {
"type": "boolean"
},
"body": {
"type": "string"
}
},
"required": [
"id",
"slug",
"name",
"status",
"version",
"created_at",
"updated_at"
]
}
}

Update a function

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

Path Parameters

  • refrequired

    Project ref
  • function_slugrequired

    Function slug

Body Parameters

{
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"body": {
"type": "string"
},
"verify_jwt": {
"type": "boolean"
}
}
}
}

Responses

{
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"slug": {
"type": "string"
},
"name": {
"type": "string"
},
"status": {
"enum": [
"ACTIVE",
"REMOVED",
"THROTTLED"
],
"type": "string"
},
"version": {
"type": "number"
},
"created_at": {
"type": "number"
},
"updated_at": {
"type": "number"
},
"verify_jwt": {
"type": "boolean"
}
},
"required": [
"id",
"slug",
"name",
"status",
"version",
"created_at",
"updated_at"
]
}
}

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

{
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"name",
"value"
]
}
}
}

Bulk create secrets

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

Path Parameters

  • refrequired

    Project ref

Body Parameters

{
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"value": {
"type": "string",
"pattern": "/^(?!SUPABASE_).*/"
}
},
"required": [
"name",
"value"
]
}
}
}

Responses


Bulk delete secrets

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

Path Parameters

  • refrequired

    Project ref

Body Parameters

{
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}

Responses

{
"schema": {
"type": "object"
}
}