Update or archive a custom subtype. Requires agency or account admin role.
PUT https://services.leadconnectorhq.com/conversations/preferences/custom-subtypes/{id}
Authorization
Path parameters
Query parameters
Body
Responses
200 - Response
400 - Bad Request
401 - Unauthorized
Example
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);