v1

latestOpenAPI 3.1.02026-07-24181585937.4 KB
Approval Definition

approvalDefinition.update

Create or update an approval definition for a specific entity that requires approval. The entity requiring approval must be within scope of an approval in Ashby that is marked as being managed by the API.

If the provided approval step definitions is an empty list, then approval will be skipped and the entity will proceed to the next stage.

Requires the approvalsWrite permission.

post/approvalDefinition.update

Request body

entityType'offer' required

The type of approval entity being updated.

entityIdstring uuid required

The id of the approval entity being updated, such as the id of the offer version.

submitApprovalRequestboolean nullable

Control whether an approval request created through this API should be immediately submitted. If false, then the approval will need to be manually submitted in the Ashby app. Defaults to false.

Example request

{
  "entityId": "e9ed20fd-d45f-4aad-8a00-a19bfba0083e",
  "approvalStepDefinitions": [
    {
      "approvalsRequired": 1,
      "approvers": [
        {
          "userId": "e9ed20fd-d45f-4aad-8a00-a19bfba0083e"
        }
      ]
    }
  ]
}

Response

Responses from the approvalDefinition.update endpoint

OR

Example response

{
  "success": true,
  "results": {
    "id": "a4664a1d-b140-4da8-9a65-6efb8723f223",
    "entityType": "Offer",
    "entityId": "e78fffa1-6431-436f-a21a-004891b47ac5",
    "approvalSteps": [
      {
        "approvalsRequired": 1,
        "approvers": [
          {
            "type": "user",
            "userId": "aa256a6b-2d2a-4a42-aed5-a94321a4e180"
          }
        ]
      }
    ]
  }
}