Invite a User

Changed Sep 4
POST
/v2/invitations

Invites a user to one of the authenticated client's sub-clients. The user is created if they don't already exist, or reused if the email address already belongs to a user of that sub-client. An invitation email is then queued.

This endpoint only supports sub-clients: client_id must refer to a sub-client of the authenticated client. You can't invite users to the authenticated client itself. Omitting client_id also targets the authenticated client (as it does elsewhere in v2), so both cases return client_not_invitable (403). To manage users in your own organization, use the SQUAKE Dashboard.

Re-inviting the same email address for the same sub-client is safe. The existing invitation is returned with an updated sent_at, and the email is sent again. The acceptance URL stays the same, so any previously sent invitation link will continue to work. If locale is omitted when re-inviting a user, the locale from the previous invitation is preserved.

Authorization

Bearer-Auth
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
client_id*string

The sub-client to invite the user into. Must be a descendant of the authenticated client; the authenticated client itself is refused.

Formatuuid
user_email*string

The invitee's email address

Formatemail
role*string

The role the invited user will hold in the sub-client (for example admin or user)

first_name?string

The invitee's first name. Optional; kept as-is on resend when omitted.

last_name?string

The invitee's last name. Optional; kept as-is on resend when omitted.

locale?string

The language used for the invitation email and acceptance page. Optional; defaults to en for a new invitation and is kept as-is on resend when omitted.

Value in"en""de""fr"

Response Body

Created

application/json
  1. response

An invitation to a user of a sub-client of the authenticated client, as returned by the /v2/invitations endpoints. Each invitation is tied to exactly one user in exactly one client; re-inviting the same address to the same sub-client returns the invitation that already exists with an updated sent_at, not a new one.

The invitation_url is the acceptance link the invited user receives by email. Persist the id if you want to look the invitation up again later; both the id and invitation_url are stable across resends.

id*string

The invitation's unique identifier (UUID).

Formatuuid
client_id*string

The UUID of the sub-client the user is being invited into. Always a descendant of the authenticated client — never the authenticated client itself.

Formatuuid
user_email*string

The email address the invitation was issued to. Normalized (trimmed and lower-cased) on creation.

Formatemail
first_name?|

The invited user's first name, if provided.

last_name?|

The invited user's last name, if provided.

role*string

The role the invited user will hold in the sub-client. One of the client-level roles (for example admin or user). SQUAKE-internal roles cannot be assigned via the API.

locale*string

The language used for the invitation email and acceptance page.

Value in"en""de""fr"
sent_at?|

When the invitation email was last sent. Updated on every resend.

Formatdate-time
accepted_at*|

When the invited user accepted the invitation, or null if it is still outstanding.

Formatdate-time
invitation_url*|

The acceptance URL the invited user follows to set a password and finish signing up. Stable across resends.

Formaturi
Example Request
curl -X POST 'https://api.sandbox.squake.earth/v2/invitations' \  -H 'Content-Type: application/json' \  -d '{  "client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5",  "user_email": "ada.lovelace@example.com",  "role": "admin"}'
Example Response
{  "id": "8f6a1c9c-3f28-4b3e-9a1b-24a0f0c7f5b1",  "client_id": "4fb3ec7a-92cb-471f-b75f-c3fe7c2a34d5",  "user_email": "ada.lovelace@example.com",  "first_name": "Ada",  "last_name": "Lovelace",  "role": "admin",  "locale": "de",  "sent_at": "2026-08-31T10:23:14Z",  "accepted_at": null,  "invitation_url": "https://app.squake.earth/accept-invite/6b3a2e1c-9e5d-4b7a-b0f8-2c8f6a4d1e11?token=eyJhbGciOi..."}