Saltar al contenido principal
POST
/
webhooks-journal
/
subscriptions
/
2026-03
Actualizar y crear suscripción
curl --request POST \
  --url https://api.hubapi.com/webhooks-journal/subscriptions/2026-03 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "actions": [],
  "objectIds": [
    123
  ],
  "objectTypeId": "<string>",
  "portalId": 123,
  "properties": [
    "<string>"
  ],
  "subscriptionType": "OBJECT"
}
'
import requests

url = "https://api.hubapi.com/webhooks-journal/subscriptions/2026-03"

payload = {
    "actions": [],
    "objectIds": [123],
    "objectTypeId": "<string>",
    "portalId": 123,
    "properties": ["<string>"],
    "subscriptionType": "OBJECT"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    actions: [],
    objectIds: [123],
    objectTypeId: '<string>',
    portalId: 123,
    properties: ['<string>'],
    subscriptionType: 'OBJECT'
  })
};

fetch('https://api.hubapi.com/webhooks-journal/subscriptions/2026-03', 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/webhooks-journal/subscriptions/2026-03",
  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([
    'actions' => [
        
    ],
    'objectIds' => [
        123
    ],
    'objectTypeId' => '<string>',
    'portalId' => 123,
    'properties' => [
        '<string>'
    ],
    'subscriptionType' => 'OBJECT'
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "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/webhooks-journal/subscriptions/2026-03"

	payload := strings.NewReader("{\n  \"actions\": [],\n  \"objectIds\": [\n    123\n  ],\n  \"objectTypeId\": \"<string>\",\n  \"portalId\": 123,\n  \"properties\": [\n    \"<string>\"\n  ],\n  \"subscriptionType\": \"OBJECT\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	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/webhooks-journal/subscriptions/2026-03")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"actions\": [],\n  \"objectIds\": [\n    123\n  ],\n  \"objectTypeId\": \"<string>\",\n  \"portalId\": 123,\n  \"properties\": [\n    \"<string>\"\n  ],\n  \"subscriptionType\": \"OBJECT\"\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.hubapi.com/webhooks-journal/subscriptions/2026-03")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"actions\": [],\n  \"objectIds\": [\n    123\n  ],\n  \"objectTypeId\": \"<string>\",\n  \"portalId\": 123,\n  \"properties\": [\n    \"<string>\"\n  ],\n  \"subscriptionType\": \"OBJECT\"\n}"

response = http.request(request)
puts response.read_body
{
  "actions": [],
  "appId": 123,
  "createdAt": "2023-11-07T05:31:56Z",
  "id": 123,
  "objectTypeId": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z",
  "actionOverrides": {},
  "associatedObjectTypeIds": [
    "<string>"
  ],
  "createdBy": 123,
  "deletedAt": "2023-11-07T05:31:56Z",
  "listIds": [
    123
  ],
  "objectIds": [
    123
  ],
  "portalId": 123,
  "properties": [
    "<string>"
  ]
}
{
  "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

Autorizaciones

Authorization
string
header
requerido

The access token received from the authorization server in the OAuth 2.0 flow.

Cuerpo

application/json
actions
enum<string>[]
requerido

Un conjunto de cadenas que especifican las acciones que activan el desencadenante. Las acciones válidas incluyen "CREATE", "UPDATE", "DELETE", "MERGE", "RESTORE".

Opciones disponibles:
CREATE,
UPDATE,
DELETE,
MERGE,
RESTORE,
ASSOCIATION_ADDED,
ASSOCIATION_REMOVED,
SNAPSHOT,
APP_INSTALL,
APP_UNINSTALL,
ADDED_TO_LIST,
REMOVED_FROM_LIST,
GDPR_DELETE
objectIds
integer<int64>[]
requerido

Un conjunto de números enteros que representan los ID de los objetos involucrados en la suscripción. Vacío significa escuchar todos los objectIds.

objectTypeId
string
requerido

Una cadena que identifica el tipo de objeto para el que se crea o actualiza la suscripción. Por ejemplo, "0-1" para contactos.

portalId
integer<int64>
requerido

Un número entero que representa el ID del portal asociado a la suscripción.

properties
string[]
requerido

Un conjunto de cadenas que enumera las propiedades de los objetos relevantes para la suscripción. Vacío significa escuchar todas las propiedades.

subscriptionType
enum<string>
predeterminado:OBJECT
requerido

Una cadena que indica el tipo de suscripción. El valor predeterminado y único válido es "OBJECT".

Opciones disponibles:
OBJECT

Respuesta

successful operation

actions
enum<string>[]
requerido

Una lista de acciones que desencadenan la suscripción. Los valores posibles son "CREATE", "UPDATE", "DELETE", "MERGE", "RESTORE", "ASSOCIATION_ADDED", "ASSOCIATION_REMOVED", "SNAPSHOT", "APP_INSTALL", "APP_UNINSTALL", "ADDED_TO_LIST", "REMOVED_FROM_LIST" y "RGPD_DELETE".

Opciones disponibles:
CREATE,
UPDATE,
DELETE,
MERGE,
RESTORE,
ASSOCIATION_ADDED,
ASSOCIATION_REMOVED,
SNAPSHOT,
APP_INSTALL,
APP_UNINSTALL,
ADDED_TO_LIST,
REMOVED_FROM_LIST,
GDPR_DELETE
appId
integer<int64>
requerido

El identificador único de la aplicación asociada a la suscripción. Es un número entero con formato int64.

createdAt
string<date-time>
requerido

La fecha y hora en que se creó la suscripción, en formato ISO 8601.

id
integer<int64>
requerido

El identificador único de la suscripción. Es un número entero con formato int64.

objectTypeId
string
requerido

El identificador del tipo de objeto asociado a la suscripción. Es una cadena.

subscriptionType
enum<string>
requerido

El tipo de suscripción, que puede ser "OBJECT", "ASSOCIATION", "EVENT", "APP_LIFECYCLE_EVENT", "LIST_MEMBERSHIP" o "RGPD_PRIVACY_DELETION".

Opciones disponibles:
APP_LIFECYCLE_EVENT,
ASSOCIATION,
EVENT,
GDPR_PRIVACY_DELETION,
LIST_MEMBERSHIP,
OBJECT
updatedAt
string<date-time>
requerido

La fecha y hora en que la suscripción se actualizó por última vez, en formato ISO 8601.

actionOverrides
object

Un objeto que contiene anulaciones de acciones, donde cada clave es una acción y el valor es un objeto ActionOverrideRequest.

associatedObjectTypeIds
string[]

Una lista de ID de tipos de objeto asociados. Cada ID es una cadena.

createdBy
integer<int64>

El ID del usuario que creó la suscripción. Es un número entero con formato int64.

deletedAt
string<date-time>

La fecha y hora en que se eliminó la suscripción, en formato ISO 8601, si corresponde.

listIds
integer<int64>[]

Una lista de ID de listas asociadas a la suscripción. Cada ID es un número entero con formato int64.

objectIds
integer<int64>[]

Una lista de ID de objeto asociados a la suscripción. Cada ID es un número entero con formato int64.

portalId
integer<int64>

El identificador único del portal asociado a la suscripción. Es un número entero con formato int64.

properties
string[]

Una lista de nombres de propiedades asociados a la suscripción. Cada propiedad es una cadena.

Última modificación el 3 de abril de 2026