HubSpot Service Hub
Manage support tickets via the HubSpot CRM v3 tickets API.
Operations
| Operation | What it does |
|---|---|
list_tickets |
List tickets with key properties (subject, stage, priority, dates) |
get_ticket |
Retrieve a single ticket by id |
create_ticket |
Create a new ticket with subject, content, stage, and priority |
update_ticket |
Update subject, content, pipeline stage, or priority on an existing ticket |
search_tickets |
Full-text search across tickets by query string, or filter by subject keyword |
API Key Setup
- In HubSpot, go to Settings > Integrations > Private Apps.
- Create a new private app.
- Under Scopes, enable CRM → Tickets (read + write).
- Click Create app and copy the Access Token.
- Pass that token as
apiKey. It is sent asAuthorization: Bearer <token>.
Parameters
| Parameter | Required | Default | Notes |
|---|---|---|---|
apiKey |
Yes | — | HubSpot private app access token |
operation |
Yes | — | One of the five operations above |
ticketId |
For get/update | — | HubSpot ticket object id |
subject |
For create; optional for update/search | — | Ticket subject line |
content |
Optional | — | Ticket body / description |
status |
Optional | 1 (New) for create |
Pipeline stage id (1=New, 2=Waiting on contact, 3=Waiting on us, 4=Closed) |
priority |
Optional | — | LOW, MEDIUM, or HIGH |
query |
For search | — | Free-text query matched against subject and content |
limit |
Optional | 10 |
1–100 records |
Examples
List open tickets:
operation: list_tickets
apiKey: pat-na1-...
limit: 20
Get a ticket by id:
operation: get_ticket
apiKey: pat-na1-...
ticketId: 12345678
Create a new ticket:
operation: create_ticket
apiKey: pat-na1-...
subject: "Login page returns 500 error"
content: "Users report intermittent 500 errors on /login since 14:00 UTC."
priority: HIGH
status: "1"
Update a ticket's stage to Closed (stage id 4):
operation: update_ticket
apiKey: pat-na1-...
ticketId: 12345678
status: "4"
Search tickets by keyword:
operation: search_tickets
apiKey: pat-na1-...
query: "login error"
limit: 10
Output
| Field | Description |
|---|---|
result |
Raw JSON response from the HubSpot API |
status |
HTTP status code (200/201 = success, 4xx = client error, 5xx = server error) |
Notes
- Default pipeline for new tickets is the HubSpot Service Pipeline (id
0). Custom pipelines require passing the pipeline id via thestatusfield and extending the tool. - Properties returned on read operations:
subject,content,hs_pipeline,hs_pipeline_stage,hs_ticket_priority,hs_ticket_category,createdate,hs_lastmodifieddate,hubspot_owner_id. - The
search_ticketsoperation uses HubSpot's CRM search endpoint, which indexes changes with a short delay (typically under 30 seconds).