# Webhook Payload Schema Reference

This reference describes each of the properties of the webhook payload schema.

The payload schema defines the structure of the data that you can pass in the webhook payload. Apono uses the [Handlebars](https://handlebarsjs.com/guide/) templating language to format expressions for certain data fields.

```json
{
  "event_type": "string",
  "event_time": "{seconds}.{nanos}",
  "data": {
    "id": "string",
    "friendly_id": "string",
    "requester": {
      "id": "string",
      "name": "string",
      "email": "string"
    },
    "grantee": {
      "id": "string",
      "source_id": "string",
      "name": "string",
      "type": "string"
    },
    "justification": "string",
    "creation_date": "{seconds}.{nanos}",
    "revocation_date": "number",
    "access_flow": {
      "id": "string",
      "name": "string"
    },
    "access_bundle": {
      "id": "string",
      "name": "string"
    },
    "access_duration_in_seconds": "number",
    "access_groups": [
      {
        "integration": {
          "id": "string",
          "type": "string",
          "name": "string"
        },
        "resource_types": [
          {
            "id": "string",
            "name": "string",
            "display_path": "string"
          }
        ],
        "access_units": [
          {
            "resource": {
              "id": "string",
              "name": "string",
              "path": "string",
              "type": {
                "id": "string",
                "name": "string",
                "display_path": "string"
              }
            },
            "permission": {
              "id": "string",
              "name": "string"
            }
          }
        ]
      }
    ],
    "approvals_logical_relation": "string",
    "approvals": [
      {
        "name": "string",
        "type": "string",
        "status": "string",
        "approver": {
          "id": "string",
          "name": "string",
          "email": "string"
        }
      }
    ],
    "custom_fields": {}
  }
}
```

| Property               | Description                                                                                                                                                                                  |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **event\_type** string | Webhook trigger, corresponding to different [access request statuses](https://docs.apono.io/docs/access-requests-and-approvals/web-portal/requesting-access-with-web-portal#access-statuses) |
| **event\_time** float  | Time of the event occurrence in epoch seconds.milliseconds                                                                                                                                   |
| **data** object        | <p>Field containing an embedded object with contextual information about the triggering event<br><br>See <a href="#data-object">data object</a>.</p>                                         |

### data object

| Property                                | Description                                                                                                                                                                                                                           |
| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **id** string                           | Apono request ID                                                                                                                                                                                                                      |
| **friendly\_id** string                 | Human-readable ID that also appears in the Apono UI                                                                                                                                                                                   |
| **grantee** object                      | <p>Metadata about the recipient of requested access</p><p>See <a href="#data.grantee-object">data.grantee object</a></p>                                                                                                              |
| **requester** object                    | <p>Metadata about the user requesting access<br><br>See <a href="#data.requester-object">data.requester object</a></p>                                                                                                                |
| **justification** string                | Reason provided by requester for needing access                                                                                                                                                                                       |
| **creation\_date** float                | Date the access request was created in epoch seconds.milliseconds                                                                                                                                                                     |
| **revocation\_date** float              | Date the access request was [revoked](https://docs.apono.io/docs/access-flows/revoking-access) in epoch seconds.milliseconds                                                                                                          |
| **access\_flow** object                 | <p>Metadata about a related <a href="../../access-flows/access-flows">access flow</a><br><br>See <a href="#data.access_flow-object">data.access\_flow object</a></p>                                                                  |
| **access\_bundle** object               | <p>Metadata about a related <a href="../../access-flows/create-bundles">access bundle</a><br><br>See <a href="#data.access_bundle-object">data.access\_bundle object</a></p>                                                          |
| **access\_groups** object               | <p>Metadata about related <a href="../../getting-started/integrating-with-apono">integrations</a> and resources that the requester wants to access<br><br>See <a href="#data.access_groups-object">data.access\_groups object</a></p> |
| **approvals\_logical\_relation** string | Whether the request requires one approver (`AnyOf` value) or all approvers within a group (`AllOf` value)                                                                                                                             |
| **approvals** object                    | <p>Metadata about approved access requests<br><br>See <a href="#data.approvals-object">data.approvals object</a></p>                                                                                                                  |

#### **data.grantee object**

| Property              | Description                                               |
| --------------------- | --------------------------------------------------------- |
| **id** string         | Grantee's Apono ID                                        |
| **source\_id** string | Grantee's ID, such as email or cloud provider ID like ARN |
| **name** string       | Grantee's Apono username                                  |
| **type** string       | Identifies if the grantee is a human or machine           |

#### **data.requester object**

| Property         | Description                |
| ---------------- | -------------------------- |
| **id** string    | Requester's Apono ID       |
| **name** string  | Requester’s Apono username |
| **email** string | Requester’s email address  |

#### **data.access\_flow object**

| Property        | Description                               |
| --------------- | ----------------------------------------- |
| **id** string   | Apono ID for the access flow              |
| **name** string | Customer-created name for the access flow |

#### **data.access\_bundle object**

| Property        | Description                                 |
| --------------- | ------------------------------------------- |
| **id** string   | Apono ID for the access bundle              |
| **name** string | Customer-created name for the access bundle |

#### **data.access\_groups object**

| Property                   | Description                                                                                                                                                                                                  |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **integration** object     | <p>Metadata about the integration that the requester wants to access<br><br>See <a href="#data.access_groups.integration-object">data.access\_groups.integration object</a></p>                              |
| **resource\_types** object | <p>Metadata about the resource types that the requester wants to access<br><br>See <a href="#data.access_groups.resource_types-object">data.access\_groups.resource\_types object</a></p>                    |
| **access\_units** object   | <p>Metadata about the requested access unit, which is a pairing of a resource and a permission<br><br>See <a href="#data.access_groups.access_units-object">data.access\_groups.access\_units object</a></p> |

#### **data.access\_groups.integration object**

| Property        | Description                                                          |
| --------------- | -------------------------------------------------------------------- |
| **id** string   | Apono ID of the integration                                          |
| **type** string | Type of resource the requester wants to access, such as *Postgresql* |
| **name** string | Customer-created resource name                                       |

#### **data.access\_groups.resource\_types object**

| Property                 | Description                                                                                                                                                                      |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **id** string            | Apono ID of the integration                                                                                                                                                      |
| **name** string          | Display name for the resource                                                                                                                                                    |
| **display\_path** string | <p>Logical, hierarchical container for the resource<br><br>For example, the display path for an AWS bucket resource type might be <code>AWS-account/us-east/bucket/E2</code></p> |

#### **data.access\_groups.access\_units object**

| Property               | Description                                                                                                                                                                                          |
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **resource** object    | <p>Metadata about the resource the requester wants to access<br><br>See <a href="#data.access_groups.access_units.resource-object">data.access\_groups.access\_units.resource object</a></p>         |
| **permissions** object | <p>Metadata about resource permission granted to the requester<br><br>See <a href="#data.access_groups.access_units.permissions-object">data.access\_groups.access\_units.permissions object</a></p> |

#### **data.access\_groups.access\_units.resource object**

| Property        | Description                                                                                                                                                                                                 |
| --------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **id** string   | Apono ID of the resource                                                                                                                                                                                    |
| **name** string | Customer-created name for the resource                                                                                                                                                                      |
| **path** string | <p>Physical path of the resource<br><br>For example, the path of a database would be <code>database-name/table-name</code></p>                                                                              |
| **type** object | <p>Metadata about the resource type the requester wants to access<br><br>See <a href="#data.access_groups.access_units.resource.type-object">data.access\_groups.access\_units.resource.type object</a></p> |

#### **data.access\_groups.access\_units.resource.type object**

| Property                 | Description                                                                                                                                                                       |
| ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **id** string            | Apono ID of the resource type                                                                                                                                                     |
| **name** string          | Name of the resource type                                                                                                                                                         |
| **display\_path** string | <p>Logical, hierarchical container for the resource<br><br>For example, the display path for an AWS bucket resource type might be <code>AWS-account/us-east/bucket/E2</code>.</p> |

#### **data.access\_groups.access\_units.permissions object**

| Property        | Description                                                           |
| --------------- | --------------------------------------------------------------------- |
| **id** string   | Apono ID for the permission                                           |
| **name** string | Name of the permission granted to the requester, such as **ReadOnly** |

#### **data.approvals object**

| Property            | Description                                                                                                                                                                                      |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **name** string     | <p>Name of the entity approving the request, which could be:</p><ul><li>A person</li><li>A group, such as an Okta group</li><li>A work shift</li><li>The word <strong>Manager</strong></li></ul> |
| **type** string     | <p>Type of approver<br><br><strong>Possible values</strong>:</p><ul><li>Person</li><li>Group, such as an Okta group</li><li>Shift, such as an on-call shift</li><li>Manager</li></ul>            |
| **status** string   | <p>Status of the request<br><br><strong>Possible values</strong>:</p><ul><li>Approved</li><li>Rejected</li><li>Pending</li></ul>                                                                 |
| **approver** object | <p>Metadata about the person approving the access request<br><br>See <a href="#data.approvals.approver-object">data.approvals.approver object</a></p>                                            |

#### **data.approvals.approver object**
