Workspace Settings

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

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": "id_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": "id_123",
      "workspaceId": 12,
      "convTTL": 1,
      "optOutKeyword": "sample",
      "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":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}"}'

Related pages in the app