---
updatedAt: 2026-06-04T08:19:34.000Z
agentTools:
  projectIndex: https://developers.99minutos.com/llms.txt
---

# /api/v3/webhooks/{webhook_id}

Update webhook configuration. You can update headers or/and status_rules.

webhook notification example:

```json
{
  "headers": {
    "Content-Type": "application/json" // Change the headers
  },
  "status_rules": {
    "allowed_status_names": [
      "delivered"   // Change the allowed status names
    ]
  }
}
```

### Catálogo de estados predeterminados

Los siguientes 15 estados se incluyen por defecto al registrar un webhook.

Para actualizar la suscripción, envía los valores de `StatusName` en `status_rules.allowed_status_names`. La lista enviada reemplaza la lista configurada actualmente. `StatusCode` se incluye como referencia del evento notificado y se envía como string; `StatusName` utiliza camelCase.

| StatusCode | StatusName |
| --- | --- |
| `2002` | `onRoadToPickup` |
| `2003` | `collected` |
| `2101` | `unsuccessfulPickup` |
| `3001` | `stored` |
| `3004` | `onLinehaul` |
| `4001` | `onRoadToDelivery` |
| `4002` | `delivered` |
| `4101` | `unsuccessfulDelivery` |
| `5001` | `onRoadToReturn` |
| `5002` | `returned` |
| `5101` | `unsuccessfulReturn` |
| `8001` | `stolen` |
| `8002` | `lost` |
| `8003` | `cancelled` |
| `8005` | `invalidAddress` |

# OpenAPI definition

