Python SDK
import json
import os
from parable_types_web_api import InviteTenantUserInput
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
input_data = InviteTenantUserInput.model_validate(
json.loads("{\"email\":\"person@example.com\",\"roleIds\":[]}"),
)
result = sdk.users.invite_user(input_data)sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input webapitypes.InviteTenantUserInput
if err := json.Unmarshal([]byte(`{"email":"person@example.com","roleIds":[]}`), &input); err != nil {
return err
}
result, err := sdk.UsersNamespace.InviteUser(ctx, input){
"data": {
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"email": "jsmith@example.com",
"id": "<string>",
"staffRoles": [
{
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"id": "<string>",
"name": "<string>",
"permissions": [
"<string>"
],
"description": "<string>",
"parentRoleId": "<string>"
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"avatarUrl": "<string>",
"locale": "<string>",
"name": "<string>",
"timezone": "<string>",
"title": "<string>",
"userOnboardingCompletedAt": "2023-11-07T05:31:56Z",
"welcomeSeenAt": "2023-11-07T05:31:56Z"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Invite someone to the Workspace
Emails an invitation to join this Workspace with the roles you choose. Accepting it gives that person access, so it needs a person’s approval.
POST
/
api
/
users
/
invitations
Python SDK
import json
import os
from parable_types_web_api import InviteTenantUserInput
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
input_data = InviteTenantUserInput.model_validate(
json.loads("{\"email\":\"person@example.com\",\"roleIds\":[]}"),
)
result = sdk.users.invite_user(input_data)sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input webapitypes.InviteTenantUserInput
if err := json.Unmarshal([]byte(`{"email":"person@example.com","roleIds":[]}`), &input); err != nil {
return err
}
result, err := sdk.UsersNamespace.InviteUser(ctx, input){
"data": {
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"email": "jsmith@example.com",
"id": "<string>",
"staffRoles": [
{
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": "<string>",
"id": "<string>",
"name": "<string>",
"permissions": [
"<string>"
],
"description": "<string>",
"parentRoleId": "<string>"
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>",
"avatarUrl": "<string>",
"locale": "<string>",
"name": "<string>",
"timezone": "<string>",
"title": "<string>",
"userOnboardingCompletedAt": "2023-11-07T05:31:56Z",
"welcomeSeenAt": "2023-11-07T05:31:56Z"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Access
This operation needs a Parable token. An MCP token cannot call it. See Authentication for the kinds of token. Your roles must granttenant.user.create.
Errors
HTTP 422: The invitation input is invalid, such as missing roles or an ineligible person. Provide a valid person and at least one assignable role.HTTP 403: You cannot invite people or assign the requested roles in this Workspace. Choose roles within your authority or ask a Workspace administrator.WA-TN-003: Parable manages who is a member of this Workspace, so nobody can be invited or reactivated in it. Ask your Parable representative to give the person access.
Authorizations
A personal access token, which starts with pat_. A Parable token can call each operation that the roles of its owner allow. An MCP token can call only the read operations that are open to agents. A SQL token does not work on this API.
Headers
Workspace slug. Overrides subdomain-based workspace resolution when provided.
Example:
"acme"
Optional request correlation ID echoed back in the response.
Example:
"550e8400-e29b-41d4-a716-446655440000"
Body
application/json
An email address
Maximum string length:
255Pattern:
^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$Role IDs to assign to the user upon invite. At least one role is required.
UUID v4 with automatic base62 encoding for client-facing APIs
Pattern:
^([0-9A-Za-z]{1,22}|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$