Approvals

List approval flows

get
Authorizations
Path parameters
organizationIdstringrequired

The organization ID

Query parameters
pageTokenstringoptional

Pagination token that keeps of track of the current position in the list

limitinteger · min: 1 · max: 100 · default: 10optional

Limits the number of results to return

reverseboolean · default: falseoptional

Order in which to retrieve the results

statusstring · enum · default: "active"optional
Options: active, deleted
objectTypestring · mrnoptional

The identifier of the object

objectActionstring · enumoptional

The action performed on the object

Options: create, update, delete
tagsstringoptional
Responses
curl -L \
  --url '/organizations/{organizationId}/approvals' \
  --header 'Authorization: Bearer jwt'
{
  "results": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "organizationId": "123e4567-e89b-12d3-a456-426614174000",
      "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
      "ownerId": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "description": "text",
      "objectType": "text",
      "objectAction": "create",
      "steps": [
        {
          "type": "any",
          "users": [
            "123e4567-e89b-12d3-a456-426614174000"
          ],
          "reviewers": [
            {
              "type": "user",
              "id": "123e4567-e89b-12d3-a456-426614174000"
            }
          ],
          "message": "text"
        }
      ],
      "createdAt": "2025-03-29T02:33:15.344Z",
      "updatedAt": "2025-03-29T02:33:15.344Z",
      "tags": [
        {
          "key": "text",
          "value": "text"
        }
      ]
    }
  ],
  "nextPageToken": "text"
}

Create approval flow

post
Authorizations
Path parameters
organizationIdstringrequired

The organization ID

Body
namestringrequired
descriptionstringrequired
objectTypestring · mrnrequired

The identifier of the object

objectActionstring · enumrequired

The action performed on the object

Options: create, update, delete
tagsobject[]optional

A tag that can be used to identify this flow.

stepsobject[] · min: 1required

Responses
curl -L \
  --request POST \
  --url '/organizations/{organizationId}/approvals' \
  --header 'Authorization: Bearer jwt' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "text",
    "description": "text",
    "objectType": "text",
    "objectAction": "create",
    "tags": [
      {
        "key": "text",
        "value": "text"
      }
    ],
    "steps": [
      {
        "type": "any",
        "users": [
          "123e4567-e89b-12d3-a456-426614174000"
        ],
        "reviewers": [
          {
            "type": "user",
            "id": "123e4567-e89b-12d3-a456-426614174000"
          }
        ],
        "message": "text"
      }
    ]
  }'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "organizationId": "123e4567-e89b-12d3-a456-426614174000",
  "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
  "ownerId": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "description": "text",
  "objectType": "text",
  "objectAction": "create",
  "steps": [
    {
      "type": "any",
      "users": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "reviewers": [
        {
          "type": "user",
          "id": "123e4567-e89b-12d3-a456-426614174000"
        }
      ],
      "message": "text"
    }
  ],
  "createdAt": "2025-03-29T02:33:15.344Z",
  "updatedAt": "2025-03-29T02:33:15.344Z",
  "tags": [
    {
      "key": "text",
      "value": "text"
    }
  ]
}

Retrieve approval flow

get
Authorizations
Path parameters
organizationIdstringrequired

The organization ID

approvalIdstring · uuidrequired
Responses
curl -L \
  --url '/organizations/{organizationId}/approvals/{approvalId}' \
  --header 'Authorization: Bearer jwt'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "organizationId": "123e4567-e89b-12d3-a456-426614174000",
  "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
  "ownerId": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "description": "text",
  "objectType": "text",
  "objectAction": "create",
  "steps": [
    {
      "type": "any",
      "users": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "reviewers": [
        {
          "type": "user",
          "id": "123e4567-e89b-12d3-a456-426614174000"
        }
      ],
      "message": "text"
    }
  ],
  "createdAt": "2025-03-29T02:33:15.344Z",
  "updatedAt": "2025-03-29T02:33:15.344Z",
  "tags": [
    {
      "key": "text",
      "value": "text"
    }
  ]
}

Delete approval flow

delete
Authorizations
Path parameters
organizationIdstringrequired

The organization ID

approvalIdstring · uuidrequired
Responses
curl -L \
  --request DELETE \
  --url '/organizations/{organizationId}/approvals/{approvalId}' \
  --header 'Authorization: Bearer jwt'

No body

Update approval flow

patch
Authorizations
Path parameters
organizationIdstringrequired

The organization ID

approvalIdstring · uuidrequired
Body
namestringoptional
descriptionstringoptional
objectTypestringoptional
objectActionstring · enumoptional
Options: create, update, delete
stepsobject[] · min: 1optional

Responses
curl -L \
  --request PATCH \
  --url '/organizations/{organizationId}/approvals/{approvalId}' \
  --header 'Authorization: Bearer jwt' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "text",
    "description": "text",
    "objectType": "text",
    "objectAction": "create",
    "steps": [
      {
        "type": "any",
        "users": [
          "123e4567-e89b-12d3-a456-426614174000"
        ],
        "reviewers": [
          {
            "type": "user",
            "id": "123e4567-e89b-12d3-a456-426614174000"
          }
        ],
        "message": "text"
      }
    ]
  }'
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "organizationId": "123e4567-e89b-12d3-a456-426614174000",
  "workspaceId": "123e4567-e89b-12d3-a456-426614174000",
  "ownerId": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "description": "text",
  "objectType": "text",
  "objectAction": "create",
  "steps": [
    {
      "type": "any",
      "users": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "reviewers": [
        {
          "type": "user",
          "id": "123e4567-e89b-12d3-a456-426614174000"
        }
      ],
      "message": "text"
    }
  ],
  "createdAt": "2025-03-29T02:33:15.344Z",
  "updatedAt": "2025-03-29T02:33:15.344Z",
  "tags": [
    {
      "key": "text",
      "value": "text"
    }
  ]
}

Last updated

Was this helpful?