Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs(gotrue): document admin users API

Nicholas Chiang8585e2f09aee
diff --git a/web/docs/gotrue/server/about.md b/web/docs/gotrue/server/about.md
index dc9b5ee866d..4acef396959 100644
--- a/web/docs/gotrue/server/about.md
+++ b/web/docs/gotrue/server/about.md
@@ -575,6 +575,102 @@ Returns:
}
```
+### **POST /admin/users**
+
+Creates a new user. Requires your `service_role` API key and thus should only be
+used in secure server-side environments.
+
+```json
+{
+ "email": "[email protected]",
+ "password": "new-password",
+ "data": {
+ "key": "value",
+ "number": 10,
+ "admin": false
+ }
+}
+```
+
+Returns:
+
+```json
+{
+ "id": "11111111-2222-3333-4444-5555555555555",
+ "aud": "authenticated",
+ "role": "authenticated",
+ "email": "[email protected]",
+ "app_metadata": {
+ "provider": "email"
+ },
+ "user_metadata": null,
+ "created_at": "2016-05-15T19:53:12.368652374-07:00",
+ "updated_at": "2016-05-15T19:53:12.368652374-07:00"
+}
+```
+
+### **GET /admin/users/{user_id}**
+
+Gets a user. Requires your `service_role` API key and thus should only be used
+in secure server-side environments.
+
+Returns:
+
+```json
+{
+ "id": "11111111-2222-3333-4444-5555555555555",
+ "aud": "authenticated",
+ "role": "authenticated",
+ "email": "[email protected]",
+ "app_metadata": {
+ "provider": "email"
+ },
+ "user_metadata": {},
+ "created_at": "2016-05-15T19:53:12.368652374-07:00",
+ "updated_at": "2016-05-15T19:53:12.368652374-07:00"
+}
+```
+
+
+### **PUT /admin/users/{user_id}**
+
+Updates a user. Requires your `service_role` API key and thus should only be
+used in secure server-side environments.
+
+```json
+{
+ "email": "[email protected]",
+ "password": "updated-password",
+ "data": {
+ "key": "updated-value",
+ "number": 10,
+ "admin": false
+ }
+}
+```
+
+Returns:
+
+```json
+{
+ "id": "11111111-2222-3333-4444-5555555555555",
+ "aud": "authenticated",
+ "role": "authenticated",
+ "email": "[email protected]",
+ "app_metadata": {
+ "provider": "email"
+ },
+ "user_metadata": {},
+ "created_at": "2016-05-15T19:53:12.368652374-07:00",
+ "updated_at": "2016-05-15T19:53:12.368652374-07:00"
+}
+```
+
+### **DELETE /admin/users/{user_id}**
+
+Deletes a user. Requires your `service_role` API key and thus should only be
+used in secure server-side environments.
+
### **POST /logout**
Logout a user (Requires authentication).