Skip to main content
PATCH
/
reset_hits
Reset Hits
curl --request PATCH \
  --url https://api.example.com/reset_hits
{
  "message": "<string>"
}
This endpoint resets the url_hits counter for a short URL back to zero. This is useful for tracking statistics over a new time period or after a campaign reset.
This endpoint requires authentication. Include a valid Bearer token in the Authorization header. This action cannot be undone.

Authentication

This endpoint uses HTTPBearer security. Include the access token obtained from the /login endpoint:
Authorization: Bearer <access_token>
The URL code is automatically extracted from the authenticated token, so no additional parameters are required.

Response

message
string
Success message confirming the hit counter has been reset

Status Codes

  • 200: Hit counter successfully reset
  • 404: URL not found
  • 403: Invalid or expired token

Use Cases

Resetting hit counts is useful for:
  • Starting fresh tracking for a new campaign
  • Clearing test traffic before going live
  • Reusing a short URL for a different time period
  • Resetting analytics after major changes to the destination URL
curl -X PATCH https://api.example.com/reset_hits \
  -H "Authorization: Bearer <access_token>"

Build docs developers (and LLMs) love