log_exchange
After each user message, send the exchange here so it can be remembered. You do not need to decide what is important, just forward the user message (and your reply, if you have one) and Synap will keep what matters. If your app serves more than one end-user, pass that person's stable id as user_id so each person's memory stays separate; if every conversation is the same single user, omit it. SCOPING: customer_id is B2B ONLY. On a B2B instance (user_context_isolation=strict) it is REQUIRED and a user_id on its own is an error. On a B2C instance (user_context_isolation=equals_customer) it is NOT accepted: the API rejects it with HTTP 400, customer-scoped retrieval does not exist there, and user_id is the whole identity. If you do not know which mode this instance is in, send user_id only and no customer_id; GET /api/v1/auth/whoami reports the mode as user_context_isolation. Logging is fire-and-forget by default; set wait_for_processing=true only when you need to confirm the memory finished extracting before continuing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | No | Stable id of the end-user this call belongs to. On a B2C instance this is the ONLY identifier you send and it is the whole identity. On a B2B instance send it together with customer_id. Omit both if every conversation is the same single user. | |
| customer_id | No | B2B ONLY. Required on a B2B instance (user_context_isolation=strict), where a user_id on its own is an error. NOT accepted on a B2C instance (user_context_isolation=equals_customer): the API rejects it with HTTP 400 and there is no customer scope to read from. When in doubt leave this out and send user_id alone. GET /api/v1/auth/whoami reports the mode. | |
| user_message | Yes | ||
| conversation_id | No | ||
| assistant_message | No | ||
| wait_for_processing | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |