Salesforce Service Cloud APIs · Schema
ChatMessageEnvelope
CloudCRMCustomer ServiceEnterpriseSalesforceSupport
Properties
| Name | Type | Description |
|---|---|---|
| message | object | Message to the bot. |
| responseOptions | object |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/service-cloud/json-schema/service-cloud-chat-message-envelope-schema.json",
"title": "ChatMessageEnvelope",
"x-generated": "2026-11-25",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/service-cloud-bot-api-openapi.yml#/components/schemas/ChatMessageEnvelope",
"type": "object",
"properties": {
"message": {
"description": "Message to the bot.",
"oneOf": [
{
"$ref": "#/$defs/ChoiceMessage"
},
{
"$ref": "#/$defs/TextMessage"
},
{
"$ref": "#/$defs/TransferSucceededRequestMessage"
},
{
"$ref": "#/$defs/TransferFailedRequestMessage"
},
{
"$ref": "#/$defs/RedirectMessage"
},
{
"$ref": "#/$defs/SetVariablesMessage"
}
]
},
"responseOptions": {
"$ref": "#/$defs/ResponseOptions"
}
},
"required": [
"message"
],
"additionalProperties": false,
"$defs": {
"BooleanVariable": {
"type": "object",
"properties": {
"name": {
"description": "API name of a variable defined in the bot definition.",
"type": "string"
},
"type": {
"description": "Variable type of a boolean variable.",
"type": "string",
"enum": [
"boolean"
]
},
"value": {
"description": "Boolean value.",
"type": [
"boolean",
"null"
]
}
},
"required": [
"name",
"type",
"value"
],
"additionalProperties": false
},
"ChoiceMessage": {
"type": "object",
"properties": {
"type": {
"description": "Message type for answering a question with choices from the bot.",
"type": "string",
"enum": [
"choice"
]
},
"sequenceId": {
"$ref": "#/$defs/SequenceId"
},
"inReplyToMessageId": {
"$ref": "#/$defs/InReplyToMessageId"
},
"choiceIndex": {
"description": "Index or alias of the chosen answer. The index starts with 1. Either `choiceIndex` or `choiceId` is required.",
"type": [
"integer",
"null"
]
},
"choiceId": {
"description": "ID of the answer when you answer by clicking a choice button. Either `choiceIndex` or `choiceId` is required.",
"type": [
"string",
"null"
]
}
},
"required": [
"type",
"sequenceId"
],
"additionalProperties": false
},
"DateTimeVariable": {
"type": "object",
"properties": {
"name": {
"description": "API name of a variable defined in the bot definition.",
"type": "string"
},
"type": {
"description": "Variable type of a datetime variable.",
"type": "string",
"enum": [
"dateTime"
]
},
"value": {
"description": "Datetime in format ISO_LOCAL_DATE_TIME 'YYYY-MM-DDTHH:MM:SS'.",
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"type",
"value"
],
"additionalProperties": false
},
"DateVariable": {
"type": "object",
"properties": {
"name": {
"description": "API name of a variable defined in the bot definition.",
"type": "string"
},
"type": {
"description": "Variable type of a date variable.",
"type": "string",
"enum": [
"date"
]
},
"value": {
"description": "Date in format ISO_LOCAL_DATE 'YYYY-MM-DD'.",
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"type",
"value"
],
"additionalProperties": false
},
"InReplyToMessageId": {
"description": "Message ID of the previous response you are replying to.",
"type": "string"
},
"ListVariable": {
"type": "object",
"properties": {
"name": {
"description": "API name of a variable defined in the bot definition.",
"type": "string"
},
"type": {
"description": "Object variable that contains a list.",
"type": "string",
"enum": [
"list"
]
},
"value": {
"description": "Array of objects.",
"type": [
"array",
"null"
],
"items": {
"type": "object"
}
}
},
"required": [
"name",
"type",
"value"
],
"additionalProperties": false
},
"MoneyVariable": {
"type": "object",
"properties": {
"name": {
"description": "API name of a variable defined in the bot definition.",
"type": "string"
},
"type": {
"description": "Variable type of a money variable storing the currency and amount.",
"type": "string",
"enum": [
"money"
]
},
"value": {
"description": "Money in format '3_LETTER_CURRENCY_CODE AMOUNT'.",
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"type",
"value"
],
"additionalProperties": false
},
"NumberVariable": {
"type": "object",
"properties": {
"name": {
"description": "API name of a variable defined in the bot definition.",
"type": "string"
},
"type": {
"description": "Variable type of a number variable.",
"type": "string",
"enum": [
"number"
]
},
"value": {
"description": "Variable value in number format.",
"type": [
"number",
"null"
]
}
},
"required": [
"name",
"type",
"value"
],
"additionalProperties": false
},
"ObjectVariable": {
"type": "object",
"properties": {
"name": {
"description": "API name of a variable defined in the bot definition.",
"type": "string"
},
"type": {
"description": "Variable type of an object variable.",
"type": "string",
"enum": [
"object"
]
},
"value": {
"description": "Variable value is an object.",
"allOf": [
{
"$ref": "#/$defs/Variables"
}
]
}
},
"required": [
"name",
"type",
"value"
],
"additionalProperties": false
},
"RedirectMessage": {
"type": "object",
"properties": {
"type": {
"description": "Message type for the redirecting the client to another bot flow.",
"type": "string",
"enum": [
"redirect"
]
},
"sequenceId": {
"$ref": "#/$defs/SequenceId"
},
"dialogId": {
"type": "string",
"description": "Dialog ID to redirect to."
}
},
"required": [
"type",
"sequenceId",
"dialogId"
],
"additionalProperties": false
},
"RefVariable": {
"type": "object",
"properties": {
"name": {
"description": "API name of a variable defined in the bot definition.",
"type": "string"
},
"type": {
"description": "Variable type of a reference ID variable.",
"type": "string",
"enum": [
"ref"
]
},
"value": {
"description": "Variable value in reference ID format.",
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"type",
"value"
],
"additionalProperties": false
},
"ResponseOptions": {
"type": "object",
"description": "Configuration of additional information returned in the response payload.",
"properties": {
"variables": {
"$ref": "#/$defs/ResponseOptionsVariables"
},
"metrics": {
"type": "boolean",
"description": "Indicates whether to include metrics in the response."
},
"intents": {
"type": "boolean",
"description": "Indicates whether to include all intents detected when processing the current request."
},
"entities": {
"type": "boolean",
"description": "Indicates whether to include all entities detected when processing the current request."
}
},
"additionalProperties": false
},
"ResponseOptionsVariables": {
"type": "object",
"description": "Variables returned in the response.",
"properties": {
"include": {
"type": "boolean",
"description": "Indicates whether to include variables in the response."
},
"filter": {
"type": [
"array",
"null"
],
"description": "Filter the returned variables. If missing, null, or empty, no filtering is applied.",
"items": {
"type": "string",
"description": "Variable name to filter the returned variables on."
}
},
"onlyChanged": {
"type": "boolean",
"description": "Indicates whether the response contains only changed variables."
}
},
"required": [
"include",
"onlyChanged"
],
"additionalProperties": false
},
"SequenceId": {
"description": "Client-generated sequence number of the message in a session. Increase this number for each subsequent message.",
"format": "int64",
"type": "integer"
},
"SetVariablesMessage": {
"type": "object",
"description": "Update existing session variables",
"properties": {
"type": {
"description": "Message type",
"type": "string",
"enum": [
"setVariables"
]
},
"sequenceId": {
"$ref": "#/$defs/SequenceId"
},
"variables": {
"$ref": "#/$defs/Variables"
}
},
"required": [
"type",
"sequenceId",
"variables"
],
"additionalProperties": false
},
"TextMessage": {
"type": "object",
"properties": {
"type": {
"description": "Message type for replying to the bot through text.",
"type": "string",
"enum": [
"text"
]
},
"sequenceId": {
"$ref": "#/$defs/SequenceId"
},
"inReplyToMessageId": {
"$ref": "#/$defs/InReplyToMessageId"
},
"text": {
"description": "Text reply to the bot. To answer a question with choices with a text message, type the `choiceLabel`.",
"type": "string"
}
},
"required": [
"type",
"sequenceId",
"text"
],
"additionalProperties": false
},
"TextVariable": {
"type": "object",
"properties": {
"name": {
"description": "API name of a variable defined in the bot definition.",
"type": "string"
},
"type": {
"description": "Variable type of a text variable.",
"type": "string",
"enum": [
"text"
]
},
"value": {
"description": "Variable value in text format.",
"type": [
"string",
"null"
]
}
},
"required": [
"name",
"type",
"value"
],
"additionalProperties": false
},
"TransferFailedRequestMessage": {
"type": "object",
"properties": {
"type": {
"description": "Message type for the client to inform the bot that the client failed to transfer the session to another target.",
"type": "string",
"enum": [
"transferFailed"
]
},
"sequenceId": {
"$ref": "#/$defs/SequenceId"
},
"inReplyToMessageId": {
"$ref": "#/$defs/InReplyToMessageId"
},
"reason": {
"description": "Reason for the failed transfer.",
"type": "string",
"enum": [
"NoAgentAvailable",
"Error"
]
},
"description": {
"description": "Description of why the transfer failed.",
"type": [
"string",
"null"
]
}
},
"required": [
"type",
"sequenceId",
"reason"
],
"additionalProperties": false
},
"TransferSucceededRequestMessage": {
"type": "object",
"properties": {
"type": {
"description": "Message type for the client to inform the bot that the client successfully transferred the session to another target.",
"type": "string",
"enum": [
"transferSucceeded"
]
},
"sequenceId": {
"$ref": "#/$defs/SequenceId"
},
"inReplyToMessageId": {
"$ref": "#/$defs/InReplyToMessageId"
}
},
"required": [
"type",
"sequenceId"
],
"additionalProperties": false
},
"Variables": {
"type": [
"array",
"null"
],
"description": "Array of custom and context variables passed to the bot when initiating a session (see [What’s a Variable?](https://help.salesforce.com/s/articleView?id=sf.bots_service_whats_a_variable.htm&type=5&_ga=2.50520745.1281711304.1657558186-1967832163.1652719780)).",
"items": {
"anyOf": [
{
"$ref": "#/$defs/BooleanVariable"
},
{
"$ref": "#/$defs/DateVariable"
},
{
"$ref": "#/$defs/DateTimeVariable"
},
{
"$ref": "#/$defs/MoneyVariable"
},
{
"$ref": "#/$defs/NumberVariable"
},
{
"$ref": "#/$defs/TextVariable"
},
{
"$ref": "#/$defs/ObjectVariable"
},
{
"$ref": "#/$defs/RefVariable"
},
{
"$ref": "#/$defs/ListVariable"
}
]
}
}
}
}
Work with this as data
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/service-cloud-chat-message-envelope"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.