Skip to content

Invitations

5 operations in the WP Waterfall API.

List invitations

get/companies/me/invitationsPermalink to List invitations

  • Dashboard session only, no API key

Lists the company's invitations with the invited email and role, in pages of up to 200 (default 50). A Site Admin or Site Developer cannot read them and gets 403.

Parameters

NameInTypeDescription
limitqueryintegerHow many rows to return in one page: at most 200, and 50 when left out. Default: 50. Range: 1 to 200.
cursorquerystringThe next_cursor of the page before. Leave it out for the first page.

Responses

StatusBodyDescription
200InvitationListInvitations
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

200 response fields

NameTypeDescription
data requiredarray of InvitationThe rows of this page.
data[].id requiredstring
data[].email requiredstring (email)
data[].role requiredstringOne of: owner, admin, developer, billing, viewer, site_admin, site_developer.
data[].site_idsarray of string (uuid)Sites the invitee may use. Only set for Site Admin and Site Developer invitations.
data[].expires_at requiredstring (date-time)
data[].created_at requiredstring (date-time)
next_cursor requiredstring or nullSend it as cursor to get the next page. Null on the last page.

Invite a teammate

post/companies/me/invitationsPermalink to Invite a teammate

Emails an invitation code that works for 7 days and answers 201 with the invitation. site_ids (up to 100) limits a Site Admin or Site Developer invitation to those sites, and the owner role answers 422. A signed-in person needs a recent sign-in for every role above Viewer. An API key needs the users:write scope and cannot invite an Admin or a Billing user (403). A company sends at most 30 invitation emails an hour.

Parameters

NameInTypeDescription
Idempotency-Key requiredheaderstringSend a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422.

Responses

StatusBodyDescription
201InvitationInvitation
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemMissing users:write
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

201 response fields

NameTypeDescription
id requiredstring
email requiredstring (email)
role requiredstringOne of: owner, admin, developer, billing, viewer, site_admin, site_developer.
site_idsarray of string (uuid)Sites the invitee may use. Only set for Site Admin and Site Developer invitations.
expires_at requiredstring (date-time)
created_at requiredstring (date-time)

Accept an invitation with its code

post/invitations/acceptPermalink to Accept an invitation with its code

  • Dashboard session only, no API key

A signed-in session only. No API key may call it. The person signs in with the invited email address and sends the code from the invitation email. They join the company with the invited role, and a site role gets one membership for each invited site. An unknown code and a code for another address both answer 404, so a code never leaks.

Parameters

NameInTypeDescription
Idempotency-Key requiredheaderstringSend a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422.

Request body application/json, required, AcceptInvitationRequest

Fields

NameTypeDescription
token requiredstring

Responses

StatusBodyDescription
200objectThe company the person joined
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemNo such invitation for this address
409ProblemThe person already belongs to this company
410ProblemThe invitation has expired
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

200 response fields

NameTypeDescription
company_id requiredstring
role requiredstring
site_ids requiredarray of string

Revoke an invitation

delete/invitations/{id}Permalink to Revoke an invitation

  • Dashboard session only, no API key

Deletes an invitation, so its code no longer works. Owners and Admins may call it. Answers 204, or 404 when the invitation was not found.

Parameters

NameInTypeDescription
id requiredpathstringThe id of the invitation.

Responses

StatusBodyDescription
204Revoked
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

Resend an invitation

post/invitations/{id}/resendPermalink to Resend an invitation

  • Dashboard session only, no API key

Makes a new code for the invitation, valid for 7 days, and emails it again, so the earlier code stops working. It counts toward the 30 invitation emails a company may send in an hour. Answers 404 when the invitation was not found.

Parameters

NameInTypeDescription
id requiredpathstringThe id of the invitation.
Idempotency-Key requiredheaderstringSend a fresh unique value on every POST: a POST without it answers 422. The answer is stored for 24 hours, so a retry with the same key and body returns the first answer, and the same key with a different body returns 422.

Responses

StatusBodyDescription
200InvitationInvitation
400ProblemThe request could not be read: bad JSON, a bad header, or a malformed value.
401ProblemThe credentials are missing, expired, or revoked. The WWW-Authenticate header names the Bearer scheme.
403ProblemThe credentials are valid but may not do this: the role, the API key scope, or a required confirmation is missing.
404ProblemThe thing in the path does not exist, or it belongs to another company. The answer is the same for both.
409ProblemThe current state does not allow this: the same change is already running, or another change got there first.
422ProblemThe request was read but a value is not valid, or a required confirmation or Idempotency-Key is missing. The errors list names each field.
429ProblemA rate limit was reached. Wait Retry-After seconds. Limits are per caller, per company, and per address.

200 response fields

NameTypeDescription
id requiredstring
email requiredstring (email)
role requiredstringOne of: owner, admin, developer, billing, viewer, site_admin, site_developer.
site_idsarray of string (uuid)Sites the invitee may use. Only set for Site Admin and Site Developer invitations.
expires_at requiredstring (date-time)
created_at requiredstring (date-time)