Workspace Settings APIs
Open in the app: General Settings
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": "settings_123",
"workspaceId": 12,
"convTTL": 24,
"optOutKeyword": "stop",
"autoUnarchiveOnMessage": true,
"testNums": [
{
"phone": "12025550123",
"active": true
}
]
}
}
}Programming language examples
cURL
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": "settings_123",
"workspaceId": 12,
"convTTL": 24,
"optOutKeyword": "stop",
"autoUnarchiveOnMessage": true,
"testNums": [
{
"phone": "12025550123",
"active": true
}
]
}
}
}Programming language examples
cURL
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":24,"testNums":[{"phone":"12025550123","active":true}],"optOutKeyword":"stop","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}"}'Delete Workspace API
Permanently delete a workspace and all of its data in Bread Crumbs: the core data first, then the AI assistant, billing and account data. The response counts what was removed in each part.
This cannot be undone. Conversations, messages, contacts, channels, agents, API keys and every other record of the workspace are deleted for good, and there is no restore. The workspace API keys stop working as soon as the core data is deleted.
Access: Owner user session only (Authorization: Bearer <token>), or a partner token for the partner’s own workspace. API keys cannot call it: workspace API keys and agent API keys are rejected.
| Attribute | Type | Description |
|---|---|---|
workspaceId | number | Required. The ID of the workspace to delete. |
What gets deleted
| Part | Response field | Removed data |
|---|---|---|
Core | core | Messages, conversations, clients, broadcasts, reports (conversation, agent, tag, stage and broadcast reports), agents, webhooks, channels ( |
AI assistants | bot | AI assistants, knowledge sources, Q&A entries, embeddings, token usage logs and the knowledge files in the |
Billing | billing | Subscription, workspace plans, pending payments, payment methods with their saved cards and payment elements, and billing info. |
Account | auth | The workspace itself, its memberships and invitations. User accounts are kept, so |
Request & Response
POST https://gateway.bcrumbs.net/core/gqmutation deleteWorkspace($input: DeleteWorkspaceInput!) {
deleteWorkspace(input: $input) {
workspaceId
core {
messages
conversations
clients
broadcasts
agents
integrations
apiKeys
webhooks
userRoles
}
bot {
ais
sources
embeddings
blobs
}
billing {
subscriptions
paymentMethods
billingInfos
}
auth {
workspace
memberships
users
}
}
}
input DeleteWorkspaceInput {
workspaceId: Int! # ID of the workspace to delete.
}The mutation above returns JSON structured like this:
{
"data": {
"deleteWorkspace": {
"workspaceId": 12,
"core": {
"messages": 48210,
"conversations": 3125,
"clients": 2870,
"broadcasts": 14,
"agents": 6,
"integrations": 2,
"apiKeys": 3,
"webhooks": 1,
"userRoles": 6
},
"bot": {
"ais": 1,
"sources": 9,
"embeddings": 412,
"blobs": 7
},
"billing": {
"subscriptions": 1,
"paymentMethods": 1,
"billingInfos": 1
},
"auth": {
"workspace": 1,
"memberships": 6,
"users": 0
}
}
}
}bot, billing and auth are null when that service returns no counts.
Order and retries. Core data is deleted first, then the AI assistant and billing data (in parallel), then the account data. Member roles are deleted last, so if a later step fails the Owner keeps their role and can call the API again to finish. Data that is already gone is counted as 0.
Not removed. Only records stored by Bread Crumbs are deleted. Uploaded files, such as contact import CSVs and shared media, stay in storage, and nothing is called at the channel providers (for example Meta) or at the payment provider.
| Error | Cause |
|---|---|
deleteWorkspace is only allowed for user, partner, or internalService callers | Called with a workspace API key or an agent API key. |
You do not have permission to access this resource with your current role assignment | The calling user has a role in the workspace but is not an Owner. |
Missing role assignment for the target user | The calling user has no role in the workspace. |
deleteWorkspace failed at bot: ... (or billing, auth) | A later step failed after the core data was deleted. Call the API again to finish. |
The request examples below use the API-KEY placeholder of this site. For this API, send an Owner’s session token (Bearer <token>) instead.
Programming language examples
cURL
curl -X POST 'https://gateway.bcrumbs.net/core/gq' \
-H 'authorization: API-KEY' \
-H 'content-type: application/json' \
-d '{"operationName":"deleteWorkspace","variables":{"input":{"workspaceId":12}},"query":"mutation deleteWorkspace($input: DeleteWorkspaceInput!) {\n deleteWorkspace(input: $input) {\n workspaceId\n core {\n messages\n conversations\n clients\n broadcasts\n agents\n integrations\n apiKeys\n webhooks\n userRoles\n }\n bot {\n ais\n sources\n embeddings\n blobs\n }\n billing {\n subscriptions\n paymentMethods\n billingInfos\n }\n auth {\n workspace\n memberships\n users\n }\n }\n}"}'