Skip to content
Resource · Workspace

Invitations

An invitation asks a person, by email, to join a workspace with a given role.

invitations:readinvitations:write
MethodPathSummary
GET…/invitationsList workspace invitations
POST…/invitationsCreate and send a workspace invitation
DELETE…/invitations/{invitationId}Delete (cancel) a pending invitation
GET…/invitations/{invitationId}Get detailed information about an invitation
POST…/invitations/{invitationId}/resendResend a pending invitation email
POST…/invitations/{invitationId}/consumeConsume an invitation to join the workspace

Paths start with /workspaces/{workspaceId}. GET endpoints need invitations:read, the others invitations:write.

The Invitation object

firestoreIdstringrequired

ID of the invitation.

workspaceIdstringrequired

ID of the workspace.

inviterIdstringrequired

ID of the user.

statusstringrequired

Status of the invitation.

  • pending

    The invitation waits for the invited person to accept it.

  • consumed

    The invited person accepted the invitation and became a member of the workspace.

rolestringrequired

Role of the user, which sets its permissions in a workspace (ws.) or a billing account (ba.).

  • ws.owner

    Owner of the workspace, with every permission, including deleting the workspace and managing owners.

  • ws.admin

    Administrator of the workspace, with every permission except managing owners and deleting the workspace or its files.

  • ws.member

    Member of the workspace, who works on its transactions, invoices, payments and accounting but manages neither its bank accounts nor its members.

  • ws.viewer

    Viewer of the workspace, a role that grants no permission.

  • ws.support

    Sway support access, granted when you invite the Sway bot.

  • ba.owner

    Owner of the billing account, with every permission, including deleting it.

  • ba.admin

    Administrator of the billing account, who reads and updates it but cannot delete it.

  • ba.member

    Member of the billing account, who can only read it.

emailstringemailrequired
expirationDateTimestringdate-time
The Invitation object
{
  "firestoreId": "In8rD4sF7jPw2yKm6tQb",
  "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
  "inviterId": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj",
  "status": "pending",
  "role": "ws.owner",
  "email": "anna.meier@example.com",
  "expirationDateTime": "2026-03-02T09:30:00.000Z"
}
GET/workspaces/{workspaceId}/invitations

List workspace invitations

Scopeinvitations:read

Path parameters

workspaceIdstringrequired

ID of the workspace.

Query parameters

limitinteger

Maximum number of items to return, from 1 to 100. A missing, invalid or non-positive value falls back to 20, and a larger value to 100.

Default20

startAfterstring

Cursor of the page to return: the nextCursor of the previous page.

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

idsstring[]

Comma-separated IDs of the items to return, up to 30. When set, limit, startAfter and the filters are ignored.

Returns

200

List of items

dataInvitation[]required

Items of the page, in list order.

limitintegerrequired

Page size of the request, or the number of requested ids.

nextCursorstring

Cursor of the next page, to pass as startAfter. Absent when the page holds fewer items than limit; a full last page still has one, and the page it points to is empty.

curl 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invitations' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "data": [
    {
      "firestoreId": "In8rD4sF7jPw2yKm6tQb",
      "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
      "inviterId": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj",
      "status": "pending",
      "role": "ws.owner",
      "email": "anna.meier@example.com",
      "expirationDateTime": "2026-03-02T09:30:00.000Z"
    }
  ],
  "limit": 20
}
POST/workspaces/{workspaceId}/invitations

Create and send a workspace invitation

Scopeinvitations:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

Query parameters

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Request body

emailstringrequired
rolestringrequired

Valuesws.ownerws.adminws.memberws.viewerba.ownerba.adminba.member

Returns

200

Successful response

dataInvitationrequired
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invitations' \
  -H "Authorization: Bearer $SWAY_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "anna.meier@example.com",
  "role": "ws.owner"
}'
{
  "data": {
    "firestoreId": "In8rD4sF7jPw2yKm6tQb",
    "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
    "inviterId": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj",
    "status": "pending",
    "role": "ws.owner",
    "email": "anna.meier@example.com",
    "expirationDateTime": "2026-03-02T09:30:00.000Z"
  }
}
DELETE/workspaces/{workspaceId}/invitations/{invitationId}

Delete (cancel) a pending invitation

