Skip to content

Invite someone to the tenant by email

POST
/v1/tenants/me/members/invitations
curl --request POST \
--url https://api.emite.cr/v1/tenants/me/members/invitations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "email": "newhire@example.com", "role": "issuer" }'

Creates (or rotates) a pending invitation with a 7-day TTL and emails a 6-digit code. If a pending invitation already exists for (tenantId, email) the code is rotated and a fresh email is sent (subject to the 60s cooldown). Rejects with 409 MEMBER_ALREADY_EXISTS if the email already has an active membership.

Media typeapplication/json
object
email
required

Email of the person to invite: the invitation, with a 6-digit code valid for 7 days, is sent there. Inviting an address whose invitation is still pending replaces its code and role (at most once every 60 seconds: 429 EMAIL_VERIFICATION_COOLDOWN). 409 MEMBER_ALREADY_EXISTS when the address already belongs to a member of the company.

string
<= 254 characters
Example
newhire@example.com
role
required

Role slug assigned on acceptance. May be a system role (admin, billing_manager, accountant, issuer, viewer) OR a custom role slug created via POST /v1/tenants/me/roles. owner is NOT assignable here — use POST /transfer-ownership instead. Custom slugs are validated against the tenant's tenant_custom_roles at the service layer.

string
Example
issuer

The pending invitation, after its email was sent.

Media typeapplication/json
object
id
required

Identifier of the invitation — the :invitationId of DELETE /v1/tenants/me/members/invitations/:invitationId.

string format: uuid
email
required

The invited address, lowercased.

string
role
required

The role the person gets on accepting. A system role (owner, admin, billing_manager, accountant, issuer, viewer) or the slug of one of the company's custom roles (GET /v1/tenants/me/roles).

string
invitedByName
required

Who invited: the name of the inviting member, or of the partner app when another Futura Byte product created the invitation. Empty when neither is known.

string
invitedByEmail
required

Email of the inviting member; empty for an invitation a partner app created.

string
expiresAt
required

When the emailed code stops working: 7 days after the invitation was sent. Inviting the same address again sends a new code and restarts the 7 days.

string format: date-time
lastSentAt
required

When the invitation email was last sent. null when the last attempt to send it failed — the invitation stays pending; invite the address again to resend it.

string format: date-time
nullable
createdAt
required

When the invitation was created. (The response of POST gives the time of that request, also when it re-sent an invitation that was already pending.)

string format: date-time
Example
{
"email": "newhire@example.com",
"role": "issuer"
}

Missing or invalid JWT.

Insufficient scope. Team management is JWT-only — API keys cannot reach these endpoints.

Email already belongs to an active member (MEMBER_ALREADY_EXISTS).