---
title: "Add A New Webhook"
method: POST
path: "/webhooks"
tags: ["Webhooks"]
---

# Add A New Webhook

`POST /webhooks`

Create a new Webhook on your account. Creating a Webhook will require an endpoint URL, a path, what events should trigger a webhook, and what request version to use.

## Headers

- `ev-api-key` string, required
- `ev-access-token` string, required

## Request body

- object
  - `endpointUrl` string, uri, required — The endpoint is where the webhook request will be sent.
  - `triggers` WebhookTriggers
    - `resources` object
      - `upload` boolean — Send webhook messages when resources are uploaded.
      - `download` boolean — Send webhook messages when resources are downloaded.
      - `delete` boolean — Send webhook messages when resources are deleted
      - `rename` boolean — Send webhook messages when resources are renamed.
      - `copy` boolean — Send webhook messages when resources are copied.
      - `move` boolean — Send webhook messages when resources are moved.
      - `compress` boolean — Send webhook messages when resources are compressed into an archive.
      - `extract` boolean — Send webhook messages when resources are extracted from an archive.
      - `createFolder` boolean — Send webhook messages when a new folder is created.
    - `shares` object
      - `formSubmit` boolean — Send webhook messages when a receive folder form is submitted.
  - `resource` string — Resource identifier for the top folder this webhook is associated with
  - `responseVersion` 'v1' | 'v2' — What version of webhook request should be sent to the endpoint URL when messages are sent

## Response `201`

Created

- WebhookResponse
  - `responseStatus` integer — Http status code of the response.
  - `data` Webhook[]
    - `id` integer
    - `type` string — Type of thing it is. "webhook"
    - `attributes` WebhookAttributes
      - `endpointUrl` string, uri — The endpoint is where the webhook request will be sent.
      - `failed` boolean — Whether webhook has been disabled for too many consecutive failures
      - `verificationToken` string — Token for verifying sender is ExaVault
      - `responseVersion` 'v1' | 'v2' — The version of webhook request to send to the endpoint URL
      - `triggers` WebhookTriggers
        - `resources` object
          - `upload` boolean — Send webhook messages when resources are uploaded.
          - `download` boolean — Send webhook messages when resources are downloaded.
          - `delete` boolean — Send webhook messages when resources are deleted
          - `rename` boolean — Send webhook messages when resources are renamed.
          - `copy` boolean — Send webhook messages when resources are copied.
          - `move` boolean — Send webhook messages when resources are moved.
          - `compress` boolean — Send webhook messages when resources are compressed into an archive.
          - `extract` boolean — Send webhook messages when resources are extracted from an archive.
          - `createFolder` boolean — Send webhook messages when a new folder is created.
        - `shares` object
          - `formSubmit` boolean — Send webhook messages when a receive folder form is submitted.
      - `created` string, date-time — Timestamp when webhook configuration was added to system.
      - `modified` string, date-time — Timestamp when webhook configuration was last modified
    - `relationships` object
      - `ownerAccount` object
        - `data` object
          - `type` string — Type of thing it is "account"
          - `id` integer — Account ID
      - `resource` object
        - `data` object
          - `type` string — Type of thing it is. "resource"
          - `id` integer — ID of the resource associated with the webhook
  - `included` union[]
    - union
      - Account — Object contains all account properties.
        - `id` integer — Account ID
        - `type` 'account' — Type of item. "account"
        - `attributes` AccountAttributes — unresolved $ref
        - `relationships` object
          - `masterUser` object
            - `data` object
              - …
      - Resource — All properties of the resource.
        - `id` integer
        - `type` 'resource' — Type of item. "resource"
        - `attributes` ResourceAttributes — Attributes of resource
          - `hash` string — Unique hash of the resource.
          - `name` string — Resource name, e.g. the name of the file or folder.
          - `extension` string — Resource extension. Property exists only if resource `type` is file.
          - `type` 'file' | 'dir' — Type of the resource.
          - `createdBy` string — Username of the creator.
          - `uploadDate` string, date-time — Timestamp of resource upload.
          - `createdAt` string, date-time — Date-time of resource creation.
          - `updatedAt` string, date-time — Date-time of resource modification.
          - `accessedAt` string, date-time — Date-time of the time when resource was accessed.
          - `createdTime` integer — UNIX timestamp of resource creation
          - `updatedTime` integer — UNIX timestamp of resource modification
          - `accessedTime` integer — UNIX timestamp of last access
          - `path` string — Full path to the resource.
          - `size` integer — Resource size in bytes
          - `fileCount` integer — Number of files within folder. null if resource type is a file.
          - `previewable` true | false — Can resource be previewed. Property equals `null` if resource `type` is dir.
        - `relationships` object
          - `share` object
            - `data` object
              - …
          - `notifications` object[]
            - `data` object
              - …
          - `directFile` object
            - `data` object
              - …
          - `parentResource` object
            - `data` object
              - …

---

[API](https://skmtc.net/prismic/apis/exavault-api.md) · [All operations](https://skmtc.net/prismic/apis/exavault-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/prismic/exavault-api/revisions/a1bd874b5960/schema)
