curl --request POST \
--url https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-update
"\nExample POST URL:\nhttps://api.hubapi.com/crm-objects/v1/objects/tickets/batch-update\n\nExample POST data (updating 2 properties each for 2 tickets):\n[\n {\n \"objectId\": 176602,\n \"properties\": [\n {\n \"name\": \"status\",\n \"value\": \"CLOSED\"\n },\n {\n \"name\": \"content\",\n \"value\": \"This is now an updated ticket marked as closed.\"\n }\n ]\n },\n {\n \"objectId\": 178218,\n \"properties\": [\n {\n \"name\": \"status\",\n \"value\": \"IN_PROGRESS\"\n },\n {\n \"name\": \"content\",\n \"value\": \"This is another updated ticket marked as in progress.\"\n }\n ]\n }\n]\n\nExample Response:\n[\n {\n \"objectType\": \"TICKET\",\n \"portalId\": 62515,\n \"objectId\": 176602,\n \"properties\": {\n \"content\": {\n \"versions\": [\n {\n \"name\": \"content\",\n \"value\": \"This is now an updated ticket marked as closed.\",\n \"timestamp\": 1522872562016,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"This is now an updated ticket marked as closed.\",\n \"timestamp\": 1522872562016,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"status\": {\n \"versions\": [\n {\n \"name\": \"status\",\n \"value\": \"CLOSED\",\n \"timestamp\": 1522870759430,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"CLOSED\",\n \"timestamp\": 1522870759430,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"isDeleted\": false\n },\n {\n \"objectType\": \"TICKET\",\n \"portalId\": 62515,\n \"objectId\": 178218,\n \"properties\": {\n \"hs_lastmodifieddate\": {\n \"versions\": [\n {\n \"name\": \"hs_lastmodifieddate\",\n \"value\": \"0\",\n \"timestamp\": 0,\n \"source\": \"CALCULATED\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"0\",\n \"timestamp\": 0,\n \"source\": \"CALCULATED\",\n \"sourceId\": null\n },\n \"content\": {\n \"versions\": [\n {\n \"name\": \"content\",\n \"value\": \"This is another updated ticket marked as in progress.\",\n \"timestamp\": 1522876779774,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"This is another updated ticket marked as in progress.\",\n \"timestamp\": 1522876779774,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"status\": {\n \"versions\": [\n {\n \"name\": \"status\",\n \"value\": \"IN_PROGRESS\",\n \"timestamp\": 1522876779774,\n \"source\": \"API\",\n \"sourceVid\": []\n },\n {\n \"name\": \"status\",\n \"value\": \"OPEN\",\n \"timestamp\": 1522870759430,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"IN_PROGRESS\",\n \"timestamp\": 1522876779774,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"isDeleted\": false\n }\n]"
Update an existing ticket by its ID. The request body must be a list of properties you want to update, with each entry including the internal name of the property you want to update, and the new value for that property. See the example for details.
curl --request POST \
--url https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-update
"\nExample POST URL:\nhttps://api.hubapi.com/crm-objects/v1/objects/tickets/batch-update\n\nExample POST data (updating 2 properties each for 2 tickets):\n[\n {\n \"objectId\": 176602,\n \"properties\": [\n {\n \"name\": \"status\",\n \"value\": \"CLOSED\"\n },\n {\n \"name\": \"content\",\n \"value\": \"This is now an updated ticket marked as closed.\"\n }\n ]\n },\n {\n \"objectId\": 178218,\n \"properties\": [\n {\n \"name\": \"status\",\n \"value\": \"IN_PROGRESS\"\n },\n {\n \"name\": \"content\",\n \"value\": \"This is another updated ticket marked as in progress.\"\n }\n ]\n }\n]\n\nExample Response:\n[\n {\n \"objectType\": \"TICKET\",\n \"portalId\": 62515,\n \"objectId\": 176602,\n \"properties\": {\n \"content\": {\n \"versions\": [\n {\n \"name\": \"content\",\n \"value\": \"This is now an updated ticket marked as closed.\",\n \"timestamp\": 1522872562016,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"This is now an updated ticket marked as closed.\",\n \"timestamp\": 1522872562016,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"status\": {\n \"versions\": [\n {\n \"name\": \"status\",\n \"value\": \"CLOSED\",\n \"timestamp\": 1522870759430,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"CLOSED\",\n \"timestamp\": 1522870759430,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"isDeleted\": false\n },\n {\n \"objectType\": \"TICKET\",\n \"portalId\": 62515,\n \"objectId\": 178218,\n \"properties\": {\n \"hs_lastmodifieddate\": {\n \"versions\": [\n {\n \"name\": \"hs_lastmodifieddate\",\n \"value\": \"0\",\n \"timestamp\": 0,\n \"source\": \"CALCULATED\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"0\",\n \"timestamp\": 0,\n \"source\": \"CALCULATED\",\n \"sourceId\": null\n },\n \"content\": {\n \"versions\": [\n {\n \"name\": \"content\",\n \"value\": \"This is another updated ticket marked as in progress.\",\n \"timestamp\": 1522876779774,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"This is another updated ticket marked as in progress.\",\n \"timestamp\": 1522876779774,\n \"source\": \"API\",\n \"sourceId\": null\n },\n \"status\": {\n \"versions\": [\n {\n \"name\": \"status\",\n \"value\": \"IN_PROGRESS\",\n \"timestamp\": 1522876779774,\n \"source\": \"API\",\n \"sourceVid\": []\n },\n {\n \"name\": \"status\",\n \"value\": \"OPEN\",\n \"timestamp\": 1522870759430,\n \"source\": \"API\",\n \"sourceVid\": []\n }\n ],\n \"value\": \"IN_PROGRESS\",\n \"timestamp\": 1522876779774,\n \"source\": \"API\",\n \"sourceId\": null\n }\n },\n \"isDeleted\": false\n }\n]"
Successful response - Update an existing ticket by its ID
The response is of type object
.
Was this page helpful?