Skip to main content

Invite Organization Member

https://infrahub-api.nexgencloud.com/v1/auth/invites

Sends an invitation for a user to join your organization. Include the email of the user to be invited in the request body.


Request body parameters


email string   Required

The email of the user to be invited to your organization.


Attributes


status boolean

Indicates the status of the request to invite an organization member, true indicates success, while false indicates error.


message string

A message describing the status of the request to send an invitation.


invite object

An object containing details about the invitation that was sent.

Show child attributes
email string

The email of the invited user.


id integer

The ID of the invitation.


status string

A message describing the status of the invitation.


created_at date-time

The timestamp when the invite was sent.

Example request
curl -X POST "https://infrahub-api.nexgencloud.com/v1/auth/invites" \
-H "accept: application/json"\
-H "api_key: YOUR API KEY"\
-H "content-type: application/json"\
-d '{
"email": "[email protected]"
}'
Response
{
"status": true,
"message": "Inviting user successful",
"invite": {
"email": "[email protected]",
"id": 4,
"status": "EMAIL_SENT",
"created_at": "2023-04-26T04:21:58"
}
}

Returns


A status of true indicates that the invitation has been successfully sent to the email specified in the request body. The invite object contains details about the sent invitation, including the recipient email, invitation ID, status (which returns EMAIL_SENT upon success), and the timestamp of invitation creation. In case of an error, refer to our documentation on handling errors here.


Back to top