````json
{
  "openapi": "3.0.3",
  "x-stoplight": {
    "id": "tt90qxfs5i6qr"
  },
  "info": {
    "title": "API Version 3",
    "version": "3.0.0",
    "description": "This is the documentation for the public api *(version 3)* of 99minutos. [https://www.99minutos.com/.](https://www.99minutos.com/.EnvironmentAPI)\n\n# First Steps\n\n1.  Create an account in the sandbox website: [https://delivery-git-sandbox-99minutos.vercel.app/](https://delivery-git-sandbox-99minutos.vercel.app/)\n2.  Go to Developers section\n3.  On API Keys V3 section click on `Generar`\n4.  After this the `client_id` and `client_secret` will be displayed\n    \n\nUse the credentials to generate access tokens as shown below in the endpoint `create access token`\n\nFollow the same process in production.\n\n## Environments\n\n| **Environment** | **Website** | **API url** |\n| --- | --- | --- |\n| Sandbox | [https://delivery-git-sandbox-99minutos.vercel.app/](https://delivery-git-sandbox-99minutos.vercel.app/) | [https://sandbox.99minutos.com](https://sandbox.99minutos.com) |\n| Production | [https://envios.99minutos.com/developers](https://envios.99minutos.com/developers) | [https://delivery.99minutos.com](https://delivery.99minutos.com) |\n\n`Each environment has an independent set of credentials`"
  },
  "paths": {
    "/api/v3/webhooks/{webhook_id}": {
      "parameters": [
        {
          "schema": {
            "type": "string",
            "format": "uuid",
            "example": "4c136c4a-cdf6-4b37-879e-f0c4a1082856"
          },
          "name": "webhook_id",
          "in": "path",
          "required": true,
          "description": "Webhook uuid"
        }
      ],
      "patch": {
        "summary": "",
        "operationId": "patch-api-v3-webhooks-webhook_id",
        "requestBody": {
          "required": true,
          "description": "Envía un mapa de headers no vacío, una lista de estados no vacía o ambos. Los campos omitidos conservan su configuración actual.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "headers": {
                    "type": "object",
                    "description": "Mapa de hasta 3 encabezados personalizados. Un mapa no vacío reemplaza los encabezados configurados.",
                    "maxProperties": 3,
                    "additionalProperties": {
                      "type": "string"
                    }
                  },
                  "status_rules": {
                    "type": "object",
                    "description": "Configuración de los estados que generan notificaciones del webhook.",
                    "properties": {
                      "allowed_status_names": {
                        "type": "array",
                        "description": "Nombres de estado en camelCase. Una lista no vacía reemplaza los estados configurados. Consulta el catálogo de estados predeterminados de esta operación.",
                        "items": {
                          "type": "string",
                          "example": "delivered"
                        },
                        "example": [
                          "delivered",
                          "unsuccessfulDelivery",
                          "unsuccessfulReturn"
                        ]
                      }
                    }
                  }
                }
              },
              "examples": {
                "update-headers-and-statuses": {
                  "summary": "Actualizar headers y estados",
                  "description": "Reemplaza los encabezados y la lista de estados notificados en una sola petición.",
                  "value": {
                    "headers": {
                      "Content-Type": "application/json",
                      "Authorization": "Bearer YOUR_WEBHOOK_TOKEN"
                    },
                    "status_rules": {
                      "allowed_status_names": [
                        "delivered",
                        "unsuccessfulDelivery",
                        "unsuccessfulReturn"
                      ]
                    }
                  }
                },
                "update-statuses": {
                  "summary": "Actualizar estados notificados",
                  "description": "Configura notificaciones de entrega completada, entrega fallida y retorno fallido.",
                  "value": {
                    "status_rules": {
                      "allowed_status_names": [
                        "delivered",
                        "unsuccessfulDelivery",
                        "unsuccessfulReturn"
                      ]
                    }
                  }
                },
                "update-headers": {
                  "summary": "Actualizar headers",
                  "description": "Reemplaza los encabezados utilizados para enviar las notificaciones del webhook.",
                  "value": {
                    "headers": {
                      "Content-Type": "application/json",
                      "Authorization": "Bearer YOUR_WEBHOOK_TOKEN"
                    }
                  }
                },
                "restore-default-statuses": {
                  "summary": "Restablecer estados predeterminados",
                  "description": "Configura los 15 estados notificados por defecto al registrar un webhook.",
                  "value": {
                    "status_rules": {
                      "allowed_status_names": [
                        "onRoadToPickup",
                        "collected",
                        "unsuccessfulPickup",
                        "stored",
                        "onLinehaul",
                        "onRoadToDelivery",
                        "delivered",
                        "unsuccessfulDelivery",
                        "onRoadToReturn",
                        "returned",
                        "unsuccessfulReturn",
                        "stolen",
                        "lost",
                        "cancelled",
                        "invalidAddress"
                      ]
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ConfigResponse"
          }
        },
        "description": "Update webhook configuration. You can update headers or/and status_rules.\n\nwebhook notification example:\n\n```json\n{\n  \"headers\": {\n    \"Content-Type\": \"application/json\" // Change the headers\n  },\n  \"status_rules\": {\n    \"allowed_status_names\": [\n      \"delivered\"   // Change the allowed status names\n    ]\n  }\n}\n```\n\n### Catálogo de estados predeterminados\n\nLos siguientes 15 estados se incluyen por defecto al registrar un webhook.\n\nPara actualizar la suscripción, envía los valores de `StatusName` en `status_rules.allowed_status_names`. La lista enviada reemplaza la lista configurada actualmente. `StatusCode` se incluye como referencia del evento notificado y se envía como string; `StatusName` utiliza camelCase.\n\n| StatusCode | StatusName |\n| --- | --- |\n| `2002` | `onRoadToPickup` |\n| `2003` | `collected` |\n| `2101` | `unsuccessfulPickup` |\n| `3001` | `stored` |\n| `3004` | `onLinehaul` |\n| `4001` | `onRoadToDelivery` |\n| `4002` | `delivered` |\n| `4101` | `unsuccessfulDelivery` |\n| `5001` | `onRoadToReturn` |\n| `5002` | `returned` |\n| `5101` | `unsuccessfulReturn` |\n| `8001` | `stolen` |\n| `8002` | `lost` |\n| `8003` | `cancelled` |\n| `8005` | `invalidAddress` |",
        "tags": [
          "webhooks"
        ],
        "security": [
          {
            "AuthJWT": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "AuthJWT": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "responses": {
      "ConfigResponse": {
        "description": "Config Response",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer"
                },
                "message": {
                  "type": "string"
                },
                "data": {
                  "type": "object",
                  "properties": {
                    "status_rules": {
                      "type": "object",
                      "properties": {
                        "status_rules": {
                          "type": "integer"
                        },
                        "allowed_status_names": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "description": ""
                          }
                        }
                      }
                    },
                    "headers": {
                      "type": "object",
                      "properties": {
                        "Authorization": {
                          "type": "string"
                        },
                        "Content-Type": {
                          "type": "string"
                        },
                        "User-Agent": {
                          "type": "string"
                        }
                      }
                    },
                    "id": {
                      "type": "string"
                    },
                    "owner": {
                      "type": "object",
                      "properties": {
                        "client_id": {
                          "type": "string"
                        }
                      }
                    },
                    "url": {
                      "type": "string"
                    }
                  }
                }
              },
              "x-examples": {
                "example-1": {
                  "status": 201,
                  "message": "configuration saved",
                  "data": {
                    "headers": {
                      "Authorization": "Basic KEY",
                      "Content-Type": "application/json",
                      "User-Agent": "99notifications"
                    },
                    "id": "01e1237d-d110-41d5-bd3a-9173b5391878",
                    "owner": {
                      "client_id": "000522b5-1954-0000-8f49-73aa0bc0956f"
                    },
                    "url": "https://43a9-186-30-89-21.ngrok.io"
                  }
                }
              }
            },
            "examples": {
              "Config Response": {
                "value": {
                  "status": 201,
                  "message": "configuration saved",
                  "data": {
                    "headers": {
                      "Authorization": "Basic KEY",
                      "Content-Type": "application/json",
                      "User-Agent": "99notifications"
                    },
                    "id": "01e1237d-d110-41d5-bd3a-9173b5391878",
                    "owner": {
                      "client_id": "000522b5-1954-0000-8f49-73aa0bc0956f"
                    },
                    "url": "https://43a9-186-30-89-21.ngrok.io"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://delivery.99minutos.com",
      "description": "Produccion"
    },
    {
      "url": "https://sandbox.99minutos.com",
      "description": "Sandbox Environment"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  }
}
````

# Sibling pages

* [/api/v3/webhooks](https://developers.99minutos.com/reference/post-api-v3-webhooks.md)
* [/api/v3/webhooks](https://developers.99minutos.com/reference/get-api-v3-webhooks.md)
* [/api/v3/webhooks/{webhook_id}](https://developers.99minutos.com/reference/delete-api-v3-webhooks-webhook_id.md)
* [/api/v3/webhooks/evidences/{tracking_id}](https://developers.99minutos.com/reference/get-api-v3-webhooks-evidences-by-tracking-id.md)