Resume a blocked flow - Spacefast Docs

Resume a blocked flow

Polls a flow that answered with a requiresAction envelope, using the continuation token from it. Returns pending with a fresh envelope to keep polling, completed carrying the one-time result, or denied or expired. One path serves every requiresAction flow, device authorization and agent approvals alike.

POST /v1/actions/resume

Request body

required application/json

min length 1 · max length 4096

Responses

200 Response for status 200

Show properties

One of:

Show properties

Example Call

cURL

curl -X POST "https://api.spacefast.com/v1/actions/resume" \
  -H "Content-Type: application/json" \
  -d '{
  "continuationToken": "string"
}'

JavaScript

const response = await fetch("https://api.spacefast.com/v1/actions/resume", {
  method: "POST",
  headers: {
    "Content-Type": "application/json"
  },
  body: "{\n  \"continuationToken\": \"string\"\n}"
});

Python

import requests

response = requests.post(
    "https://api.spacefast.com/v1/actions/resume",
    headers={
        "Content-Type": "application/json"
    },
    data="{\n  \"continuationToken\": \"string\"\n}",
)

Response

200 default

{
  "$schema": "http://example.com",
  "data": {
    "status": "pending",
    "requiresAction": {
      "actionType": "device_authorization",
      "instruction": "string",
      "url": "http://example.com",
      "pollUrl": "http://example.com",
      "continuationToken": "string",
      "pollAfterSeconds": 9007199254740991,
      "expiresAt": "2019-08-24T14:15:22Z"
    }
  }
}

Error Response

{
  "$schema": "http://example.com",
  "type": "string",
  "title": "string",
  "status": -9007199254740991,
  "detail": "string",
  "code": "string",
  "pointer": "string",
  "details": {
    "property1": null,
    "property2": null
  },
  "suggestions": [
    "string"
  ],
  "next": [
    "string"
  ],
  "requestId": "string"
}