# Supabase

Manage Supabase: projects, edge functions, secrets, database, branches. Exposes **35 actions** covering the API surface an agent needs - read and write.

## What it can do

| Method | What it does |
| --- | --- |
| `supabase_organizations_list` | List all organizations - GET /organizations. |
| `supabase_organization_get` | Get one organization by ID - GET /organizations/&#123;id&#125;. |
| `supabase_projects_list` | List projects - GET /projects. |
| `supabase_project_get` | Get one project by ID - GET /projects/&#123;id&#125;. |
| `supabase_project_create` | Create a new project - POST /projects. |
| `supabase_project_update` | Update a project - PATCH /projects/&#123;id&#125;. |
| `supabase_project_delete` | Delete a project - DELETE /projects/&#123;id&#125;. |
| `supabase_project_pause` | Pause a project - POST /projects/&#123;id&#125;/pause. |
| `supabase_project_restore` | Restore a paused project - POST /projects/&#123;id&#125;/restore. |
| `supabase_functions_list` | List Edge Functions in a project - GET /projects/&#123;project_id&#125;/functions. |
| `supabase_function_get` | Get one Edge Function details - GET /projects/&#123;project_id&#125;/functions/&#123;name&#125;. |
| `supabase_function_deploy` | Deploy an Edge Function - POST /projects/&#123;project_id&#125;/functions/&#123;name&#125;/deploy. |
| `supabase_function_delete` | Delete an Edge Function - DELETE /projects/&#123;project_id&#125;/functions/&#123;name&#125;. |
| `supabase_secrets_list` | List project secrets - GET /projects/&#123;project_id&#125;/secrets. |
| `supabase_secret_create` | Create a project secret - POST /projects/&#123;project_id&#125;/secrets. |
| `supabase_secret_update` | Update a project secret value - PATCH /projects/&#123;project_id&#125;/secrets/&#123;name&#125;. |
| `supabase_secret_delete` | Delete a project secret - DELETE /projects/&#123;project_id&#125;/secrets/&#123;name&#125;. |
| `supabase_database_query` | Execute a SQL query on the database - POST /projects/&#123;project_id&#125;/query. |
| `supabase_database_branches_list` | List database branches - GET /projects/&#123;project_id&#125;/branches. |
| `supabase_database_branch_create` | Create a database branch - POST /projects/&#123;project_id&#125;/branches. |
| `supabase_database_branch_delete` | Delete a database branch - DELETE /projects/&#123;project_id&#125;/branches/&#123;branch_name&#125;. |
| `supabase_database_backups_list` | List database backups - GET /projects/&#123;project_id&#125;/backups. |
| `supabase_database_backup_create` | Create a manual database backup - POST /projects/&#123;project_id&#125;/backups. |
| `supabase_database_backup_restore` | Restore database from a backup - POST /projects/&#123;project_id&#125;/backups/&#123;backup_id&#125;/restore. |
| `supabase_config_auth_get` | Get Auth configuration - GET /projects/&#123;project_id&#125;/auth/config. |
| `supabase_config_auth_update` | Update Auth configuration - PATCH /projects/&#123;project_id&#125;/auth/config. |
| `supabase_config_postgrest_get` | Get PostgREST configuration - GET /projects/&#123;project_id&#125;/postgrest/config. |
| `supabase_config_postgrest_update` | Update PostgREST configuration - PATCH /projects/&#123;project_id&#125;/postgrest/config. |
| `supabase_api_keys_list` | List project API keys - GET /projects/&#123;project_id&#125;/api-keys. |
| `supabase_api_key_get` | Get one API key details - GET /projects/&#123;project_id&#125;/api-keys/&#123;id&#125;. |
| `supabase_api_key_create` | Create a new project API key - POST /projects/&#123;project_id&#125;/api-keys. |
| `supabase_api_key_delete` | Delete an API key - DELETE /projects/&#123;project_id&#125;/api-keys/&#123;id&#125;. |
| `supabase_custom_domains_list` | List custom domains - GET /projects/&#123;project_id&#125;/custom-domains. |
| `supabase_custom_domain_create` | Create a custom domain - POST /projects/&#123;project_id&#125;/custom-domains. |
| `supabase_custom_domain_delete` | Delete a custom domain - DELETE /projects/&#123;project_id&#125;/custom-domains/&#123;id&#125;. |

## How to get credentials

This connector uses an **API key / token**. Create one in the provider
dashboard, then paste it into FlyMyAI:

- **`SUPABASE_ACCESS_TOKEN`** - Supabase - Account - Access Tokens (Management API PAT). (https://supabase.com/dashboard/account/tokens)

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `SUPABASE_ACCESS_TOKEN` | Supabase - Account - Access Tokens (Management API PAT). |

## Troubleshooting

- **`401 Unauthorized` / `403 Forbidden`** - the token is wrong, expired, or missing a required scope; regenerate it.
- **`429 Too Many Requests`** - provider rate limit; retry after a short backoff.
- **Unexpected `4xx` on writes** - double-check required fields; the agent confirms before write actions.

## Links

- [Supabase API documentation](https://supabase.com/docs/reference/api)
