Get a workspace invite code
Generate a single-use invite code with GET /v2/workspaces/members/code and give it to a workspace owner, who adds you with it. It expires in 5 minutes.
GET
Get a workspace invite code
string
required
The API key for your account. You can find this in your account settings.
workspaces:manage scope.
Generates a short-lived invite code tied to the authenticated user’s identity, not to any specific workspace. The user who wants to join shares this code out-of-band (chat, email) with a workspace owner, who then submits it via Invite Member along with the role to grant.
The code expires 5 minutes after generation and is single-use: it is invalidated as soon as it is redeemed. Request a new one if it expires before the owner adds you. Rate limited to 1 code every 5 minutes per user.
Response
string
Indicates whether the call was successful:
success if it was, error if not.string
Your workspace invite code.
Common errors
Related
- CLI:
squarecloud workspace member invite-code - SDKs:
api.workspaces.members.inviteCode()(JavaScript),client.workspaces.members.invite_code()(Python),c.Workspaces.Members.InviteCode()(Go)

