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

# Register Webhook



## OpenAPI

````yaml /api-reference/openapi.yaml post /v2/webhooks/register
openapi: 3.0.3
info:
  title: Rise
  description: Web3-enabled payroll and compliance for the modern workforce
  version: 2.0.0
servers:
  - url: https://b2b-api.dev-riseworks.io
    description: Development
  - url: https://integrations-api.staging-riseworks.io
    description: Staging
  - url: https://integrations-api.riseworks.io
    description: Production
security: []
paths:
  /v2/webhooks/register:
    post:
      tags:
        - B2B Webhooks
      summary: Register Webhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                company_nanoid:
                  type: string
                  minLength: 15
                  maxLength: 15
                  pattern: ^co-.*
                  description: Unique identifier of the company.
                team_nanoid:
                  description: Unique identifier of the team.
                  type: string
                  minLength: 15
                  maxLength: 15
                  pattern: ^te-.*
                url:
                  type: string
                  format: uri
                webhook_version:
                  default: v2
                  description: >-
                    v2: HMAC-signed payloads (requires secret and events). v1:
                    Ethereum-signed legacy payloads (omit secret; receives all
                    events).
                  type: string
                  enum:
                    - v1
                    - v2
                events:
                  description: >-
                    Required for v2: non-empty list of subscribed event types.
                    For v1 omit or use []; v1 always receives all events.
                  type: array
                  items:
                    type: string
                secret:
                  description: >-
                    Required for v2 (minimum 16 characters). Must be omitted for
                    v1.
                  type: string
                  minLength: 16
                is_active:
                  type: boolean
                name:
                  description: Optional display name for the webhook.
                  type: string
                  maxLength: 255
                description:
                  description: Optional description for the webhook.
                  type: string
              required:
                - company_nanoid
                - url
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      webhook_nanoid:
                        type: string
                        minLength: 15
                        maxLength: 15
                        pattern: ^wh-.*
                        description: Unique identifier of the Webhook.
                      company_nanoid:
                        type: string
                        minLength: 15
                        maxLength: 15
                        pattern: ^co-.*
                        description: Unique identifier of the company.
                      team_nanoid:
                        description: Unique identifier of the team, if applicable.
                        type: string
                        minLength: 15
                        maxLength: 15
                        pattern: ^te-.*
                      webhook_version:
                        type: string
                        enum:
                          - v1
                          - v2
                        description: >-
                          Whether this endpoint uses v1 (Ethereum-signed) or v2
                          (HMAC) delivery.
                      url:
                        type: string
                        format: uri
                      events:
                        type: array
                        items:
                          type: string
                      is_active:
                        type: boolean
                      name:
                        type: string
                        nullable: true
                      description:
                        type: string
                        nullable: true
                    required:
                      - webhook_nanoid
                      - company_nanoid
                      - webhook_version
                      - url
                      - events
                      - is_active
                      - name
                      - description
                    additionalProperties: false
                required:
                  - success
                  - data
                additionalProperties: false
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Bad Request
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Forbidden
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Not Found
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  data:
                    type: string
                  error_code:
                    type: string
                required:
                  - success
                  - data
                additionalProperties: false
                description: Internal Server Error
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````