オブジェクト定義を作成
curl --request POST \
--url 'https://api.hubapi.com/media-bridge/2026-09/{appId}/settings/object-definitions?hapikey=' \
--header 'Content-Type: application/json' \
--data '
{
"mediaTypes": []
}
'import requests
url = "https://api.hubapi.com/media-bridge/2026-09/{appId}/settings/object-definitions?hapikey="
payload = { "mediaTypes": [] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({mediaTypes: []})
};
fetch('https://api.hubapi.com/media-bridge/2026-09/{appId}/settings/object-definitions?hapikey=', 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/media-bridge/2026-09/{appId}/settings/object-definitions?hapikey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mediaTypes' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hubapi.com/media-bridge/2026-09/{appId}/settings/object-definitions?hapikey="
payload := strings.NewReader("{\n \"mediaTypes\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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/media-bridge/2026-09/{appId}/settings/object-definitions?hapikey=")
.header("Content-Type", "application/json")
.body("{\n \"mediaTypes\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/media-bridge/2026-09/{appId}/settings/object-definitions?hapikey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"mediaTypes\": []\n}"
response = http.request(request)
puts response.read_body{
"createdObjects": {}
}{
"message": "Invalid input (details will vary based on the error)",
"correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
"category": "VALIDATION_ERROR",
"links": {
"knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
}
}スキーマ
Create Object Definitions
HubSpotメディアブリッジで特定のアプリの新しいオブジェクト定義を作成してください。このエンドポイントは、アプリ内で使用できる新しいオブジェクトを定義するために使用され、メディア関連機能のカスタマイズと連携を可能にします。
POST
/
media-bridge
/
2026-09
/
{appId}
/
settings
/
object-definitions
オブジェクト定義を作成
curl --request POST \
--url 'https://api.hubapi.com/media-bridge/2026-09/{appId}/settings/object-definitions?hapikey=' \
--header 'Content-Type: application/json' \
--data '
{
"mediaTypes": []
}
'import requests
url = "https://api.hubapi.com/media-bridge/2026-09/{appId}/settings/object-definitions?hapikey="
payload = { "mediaTypes": [] }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({mediaTypes: []})
};
fetch('https://api.hubapi.com/media-bridge/2026-09/{appId}/settings/object-definitions?hapikey=', 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/media-bridge/2026-09/{appId}/settings/object-definitions?hapikey=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'mediaTypes' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hubapi.com/media-bridge/2026-09/{appId}/settings/object-definitions?hapikey="
payload := strings.NewReader("{\n \"mediaTypes\": []\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
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/media-bridge/2026-09/{appId}/settings/object-definitions?hapikey=")
.header("Content-Type", "application/json")
.body("{\n \"mediaTypes\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/media-bridge/2026-09/{appId}/settings/object-definitions?hapikey=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"mediaTypes\": []\n}"
response = http.request(request)
puts response.read_body{
"createdObjects": {}
}{
"message": "Invalid input (details will vary based on the error)",
"correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
"category": "VALIDATION_ERROR",
"links": {
"knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
}
}Supported products
Supported products
Required Scopes
Required Scopes
承認
パスパラメータ
オブジェクト定義が作成されているアプリの一意の識別子。
ボディ
application/json
作成可能なメディアオブジェクトのタイプを表す文字列の配列です。有効な値には、「VIDEO」、「AUDIO」、「DOCUMENT」、「OTHER」、「IMAGE」が含まれます。
利用可能なオプション:
VIDEO, AUDIO, DOCUMENT, OTHER, IMAGE レスポンス
successful operation
正常に作成されたオブジェクトの配列。配列内の各オブジェクトは、新しく作成された連携オブジェクトを表します。
Show child attributes
Show child attributes
最終更新日 2026年10月6日