g2bAPI Reference
Interactions

Answer an agent interaction

Settles one owned pending question or plan approval. Settlement is one-shot; later attempts return a conflict, and sensitive answers are redacted from the response.

POST
/v1/interactions/{id}/answer

Settles one owned pending question or plan approval. Settlement is one-shot; later attempts return a conflict, and sensitive answers are redacted from the response.

Authorization

bearerAuth
AuthorizationBearer <token>

Create an API key in g2b Settings, then send it as a Bearer token.

In: header

Path Parameters

id*string
Length1 <= length <= 256

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/interactions/string/answer" \  -H "Content-Type: application/json" \  -d '{    "answers": {      "property1": {        "kind": "options",        "optionIds": [          "string"        ]      },      "property2": {        "kind": "options",        "optionIds": [          "string"        ]      }    },    "action": "answer"  }'
{  "interactionId": "string",  "status": "answered",  "cancelledBy": "user",  "answers": {    "property1": {      "kind": "options",      "optionIds": [        "string"      ]    },    "property2": {      "kind": "options",      "optionIds": [        "string"      ]    }  },  "resolvedAt": "2019-08-24T14:15:22Z"}