Skip to main content
Update or archive a custom subtype. Requires agency or account admin role.
PUT https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes/{id}

Autorización

Authorization
string
required
Bearer token generado desde el portal Leadway. Ver Autenticación.
Version
string
default:"2021-07-28"
required
Versión de la API.

Path parameters

id
string
default:"ve9EPM428h8vShlRW1KT"
required
Custom Subtype Id

Query parameters

locationId
string
default:"ve9EPM428h8vShlRW1KT"
required
Account Id

Body

name
string
default:"Newsletter Subscription"
Name of the custom subtype (max 100 characters)
description
string
Description of the custom subtype (max 100 characters)
archived
boolean
default:"False"
Whether the custom subtype is archived
Resubscription legal form ID (optional when archiving)

Respuestas

{}
{}

Ejemplo

curl -X PUT 'https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes/YOUR_id' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Version: 2021-07-28' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "Newsletter Subscription",
  "description": "Updated weekly newsletter subscription preferences",
  "archived": false,
  "resubscription_legal_form_id": "form_123456"
}'
const response = await fetch('https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes/YOUR_id', {
  method: 'PUT',
  headers: {
    Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
    Version: '2021-07-28',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"name": "Newsletter Subscription", "description": "Updated weekly newsletter subscription preferences", "archived": false, "resubscription_legal_form_id": "form_123456"}),
});
const data = await response.json();
import os, requests
response = requests.request(
    'PUT',
    'https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes/YOUR_id',
    headers={
        'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
        'Version': '2021-07-28',
        'Content-Type': 'application/json',
    },
    json={"name": "Newsletter Subscription", "description": "Updated weekly newsletter subscription preferences", "archived": false, "resubscription_legal_form_id": "form_123456"},
)
data = response.json()
<?php
$ch = curl_init('https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes/YOUR_id');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
        'Version: 2021-07-28',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode({'name': 'Newsletter Subscription', 'description': 'Updated weekly newsletter subscription preferences', 'archived': false, 'resubscription_legal_form_id': 'form_123456'}),
]);
$data = json_decode(curl_exec($ch), true);