Define a custom moment
Defines a moment type in plain English. It starts as a draft at version 1, edited in place until it first goes live; make it live with an update. Its name is the kind its moments carry.
Authorization
apiKey API key (prefix spk_test_ or spk_live_) or personal access token (prefix pat_)
In: header
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; picked from the name when absent
Value in
- "violet"
- "blue"
- "teal"
- "green"
- "yellow"
- "orange"
- "red"
- "pink"
- "gray"
Up to 10 lines each it should and should not fire on
Its display name; the name in words when absent (pricing_objection is Pricing objection)
length <= 60The classifier's probability a turn needs to fire it, above 0 and up to 1; 0.5 when absent
doubleThe kind its moments will carry: snake_case, unique in the organization, and not a built-in kind. Fixed once created.
length <= 40When it does not fire, though it might look like it should
length <= 1000act (the default) waits for the exchange to land, answer goes while a question still hangs, ideas lets one fire serve a brainstorm
Value in
- "act"
- "answer"
- "ideas"
When it fires, in plain English
length <= 1000Response Body
application/json
application/json
curl -X POST "https://example.com/moments" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "name": "pricing_objection", "when": "The customer pushes back on price, asks for a discount, or compares us to a cheaper option." }'{ "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"}