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

# Create Webhook

> Register a new webhook subscription.

**Handshake:** on create, Everhour sends a POST to the supplied `targetUrl` with an `X-Hook-Secret` header (HMAC-SHA512) and an empty body. The receiver must respond with a 2xx status to complete verification. Send `X-Skip-Handshake: 1` to skip verification when the receiver cannot participate.

**Scope:** a webhook can listen across the whole team or be scoped to a single project. See [Webhooks](/webhooks) for event types, payload structure, and delivery semantics.



## OpenAPI

````yaml /openapi.json post /hooks
openapi: 3.1.1
info:
  title: Everhour API
  version: 1.0.0
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://api.everhour.com
security:
  - ApiKeyAuth: []
tags:
  - name: Clients
  - name: Custom Fields
  - name: Expenses
  - name: Invoices
  - name: Projects
  - name: Reports
  - name: Schedule
  - name: Tasks
  - name: Time Off
  - name: Time Records
  - name: Timecards
  - name: Timers
  - name: Timesheets
  - name: Users
  - name: Webhooks
paths:
  /hooks:
    post:
      tags:
        - Webhooks
      summary: Create Webhook
      description: >-
        Register a new webhook subscription.


        **Handshake:** on create, Everhour sends a POST to the supplied
        `targetUrl` with an `X-Hook-Secret` header (HMAC-SHA512) and an empty
        body. The receiver must respond with a 2xx status to complete
        verification. Send `X-Skip-Handshake: 1` to skip verification when the
        receiver cannot participate.


        **Scope:** a webhook can listen across the whole team or be scoped to a
        single project. See [Webhooks](/webhooks) for event types, payload
        structure, and delivery semantics.
      operationId: createWebhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookRequestCreateRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '401':
          description: Unauthorized
components:
  schemas:
    WebhookRequestCreateRequest:
      type: object
      properties:
        targetUrl:
          type: string
          description: URL that receives event POSTs.
          example: https://some-secure-endpoint.com/path
        events:
          type: array
          description: Events you want to receive.
          items:
            type: string
          example:
            - api:time:updated
        project:
          type:
            - string
            - 'null'
          description: Restrict the subscription to a single project.
          example: ev:12345657890
      required:
        - targetUrl
        - events
    Webhook:
      type: object
      properties:
        id:
          type: number
          description: Webhook ID
          example: 12345
        targetUrl:
          type: string
          example: https://some-secure-endpoint.com/path
        events:
          type: array
          items:
            type: string
          example:
            - api:time:updated
        project:
          type:
            - string
            - 'null'
          description: You can receive events only for specific project
          example: ev:12345657890
        active:
          type: boolean
          example: true
        createdAt:
          type: string
          description: 'Datetime when webhook was created (format: Y-m-d H:i:s)'
          example: '2018-03-05 16:17:14'
        lastUsedAt:
          type: string
          description: 'Datetime when webhook was last used (format: Y-m-d H:i:s)'
          example: '2018-03-05 20:01:58'
      required:
        - id
        - targetUrl
        - events
        - createdAt
        - lastUsedAt
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-Api-Key

````