Matchai Docs

Get an approval requestComing soon

Returns where an approval request stands. Once it is approved, result holds the response the call returned when Matchai performed it.

Coming soon. This is documented ahead of launch so you can plan your integration; it is not available yet.
GET
/approvals/{approval_id}

Coming soon. Returns where an approval request stands. Once it is approved, result holds the response the call returned when Matchai performed it.

Scopes: none beyond a valid key or token

Pricing: Included with the connection.

Authorization

headerAuthorizationBearer <matchai_<base62>>

A personal API key, sent as Authorization: Bearer matchai_…. Create keys in Matchai under Settings → Connectors → Advanced (for developers). A key starts with matchai_ followed by letters and digits, carries the scopes chosen when it was created, and can be revoked at any time. Keys reach only the account that created them: to serve other professionals, use Connect with Matchai.

Path Parameters

approval_id*string

Approval id.

Length1 <= length <= 64

Response Body

The approval.

application/json
  1. response
id*string

Approval id.

Length1 <= length <= 64
status*string

approved means Matchai has performed the call; its outcome is in result.

Value in"pending""approved""declined""expired""cancelled"
operation_id*string

The API operation waiting for approval, for example sendMessage.

method*string
Value in"POST""PUT""PATCH""DELETE"
path*string

The request path, for example /conversations/{conversation_id}/messages with the ids filled in.

summary*string

What the account holder was asked to approve.

approval_url*string

Where the account holder answers.

Formaturi
created_at*string

When the request was made.

Formatdate-time
expires_at*string

When it lapses if nobody answers.

Formatdate-time
resolved_at?|

When it was answered, expired or cancelled.

Formatdate-time
result?|null
Example Request
curl -X GET 'https://api.matchai.co/v1/approvals/string'
Example Response
{  "id": "string",  "status": "pending",  "operation_id": "string",  "method": "POST",  "path": "string",  "summary": "string",  "approval_url": "http://example.com",  "created_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z",  "resolved_at": "2019-08-24T14:15:22Z",  "result": {    "status_code": 0,    "body": {}  }}