API referenceCustom moments

Promote a version

POST
/moments/{id}/versions/{n}/promote

Makes the version the live one in one step: the version that was live is archived, and a shadow of this version ends.

Authorization

apiKey
X-API-Key<token>

API key (prefix spk_test_ or spk_live_) or personal access token (prefix pat_)

In: header

Path Parameters

id*string

Custom moment ID

n*integer

The version

Formatint64
Range1 <= value

Header Parameters

Idempotency-Key*string

Idempotency key that prevents processing a request twice. Use a unique UUID v4 per request.

Lengthlength <= 255

Response Body

application/json

application/json

curl -X POST "https://example.com/moments/mdef_2jxsy8cc8v0348asy6t1/versions/1/promote" \  -H "Idempotency-Key: string"
{  "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"}