Create a group of tickets
curl --request POST \
--url https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-createimport requests
url = "https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-create"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-create"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-create")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body[
{
"name": "source_type",
"value": "TWITTER_DM"
},
{
"name": "status",
"value": "OPEN"
},
{
"name": "created_by",
"value": "496346"
},
{
"name": "subject",
"value": "This is another example ticket"
},
{
"name": "source_type",
"value": "FORM"
},
{
"name": "status",
"value": "CLOSED"
},
{
"name": "created_by",
"value": "496346"
},
{
"name": "subject",
"value": "Yet anotherexample ticket"
},
{
"versions": [
{
"name": "hs_lastmodifieddate",
"value": "0",
"timestamp": 0,
"source": "CALCULATED",
"sourceVid": []
}
],
"value": "0",
"timestamp": 0,
"source": "CALCULATED",
"sourceId": null
},
{
"versions": [
{
"name": "subject",
"value": "This is another example ticket",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "This is another example ticket",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "createdate",
"value": "0",
"timestamp": 0,
"source": "API",
"sourceVid": []
}
],
"value": "0",
"timestamp": 0,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "source_type",
"value": "TWITTER_DM",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "TWITTER_DM",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "created_by",
"value": "496346",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "496346",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "status",
"value": "OPEN",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "OPEN",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "hs_lastmodifieddate",
"value": "0",
"timestamp": 0,
"source": "CALCULATED",
"sourceVid": []
}
],
"value": "0",
"timestamp": 0,
"source": "CALCULATED",
"sourceId": null
},
{
"versions": [
{
"name": "subject",
"value": "Yet anotherexample ticket",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "Yet anotherexample ticket",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "createdate",
"value": "0",
"timestamp": 0,
"source": "API",
"sourceVid": []
}
],
"value": "0",
"timestamp": 0,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "source_type",
"value": "FORM",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "FORM",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "created_by",
"value": "496346",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "496346",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "status",
"value": "CLOSED",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "CLOSED",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
}
]v1
Create a group of tickets
Delete a group of existing tickets. Up to 100 tickets can be deleted in a single request. Note: This action cannot be undone. Deleted tickets cannot be updated and there is no way to restore them
POST
/
crm-objects
/
v1
/
objects
/
tickets
/
batch-create
Create a group of tickets
curl --request POST \
--url https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-createimport requests
url = "https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-create"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-create"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-create")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/crm-objects/v1/objects/tickets/batch-create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body[
{
"name": "source_type",
"value": "TWITTER_DM"
},
{
"name": "status",
"value": "OPEN"
},
{
"name": "created_by",
"value": "496346"
},
{
"name": "subject",
"value": "This is another example ticket"
},
{
"name": "source_type",
"value": "FORM"
},
{
"name": "status",
"value": "CLOSED"
},
{
"name": "created_by",
"value": "496346"
},
{
"name": "subject",
"value": "Yet anotherexample ticket"
},
{
"versions": [
{
"name": "hs_lastmodifieddate",
"value": "0",
"timestamp": 0,
"source": "CALCULATED",
"sourceVid": []
}
],
"value": "0",
"timestamp": 0,
"source": "CALCULATED",
"sourceId": null
},
{
"versions": [
{
"name": "subject",
"value": "This is another example ticket",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "This is another example ticket",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "createdate",
"value": "0",
"timestamp": 0,
"source": "API",
"sourceVid": []
}
],
"value": "0",
"timestamp": 0,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "source_type",
"value": "TWITTER_DM",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "TWITTER_DM",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "created_by",
"value": "496346",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "496346",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "status",
"value": "OPEN",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "OPEN",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "hs_lastmodifieddate",
"value": "0",
"timestamp": 0,
"source": "CALCULATED",
"sourceVid": []
}
],
"value": "0",
"timestamp": 0,
"source": "CALCULATED",
"sourceId": null
},
{
"versions": [
{
"name": "subject",
"value": "Yet anotherexample ticket",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "Yet anotherexample ticket",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "createdate",
"value": "0",
"timestamp": 0,
"source": "API",
"sourceVid": []
}
],
"value": "0",
"timestamp": 0,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "source_type",
"value": "FORM",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "FORM",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "created_by",
"value": "496346",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "496346",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
},
{
"versions": [
{
"name": "status",
"value": "CLOSED",
"timestamp": 1522870759430,
"source": "API",
"sourceVid": []
}
],
"value": "CLOSED",
"timestamp": 1522870759430,
"source": "API",
"sourceId": null
}
]Scope requirements
Scope requirements
レスポンス
200 - application/json
Successful response - Delete a group of existing tickets
The response is of type object.
最終更新日 2026年4月10日
⌘I