Skip to main content
Members are people you give dashboard access to one of your databases. Roles control what they can do in the dashboard, not PostgreSQL privileges; see Databases for what each role allows and Database roles for SQL roles.
  • 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.
Roles are 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
What happens depends on whether the email belongs to an existing DBHost user. Both cases return 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
Unknown email. DBHost emails an invitation that expires after seven days. An open invitation for the same email on this database is replaced by the new one.
201 Created
Manage the invitation afterwards with the invitations routes.

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.
All changes are recorded in the database’s activity log.

Errors

The CLI equivalents are dbhost members list|add|update|remove.