メインコンテンツへスキップ
PUT
/
crm-objects
/
v1
/
objects
/
tickets
/
{id}
Update a ticket
curl --request PUT \
  --url https://api.hubapi.com/crm-objects/v1/objects/tickets/{id}
import requests

url = "https://api.hubapi.com/crm-objects/v1/objects/tickets/{id}"

response = requests.put(url)

print(response.text)
const options = {method: 'PUT'};

fetch('https://api.hubapi.com/crm-objects/v1/objects/tickets/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);

$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/{id}"

req, _ := http.NewRequest("PUT", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.put("https://api.hubapi.com/crm-objects/v1/objects/tickets/{id}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.hubapi.com/crm-objects/v1/objects/tickets/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
[
  {
    "name": "hs_ticket_priority",
    "value": "HIGH"
  },
  {
    "name": "content",
    "value": "This is now an updated ticket marked as high priority."
  },
  {
    "versions": [
      {
        "name": "hs_lastmodifieddate",
        "value": "0",
        "timestamp": 0,
        "source": "CALCULATED",
        "sourceVid": []
      }
    ],
    "value": "0",
    "timestamp": 0,
    "source": "CALCULATED",
    "sourceId": null
  },
  {
    "versions": [
      {
        "name": "hs_ticket_priority",
        "value": "HIGH",
        "timestamp": 1560173981204,
        "source": "API",
        "sourceVid": []
      }
    ],
    "value": "HIGH",
    "timestamp": 1560173981204,
    "source": "API",
    "sourceId": null
  },
  {
    "versions": [
      {
        "name": "content",
        "value": "This is now an updated ticket marked as high priority.",
        "timestamp": 1522872562016,
        "source": "API",
        "sourceVid": []
      }
    ],
    "value": "This is now an updated ticket marked as closed.",
    "timestamp": 1522872562016,
    "source": "API",
    "sourceId": null
  },
  {
    "versions": [
      {
        "name": "status",
        "value": "CLOSED",
        "timestamp": 1522872562016,
        "source": "API",
        "sourceVid": []
      },
      {
        "name": "status",
        "value": "CLOSED",
        "timestamp": 1522870759430,
        "source": "API",
        "sourceVid": []
      }
    ],
    "value": "CLOSED",
    "timestamp": 1522872562016,
    "source": "API",
    "sourceId": null
  }
]

レスポンス

200 - application/json

Successful response - Get all tickets from a portal, up to 100 per request

The response is of type object.

最終更新日 2026年4月10日