Skip to main content
POST
https://api.bunship.com
/
api
/
v1
/
invitations
/
{token}
/
accept
Accept Invitation
curl --request POST \
  --url https://api.bunship.com/api/v1/invitations/{token}/accept \
  --header 'Authorization: Bearer <token>'
{
  "message": "Invitation accepted successfully",
  "organization": {
    "id": "org_cld2abc123def456",
    "name": "Acme Corp",
    "slug": "acme-corp"
  }
}
Accepts an invitation using the token from the invite link. The authenticated user must be logged in with the same email address as the invitation. On success, a new membership is created with the role specified in the invitation.

Auth

Requires a valid Bearer token. The authenticated user’s email must match the invitation email.

Path Parameters

token
string
required
Invitation token from the invite URL.

Response

message
string
Confirmation message.
organization
object
The joined organization’s basic details.
{
  "message": "Invitation accepted successfully",
  "organization": {
    "id": "org_cld2abc123def456",
    "name": "Acme Corp",
    "slug": "acme-corp"
  }
}

Errors

StatusCodeDescription
400VALIDATION_ERRORInvitation is expired, email mismatch, or organization no longer exists
401AUTHENTICATION_ERRORNot authenticated — must sign up or log in first
404NOT_FOUNDInvalid or already-used invitation token
409CONFLICTUser is already a member of this organization

Example

curl -X POST https://api.bunship.com/api/v1/invitations/tok_abc123def456.../accept \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIs..."