Skip to content

Workspace Invitations

Invite users to a workspace by email, look up and accept invitations, and manage outgoing invitations. Invitations expire 7 days after they are created. None of the invitation flows have dedicated SDK methods — call the REST endpoints directly.


Invite User

POST /wallethero-api/invite

Sends an email invitation to join a workspace. Any previous pending invitation to the same email for the workspace is superseded.

Auth: Bearer token — requires the invite_users permission.

Request Body

FieldTypeRequiredDefaultDescription
emailstring (email)YesEmail address to invite
workspace_idstring (UUID)YesWorkspace to invite into
rolestringNomemberOne of admin, member

Example Request

bash
curl -X POST "https://api.wallethero.app/wallethero-api/invite" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "workspace_id": "11111111-1111-1111-1111-111111111111",
    "role": "member"
  }'

Response (200)

json
{
  "invitation": {
    "id": "66666666-6666-6666-6666-666666666666",
    "email": "[email protected]",
    "expires_at": "2024-01-22T10:30:00Z",
    "workspace_name": "Acme Coffee Rewards",
    "superseded_previous": false
  },
  "message": "Invitation sent successfully"
}

If a previous active invitation existed, superseded_previous is true and the message notes it.

SDK

No SDK method — call the REST endpoint directly.


List Workspace Invitations

GET /wallethero-api/workspace/:workspaceId/invitations

Lists the outgoing pending/expired invitations a workspace has sent.

Auth: Bearer token — workspace member.

Path Parameters

ParameterTypeDescription
workspaceIdstring (UUID)Workspace identifier

Response (200)

json
{
  "invitations": [
    {
      "id": "66666666-6666-6666-6666-666666666666",
      "email": "[email protected]",
      "invitation_token": "77777777-7777-7777-7777-777777777777",
      "role": "member",
      "status": "pending",
      "date_created": "2024-01-15T10:30:00Z",
      "expires_at": "2024-01-22T10:30:00Z",
      "inviter_name": "John Admin",
      "workspace_name": "Acme Coffee Rewards"
    }
  ]
}

Response Fields

FieldTypeDescription
idstring (UUID)Invitation identifier
emailstringInvited email address
invitation_tokenstring (UUID)Token used to look up / accept the invitation
rolestringOne of admin, member
statusstringOne of pending, expired (a pending invitation past its expiry is reported as expired)
date_createdstring (ISO 8601)Creation timestamp
expires_atstring (ISO 8601)Expiration time
inviter_namestringName of the user who sent the invitation
workspace_namestringWorkspace name

SDK

No SDK method — call the REST endpoint directly.


Get Invitation Details

GET /wallethero-api/invitation/:token

Looks up an invitation by its token to show details before accepting. The token in the path is the credential.

Auth: Public — no Bearer token required.

Path Parameters

ParameterTypeDescription
tokenstring (UUID)Invitation token from the email link

Example Request

bash
curl "https://api.wallethero.app/wallethero-api/invitation/INVITATION_TOKEN"

Response (200)

json
{
  "invitation": {
    "email": "[email protected]",
    "expires_at": "2024-01-22T10:30:00Z",
    "inviter_email": "[email protected]",
    "inviter_name": "John Admin",
    "user_exists": false,
    "workspace_name": "Acme Coffee Rewards"
  }
}

Response Fields

FieldTypeDescription
emailstringInvited email address
expires_atstring (ISO 8601)Invitation expiration time
inviter_emailstringEmail of the user who sent the invitation
inviter_namestringName of the user who sent the invitation
user_existsbooleanWhether a user account already exists for this email
workspace_namestringName of the workspace being joined

An invalid or expired token returns 400 INVALID_PAYLOAD.

SDK

No SDK method — call the REST endpoint directly.


Accept Invitation

POST /wallethero-api/accept-invitation

Accepts an invitation for an already-registered user. The authenticated user's email must match the invitation's recipient.

Auth: Bearer token — existing user whose email matches the invitation.

Request Body

FieldTypeRequiredDescription
invitation_tokenstring (UUID)YesToken from the invitation email link

Example Request

bash
curl -X POST "https://api.wallethero.app/wallethero-api/accept-invitation" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "invitation_token": "77777777-7777-7777-7777-777777777777" }'

Response (200)

json
{
  "message": "Invitation accepted successfully",
  "workspace": {
    "id": "11111111-1111-1111-1111-111111111111",
    "name": "Acme Coffee Rewards"
  }
}

SDK

No SDK method — call the REST endpoint directly.


List My Invitations

GET /wallethero-api/my-invitations

Returns the pending, non-expired invitations addressed to the authenticated user's email.

Auth: Bearer token.

Response (200)

json
{
  "invitations": [
    {
      "id": "66666666-6666-6666-6666-666666666666",
      "invitation_token": "77777777-7777-7777-7777-777777777777",
      "workspace_name": "Acme Coffee Rewards",
      "inviter_name": "John Admin",
      "date_created": "2024-01-15T10:30:00Z",
      "expires_at": "2024-01-22T10:30:00Z"
    }
  ]
}

SDK

No SDK method — call the REST endpoint directly.


Revoke Invitation

DELETE /wallethero-api/invitation/:invitationId

Revokes a pending invitation (sets its status to revoked).

Auth: Bearer token — requires the manage_members permission on the invitation's workspace.

Path Parameters

ParameterTypeDescription
invitationIdstring (UUID)Invitation identifier

Example Request

bash
curl -X DELETE "https://api.wallethero.app/wallethero-api/invitation/INVITATION_ID" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200)

json
{ "message": "Invitation revoked successfully" }

SDK

No SDK method — call the REST endpoint directly.


Resend Invitation

POST /wallethero-api/invitation/:invitationId/resend

Resends an (expired) invitation: a fresh invitation with a new token and 7-day expiry is created, and the original is deleted.

Auth: Bearer token — requires the invite_users permission on the invitation's workspace.

Path Parameters

ParameterTypeDescription
invitationIdstring (UUID)Invitation identifier to resend

Example Request

bash
curl -X POST "https://api.wallethero.app/wallethero-api/invitation/INVITATION_ID/resend" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200)

json
{
  "invitation": {
    "id": "88888888-8888-8888-8888-888888888888",
    "email": "[email protected]",
    "expires_at": "2024-02-01T10:30:00Z",
    "workspace_name": "Acme Coffee Rewards",
    "superseded_previous": false
  },
  "message": "Invitation resent successfully"
}

SDK

No SDK method — call the REST endpoint directly.

Notes

  • Invitations expire 7 days after creation.
  • Creating a new invitation supersedes any previous pending invitation to the same email for the workspace.

WalletHero Documentation