import { WebApiSDK } from "@parable-platform/web-api-sdk";
import type { InviteUserWithDefaultRoleInput } from "@parable-platform/web-api-types";
const sdk = new WebApiSDK({
baseUrl: process.env.PARABLE_API_URL!,
auth: { token: process.env.PARABLE_API_TOKEN! },
requestInterceptor: (config) => ({
...config,
headers: { ...config.headers, "X-Tenant": process.env.PARABLE_WORKSPACE! },
}),
});
const input: InviteUserWithDefaultRoleInput = JSON.parse(`{
"email": "person@example.com"
}`);
const result = await sdk.users.inviteUserWithDefaultRole(
input
);import json
import os
from parable_types_web_api import InviteUserWithDefaultRoleInput
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 = InviteUserWithDefaultRoleInput.model_validate(
json.loads("{\"email\":\"person@example.com\"}"),
)
result = sdk.users.invite_user_with_default_role(input_data)use parable_web_api_sdk::{types, ClientConfig, RequestOptions, WebApiSdk};
let sdk = WebApiSdk::new(ClientConfig::with_base_url(
std::env::var("PARABLE_API_URL")?,
Some(std::env::var("PARABLE_API_TOKEN")?),
None,
))?;
let options = RequestOptions::with_header("X-Tenant", std::env::var("PARABLE_WORKSPACE")?, None, None);
let input: types::InviteUserWithDefaultRoleInput = serde_json::from_value(
serde_json::json!({
"email": "person@example.com"
}),
)?;
let result = sdk.users.invite_user_with_default_role(
input,
Some(&options)
).await?;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.InviteUserWithDefaultRoleInput
if err := json.Unmarshal([]byte(`{"email":"person@example.com"}`), &input); err != nil {
return err
}
result, err := sdk.UsersNamespace.InviteUserWithDefaultRole(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 with the default role
Emails an invitation to join this Workspace with the Workspace’s default role, the role set under Protection, Login. Accepting it gives that person access, so it needs a person’s approval. Only a person can invite someone with other roles.
import { WebApiSDK } from "@parable-platform/web-api-sdk";
import type { InviteUserWithDefaultRoleInput } from "@parable-platform/web-api-types";
const sdk = new WebApiSDK({
baseUrl: process.env.PARABLE_API_URL!,
auth: { token: process.env.PARABLE_API_TOKEN! },
requestInterceptor: (config) => ({
...config,
headers: { ...config.headers, "X-Tenant": process.env.PARABLE_WORKSPACE! },
}),
});
const input: InviteUserWithDefaultRoleInput = JSON.parse(`{
"email": "person@example.com"
}`);
const result = await sdk.users.inviteUserWithDefaultRole(
input
);import json
import os
from parable_types_web_api import InviteUserWithDefaultRoleInput
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 = InviteUserWithDefaultRoleInput.model_validate(
json.loads("{\"email\":\"person@example.com\"}"),
)
result = sdk.users.invite_user_with_default_role(input_data)use parable_web_api_sdk::{types, ClientConfig, RequestOptions, WebApiSdk};
let sdk = WebApiSdk::new(ClientConfig::with_base_url(
std::env::var("PARABLE_API_URL")?,
Some(std::env::var("PARABLE_API_TOKEN")?),
None,
))?;
let options = RequestOptions::with_header("X-Tenant", std::env::var("PARABLE_WORKSPACE")?, None, None);
let input: types::InviteUserWithDefaultRoleInput = serde_json::from_value(
serde_json::json!({
"email": "person@example.com"
}),
)?;
let result = sdk.users.invite_user_with_default_role(
input,
Some(&options)
).await?;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.InviteUserWithDefaultRoleInput
if err := json.Unmarshal([]byte(`{"email":"person@example.com"}`), &input); err != nil {
return err
}
result, err := sdk.UsersNamespace.InviteUserWithDefaultRole(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 with the default role
invite_someoneAuthorizations
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.
"acme"
Optional request correlation ID echoed back in the response.
"550e8400-e29b-41d4-a716-446655440000"
Body
An invitation that gives the Workspace's default role, the one an agent sends. It names no roles: only a person chooses those.
An email address
255^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$Was this page helpful?