Skip to main content
POST
/
v2
/
approval-delegations
Create Approval Delegation
curl --request POST \
  --url https://public.api.serval.com/v2/approval-delegations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "delegates": [
    {
      "type": "APPROVAL_DELEGATE_TYPE_UNSPECIFIED",
      "id": "<string>"
    }
  ],
  "delegatorUserId": "<string>",
  "priority": 123,
  "description": "<string>"
}
'
{
  "data": {
    "id": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "delegatorUserId": "<string>",
    "delegates": [
      {
        "type": "APPROVAL_DELEGATE_TYPE_UNSPECIFIED",
        "id": "<string>"
      }
    ],
    "priority": 123,
    "description": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
delegates
ApprovalDelegate · object[]
required

The delegates who can approve on behalf of the delegator.

delegatorUserId
string | null

The ID of the user who is delegating their approvals. When omitted, defaults to the authenticated user.

priority
integer<int32>

The priority of the delegation rule (lower values are higher priority).

description
string

A description of the delegation rule.

Response

Success

data
data · object

An approval delegation rule that allows a user to delegate their approval responsibilities.