Matchai Docs

Withdraw an approval requestComing soon

Withdraws a pending request, for example when the person changed their mind in your app. The account holder no longer sees it.

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

Coming soon. Withdraws a pending request, for example when the person changed their mind in your app. The account holder no longer sees 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

Header Parameters

Idempotency-Key?string

A unique string (a UUID works). Retrying with the same key within 24 hours returns the first response instead of acting twice. Reusing a key with a different body returns 409 idempotency_key_reused.

Length1 <= length <= 255

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 POST 'https://api.matchai.co/v1/approvals/string/cancel' \  -H 'Idempotency-Key: 6f1d3c2a-0b7e-4f5a-9c8d-1e2f3a4b5c6d'
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": {}  }}