curl --request POST \
--url https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-read
"\nExample POST URL (without properties):\nhttps://api.hubapi.com/crm-objects/v1/objects/tickets/batch-read\n\nExample POST JSON:\n{\n \"ids\": [\n 177769,\n 176601\n ]\n}\n\nExample Response:\n{\n \"176601\": {\n \"objectType\": \"TICKET\",\n \"portalId\": 62515,\n \"objectId\": 176601,\n \"properties\": {},\n \"isDeleted\": false\n },\n \"177769\": {\n \"objectType\": \"TICKET\",\n \"portalId\": 62515,\n \"objectId\": 177769,\n \"properties\": {},\n \"isDeleted\": false\n }\n}\n\n\nExample POST URL (with properties):\nhttps://api.hubapi.com/crm-objects/v1/objects/tickets/batch-read?properties=subject&properties=content&properties=created_by\n\nExample POST JSON:\n{\n \"ids\": [\n 177769,\n 176601\n ]\n}\n\nExample response:\n{\n \"176601\": {\n \"objectType\": \"TICKET\",\n \"portalId\": 62515,\n \"objectId\": 176601,\n \"properties\": {\n \"subject\": {\n \"versions\": [\n {\n \"name\": \"subject\",\n \"value\": \"This is an example ticket\",\n \"timestamp\": 1522868974802,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"This is an example ticket\",\n \"timestamp\": 1522868974802,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"created_by\": {\n \"versions\": [\n {\n \"name\": \"created_by\",\n \"value\": \"496346\",\n \"timestamp\": 1522868974802,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"496346\",\n \"timestamp\": 1522868974802,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"content\": {\n \"versions\": [\n {\n \"name\": \"content\",\n \"value\": \"Here are the details of the ticket.\",\n \"timestamp\": 1522868974802,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"Here are the details of the ticket.\",\n \"timestamp\": 1522868974802,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"isDeleted\": false\n },\n \"177769\": {\n \"objectType\": \"TICKET\",\n \"portalId\": 62515,\n \"objectId\": 177769,\n \"properties\": {\n \"subject\": {\n \"versions\": [\n {\n \"name\": \"subject\",\n \"value\": \"This is my first ticket!\",\n \"timestamp\": 1522862571921,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"This is my first ticket!\",\n \"timestamp\": 1522862571921,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"created_by\": {\n \"versions\": [\n {\n \"name\": \"created_by\",\n \"value\": \"496346\",\n \"timestamp\": 1522862571921,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"496346\",\n \"timestamp\": 1522862571921,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"content\": {\n \"versions\": [\n {\n \"name\": \"content\",\n \"value\": \"Here's the content of the ticket.\",\n \"timestamp\": 1522862571921,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"Here's the content of the ticket.\",\n \"timestamp\": 1522862571921,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"isDeleted\": false\n }\n}"
Create a group of tickets. Up to 100 tickets can be created in a single request. The request body will be an array, with each entry being a list of ticket properties you want to set for each new ticket. You must set the ticket pipeline and stage when creating a new ticket. Please see the example for more details.
curl --request POST \
--url https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-read
"\nExample POST URL (without properties):\nhttps://api.hubapi.com/crm-objects/v1/objects/tickets/batch-read\n\nExample POST JSON:\n{\n \"ids\": [\n 177769,\n 176601\n ]\n}\n\nExample Response:\n{\n \"176601\": {\n \"objectType\": \"TICKET\",\n \"portalId\": 62515,\n \"objectId\": 176601,\n \"properties\": {},\n \"isDeleted\": false\n },\n \"177769\": {\n \"objectType\": \"TICKET\",\n \"portalId\": 62515,\n \"objectId\": 177769,\n \"properties\": {},\n \"isDeleted\": false\n }\n}\n\n\nExample POST URL (with properties):\nhttps://api.hubapi.com/crm-objects/v1/objects/tickets/batch-read?properties=subject&properties=content&properties=created_by\n\nExample POST JSON:\n{\n \"ids\": [\n 177769,\n 176601\n ]\n}\n\nExample response:\n{\n \"176601\": {\n \"objectType\": \"TICKET\",\n \"portalId\": 62515,\n \"objectId\": 176601,\n \"properties\": {\n \"subject\": {\n \"versions\": [\n {\n \"name\": \"subject\",\n \"value\": \"This is an example ticket\",\n \"timestamp\": 1522868974802,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"This is an example ticket\",\n \"timestamp\": 1522868974802,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"created_by\": {\n \"versions\": [\n {\n \"name\": \"created_by\",\n \"value\": \"496346\",\n \"timestamp\": 1522868974802,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"496346\",\n \"timestamp\": 1522868974802,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"content\": {\n \"versions\": [\n {\n \"name\": \"content\",\n \"value\": \"Here are the details of the ticket.\",\n \"timestamp\": 1522868974802,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"Here are the details of the ticket.\",\n \"timestamp\": 1522868974802,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"isDeleted\": false\n },\n \"177769\": {\n \"objectType\": \"TICKET\",\n \"portalId\": 62515,\n \"objectId\": 177769,\n \"properties\": {\n \"subject\": {\n \"versions\": [\n {\n \"name\": \"subject\",\n \"value\": \"This is my first ticket!\",\n \"timestamp\": 1522862571921,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"This is my first ticket!\",\n \"timestamp\": 1522862571921,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"created_by\": {\n \"versions\": [\n {\n \"name\": \"created_by\",\n \"value\": \"496346\",\n \"timestamp\": 1522862571921,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"496346\",\n \"timestamp\": 1522862571921,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"content\": {\n \"versions\": [\n {\n \"name\": \"content\",\n \"value\": \"Here's the content of the ticket.\",\n \"timestamp\": 1522862571921,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"Here's the content of the ticket.\",\n \"timestamp\": 1522862571921,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"isDeleted\": false\n }\n}"
Successful response - Create a group of tickets
The response is of type object
.
Was this page helpful?