- These routes require a full-account API key. A selected-database key
receives
403 KEY_SCOPE_DENIED. See API keys. - The key acts as the account owner, so only databases you own are visible.
- API access requires a Pro or Business plan.
admin, developer and viewer. The owner is listed separately
and cannot be added, changed or removed through these routes.
List members
GET /api/v1/databases/{id}/members
Returns the owner, current members and invitations for the database.
200 OK
members[].id is the membership ID used by the update and remove routes.
invitations has the same shape as
List invitations.
Add a member
POST /api/v1/databases/{id}/members
201 Created; data.kind tells you which one applied.
Existing user. DBHost adds the membership directly. If the user is already
a member, their role is set to the requested role.
201 Created
201 Created
Change a member’s role
PATCH /api/v1/databases/{id}/members/{membershipId}
Changing the dashboard role does not rotate or revoke a shared SQL password
the member may already have copied.
200 OK
Remove a member
DELETE /api/v1/databases/{id}/members/{membershipId}
Removes the membership and dashboard access to this database. It does not
invalidate a shared SQL password the member may have copied. To stop direct
SQL access, the database owner must plan a password rotation and update apps
or other people that use that credential. Returns 204 No Content with an
empty body.
Errors
The CLI equivalents are
dbhost members list|add|update|remove.