/{app_slug}/v1/me/tenant-invites/acceptAuthAccept a tenant invite as the signed-in EndUser
Adds the caller to the invited tenant with the role the invite names, and consumes the invite. Requires the invited address to be one of the caller's own VERIFIED email contacts in this app — holding the code is not sufficient, because whoever minted the invite also holds it, and an unverified contact is not proof of owning the address. A refused accept leaves the invite redeemable.
Path parameters
app_slug*stringSlug of the app.
Request body
code*stringTenant invite code (`tinv_…`) from the invitation email. Must have been issued to an email address this account already owns in this app.
Example: "tinv_9dK2mQ7pR4vXbN1sT6yZ0hLcJeW3fAgU"
Response · 200
tenant_id*stringTenant the caller just joined.
role_id*stringId of the role.
role_name*stringName of the role.
Example: "member"
membership_id*stringThe new `tenant_membership` row id.
Example
Request
POST https://api.auth.productcraft.co/{app_slug}/v1/me/tenant-invites/accept
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"code": "tinv_9dK2mQ7pR4vXbN1sT6yZ0hLcJeW3fAgU"
}Response
{
"tenant_id": "string",
"role_id": "string",
"role_name": "member",
"membership_id": "string"
}