invites
Creates, updates, deletes, gets or lists an invites resource.
Overview
| Name | invites |
| Type | Resource |
| Id | cloudflare.user.invites |
Fields
The following fields are returned by SELECT queries:
- get
- list
Invitation Details response
| Name | Datatype | Description |
|---|---|---|
id | string | Invite identifier tag. (example: 4f5f0c14a2a41d5063dd301b2f829f04) |
invited_member_id | string | ID of the user to add to the organization. (example: 5a7805061c76ada191ed06f989cc3dac) |
organization_id | string | ID of the organization the user will be added to. (example: 5a7805061c76ada191ed06f989cc3dac) |
organization_name | string | Organization name. (example: Cloudflare, Inc.) |
expires_on | string (date-time) | When the invite is no longer active. (example: 2014-01-01T05:20:00Z) |
invited_by | string | The email address of the user who created the invite. (example: user@example.com) |
invited_member_email | string | Email address of the user to add to the organization. (example: user@example.com) |
invited_on | string (date-time) | When the invite was sent. (example: 2014-01-01T05:20:00Z) |
organization_is_enforcing_twofactor | boolean | |
roles | array | List of role names the membership has for this account. |
status | string | Current status of the invitation. (pending, accepted, rejected, expired) (example: accepted) |
List Invitations response
| Name | Datatype | Description |
|---|---|---|
id | string | Invite identifier tag. (example: 4f5f0c14a2a41d5063dd301b2f829f04) |
invited_member_id | string | ID of the user to add to the organization. (example: 5a7805061c76ada191ed06f989cc3dac) |
organization_id | string | ID of the organization the user will be added to. (example: 5a7805061c76ada191ed06f989cc3dac) |
organization_name | string | Organization name. (example: Cloudflare, Inc.) |
expires_on | string (date-time) | When the invite is no longer active. (example: 2014-01-01T05:20:00Z) |
invited_by | string | The email address of the user who created the invite. (example: user@example.com) |
invited_member_email | string | Email address of the user to add to the organization. (example: user@example.com) |
invited_on | string (date-time) | When the invite was sent. (example: 2014-01-01T05:20:00Z) |
organization_is_enforcing_twofactor | boolean | |
roles | array | List of role names the membership has for this account. |
status | string | Current status of the invitation. (pending, accepted, rejected, expired) (example: accepted) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | invite_id | Gets the details of an invitation. | |
list | select | Lists all invitations associated with my user. | ||
edit | update | invite_id, status | Responds to an invitation. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
invite_id | string |
SELECT examples
- get
- list
Gets the details of an invitation.
SELECT
id,
invited_member_id,
organization_id,
organization_name,
expires_on,
invited_by,
invited_member_email,
invited_on,
organization_is_enforcing_twofactor,
roles,
status
FROM cloudflare.user.invites
WHERE invite_id = '{{ invite_id }}' -- required
;
Lists all invitations associated with my user.
SELECT
id,
invited_member_id,
organization_id,
organization_name,
expires_on,
invited_by,
invited_member_email,
invited_on,
organization_is_enforcing_twofactor,
roles,
status
FROM cloudflare.user.invites
;
UPDATE examples
- edit
Responds to an invitation.
UPDATE cloudflare.user.invites
SET
status = '{{ status }}'
WHERE
invite_id = '{{ invite_id }}' --required
AND status = '{{ status }}' --required
RETURNING
errors,
messages,
result,
success;