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
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
email | string (email) | Yes | — | Email address to invite |
workspace_id | string (UUID) | Yes | — | Workspace to invite into |
role | string | No | member | One of admin, member |
Example Request
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)
{
"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
| Parameter | Type | Description |
|---|---|---|
workspaceId | string (UUID) | Workspace identifier |
Response (200)
{
"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
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Invitation identifier |
email | string | Invited email address |
invitation_token | string (UUID) | Token used to look up / accept the invitation |
role | string | One of admin, member |
status | string | One of pending, expired (a pending invitation past its expiry is reported as expired) |
date_created | string (ISO 8601) | Creation timestamp |
expires_at | string (ISO 8601) | Expiration time |
inviter_name | string | Name of the user who sent the invitation |
workspace_name | string | Workspace 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
| Parameter | Type | Description |
|---|---|---|
token | string (UUID) | Invitation token from the email link |
Example Request
curl "https://api.wallethero.app/wallethero-api/invitation/INVITATION_TOKEN"Response (200)
{
"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
| Field | Type | Description |
|---|---|---|
email | string | Invited email address |
expires_at | string (ISO 8601) | Invitation expiration time |
inviter_email | string | Email of the user who sent the invitation |
inviter_name | string | Name of the user who sent the invitation |
user_exists | boolean | Whether a user account already exists for this email |
workspace_name | string | Name 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
| Field | Type | Required | Description |
|---|---|---|---|
invitation_token | string (UUID) | Yes | Token from the invitation email link |
Example Request
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)
{
"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)
{
"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
| Parameter | Type | Description |
|---|---|---|
invitationId | string (UUID) | Invitation identifier |
Example Request
curl -X DELETE "https://api.wallethero.app/wallethero-api/invitation/INVITATION_ID" \
-H "Authorization: Bearer YOUR_TOKEN"Response (200)
{ "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
| Parameter | Type | Description |
|---|---|---|
invitationId | string (UUID) | Invitation identifier to resend |
Example Request
curl -X POST "https://api.wallethero.app/wallethero-api/invitation/INVITATION_ID/resend" \
-H "Authorization: Bearer YOUR_TOKEN"Response (200)
{
"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.