Skip to content

Approval Requests

List approval requests in the review queue

Section titled “List approval requests in the review queue”

GET /api/v1/approval-requests

Operation
approval_requests.list
Accepts
sessionCookie, sessionToken
Scope
governance:read
Effect
reading
Rate class
read

Parameters

  • status ApprovalRequestStatus in query, optional
  • limit integer in query, optional, default 50, minimum 1, maximum 200
  • cursor string in query, optional, minLength 1

Answers

  • 200 One page of the list

    application/json: object

  • 400 BAD_REQUEST: The request cannot be read.
  • 401 UNAUTHENTICATED: No credential was presented, or the credential is not valid.
  • 403 FORBIDDEN: The caller lacks the scope or the right this operation requires.
  • 422 VALIDATION_FAILED: Path, query or body do not match the operation's schema.
  • 429 RATE_LIMITED: The caller sent too many requests of this operation's rate class. details.retryAfterSeconds and the Retry-After header give the seconds to wait. The numbers are the instance's, set under rateLimits in its release config.
  • 500 INTERNAL: The instance failed. The message never carries details.

Count the approval requests waiting for the caller

Section titled “Count the approval requests waiting for the caller”

GET /api/v1/approval-requests/pending-count

Operation
approval_requests.count_pending
Accepts
sessionCookie, sessionToken
Scope
conversation:read
Effect
reading
Rate class
read

Answers

  • 200 The result

    application/json: PendingApprovalRequestCount

  • 400 BAD_REQUEST: The request cannot be read.
  • 401 UNAUTHENTICATED: No credential was presented, or the credential is not valid.
  • 403 FORBIDDEN: The caller lacks the scope or the right this operation requires.
  • 422 VALIDATION_FAILED: Path, query or body do not match the operation's schema.
  • 429 RATE_LIMITED: The caller sent too many requests of this operation's rate class. details.retryAfterSeconds and the Retry-After header give the seconds to wait. The numbers are the instance's, set under rateLimits in its release config.
  • 500 INTERNAL: The instance failed. The message never carries details.

GET /api/v1/approval-requests/{requestId}

Operation
approval_requests.get
Accepts
sessionCookie, sessionToken
Scope
conversation:read
Effect
reading
Rate class
read

Parameters

  • requestId string in path, required

Answers

  • 200 The result

    application/json: ApprovalRequestView

  • 400 BAD_REQUEST: The request cannot be read.
  • 401 UNAUTHENTICATED: No credential was presented, or the credential is not valid.
  • 403 FORBIDDEN: The caller lacks the scope or the right this operation requires.
  • 404 NOT_FOUND: The resource does not exist, is not visible to the caller, or the instance runs without this operation.
  • 422 VALIDATION_FAILED: Path, query or body do not match the operation's schema.
  • 429 RATE_LIMITED: The caller sent too many requests of this operation's rate class. details.retryAfterSeconds and the Retry-After header give the seconds to wait. The numbers are the instance's, set under rateLimits in its release config.
  • 500 INTERNAL: The instance failed. The message never carries details.

POST /api/v1/approval-requests/{requestId}/decide

Operation
approval_requests.decide
Accepts
sessionCookie, sessionToken
Scope
governance:write
Effect
changing
Rate class
write

Parameters

  • requestId string in path, required

Request body

application/json: DecideApprovalRequest

Answers

  • 200 The result

    application/json: ApprovalRequest

  • 400 BAD_REQUEST: The request cannot be read.
  • 401 UNAUTHENTICATED: No credential was presented, or the credential is not valid.
  • 403 FORBIDDEN: The caller lacks the scope or the right this operation requires.
  • 404 NOT_FOUND: The resource does not exist, is not visible to the caller, or the instance runs without this operation.
  • 409 CONFLICT: The request conflicts with the current state of the resource.
  • 422 VALIDATION_FAILED: Path, query or body do not match the operation's schema.
  • 429 RATE_LIMITED: The caller sent too many requests of this operation's rate class. details.retryAfterSeconds and the Retry-After header give the seconds to wait. The numbers are the instance's, set under rateLimits in its release config.
  • 500 INTERNAL: The instance failed. The message never carries details.

POST /api/v1/approval-requests/{requestId}/revert

Operation
approval_requests.revert
Accepts
sessionCookie, sessionToken
Scope
governance:write
Effect
changing
Rate class
write

Parameters

  • requestId string in path, required

Answers

  • 200 The result

    application/json: ApprovalRequest

  • 400 BAD_REQUEST: The request cannot be read.
  • 401 UNAUTHENTICATED: No credential was presented, or the credential is not valid.
  • 403 FORBIDDEN: The caller lacks the scope or the right this operation requires.
  • 404 NOT_FOUND: The resource does not exist, is not visible to the caller, or the instance runs without this operation.
  • 409 CONFLICT: The request conflicts with the current state of the resource.
  • 422 VALIDATION_FAILED: Path, query or body do not match the operation's schema.
  • 429 RATE_LIMITED: The caller sent too many requests of this operation's rate class. details.retryAfterSeconds and the Retry-After header give the seconds to wait. The numbers are the instance's, set under rateLimits in its release config.
  • 500 INTERNAL: The instance failed. The message never carries details.

Withdraw an approval request the caller created

Section titled “Withdraw an approval request the caller created”

POST /api/v1/approval-requests/{requestId}/withdraw

Operation
approval_requests.withdraw
Accepts
sessionCookie, sessionToken
Scope
conversation:write
Effect
changing
Rate class
write

Parameters

  • requestId string in path, required

Answers

  • 200 The result

    application/json: ApprovalRequest

  • 400 BAD_REQUEST: The request cannot be read.
  • 401 UNAUTHENTICATED: No credential was presented, or the credential is not valid.
  • 403 FORBIDDEN: The caller lacks the scope or the right this operation requires.
  • 404 NOT_FOUND: The resource does not exist, is not visible to the caller, or the instance runs without this operation.
  • 409 CONFLICT: The request conflicts with the current state of the resource.
  • 422 VALIDATION_FAILED: Path, query or body do not match the operation's schema.
  • 429 RATE_LIMITED: The caller sent too many requests of this operation's rate class. details.retryAfterSeconds and the Retry-After header give the seconds to wait. The numbers are the instance's, set under rateLimits in its release config.
  • 500 INTERNAL: The instance failed. The message never carries details.