Skip to content

Workspaces

Create workspace invitations

Invite people to a workspace or grant access immediately to existing organization members. Requires workspace Admin access and current invitation eligibility; invitations offering organization Admin membership also require organization Admin access. Recipients are processed independently: inspect `failed` even after HTTP `200`, and inspect invitation status before retrying a delivery failure. Existing access is preserved. Workspace API keys return `403`; use a personal API key or scoped OAuth token. OAuth scope: `api:write`.

POST/api/v2/workspaces/{workspaceId}/invitations

Invite people to a workspace or grant access immediately to existing organization members. Requires workspace Admin access and current invitation eligibility; invitations offering organization Admin membership also require organization Admin access. Recipients are processed independently: inspect failed even after HTTP 200, and inspect invitation status before retrying a delivery failure. Existing access is preserved. Workspace API keys return 403; use a personal API key or scoped OAuth token.

OAuth scope: api:write.

Authentication

Send a personal or workspace API key in X-API-Key. See key types and access; operations that reject workspace keys say so in their description.

Send X-API-Key in the request header.

Alternatively

Send a Sim OAuth access token in Authorization: Bearer. See OAuth authentication and scopes.

Authorization: Bearer YOUR_ACCESS_TOKEN

Required scopes: api:write

OAuth flows
json
{
  "authorizationCode": {
    "authorizationUrl": "https://www.sim.ai/api/auth/oauth2/authorize",
    "tokenUrl": "https://www.sim.ai/api/auth/oauth2/token",
    "refreshUrl": "https://www.sim.ai/api/auth/oauth2/token",
    "scopes": {
      "api:read": "Read your workspaces, workflows, files, tables, and logs",
      "api:write": "Read, create, change, run, and delete resources in your workspaces",
      "offline_access": "Stay signed in without asking again"
    }
  }
}

OAuth scope: api:write.

Path parameters

workspaceIdstringRequired

Unique workspace identifier.

minLength
1
maxLength
128

Request body

Required

Recipients and the access to grant.

object

Recipients and the access to grant.

3 fields
emailsarrayRequired

Email addresses to invite. Each address is processed separately; inspect failed for unsuccessful recipients.

minItems
1
maxItems
50
Schema details
Array itemstring
format
email
maxLength
320
pattern
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
permissionstring

Workspace permission to grant. Existing workspace access is preserved.

default
read
enum
["admin","write","read"]
membershipstring

Organization membership: member or admin uses a seat when billing is enabled. External grants workspace access only and requires an eligible paid account when billing is enabled. Existing members of another organization remain external.

default
member
enum
["member","admin","external"]

Additional properties are not allowed.

Request example 1

json
{
  "emails": [
    "member@example.com"
  ],
  "permission": "write",
  "membership": "member"
}

Responses

200

Per-recipient invitation and direct-grant outcomes.

object

Successful recipients remain committed when later recipients fail.

1 field
dataobjectRequired

Response data.

5 fields
successbooleanRequired

Whether every recipient succeeded. Inspect failed even when the HTTP response is successful.

successfularrayRequired

Email addresses that received a pending invitation.

Schema details
Array itemstring
addedarrayRequired

Existing organization members granted workspace access immediately.

Schema details
Array itemstring
failedarrayRequired

Failures for individual recipients. Earlier successful recipients remain committed.

Schema details
Array itemobject
2 fields
emailstringRequired

Recipient whose operation failed.

errorstringRequired

Reason the invitation or access grant could not be completed.

Additional properties are not allowed.

invitationsarrayRequired

Invitation and immediate-access results for successful recipients.

Schema details
Array itemobject
7 fields
idstringRequired

Invitation identifier, or direct-grant result identifier when instantAdd is true.

emailstringRequired

Recipient email address.

workspaceIdsarrayRequired

Workspaces included in this invitation or direct grant.

Schema details
Array itemstring
permissionstringRequired

Workspace permission offered or granted.

enum
["admin","write","read"]
membershipIntentstringRequired

Whether the recipient joins the organization or receives only workspace access.

enum
["internal","external"]
instantAddboolean

Whether access was granted immediately without a pending invitation.

outcomestring

Result when reconciling access for an existing user.

enum
["added","updated","unchanged"]

Additional properties are not allowed.

Additional properties are not allowed.

Additional properties are not allowed.

Response example 1

json
{
  "data": {
    "success": true,
    "successful": [
      "member@example.com"
    ],
    "added": [],
    "failed": [],
    "invitations": [
      {
        "id": "invitation-123",
        "email": "member@example.com",
        "workspaceIds": [
          "workspace-123"
        ],
        "permission": "write",
        "membershipIntent": "internal"
      }
    ]
  }
}

Response headers

X-RateLimit-Limitinteger

Maximum requests allowed in the current window.

minimum
0
maximum
9007199254740991
X-RateLimit-Remaininginteger

Requests remaining in the current window.

minimum
0
maximum
9007199254740991
X-RateLimit-Resetstring

ISO 8601 timestamp when the current rate-limit window resets.

format
date-time
pattern
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Was this helpful?
Suggest an edit