- 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.
pending, accepted,
revoked and expired. Only pending invitations can be resent or revoked.
List invitations
GET /api/v1/databases/{id}/invitations
Returns the invitations recorded for the database. Before reading, DBHost
marks pending invitations whose expiresAt has passed as expired.
200 OK
pending. Filter
on status if you need open invitations only.
Resend an invitation
POST /api/v1/databases/{id}/invitations/{invitationId}/resend
Sends a new invitation email for a pending invitation and resets its expiry to
seven days from now. The invitation keeps the same id. DBHost then tries to
revoke the link in the previous email; if that revocation fails, the old link
can keep working until it expires. No request body is needed.
200 OK
Revoke an invitation
DELETE /api/v1/databases/{id}/invitations/{invitationId}
Revokes a pending invitation so its link can no longer be used. Returns
204 No Content with an empty body. The invitation stays in the list with
status revoked.
Errors
The CLI equivalents are
dbhost invitations list <database-id> and
dbhost invitations resend|revoke <database-id> <invitation-id>.