Subscribe to Ticket events

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Subscribe to Ticket Events

Registers a callback URL with Netevia HQ so that your system receives real-time HTTP POST notifications whenever a tracked event occurs on any ticket accessible to your account. Supported events include status changes, new comments, new attachments, and department transfers. The subscription is scoped to the authenticated user's account.

Endpoint

POST /api/v1/tickets/subscribe

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 during initial integration setup to register a webhook endpoint on your platform. Once subscribed, you no longer need to poll getCommentsByTicketId or getTicketById for updates — Netevia HQ will push notifications to your callback URL automatically. This is especially useful for tracking Instant Funding ticket responses without continuous polling.

Request Body

FieldTypeRequiredDescription
callbackUrlstringYesThe publicly accessible HTTPS URL that will receive event POST requests from Netevia HQ.
{
  "callbackUrl": "https://yourplatform.com/webhooks/netevia/tickets"
}

Response

200 OK

FieldTypeDescription
requestIdintegerInternal request tracking ID.
successbooleantrue if the subscription was registered successfully.
errorstringError message if the subscription failed.
validationErrorsarrayList of field-level validation issues.
{
  "requestId": 98132,
  "success": true,
  "error": null,
  "validationErrors": []
}

Callback Payload

When an event occurs, Netevia HQ sends an HTTP POST to your callbackUrl with the following JSON body:

FieldTypeDescription
CallbackUrlstringThe URL registered for this subscription.
TicketIdstringThe ID of the ticket that triggered the event.
EventTypestringThe type of event that occurred (see Event Types table).
MIDstringMerchant ID associated with the ticket.
TitlestringTicket subject/title.
PreviousValuestringThe previous value (for status change events).
CurrentValuestringThe new value or content (e.g., comment text, new status).

Callback Example:

{
  "CallbackUrl": "https://yourplatform.com/webhooks/netevia/tickets",
  "TicketId": "48291",
  "EventType": "Add Comment",
  "MID": "9180000000000000",
  "Title": "Instant Funding",
  "PreviousValue": "",
  "CurrentValue": "Please provide a voided check to complete the Instant Funding setup."
}

Event Types

ValueNameDescription
0Add AttachmentA new file was attached to the ticket.
1Add CommentA new comment was posted to the ticket thread.
2Change StatusThe ticket status was updated (e.g., New to InProgress).
3Change DepartmentThe ticket was transferred to a different department.

Error Codes

CodeWhen it happens
400callbackUrl is missing or not a valid URL format.
401Invalid or missing Basic Auth credentials.
403User does not have permission for this operation.
404Ticket or resource not found.
500Internal server error.

Common Mistakes

  • Registering an HTTP (non-HTTPS) callback URL — the server may reject insecure endpoints.
  • Not making the callback endpoint publicly accessible — Netevia HQ must be able to reach the URL from its servers.
  • Not handling duplicate event deliveries — implement idempotency in your callback handler using TicketId and EventType.
  • Subscribing multiple times with the same URL — call POST /api/v1/tickets/unsubscribe first to clear an existing subscription before re-registering.

Related Endpoints

  • POST /api/v1/tickets/unsubscribe — Remove the active webhook subscription.
  • GET /api/v1/tickets/getTicketById — Poll for ticket details if webhooks are not available.
  • GET /api/v1/tickets/getCommentsByTicketId — Retrieve comments if a callback is missed.

Example

curl -X POST https://hq.staging.netevia.dev/api/v1/tickets/subscribe \
  -H "Authorization: Basic $(echo -n 'username:password' | base64)" \
  -H "Content-Type: application/json" \
  -d '{
    "callbackUrl": "https://yourplatform.com/webhooks/netevia/tickets"
  }'
Body Params
string
required
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Response

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
text/json