messages follows the same shape as the arguments to record_message.
Parameters
List of message dicts. Each dict supports the following keys:
conversation_id(str, required): conversation identifier; must be a valid UUID registered viarecord_messagerole(str, required): must be"user"or"assistant"content(str, required): message textuser_id(str, optional): external user idcustomer_id(str, optional): external customer id; required on B2B, auto-resolved on B2C (B2C vs B2B)session_id(str, optional): session identifiermetadata(dict, optional): free-form metadata
record_message, user_id and customer_id are optional in batch mode. If omitted, the entry is recorded without explicit user/customer attribution.Returns
A dict summarising the batch outcome.Number of messages submitted.
Number of messages accepted.
Number of messages rejected.
Per-message results in submission order. Successful entries include
message_id and recorded_at; failed entries include an error field.Example
Raises
InvalidInputError: when an entry is missing required keys orroleis invalid.AuthenticationError: when the API key is missing or invalid.NetworkError: when the SDK cannot reach Synap.