Organization invitations
An invitation asks someone, by email, to join your organization with a role. Creating one emails the person a link; when they accept it they become a member of the organization. Invitations expire 24 hours after they are created.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /organizations-users-invites | List invitations |
GET | /organizations-users-invites/:id | Get an invitation |
POST | /organizations-users-invites | Create an invitation |
PATCH | /organizations-users-invites/:id | Update an invitation |
DELETE | /organizations-users-invites/:id | Cancel an invitation |
Reads are limited to your API key's organization. Pass organization_id as a filter to work with one organization.
Who can invite
The checks use the role of the API key's user in the organization:
| Role | Can invite / cancel |
|---|---|
owner | Any role (owner, admin, member). |
admin | Only member invitations. |
member | Nothing (403 Forbidden). |
The invitation object
json
organization, created_by_user and user_exists (whether an AchieveApex account already exists for email) are added on list and get.
Fields
| Field | Type | Description |
|---|---|---|
id | integer | Read-only. Unique ID. |
organization_id | integer | Organization the person is invited to. Required on create; cannot be changed. |
email | string | Email of the person invited. Required on create. Stored lowercase and trimmed. |
created_by_user_id | integer | Read-only. User who sent the invitation (the API key's user). |
role | string | Role the person gets on accepting: owner, admin or member. Required on create. |
organization_role_id | integer | null | Custom role (granular permissions) assigned on accepting, if any. |
first_name | string | null | First name to pre-fill on the new user's profile. Max 255 characters. |
last_name | string | null | Last name to pre-fill on the new user's profile. Max 255 characters. |
avatar_url | string | null | Profile picture to pre-fill. Must be a file uploaded for this organization's invitations (a key starting with organizations/<organization_id>/invites/). |
status | string | Read-only on create. pending, accepted or rejected. Starts as pending. |
expires_at | string (date-time) | Read-only on create. 24 hours after creation. Expired invitations cannot be accepted. |
created_at | string (date-time) | Read-only. Creation time. |
updated_at | string (date-time) | Read-only. Last update time. |
deleted_at | string (date-time) | null | Read-only. Set when the invitation is cancelled. |
Related
Report an issue with this documentation
Please log in to report issues with our documentation.