Update a custom moment
Send only the fields to change. Until the custom moment first goes live, a change to when, not_when, the examples, the timing or min_confidence edits its draft in place. Once it has a live_version, such a change writes the next version as a draft, and live_version keeps running until the draft is shadowed and promoted, or promoted directly. A status change, live or disabled, reaches live conversations within seconds.
Authorization
apiKey API key (prefix spk_test_ or spk_live_) or personal access token (prefix pat_)
In: header
Path Parameters
Custom moment ID
Header Parameters
Idempotency key that prevents processing a request twice. Use a unique UUID v4 per request.
length <= 255Request Body
application/json
The color it is shown in. Makes no new version; moments already detected keep the color they carry
Value in
- "violet"
- "blue"
- "teal"
- "green"
- "yellow"
- "orange"
- "red"
- "pink"
- "gray"
Replaces both example lists
Its display name, 1 to 60 characters. Makes no new version; moments already detected keep the label they carry
length <= 60The classifier's probability a turn needs to fire it
doubleWhen it does not fire
length <= 1000live to run it on conversations, disabled to stop it; a custom moment never goes back to draft
Value in
- "draft"
- "live"
- "disabled"
Its timing profile
Value in
- "act"
- "answer"
- "ideas"
When it fires
length <= 1000Response Body
application/json
application/json
curl -X PUT "https://example.com/moments/mdef_2jxsy8cc8v0348asy6t1" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{}'{ "color": "violet", "created_at": "2019-08-24T14:15:22Z", "examples": { "fire": [ "string" ], "skip": [ "string" ] }, "id": "mdef_2jxsy8cc8v0348asy6t1", "label": "Pricing objection", "live_version": 0, "min_confidence": 0.1, "name": "pricing_objection", "not_when": "string", "shadow_version": 0, "status": "draft", "timing": "act", "updated_at": "2019-08-24T14:15:22Z", "version": 0, "when": "string"}