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

# Register (or rotate) a partner webhook endpoint



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/admin/partners/{partner_id}/webhook-endpoints
openapi: 3.1.0
info:
  title: crewpass-api-v2
  description: >-
    CrewPass V2 Partner API — a scope-gated, consent-intersected, multi-tenant
    front door onto existing CrewPass crew/vessel/compliance data.
  version: 0.1.0
servers: []
security: []
paths:
  /api/v2/admin/partners/{partner_id}/webhook-endpoints:
    post:
      tags:
        - admin
      summary: Register (or rotate) a partner webhook endpoint
      operationId: >-
        register_webhook_endpoint_api_v2_admin_partners__partner_id__webhook_endpoints_post
      parameters:
        - name: partner_id
          in: path
          required: true
          schema:
            type: string
            title: Partner Id
        - name: X-Internal-Auth
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Internal-Auth
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookEndpointRegisterRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookEndpointResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    WebhookEndpointRegisterRequest:
      properties:
        url:
          type: string
          minLength: 1
          title: Url
        subscribed_events:
          items:
            type: string
          type: array
          title: Subscribed Events
        secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Secret
        status:
          type: string
          title: Status
          default: active
      type: object
      required:
        - url
      title: WebhookEndpointRegisterRequest
    WebhookEndpointResponse:
      properties:
        endpoint_id:
          type: string
          title: Endpoint Id
        partner_id:
          type: string
          title: Partner Id
        url:
          type: string
          title: Url
        subscribed_events:
          items:
            type: string
          type: array
          title: Subscribed Events
        status:
          type: string
          title: Status
        secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Secret
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      type: object
      required:
        - endpoint_id
        - partner_id
        - url
        - subscribed_events
        - status
      title: WebhookEndpointResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````