Skip to main content
POST
/
api
/
v2
/
org
/
members
/
invite
Invite a member
curl --request POST \
  --url https://app.octolens.com/api/v2/org/members/invite \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "email": "jsmith@example.com",
  "role": "member"
}
'
{
  "id": "orginv_3Ciq0qskipF0g0gxlfLckBtnXk2",
  "email": "<string>",
  "role": "member",
  "createdAt": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://octolens.com/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Clerk API key. Create one in Settings → API Keys. Pass as Authorization: Bearer <key>.

Body

application/json

Send an email invitation to join the authenticated organization.

email
string<email>
required

Address to send the invitation to.

Pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
role
enum<string>
default:member

Role to assign when the invitation is accepted.

Available options:
admin,
member
Example:

"member"

Response

200 response

An invitation that hasn't been accepted yet.

id
string
required

Invitation id.

Example:

"orginv_3Ciq0qskipF0g0gxlfLckBtnXk2"

email
string
required

Invitee's email address.

role
enum<string>
required

Role within the organization.

Available options:
admin,
member
Example:

"member"

createdAt
string<date-time>
required

When the invitation was created.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$