Approvals

List approval flows

get

/organizations/{organizationId}/approvals

Authorizations
Path parameters
organizationIdstringrequired

The organization ID

Query parameters
pageTokenstring

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

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

Limits the number of results to return

reverseboolean

Order in which to retrieve the results

statusstring · enum · default: active
Options: active, deleted
objectTypestring · mrn

The identifier of the object

objectActionstring · enum

The action performed on the object

Options: create, update, delete
tagsstring
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",
      "createdAt": "2025-02-21T18:02:51.359Z",
      "updatedAt": "2025-02-21T18:02:51.359Z",
      "tags": [
        {
          "key": "text",
          "value": "text"
        }
      ],
      "steps": [
        {
          "message": "text",
          "type": "any",
          "users": [
            "123e4567-e89b-12d3-a456-426614174000"
          ],
          "reviewers": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "type": "user"
            }
          ]
        }
      ]
    }
  ],
  "nextPageToken": "text"
}

Create approval flow

post

/organizations/{organizationId}/approvals

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
tagsApprovalFlowIdentifierTag[]
stepsobject[]required
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":[null],"reviewers":[{"id":"123e4567-e89b-12d3-a456-426614174000","type":"user"}]}]}'
{
  "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",
  "createdAt": "2025-02-21T18:02:51.359Z",
  "updatedAt": "2025-02-21T18:02:51.359Z",
  "tags": [
    {
      "key": "text",
      "value": "text"
    }
  ],
  "steps": [
    {
      "message": "text",
      "type": "any",
      "users": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "reviewers": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "type": "user"
        }
      ]
    }
  ]
}

Retrieve approval flow

get

/organizations/{organizationId}/approvals/{approvalId}

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",
  "createdAt": "2025-02-21T18:02:51.359Z",
  "updatedAt": "2025-02-21T18:02:51.359Z",
  "tags": [
    {
      "key": "text",
      "value": "text"
    }
  ],
  "steps": [
    {
      "message": "text",
      "type": "any",
      "users": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "reviewers": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "type": "user"
        }
      ]
    }
  ]
}

Delete approval flow

delete

/organizations/{organizationId}/approvals/{approvalId}

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

/organizations/{organizationId}/approvals/{approvalId}

Authorizations
Path parameters
organizationIdstringrequired

The organization ID

approvalIdstring · uuidrequired
Body
namestring
descriptionstring
objectTypestring
objectActionstring · enum
Options: create, update, delete
stepsobject[]
Responses
curl -L \
  --request PATCH \
  --url '/organizations/{organizationId}/approvals/{approvalId}' \
  --header 'Authorization: Bearer jwt' \
  --header 'Content-Type: application/json' \
  --data '{"objectAction":"create","steps":[{"type":"any","users":[null],"reviewers":[{"id":"123e4567-e89b-12d3-a456-426614174000","type":"user"}]}]}'
{
  "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",
  "createdAt": "2025-02-21T18:02:51.359Z",
  "updatedAt": "2025-02-21T18:02:51.359Z",
  "tags": [
    {
      "key": "text",
      "value": "text"
    }
  ],
  "steps": [
    {
      "message": "text",
      "type": "any",
      "users": [
        "123e4567-e89b-12d3-a456-426614174000"
      ],
      "reviewers": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "type": "user"
        }
      ]
    }
  ]
}

Last updated

Was this helpful?