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

# Remove Store Webhook

> Removes a registered webhook from the store.

## 🗑️ Remove Store Webhook

This endpoint allows removing a registered webhook URL for a specific store.

### 🔐 Authentication

This route requires authentication via API Key, sent in the request header:

```http theme={null}
Authorization: YOUR_API_KEY_HERE
```

### 📥 Route Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `storeId` | `string (UUID)` | Yes | Store ID |

### 📥 Query Parameter

| Field | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | Exact URL of the webhook to be removed |

### 📋 Request Example

```bash theme={null}
curl --location --request DELETE "https://api.cabrapi.com.br/v1/stores/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/webhooks?url=https%3A%2F%2Fmeusistema.com%2Fcallback1" \
--header "Authorization: YOUR_API_KEY_HERE"
```

### 📊 Response Example (200)

```json theme={null}
{
  "code": "WEBHOOK_REMOVED"
}
```

### ❌ Possible Errors

| Status | Code | When it happens |
| - | - | - |
| `400` | `STORE_ID_REQUIRED` | Dead code: the route requires `storeId`; never fires in practice. |
| `400` | `URL_REQUIRED` | `url` field not sent (the controller accepts it via query OR body). |
| `401` | `API_KEY_NOT_PROVIDED` | `Authorization` header not sent. |
| `401` | `INVALID_API_KEY` | Invalid or not found API Key. |
| `403` | `USER_DISABLED` | User account disabled or deleted. |
| `403` | `NO_ACTIVE_SUBSCRIPTION` | Account has no active plan. |
| `404` | `STORE_NOT_FOUND` | Store does not exist or does not belong to your account. |
| `429` | `RATE_LIMIT_EXCEEDED` | Plan per-minute request limit exceeded. |
| `500` | `WEBHOOK_ERROR` | Internal failure while processing the request. |
| `503` | `SERVICE_UNAVAILABLE` | Service temporarily unavailable. |


## OpenAPI

````yaml DELETE /stores/{storeId}/webhooks
openapi: 3.1.0
info:
  title: caBRAPI
  version: 1.0.0
servers:
  - url: https://api.cabrapi.com.br/v1
security: []
paths:
  /stores/{storeId}/webhooks:
    delete:
      tags:
        - Webhooks
      summary: Remove webhook from store
      operationId: deleteWebhook
      parameters:
        - $ref: '#/components/parameters/StoreId'
        - name: url
          in: query
          required: false
          description: >-
            Exact webhook URL to be removed (can be passed via query param or
            JSON body `{"url": "..."}`).
          schema:
            format: uri
            type: string
      requestBody:
        required: false
        description: 'Alternative to the `url` query parameter: JSON body `{"url": "..."}`.'
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  format: uri
                  type: string
              required:
                - url
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  code:
                    example: WEBHOOK_REMOVED
                    type: string
                required:
                  - code
                type: object
          description: Remove webhook from store.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid request.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Missing or invalid API key.
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden (inactive plan or insufficient permissions).
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Resource not found.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate limit exceeded.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal server error.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Service unavailable.
      security:
        - ApiKey: []
components:
  parameters:
    StoreId:
      in: path
      name: storeId
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 50
  schemas:
    Error:
      properties:
        code:
          example: STORE_NOT_FOUND
          type: string
      required:
        - code
      type: object
  securitySchemes:
    ApiKey:
      in: header
      name: Authorization
      type: apiKey
      x-default: YOUR_API_KEY_HERE

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.