Invite

Create a user invitation

POST
Invite a user to an Organization.

Path parameters

organizationIdstringRequired
The ID of the Organization to invite the user to.

Request

This endpoint expects an object.
inviteeEmail
stringRequired
The email of the user to invite.
role
enumRequired
The user's Organization role.
Allowed values: ORGANIZATION_OWNERORGANIZATION_BILLING_ADMINORGANIZATION_MEMBER

Response

This endpoint returns an object
expiresAt
string

The time when the invite is expired in UTC, formatted as YYYY-MM-DDTHH:MM:SSZ.

inviteId
string
The invite ID.
invitee
object
inviter
object
organizationId
string
The ID of the Organization where the invite was sent.
organizationName
stringOptional
The name of the Organization where the invite was sent.
userId
stringOptional
The ID for the user who was invited.
POST
1curl -X POST https://api.astronomer.io/iam/v1beta1/organizations/organizationId/invites \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "inviteeEmail": "user1@company.com",
6 "role": "ORGANIZATION_OWNER"
7}'
Response
1{
2 "expiresAt": "2022-11-22T04:37:12Z",
3 "inviteId": "clm9t1g17000008jmfsw20lsz",
4 "invitee": {
5 "id": "clm8qv74h000008mlf08scq7k",
6 "apiTokenName": "my-token",
7 "avatarUrl": "https://avatar.url",
8 "fullName": "Jane Doe",
9 "subjectType": "USER",
10 "username": "user1@company.com"
11 },
12 "inviter": {
13 "id": "clm8qv74h000008mlf08scq7k",
14 "apiTokenName": "my-token",
15 "avatarUrl": "https://avatar.url",
16 "fullName": "Jane Doe",
17 "subjectType": "USER",
18 "username": "user1@company.com"
19 },
20 "organizationId": "clm9t0gbt000108jv4f1cfu8u",
21 "organizationName": "My Organization",
22 "userId": "clm9t060z000008jv3mira7x5"
23}