Workspace Settings APIs
Open in the app: General Settings (opens in a new tab)
Overview
Read and update workspace-level conversation settings.
Workspace settings properties
| Property | Type | Description |
|---|---|---|
workspaceId | number | The workspace ID. |
id | string | The workspace settings ID. |
convTTL | number | The conversation time to live in hours, after this time, the conversation will be closed automatically. |
testNums | json | The workspace test numbers, it's explained in the next section. |
optOutKeyword | string | The opt-out keyword used to auto-archive contacts, when a contact sends this keyword in a message, the contact will be archived automatically. |
autoUnarchiveOnMessage | boolean | Whether archived contacts are auto-unarchived on inbound messages, when a contact sends a message, the contact will be unarchived automatically if this option is enabled. |
Workspace test numbers properties
Tests numbers are used for now with Crumby AI assistant, when a test number is active, the Crumby AI assistant playground will simulate a conversation with that test number. Like the agent will fetch the user info and context for that number, and will remember the conversation for future use.
| Property | Type | Description |
|---|---|---|
phone | string | The test phone number. |
active | boolean | Indicates whether the test number is active. |
Workspace Settings API
Get workspace settings.
| Attribute | Type | Description |
|---|---|---|
workspaceId | number | Required. The workspace ID. |
Request & Response
POST https://gateway.bcrumbs.net/core/gqquery workspaceSettings($input: WorkspaceSettingsInput!) {
workspaceSettings(input: $input) {
id
workspaceId
convTTL
optOutKeyword
autoUnarchiveOnMessage
testNums {
phone
active
}
}
}
input WorkspaceSettingsInput {
workspaceId: Int! # Workspace ID.
}The query above returns JSON structured like this:
{
"data": {
"workspaceSettings": {
"id": "id_123",
"workspaceId": 12,
"convTTL": 24,
"optOutKeyword": "STOP",
"autoUnarchiveOnMessage": true,
"testNums": [
{
"phone": "+12025550123",
"active": true
}
]
}
}
}Programming language examples
curl -X POST 'https://gateway.bcrumbs.net/core/gq' \
-H 'authorization: API-KEY' \
-H 'content-type: application/json' \
-d '{"operationName":"workspaceSettings","variables":{"input":{"workspaceId":12}},"query":"query workspaceSettings($input: WorkspaceSettingsInput!) {\\n workspaceSettings(input: $input) {\\n id\\n workspaceId\\n convTTL\\n optOutKeyword\\n autoUnarchiveOnMessage\\n testNums {\\n phone\\n active\\n }\\n }\\n}"}'Patch Workspace Settings API
Update workspace settings. You should have the MANAGE_WORKSPACE permission to update workspace settings.
| Attribute | Type | Description |
|---|---|---|
workspaceId | number | Required. The workspace ID. |
convTTL | number | Conversation TTL in hours. |
testNums | [WorkspaceTestNumberInput!] | Test numbers configuration. |
optOutKeyword | string | Keyword that auto-archives contacts. |
autoUnarchiveOnMessage | boolean | Automatically unarchive on inbound message. |
Request & Response
POST https://gateway.bcrumbs.net/core/gqmutation patchWorkspaceSettings($input: WorkspaceSettingsPatchInput!) {
patchWorkspaceSettings(input: $input) {
id
workspaceId
convTTL
optOutKeyword
autoUnarchiveOnMessage
testNums {
phone
active
}
}
}
input WorkspaceSettingsPatchInput {
workspaceId: Int! # Workspace ID.
convTTL: Int # Conversation TTL in hours.
testNums: [WorkspaceTestNumberInput!] # Test numbers configuration.
optOutKeyword: String # Keyword that auto-archives contacts.
autoUnarchiveOnMessage: Boolean # Automatically unarchive on inbound message.
}The mutation above returns JSON structured like this:
{
"data": {
"patchWorkspaceSettings": {
"id": "id_123",
"workspaceId": 12,
"convTTL": 1,
"optOutKeyword": "sample",
"autoUnarchiveOnMessage": true,
"testNums": [
{
"phone": "+12025550123",
"active": true
}
]
}
}
}Programming language examples
curl -X POST 'https://gateway.bcrumbs.net/core/gq' \
-H 'authorization: API-KEY' \
-H 'content-type: application/json' \
-d '{"operationName":"patchWorkspaceSettings","variables":{"input":{"workspaceId":12,"convTTL":1,"testNums":[{"phone":"+12025550123","active":true}],"optOutKeyword":"sample","autoUnarchiveOnMessage":true}},"query":"mutation patchWorkspaceSettings($input: WorkspaceSettingsPatchInput!) {\\n patchWorkspaceSettings(input: $input) {\\n id\\n workspaceId\\n convTTL\\n optOutKeyword\\n autoUnarchiveOnMessage\\n testNums {\\n phone\\n active\\n }\\n }\\n}"}'