Add context to a lead
Adds context or a timeline event to a lead. Use event for things that happened at a point in time (a status change, a completed step, an update from your system) — Apten places it in the conversation timeline so the AI knows when it occurred relative to the lead’s messages and can react to it. Use context for standing facts and instructions that should always apply regardless of when they were added (preferences, rules, background). At least one of context, event, additionalInfo, or command is required; they can be combined in one call.
Authorizations
Path Parameters
The ID of the lead to add context to.
Body
The lead's context and/or timeline event, and an optional command.
A standing fact or instruction about the lead that should always apply, regardless of when it was added. For something that happened at a point in time, use event instead.
Something that just happened, stated as a short factual sentence (what changed, and the next step if there is one). Apten records it in the conversation timeline with a timestamp: the AI knows when it occurred relative to the lead's messages, treats it as information the lead has not seen, and can bring it up naturally or act on it in the flow-chart conversation. Example: 'Application submitted. Next step: upload proof of residence.'
An key-value object containing structured data to store with the lead. These will be stored as variables that can be accessed in the flow-chart conversation prompts.
An optional command for Apten regarding the lead. Currently allowed commands are scheduling a follow up and sending a message.
Response
Context has successfully been added to the lead.
Returns "Success" if the context was added successfully.

