Skip to Content
API ReferenceWorkspace Settings

Workspace Settings APIs

Open in the app: General Settings

Overview

Read and update workspace-level conversation settings.

Workspace settings properties

PropertyTypeDescription
workspaceIdnumber

The workspace ID.

idstring

The workspace settings ID.

convTTLnumber

The conversation time to live in hours, after this time, the conversation will be closed automatically.

testNumsjson

The workspace test numbers, it's explained in the next section.

optOutKeywordstring

The opt-out keyword used to auto-archive contacts, when a contact sends this keyword in a message, the contact will be archived automatically.

autoUnarchiveOnMessageboolean

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.

PropertyTypeDescription
phonestring

The test phone number.

activeboolean

Indicates whether the test number is active.

Workspace Settings API

Get workspace settings.

AttributeTypeDescription
workspaceIdnumber

Required. The workspace ID.

Request & Response

POST https://gateway.bcrumbs.net/core/gq
query 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 } ] } } }
You can check our playground to explore and interact with GraphQL APIs easily and intuitively with real-time documentation.

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.

AttributeTypeDescription
workspaceIdnumber

Required. The workspace ID.

convTTLnumber

Conversation TTL in hours.

testNums[WorkspaceTestNumberInput!]

Test numbers configuration.

optOutKeywordstring

Keyword that auto-archives contacts.

autoUnarchiveOnMessageboolean

Automatically unarchive on inbound message.

Request & Response

POST https://gateway.bcrumbs.net/core/gq
mutation 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 } ] } } }
You can check our playground to explore and interact with GraphQL APIs easily and intuitively with real-time documentation.

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":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.

AttributeTypeDescription
workspaceIdnumber

Required. The ID of the workspace to delete.

What gets deleted

PartResponse fieldRemoved data
Corecore

Messages, conversations, clients, broadcasts, reports (conversation, agent, tag, stage and broadcast reports), agents, webhooks, channels (integrations), tags, quick replies, workspace settings, API keys and, as the last step, member roles (userRoles).

AI assistantsbot

AI assistants, knowledge sources, Q&A entries, embeddings, token usage logs and the knowledge files in the rag upload container (blobs).

Billingbilling

Subscription, workspace plans, pending payments, payment methods with their saved cards and payment elements, and billing info.

Accountauth

The workspace itself, its memberships and invitations. User accounts are kept, so users is always 0.

Request & Response

POST https://gateway.bcrumbs.net/core/gq
mutation 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.

ErrorCause
deleteWorkspace is only allowed for user, partner, or internalService callersCalled with a workspace API key or an agent API key.
You do not have permission to access this resource with your current role assignmentThe calling user has a role in the workspace but is not an Owner.
Missing role assignment for the target userThe 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.

You can check our playground to explore and interact with GraphQL APIs easily and intuitively with real-time documentation.

Programming language examples

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}"}'