---
title: "Activate a resthook subscription"
method: POST
path: "/v3/resthook_subscriptions/activate"
tags: ["Webhooks"]
---

# Activate a resthook subscription

`POST /v3/resthook_subscriptions/activate`

After creating a subscription, we'll send a POST request to your target URL with a `X-Hook-Secret` header. <br />
You should response to this with a 200 status code, and use the value of the `X-Hook-Secret` header that you received to activate the subscription using this endpoint.

## Headers

- `X-Hook-Secret` string, required

## Response `200`

Successfully activated a resthook subscription.

- ResthookSubscription
  - `id` integer, required — Resthook subscription's ID.
  - `event` 'resume.parse.succeeded' | 'resume.parse.failed' | 'resume.parse.completed' | 'invoice.parse.succeeded' | 'invoice.parse.failed' | 'invoice.parse.completed' | 'invoice.validate.completed' | 'document.parse.succeeded' | 'document.parse.failed' | 'document.parse.completed' | 'document.validate.completed' | 'document.classify.succeeded' | 'document.classify.failed' | 'document.classify.completed' | 'document.rejected' | 'annotation.validated', required — The event name to subscribe to.
  - `organization` Organization, required
    - `identifier` string, required — Uniquely identify an organization.
    - `name` string, required
    - `userRole` 'admin' | 'member', required
    - `avatar` string, nullable, required — URL of the organization's avatar.
    - `resthookSignatureKey` string, nullable, required — Used to sign webhook payloads so you can verify their integrity.
    - `isTrial` boolean, required
    - `validationToolConfig` object, nullable, required — Configuration of the embeddable validation tool.
      - `theme` ThemeConfig
        - `palette` object
          - `mode` 'light' | 'dark'
          - `background` union
            - string
            - object
              - …
          - `text` object
            - `primary` string
            - `secondary` string
            - `disabled` string
          - `divider` string
          - `primary` PaletteColorOptions
            - `main` string, required
            - `light` string
            - `dark` string
            - `contrastText` string
          - `secondary` PaletteColorOptions
            - `main` string, required
            - `light` string
            - `dark` string
            - `contrastText` string
          - `success` PaletteColorOptions
            - `main` string, required
            - `light` string
            - `dark` string
            - `contrastText` string
          - `annotation` PaletteColorOptions
            - `main` string, required
            - `light` string
            - `dark` string
            - `contrastText` string
          - `error` PaletteColorOptions
            - `main` string, required
            - `light` string
            - `dark` string
            - `contrastText` string
          - `info` PaletteColorOptions
            - `main` string, required
            - `light` string
            - `dark` string
            - `contrastText` string
          - `warning` PaletteColorOptions
            - `main` string, required
            - `light` string
            - `dark` string
            - `contrastText` string
        - `typography` object
          - `fontFamily` string
          - `fontSize` union
            - string
            - number
          - `fontWeightRegular` string
          - `fontWeightMedium` string
          - `fontWeightBold` string
        - `borderRadius` number
        - `fontUrl` string
      - `hideActions` boolean — Hide the confirm document button and other actions.
      - `hideCollection` boolean — Hide the collection selector.
      - `hideEditPages` boolean — Hide the edit pages button.
      - `hideExport` boolean — Hide the export menu.
      - `hideFilename` boolean — Hide the filename input.
      - `hideShowRawValues` boolean — Hide the toggle for showing raw annotation values.
      - `hideReject` boolean — Hide the reject document button.
      - `hideReparse` boolean — Hide the reparse button.
      - `hideRunOcr` boolean — Hide the run OCR button.
      - `hideTags` boolean — Hide the tags editor.
      - `hideWarnings` boolean — Hide the warnings panel.
      - `restrictDocumentSplitting` boolean — Disable the page editor after a document has been split once.
      - `disableCurrencyFormatting` boolean — Disable currency formatting of decimals values.
      - `disableEditDocumentMetadata` boolean — Disable editing document metadata. Makes the collection selector, filename input and tags editor read only.
      - `disableManualAnnotationEditing` boolean — Disable manual editing of annotation values via the validation popover.
      - `hideDocumentStatus` boolean — Hide the document status indicator in the toolbar.
    - `showCustomFieldCreation` boolean, required — Whether to show the custom field creation in the UI.
    - `allowDataSourceRecordCreation` boolean, required — Allow reviewers to create missing records from the data source selector. Keep disabled when data sources are managed by external system syncs.
  - `workspace` ResthookSubscriptionWorkspace, required
    - `identifier` string, required — Uniquely identify a workspace.
    - `name` string, required
    - `organization` Organization, required
      - `identifier` string, required — Uniquely identify an organization.
      - `name` string, required
      - `userRole` 'admin' | 'member', required
      - `avatar` string, nullable, required — URL of the organization's avatar.
      - `resthookSignatureKey` string, nullable, required — Used to sign webhook payloads so you can verify their integrity.
      - `isTrial` boolean, required
      - `validationToolConfig` object, nullable, required — Configuration of the embeddable validation tool.
        - `theme` ThemeConfig
          - `palette` object
            - `mode` 'light' | 'dark'
            - `background` union
              - …
            - `text` object
              - …
            - `divider` string
            - `primary` PaletteColorOptions
              - …
            - `secondary` PaletteColorOptions
              - …
            - `success` PaletteColorOptions
              - …
            - `annotation` PaletteColorOptions
              - …
            - `error` PaletteColorOptions
              - …
            - `info` PaletteColorOptions
              - …
            - `warning` PaletteColorOptions
              - …
          - `typography` object
            - `fontFamily` string
            - `fontSize` union
              - …
            - `fontWeightRegular` string
            - `fontWeightMedium` string
            - `fontWeightBold` string
          - `borderRadius` number
          - `fontUrl` string
        - `hideActions` boolean — Hide the confirm document button and other actions.
        - `hideCollection` boolean — Hide the collection selector.
        - `hideEditPages` boolean — Hide the edit pages button.
        - `hideExport` boolean — Hide the export menu.
        - `hideFilename` boolean — Hide the filename input.
        - `hideShowRawValues` boolean — Hide the toggle for showing raw annotation values.
        - `hideReject` boolean — Hide the reject document button.
        - `hideReparse` boolean — Hide the reparse button.
        - `hideRunOcr` boolean — Hide the run OCR button.
        - `hideTags` boolean — Hide the tags editor.
        - `hideWarnings` boolean — Hide the warnings panel.
        - `restrictDocumentSplitting` boolean — Disable the page editor after a document has been split once.
        - `disableCurrencyFormatting` boolean — Disable currency formatting of decimals values.
        - `disableEditDocumentMetadata` boolean — Disable editing document metadata. Makes the collection selector, filename input and tags editor read only.
        - `disableManualAnnotationEditing` boolean — Disable manual editing of annotation values via the validation popover.
        - `hideDocumentStatus` boolean — Hide the document status indicator in the toolbar.
      - `showCustomFieldCreation` boolean, required — Whether to show the custom field creation in the UI.
      - `allowDataSourceRecordCreation` boolean, required — Allow reviewers to create missing records from the data source selector. Keep disabled when data sources are managed by external system syncs.
  - `targetUrl` string, required — URL of the resthook's receiver.
  - `active` boolean, required — Resthooks only fire for active subscriptions.
  - `autoDeactivated` boolean, required — Resthook subscriptions can be auto deactivated if the receiver continuously returns error status code over a period of time.
  - `autoDeactivateReason` string, required — The reason for the subscription being auto deactivated. May contains the error response that the receiver returned.
  - `version` 'v1' | 'v2' | 'v3', required — Version of the resthook subscription. Determines the resthook body being fired.

## Other responses

- `400` — Bad request. If it is a validation error will contain a list of each invalid field
- `401` — Authorisation error
- `default` — UnexpectedError

---

[API](https://skmtc.net/affinda/apis/affinda-api.md) · [All operations](https://skmtc.net/affinda/apis/affinda-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/affinda/affinda-api/versions/5f71e092a3e8/schema)