Scopeinvitations:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

invitationIdstringrequired

ID of the invitation.

Returns

204

No content

curl -X DELETE 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invitations/In8rD4sF7jPw2yKm6tQb' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "error": {
    "code": "invalid-argument",
    "message": "Invalid request"
  }
}
GET/workspaces/{workspaceId}/invitations/{invitationId}

Get detailed information about an invitation

Scopeinvitations:read

Path parameters

workspaceIdstringrequired

ID of the workspace.

invitationIdstringrequired

ID of the invitation.

Query parameters

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

emailstringrequired

Returns

200

Successful response

dataDetailedInvitationrequired
Show 8 child fields
firestoreIdstringrequired

ID of the invitation.

workspaceIdstringrequired

ID of the workspace.

inviterIdstringrequired

ID of the user.

statusstringrequired

Status of the invitation.

  • pending

    The invitation waits for the invited person to accept it.

  • consumed

    The invited person accepted the invitation and became a member of the workspace.

rolestringrequired

Role of the user, which sets its permissions in a workspace (ws.) or a billing account (ba.).

  • ws.owner

    Owner of the workspace, with every permission, including deleting the workspace and managing owners.

  • ws.admin

    Administrator of the workspace, with every permission except managing owners and deleting the workspace or its files.

  • ws.member

    Member of the workspace, who works on its transactions, invoices, payments and accounting but manages neither its bank accounts nor its members.

  • ws.viewer

    Viewer of the workspace, a role that grants no permission.

  • ws.support

    Sway support access, granted when you invite the Sway bot.

  • ba.owner

    Owner of the billing account, with every permission, including deleting it.

  • ba.admin

    Administrator of the billing account, who reads and updates it but cannot delete it.

  • ba.member

    Member of the billing account, who can only read it.

emailstringemailrequired
expirationDateTimestringdate-time
detailsobjectrequired
Show 3 child fields
inviterNamestringrequired
workspaceNamestringrequired
workspacePhotoUrlstringuri
curl 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invitations/In8rD4sF7jPw2yKm6tQb?email=anna.meier%40example.com' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "data": {
    "firestoreId": "In8rD4sF7jPw2yKm6tQb",
    "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
    "inviterId": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj",
    "status": "pending",
    "role": "ws.owner",
    "email": "anna.meier@example.com",
    "expirationDateTime": "2026-03-02T09:30:00.000Z",
    "details": {
      "inviterName": "string",
      "workspaceName": "string",
      "workspacePhotoUrl": "https://example.com"
    }
  }
}
POST/workspaces/{workspaceId}/invitations/{invitationId}/resend

Resend a pending invitation email

Scopeinvitations:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

invitationIdstringrequired

ID of the invitation.

Returns

204

No content

curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invitations/In8rD4sF7jPw2yKm6tQb/resend' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "error": {
    "code": "invalid-argument",
    "message": "Invalid request"
  }
}
POST/workspaces/{workspaceId}/invitations/{invitationId}/consume

Consume an invitation to join the workspace

Scopeinvitations:write

Path parameters

workspaceIdstringrequired

ID of the workspace.

invitationIdstringrequired

ID of the invitation.

Query parameters

fieldsstring

Comma-separated property paths to include in the response, or in each item of a list. Use dots for nested paths.

Returns

200

Successful response

dataMembershiprequired
curl -X POST 'https://api.business.swayapp.io/v1/workspaces/Wk7fQ2xR9bLm4tZp8sNv/invitations/In8rD4sF7jPw2yKm6tQb/consume' \
  -H "Authorization: Bearer $SWAY_API_KEY"
{
  "data": {
    "firestoreId": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj",
    "workspaceId": "Wk7fQ2xR9bLm4tZp8sNv",
    "userId": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj",
    "displayName": "string",
    "email": "anna.meier@example.com",
    "photoUrl": "https://example.com",
    "role": "ws.owner",
    "activation": {
      "enabled": true,
      "updateDateTime": "2026-03-02T09:15:00.000Z",
      "updatedBy": "Xq3vT9mB2kLpR7sN4wYc8dZf1aHj"
    }
  }
}

Start building on your own data.

Create an account, open Profile › Developer and create a key scoped to the resources you need. Questions about an integration? The team answers them on a call.