> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Admin By Request Webhook Setup Guide

> Register the StackOne webhook URL in Admin By Request so its events reach StackOne and your subscribed webhooks.

## Prerequisites

The connector should already be set up, with a Connector Profile and a Linked Account. See [Getting Started](https://docs.stackone.com/connectors/adminbyrequest.md#getting-started) on the Admin By Request connector page.

## Send Admin By Request events to StackOne

Each Admin By Request webhook pushes one type of data. Create one webhook for each event you want to receive, all pointing at the same Native Webhook URL with that event's `event` value added.

**1. Copy the Native Webhook URL**

On the linked account in StackOne, copy the **Native Webhook URL**.

**2. Choose the data to push**

Sign in to the [Admin By Request portal](https://www.adminbyrequest.com/Login) and open **Settings** > **Tenant Settings**.

<ul>
  <li>Click **Data**.</li>
  <li>Open the **Webhooks** tab.</li>
  <li>Click **Create Webhook**.</li>
  <li>**Enabled**: **ON**</li>
  <li>**Name**: a name that identifies the event, for example `StackOne - Event: New event`</li>
  <li>**Push Data**: the event to send, for example **Event: New event**</li>
</ul>

![Admin By Request Webhook form with the Push Data list open and Event New event highlighted](https://mintcdn.com/stackone-60/v1XsPhsuviGJ_fR7/connectors/adminbyrequest/images/events-push-data.png?fit=max\&auto=format\&n=v1XsPhsuviGJ_fR7\&q=85\&s=f7797283b6181389d592c0e506e9d248)

**3. Set Pushed Events for security events**

When **Push Data** is **Event: New event**, the form adds **Pushed Events**, set to **Alerts only**. Information and warning events are only pushed when you widen it.

<ul>
  <li>**Pushed Events**: **All events**</li>
  <li>Skip this step for the other **Push Data** types.</li>
</ul>

![Admin By Request Webhook form with Pushed Events set to All events](https://mintcdn.com/stackone-60/v1XsPhsuviGJ_fR7/connectors/adminbyrequest/images/events-pushed-events.png?fit=max\&auto=format\&n=v1XsPhsuviGJ_fR7\&q=85\&s=045205b458493743e0589c865aa14ff5)

**4. Enter the URL and save**

Each webhook sends to the Native Webhook URL with its event's value added.

<ul>
  <li>**URL**: the Native Webhook URL followed by `?event=` and the event's value from the event list, for example `?event=event.new_event`. If the Native Webhook URL already contains `?`, add `&event=` instead.</li>
  <li>Leave **Add headers** off.</li>
  <li>Click **Save**.</li>
  <li>Repeat these steps for each other event you want, choosing its **Push Data** type and its own `event` value.</li>
</ul>

![Admin By Request Webhook form with the Native Webhook URL in the URL field and the Save button highlighted](https://mintcdn.com/stackone-60/v1XsPhsuviGJ_fR7/connectors/adminbyrequest/images/events-url-save.png?fit=max\&auto=format\&n=v1XsPhsuviGJ_fR7\&q=85\&s=f8778dd31882e60b2e8d83a23428449b)

## Available webhook events

These Admin By Request events can be enabled. Only events turned on in StackOne are delivered, and each one needs its own webhook in the portal with the `event` value shown in backticks.

**1. Request events**

Events for elevation requests (Run As Admin, Admin Session, Server Session).

<ul>
  <li>**Request: New request** (`request.new_request`) — Fired when a user submits a request that needs approval</li>
  <li>**Request: Approved** (`request.approved`) — Fired when a request is approved</li>
  <li>**Request: Denied** (`request.denied`) — Fired when a request is denied, with the denial reason</li>
</ul>

**2. Auditlog events**

Events for auditlog entries.

<ul>
  <li>**Auditlog: New entry** (`auditlog.new_entry`) — Fired when a new auditlog entry is created</li>
  <li>**Auditlog: Entry change** (`auditlog.entry_change`) — Fired when an auditlog entry is created or changes, for example when its request is approved or denied</li>
</ul>

**3. Security events**

Events raised on managed computers, such as local admin changes, PIN codes and blocked files.

<ul>
  <li>**Event: New event** (`event.new_event`) — Fired when a new security event is logged; the levels sent follow the webhook's **Pushed Events** setting</li>
</ul>

## Delivery format

Details of how Admin By Request delivers events to StackOne.

**1. One record per request**

Each request carries one record in the same JSON format as the Admin By Request public API: a request, an auditlog entry or a security event. The body has no event type field, so the `event` value in the URL identifies the event.

<ul>
  <li>A new request usually sends **Auditlog: Entry change** as well as **Auditlog: New entry** and **Request: New request**</li>
  <li>Security events carry `eventCode` and `eventLevel` (0 information, 1 warning, 2 alert)</li>
</ul>

## Verify

Your Connector should now be able to receive and process events. Try triggering an event and you should see an Event appear in the Connector logs.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.