multi-router.aidocs

API Reference

InvitesEnterprise

Inviting people to the account, and changing, resending and revoking invitations.

The invites endpoints invite people to the account by email, with an account role and access to organizations. They need a key of the account organization, and keys limited to some routers cannot use them. See Inviting People.

MethodPathDescriptionScope
GET/v1/people/invitesList invitations. Filter with status: pending, accepted, declined, revoked or expired. Paginated.invites:read
POST/v1/people/invitesInvite a person. Returns 201. Accepts an Idempotency-Key.invites:write
GET/v1/people/invites/{id}Get one invitation.invites:read
PATCH/v1/people/invites/{id}Change account_role or grants of a pending invitation. Accepts dry_run.invites:write
DELETE/v1/people/invites/{id}Revoke an invitation.invites:delete
POST/v1/people/invites/{id}/resendRenew a pending invitation for seven days and email it again. Takes no body. Accepts an Idempotency-Key.invites:write

A create requires email, account_role (admin, member or null, and present even when null), and grants, each with organization_id, role (admin, member or null), managed and policy_id. In a PATCH, account_role: null clears the account role, while grants: null leaves grants unchanged; grants: [] clears them. Creates and resends share a budget of 20 attempts per minute per account; an idempotent replay of a resend does not count or send again.

Invite a personbash
curl -X POST https://api.multi-router.ai/v1/people/invites \
  -H "Authorization: Bearer $MR_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "priya@example.com",
    "account_role": null,
    "grants": [{ "organization_id": "org_3Hd8Kw2PqZ", "role": "admin", "managed": false, "policy_id": null }]
  }'
CodeStatusMeaning
invalid_account_role400The account role is not admin, member or null.
invalid_grants400A grant is invalid.
account_organization_role_mismatch400The grant for the account organization has a role that differs from account_role.
account_token_required403The key belongs to a named organization.
router_scoped_token403The key is limited to some routers.
invite_not_found404No invitation has that id.
person_exists409The person already belongs to the account.
invite_pending409A pending invitation for the email already exists.
invite_not_pending409A change or resend names an invitation that is not pending.
invite_changed409The invitation changed at the same time. Retry.
rate_limited429Over 20 invite attempts per minute. Retry-After gives the seconds to wait.
OrganizationsSSO
Was this helpful?