Create an invitation
POST
/v1/invitations
curl -X POST "https://api.summerbase.com/v1/invitations" \ -H "Authorization: Bearer sb_..." \ -H "Content-Type: application/json" \ -d '{ "email": "sam@example.com", "role": "writer" }'const response = await fetch("https://api.summerbase.com/v1/invitations", { method: "POST", headers: { Authorization: "Bearer sb_...", "Content-Type": "application/json", }, body: JSON.stringify({ "email": "sam@example.com", "role": "writer" }),})const data = await response.json()Invite an email address to join this organization, and send them a link.
One outstanding invitation per address: inviting somebody who already has
one is refused. Use resend to send the existing link again.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
The address the invitation was sent to.
string
role
The role accepting the invitation grants. One of viewer, writer or
admin — see Core.Accounts.Role.
string
Example
{ "email": "sam@example.com", "role": "writer"}Response
Section titled “Response”Returns the invitation object.
Media typeapplication/json
Example
{ "email": "sam@example.com", "expires_at": "2026-10-26T15:30:00Z", "id": "0199c3e4-2a7b-7f10-9c8d-4e6f1a3b5d27", "object": "invitation", "role": "writer"}