| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Unsubscribe from Ticket Events
Cancels the active webhook subscription for the authenticated account, stopping all future ticket event notifications to the previously registered callback URL. The request body is empty — the subscription to remove is determined by the authenticated user's credentials.
Endpoint
POST /api/v1/tickets/unsubscribe
Authentication
Basic HTTP Authentication required.
Encode username:password in Base64 and pass in the Authorization header:
Authorization: Basic {base64(username:password)}
When to use
Use this endpoint when decommissioning an integration, changing the callback URL, or temporarily disabling ticket notifications. To update a callback URL, call unsubscribe first and then call POST /api/v1/tickets/subscribe with the new URL.
Request Body
This endpoint accepts an empty JSON object. No fields are required.
{}Response
200 OK
| Field | Type | Description |
|---|---|---|
requestId | integer | Internal request tracking ID. |
success | boolean | true if the subscription was removed successfully. |
error | string | Error message if the operation failed. |
validationErrors | array | List of field-level validation issues. |
{
"requestId": 98133,
"success": true,
"error": null,
"validationErrors": []
}Error Codes
| Code | When it happens |
|---|---|
| 400 | Malformed request body. |
| 401 | Invalid or missing Basic Auth credentials. |
| 403 | User does not have permission for this operation. |
| 404 | No active subscription found for this account. |
| 500 | Internal server error. |
Common Mistakes
- Omitting the
Content-Type: application/jsonheader even though the body is empty — the server may reject requests without it. - Calling unsubscribe when no subscription exists — this may return a 404 error depending on server behavior.
- Not following up with a new
POST /api/v1/tickets/subscribecall when the intent is to change the callback URL rather than permanently stop notifications.
Related Endpoints
POST /api/v1/tickets/subscribe— Register a new webhook callback URL for ticket events.GET /api/v1/tickets/getTickets— Fall back to polling if no subscription is active.GET /api/v1/tickets/getCommentsByTicketId— Manually poll for comments without webhook support.
Example
curl -X POST https://hq.staging.netevia.dev/api/v1/tickets/unsubscribe \
-H "Authorization: Basic $(echo -n 'username:password' | base64)" \
-H "Content-Type: application/json" \
-d '{}'