Skip to main content
POST
/
delegations
cURL
curl --request POST \
  --url https://api.opal.dev/v1/delegations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "delegator_user_id": "123e4567-e89b-12d3-a456-426614174000",
  "delegate_user_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
  "start_time": "2023-10-01T12:00:00.000Z",
  "end_time": "2023-10-01T12:00:00.000Z",
  "reason": "I need to be out of the office"
}'
{
  "id": "4aed3e8a-727b-4d72-8010-3b8710c50bec",
  "delegator_user_id": "123e4567-e89b-12d3-a456-426614174000",
  "delegate_user_id": "7c86c85d-0651-43e2-a748-d69d658418e8",
  "start_time": "2023-10-01T12:00:00.000Z",
  "end_time": "2023-10-01T12:00:00.000Z",
  "reason": "I need to be out of the office",
  "created_at": "2023-10-01T12:00:00.000Z",
  "updated_at": "2023-10-01T12:00:00.000Z"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Request body for creating a new delegation of access review requests from one user to another.

delegator_user_id
string<uuid>
required

The ID of the user delegating their access review requests.

Example:

"123e4567-e89b-12d3-a456-426614174000"

delegate_user_id
string<uuid>
required

The ID of the user being delegated to.

Example:

"7c86c85d-0651-43e2-a748-d69d658418e8"

start_time
string<date-time>
required

The start time of the delegation.

Example:

"2023-10-01T12:00:00.000Z"

end_time
string<date-time>
required

The end time of the delegation.

Example:

"2023-10-01T12:00:00.000Z"

reason
string
required

The reason for the delegation.

Example:

"I need to be out of the office"

Response

200 - application/json

Delegation created successfully.

Delegation Object

Description

The Delegation object represents a delegation of access review requests from one user to another.

Usage Example

List from the GET Delegations endpoint. Get from the GET Delegation endpoint.

id
string<uuid>
required

The ID of the delegation.

Example:

"4aed3e8a-727b-4d72-8010-3b8710c50bec"

delegator_user_id
string<uuid>
required

The ID of the user delegating their access review requests.

Example:

"123e4567-e89b-12d3-a456-426614174000"

delegate_user_id
string<uuid>
required

The ID of the user being delegated to.

Example:

"7c86c85d-0651-43e2-a748-d69d658418e8"

start_time
string<date-time>
required

The start time of the delegation.

Example:

"2023-10-01T12:00:00.000Z"

end_time
string<date-time>
required

The end time of the delegation.

Example:

"2023-10-01T12:00:00.000Z"

reason
string
required

The reason for the delegation.

Example:

"I need to be out of the office"

created_at
string<date-time>
required

The creation time of the delegation.

Example:

"2023-10-01T12:00:00.000Z"

updated_at
string<date-time>
required

The last updated time of the delegation.

Example:

"2023-10-01T12:00:00.000Z"