Skip to main content

invites

Creates, updates, deletes, gets or lists an invites resource.

Overview

Nameinvites
TypeResource
Idcloudflare.user.invites

Fields

The following fields are returned by SELECT queries:

Invitation Details response

NameDatatypeDescription
idstringInvite identifier tag. (example: 4f5f0c14a2a41d5063dd301b2f829f04)
invited_member_idstringID of the user to add to the organization. (example: 5a7805061c76ada191ed06f989cc3dac)
organization_idstringID of the organization the user will be added to. (example: 5a7805061c76ada191ed06f989cc3dac)
organization_namestringOrganization name. (example: Cloudflare, Inc.)
expires_onstring (date-time)When the invite is no longer active. (example: 2014-01-01T05:20:00Z)
invited_bystringThe email address of the user who created the invite. (example: user@example.com)
invited_member_emailstringEmail address of the user to add to the organization. (example: user@example.com)
invited_onstring (date-time)When the invite was sent. (example: 2014-01-01T05:20:00Z)
organization_is_enforcing_twofactorboolean
rolesarrayList of role names the membership has for this account.
statusstringCurrent status of the invitation. (pending, accepted, rejected, expired) (example: accepted)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectinvite_idGets the details of an invitation.
listselectLists all invitations associated with my user.
editupdateinvite_id, statusResponds 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.

NameDatatypeDescription
invite_idstring

SELECT examples

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
;

UPDATE examples

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;