APIs & Integrations

TylerC
Participant

Create Service Ticket API Issue

SOLVE

Hello,

 

I'm trying to create a service ticket using the API according to the documentation here (https://developers.hubspot.com/docs/api/crm/tickets) for the "Create" endpoint. It seems to only be giving me errors with this test call (below) and I can't seem to figure out a way to fix this

 

curl --location --request POST 'https://api.hubapi.com/crm/v3/objects/tickets?hapikey=KEY' \
--header 'content-type: application/json' \
--data-raw '{
"properties": {
"hs_pipeline": "support_pipeline",
"hs_pipeline_stage": "open",
"hs_ticket_priority": "HIGH",
"hubspot_owner_id": "",
"subject": "troubleshoot report",
"content": "test content"
}
}'

 

The response I get is below:

 

{
    "status""error",
    "message""Property values were not valid: [{\"isValid\":false,\"message\":\"open is not a valid pipeline stage ID. Valid options are: pipelineId=0 : [1, 2, 3, 4]\",\"error\":\"INVALID_OPTION\",\"name\":\"hs_pipeline_stage\"}]",
    "correlationId""XXXXX",
    "category""VALIDATION_ERROR"
}

 

I've tried "hs_pipeline_stage" of 0, 1, 2, 3, 4 but still none of those worked.. Also I've already performed the "List" API call successfully so there isn't an issue with my API key as far as I know..

 

Does anyone know how to solve this?

0 Upvotes
1 Accepted solution
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Create Service Ticket API Issue

SOLVE
2 Replies 2
dennisedson
Solution
HubSpot Product Team
HubSpot Product Team

Create Service Ticket API Issue

SOLVE
TylerC
Participant

Create Service Ticket API Issue

SOLVE

Thanks!