Skip to content

Adding achat message

This call enables you to add a chat message to a chat field.





URL parameters
Parameter Type Required Description
ddName String Yes The name of the document definition to which the chat field belongs.
environmentId String No The ID of the environment. If you do not provide the environmentId in the header, you have to provide it in the body of the REST call.
Header Parameters
Parameter Type Required Description
Content-Type String Yes Provide the content type of your call. Only application/json is supported.
X-User-Id String Yes The ID of the user who wants to trigger the REST action. This ID is returned by the authentication call.
X-Auth-Token String Yes The authentication token that the authentication call returned.

A JSON object with information about the user account that is created or updated. The object can contain the following fields:

Field Type Required Description
_id String No The ID of the document that contains the chat field.
externalId String No The external ID of the document that contains the chat field. If both the __id_ and externalId fields are present, the __id_ field takes precedence. At least one of the __id_ or externalId fields should be present.
_environmentId String No The ID of the environment that contains the document. Either the body or the URL parameters should contain the environmentId field.
fieldName String Yes The name of the chat field to which the message should be added.
lineId String No The ID of the line with the corresponding chat field.
lineName String No Then name of the line that contains the chat field. If the lineName field is not present, BizzStream assumes that the chat field is a header field.
messageContent String Yes The content of the message.

A JSON object with the status code of the HTTP response and possibly error information.


curl /api/v1/chat?ddName=order
    -H "X-Auth-Token: 6IrqyFhbKjpyJZ_NX6dwLmRNxWk0OVffE8aBfauNKUG" \
    -H "X-User-Id: a6gA9rYaGTFKPrT5P" \
    -H "Content-Type: application/json" \
    -X POST \
    -d '{
        "messageContent":"This is a text message."