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

# Update webhook status

> Enable or disable a webhook subscription without deleting it.

## Status Values
- `active`: Webhook will receive events
- `inactive`: Webhook will not receive events (but remains configured)

## Use Cases
- **Maintenance:** Temporarily pause webhooks during system maintenance
- **Testing:** Disable production webhooks while testing
- **Troubleshooting:** Pause problematic webhooks without losing configuration
- **Migration:** Deactivate old endpoints before switching to new ones

## Example Request
```bash
# Disable a webhook
curl -X POST https://app.titanx.io/api/public/v2/webhooks/550e8400-e29b-41d4-a716-446655440000/inactive \
  -H "Authorization: Bearer YOUR_API_KEY"

# Re-enable a webhook
curl -X POST https://app.titanx.io/api/public/v2/webhooks/550e8400-e29b-41d4-a716-446655440000/active \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Best Practices
- Prefer status updates over deletion when temporarily disabling webhooks
- Monitor webhook status in your application's health checks
- Log status changes for audit purposes



## OpenAPI

````yaml /api-reference/openapi.json post /api/public/v2/webhooks/{id}/{status}
openapi: 3.1.0
info:
  version: 2.0.0
  title: TitanX API
  description: |-
    # TitanX API Documentation

    Welcome to the TitanX API!

    ## Base URL

    ```
    https://app.titanx.io/api/public/v2
    ```

    ## Authentication

    All endpoints require Bearer token authentication:

    ```http
    Authorization: Bearer YOUR_API_KEY
    ```

    ## Response Format

    All endpoints return responses in this consistent format:

    ```json
    {
      "data": { /* Your requested data */ },
      "credits": {
        "creditsCharged": 5,
        "creditsRemaining": 995,
        "costPerPhone": 0.05,
        "phoneCount": 100
      },
      "error": null
    }
    ```
servers:
  - url: https://app.titanx.io
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: v2
    description: ✅ Version 2 API (Current)
    externalDocs:
      description: V2 API Guide
      url: https://docs.titanx.io/api/v2
  - name: v2-contacts
    description: V2 Contact operations - scoring and enrichment with credit tracking
  - name: v2-jobs
    description: V2 Job operations - job management and contact retrieval
  - name: v2-account
    description: V2 Account operations - credits and billing information
  - name: v2-webhooks
    description: >-
      V2 Webhook operations - manage webhook subscriptions for real-time contact
      event notifications
paths:
  /api/public/v2/webhooks/{id}/{status}:
    post:
      tags:
        - v2
        - v2-webhooks
      summary: Update webhook status
      description: >-
        Enable or disable a webhook subscription without deleting it.


        ## Status Values

        - `active`: Webhook will receive events

        - `inactive`: Webhook will not receive events (but remains configured)


        ## Use Cases

        - **Maintenance:** Temporarily pause webhooks during system maintenance

        - **Testing:** Disable production webhooks while testing

        - **Troubleshooting:** Pause problematic webhooks without losing
        configuration

        - **Migration:** Deactivate old endpoints before switching to new ones


        ## Example Request

        ```bash

        # Disable a webhook

        curl -X POST
        https://app.titanx.io/api/public/v2/webhooks/550e8400-e29b-41d4-a716-446655440000/inactive
        \
          -H "Authorization: Bearer YOUR_API_KEY"

        # Re-enable a webhook

        curl -X POST
        https://app.titanx.io/api/public/v2/webhooks/550e8400-e29b-41d4-a716-446655440000/active
        \
          -H "Authorization: Bearer YOUR_API_KEY"
        ```


        ## Best Practices

        - Prefer status updates over deletion when temporarily disabling
        webhooks

        - Monitor webhook status in your application's health checks

        - Log status changes for audit purposes
      parameters:
        - schema:
            type: string
            format: uuid
            description: Webhook ID
            example: 550e8400-e29b-41d4-a716-446655440000
          required: true
          description: Webhook ID
          name: id
          in: path
        - schema:
            type: string
            enum:
              - active
              - inactive
            description: New status for the webhook
            example: inactive
          required: true
          description: New status for the webhook
          name: status
          in: path
      responses:
        '200':
          description: Webhook status updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookStatusUpdateResponse'
        '400':
          description: Invalid request - invalid webhook ID or status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookErrorResponse'
        '401':
          description: Unauthorized - invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookErrorResponse'
        '404':
          description: Webhook not found or not owned by user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    WebhookStatusUpdateResponse:
      type: object
      properties:
        payload:
          type: object
          properties:
            id:
              type: string
              format: uuid
              description: Webhook identifier
              example: 550e8400-e29b-41d4-a716-446655440000
            status:
              type: string
              enum:
                - active
                - inactive
              description: Updated webhook status
              example: inactive
            updatedAt:
              type: string
              format: date-time
              description: Update timestamp
              example: '2024-01-15T10:35:00Z'
          required:
            - id
            - status
            - updatedAt
      required:
        - payload
    WebhookErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
          example: 'Invalid webhook ID: must be a valid UUID'
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````