Skip to content

requests.resolveRequest

POST
/v1/requests/{requestId}
curl --request POST \
--url https://example.com/v1/requests/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "commandKey": "example", "expected": 1, "decision": "allow", "scope": "once", "reason": "example", "rule": "example" }'

Saves one decision and returns its execution receipt. The workflow sends the result to the Chat.

requestId
required
string
>= 1 characters <= 128 characters
Media typeapplication/json
object
commandKey
required
string
>= 1 characters <= 128 characters
expected
required
integer
<= 9007199254740991
decision
required
string
Allowed values: allow deny
scope
string
Allowed values: once chat lifetime
reason
string
<= 2000 characters
rule
string
>= 1 characters <= 4000 characters

Success

Media typeapplication/json
object
executionId
required
string
>= 1 characters <= 128 characters
commandKey
required
string
>= 1 characters <= 128 characters
sequence
required
integer
<= 9007199254740991

Example generated

{
"executionId": "example",
"commandKey": "example",
"sequence": 1
}

BotInvalid | OrganizationRequired

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: BotInvalid
message
required
string

Example

{
"_tag": "BotInvalid"
}

AuthenticationRequired

Media typeapplication/json
object
_tag
required
string
Allowed values: AuthenticationRequired

Example

{
"_tag": "AuthenticationRequired"
}

@nmnmcc/ability/Authorizer/Forbidden | ExecutionForbidden | MembershipRequired | ForbiddenOrigin

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: Forbidden
action
required
string
kind
required
string
field
string
reason
string

Example

{
"_tag": "Forbidden"
}

BotNotFound | ExecutionNotFound | RequestNotFound

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: BotNotFound
bot
required
string

Example

{
"_tag": "BotNotFound"
}

@nmnmcc/ability/Authorizer/Pending | BotConflict | ExecutionConflict | ExecutionKeyConflict | RequestConflict

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: Pending
ticket
required
string
reason
string

Example

{
"_tag": "Pending"
}

RateLimited

Media typeapplication/json
object
_tag
required
string
Allowed values: RateLimited
retryAfterSeconds
required
integer
>= -9007199254740991 <= 9007199254740991

Example

{
"_tag": "RateLimited"
}

BotStorageUnavailable | ExecutionUnavailable | AuthenticationUnavailable | RequestFailed

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: PolicyUnavailable

Example

{
"_tag": "PolicyUnavailable"
}