API Documentation
Integrate SnagHopper with your own tools using our robust REST API. All endpoints use JSON for requests and responses.
Authentication
Authenticate using a Bearer token in the Authorization
header.
Authorization: Bearer YOUR_API_TOKEN
Contact support to generate or manage your API tokens.
Endpoints
List Tickets
GET /api/tickets
Returns a paginated list of tickets.
{ "data": [ { "id": 1, "title": "Login bug", "status": "open", ... }, ... ], "meta": { "current_page": 1, "last_page": 3 } }
Create Ticket
POST /api/tickets
Create a new ticket.
{ "title": "Cannot save project", "description": "Steps to reproduce...", "priority": "high" }
Response:
{ "id": 42, "title": "Cannot save project", "status": "open", ... }
Update Ticket
PATCH /api/tickets/{id}
Update ticket status, priority, or details.
{ "status": "closed" }
List Users
GET /api/users
Returns a list of users in your workspace.
Invite User
POST /api/users/invite
Invite a new user by email.
{ "email": "[email protected]" }
Add Comment to Ticket
POST /api/tickets/{id}/comments
Add a comment to a ticket.
{ "body": "We are investigating this issue." }
Error Handling
All errors return standard HTTP status codes and a JSON error message.
{ "error": "Invalid token." }
Examples
Curl
curl -H "Authorization: Bearer YOUR_API_TOKEN" https://snaghopper.com/api/tickets
Laravel HTTP Client
Http::withToken('YOUR_API_TOKEN')->get('https://snaghopper.com/api/tickets');
For full API reference or custom integration help, contact [email protected].