Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
API ReferenceAccount and accessOrganizations

Invite a member by email (owner/admin)

Invites an email address to the organization with any role but owner, up to your own access (custom roles need permissions enabled). Expires in seven days. Records a pending invite and emails the address. The response status is always "invited"; the user becomes a member only after they accept (POST /v1/me/invites/{orgId}/accept). Re-inviting the same email refreshes the invite's role and expiry. 409 if the email already belongs to a member.

Required permission

Checked against the member.invite permission for the resource it acts on. See Permissions for the roles and API key permissions that include it.

Command line

The orl CLI wraps this endpoint:

orl organizations member add --email <email>
POST
/v1/orgs/{orgId}/members/add

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Path Parameters

orgId*string

Request Body

application/json
  1. body

Send role or roleId.

email*string
role?string

A built-in role. billing and inference need permissions enabled.

Value in"admin""member""viewer""billing""inference"
roleId?string

A custom role's id (role_...), for an organization with permissions enabled.

Response Body

Added

application/json
  1. response
userId*string
role*string
roleName?string

The role's display name (permissions enabled only).

email?string
fullName?string
avatarUrl?string
invitedAt?string
joinedAt?string
status?string

Set only on the addOrgMember response, where it is "invited": the invite is recorded and emailed, and the user becomes a member only after accepting it. Listed and updated members omit it, and "active" is not returned.

Value in"active""invited"
Example Request
curl -X POST 'https://api.openrelay.inc/v1/orgs/string/members/add' \  -H 'Content-Type: application/json' \  -d '{  "email": "string"}'
Example Response
{  "userId": "string",  "role": "string",  "roleName": "string",  "email": "string",  "fullName": "string",  "avatarUrl": "string",  "invitedAt": "string",  "joinedAt": "string",  "status": "active"}