Get the details for a module by ID
curl --request GET \
--url https://api.hubapi.com/content/api/v4/custom_widgets/{id}import requests
url = "https://api.hubapi.com/content/api/v4/custom_widgets/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hubapi.com/content/api/v4/custom_widgets/{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/content/api/v4/custom_widgets/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/content/api/v4/custom_widgets/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hubapi.com/content/api/v4/custom_widgets/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/content/api/v4/custom_widgets/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"authorAt": 1704317276220,
"categories": [],
"contentTags": [],
"contentTypes": [
"LANDING_PAGE",
"SITE_PAGE"
],
"created": 1589381258170,
"createdById": 5,
"css": "/* cool CSS */",
"cssAssets": [],
"cssCdnUri": "",
"cssRenderOptions": {
"async": true
},
"default": false,
"deleted": false,
"deletedAt": 0,
"externalJs": [],
"externalJsRenderOptions": {},
"extraClasses": "",
"fields": [
{
"allow_new_line": false,
"default": "Hello world",
"display_width": null,
"help_text": "",
"id": "video_title",
"label": "Video Title",
"locked": false,
"name": "video_title",
"required": true,
"show_emoji_picker": false,
"type": "text",
"validation_regex": ""
}
],
"filename": "My Module",
"folderId": 99988,
"folderPath": "my-theme/modules",
"global": false,
"hostTemplateTypes": [
"PAGE"
],
"id": 12345678910,
"inheritedAsset": false,
"inlineHelpText": "",
"isAvailableForNewContent": true,
"isJsModule": false,
"jsAssets": [],
"jsRenderOptions": null,
"messages": {},
"minifiedCssCdnUri": "https://cdn2.hubspot.net/hub/1234/hub_generated/module_assets/012345678910/987/module_012345678910_My_Module.min.css",
"moduleId": 12345678910,
"name": "My Module",
"otherAssets": [],
"path": "/my-theme/modules/My Module",
"placeholder": null,
"portalId": 1234,
"previewKey": "WLh7vw4zt8G1fuvBuBTmCQ",
"purchased": false,
"schemaVersion": 2,
"smartObjects": [],
"smartType": "NOT_SMART",
"source": "<!-- HTML source -->",
"tags": [],
"updated": 1704317276220,
"updatedById": 1122,
"writeable": true
}レガシーモジュール
Get the details for a module by ID
Get the details for a specific module using its ID.
GET
/
content
/
api
/
v4
/
custom_widgets
/
{id}
Get the details for a module by ID
curl --request GET \
--url https://api.hubapi.com/content/api/v4/custom_widgets/{id}import requests
url = "https://api.hubapi.com/content/api/v4/custom_widgets/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.hubapi.com/content/api/v4/custom_widgets/{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/content/api/v4/custom_widgets/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/content/api/v4/custom_widgets/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hubapi.com/content/api/v4/custom_widgets/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hubapi.com/content/api/v4/custom_widgets/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"authorAt": 1704317276220,
"categories": [],
"contentTags": [],
"contentTypes": [
"LANDING_PAGE",
"SITE_PAGE"
],
"created": 1589381258170,
"createdById": 5,
"css": "/* cool CSS */",
"cssAssets": [],
"cssCdnUri": "",
"cssRenderOptions": {
"async": true
},
"default": false,
"deleted": false,
"deletedAt": 0,
"externalJs": [],
"externalJsRenderOptions": {},
"extraClasses": "",
"fields": [
{
"allow_new_line": false,
"default": "Hello world",
"display_width": null,
"help_text": "",
"id": "video_title",
"label": "Video Title",
"locked": false,
"name": "video_title",
"required": true,
"show_emoji_picker": false,
"type": "text",
"validation_regex": ""
}
],
"filename": "My Module",
"folderId": 99988,
"folderPath": "my-theme/modules",
"global": false,
"hostTemplateTypes": [
"PAGE"
],
"id": 12345678910,
"inheritedAsset": false,
"inlineHelpText": "",
"isAvailableForNewContent": true,
"isJsModule": false,
"jsAssets": [],
"jsRenderOptions": null,
"messages": {},
"minifiedCssCdnUri": "https://cdn2.hubspot.net/hub/1234/hub_generated/module_assets/012345678910/987/module_012345678910_My_Module.min.css",
"moduleId": 12345678910,
"name": "My Module",
"otherAssets": [],
"path": "/my-theme/modules/My Module",
"placeholder": null,
"portalId": 1234,
"previewKey": "WLh7vw4zt8G1fuvBuBTmCQ",
"purchased": false,
"schemaVersion": 2,
"smartObjects": [],
"smartType": "NOT_SMART",
"source": "<!-- HTML source -->",
"tags": [],
"updated": 1704317276220,
"updatedById": 1122,
"writeable": true
}パスパラメータ
The ID of the module to fetch the details for
レスポンス
200 - application/json
Successful response
The unique ID of the module
The name of the module
The path of the module
The HTML source of the module
The CSS for the module
The fields/parameters of the module
Whether this is a global module
Whether the module is available for new content
When the module was created
When the module was last updated
最終更新日 2026年4月10日
⌘I