Preview or confirm an ordered form field update
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/webhooks/{id}/form-sync \
--header 'Content-Type: application/json' \
--data '
{
"form_fields": [
{
"name": "<string>",
"required": true,
"max_length": 50000,
"options": [
"<string>"
],
"label": "<string>",
"placeholder": "<string>",
"help": "<string>",
"default": "<string>"
}
],
"expected_fields": [
{
"name": "<string>",
"required": true,
"max_length": 50000,
"options": [
"<string>"
],
"label": "<string>",
"placeholder": "<string>",
"help": "<string>",
"default": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
form_fields: [
{
name: '<string>',
required: true,
max_length: 50000,
options: ['<string>'],
label: '<string>',
placeholder: '<string>',
help: '<string>',
default: '<string>'
}
],
expected_fields: [
{
name: '<string>',
required: true,
max_length: 50000,
options: ['<string>'],
label: '<string>',
placeholder: '<string>',
help: '<string>',
default: '<string>'
}
]
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/webhooks/{id}/form-sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/webhooks/{id}/form-sync"
payload = {
"form_fields": [
{
"name": "<string>",
"required": True,
"max_length": 50000,
"options": ["<string>"],
"label": "<string>",
"placeholder": "<string>",
"help": "<string>",
"default": "<string>"
}
],
"expected_fields": [
{
"name": "<string>",
"required": True,
"max_length": 50000,
"options": ["<string>"],
"label": "<string>",
"placeholder": "<string>",
"help": "<string>",
"default": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"before": [
{
"name": "<string>",
"type": "text",
"required": true,
"max_length": 50000,
"options": [
"<string>"
],
"label": "<string>",
"placeholder": "<string>",
"help": "<string>",
"default": "<string>"
}
],
"after": [
{
"name": "<string>",
"type": "text",
"required": true,
"max_length": 50000,
"options": [
"<string>"
],
"label": "<string>",
"placeholder": "<string>",
"help": "<string>",
"default": "<string>"
}
],
"changed": true,
"applied": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"max_projects": 123,
"projects": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true,
"feature": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"max_projects": 123,
"projects": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true,
"feature": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"max_projects": 123,
"projects": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true,
"feature": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"max_projects": 123,
"projects": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true,
"feature": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"max_projects": 123,
"projects": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true,
"feature": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"max_projects": 123,
"projects": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true,
"feature": "<string>"
}Webhooks
Preview or confirm an ordered form field update
Preview with form_fields. To apply, also send expected_fields equal to the before array from the preview. An unchanged array does not write.
POST
/
admin
/
api
/
projects
/
{project_id}
/
webhooks
/
{id}
/
form-sync
Preview or confirm an ordered form field update
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/webhooks/{id}/form-sync \
--header 'Content-Type: application/json' \
--data '
{
"form_fields": [
{
"name": "<string>",
"required": true,
"max_length": 50000,
"options": [
"<string>"
],
"label": "<string>",
"placeholder": "<string>",
"help": "<string>",
"default": "<string>"
}
],
"expected_fields": [
{
"name": "<string>",
"required": true,
"max_length": 50000,
"options": [
"<string>"
],
"label": "<string>",
"placeholder": "<string>",
"help": "<string>",
"default": "<string>"
}
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
form_fields: [
{
name: '<string>',
required: true,
max_length: 50000,
options: ['<string>'],
label: '<string>',
placeholder: '<string>',
help: '<string>',
default: '<string>'
}
],
expected_fields: [
{
name: '<string>',
required: true,
max_length: 50000,
options: ['<string>'],
label: '<string>',
placeholder: '<string>',
help: '<string>',
default: '<string>'
}
]
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/webhooks/{id}/form-sync', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/webhooks/{id}/form-sync"
payload = {
"form_fields": [
{
"name": "<string>",
"required": True,
"max_length": 50000,
"options": ["<string>"],
"label": "<string>",
"placeholder": "<string>",
"help": "<string>",
"default": "<string>"
}
],
"expected_fields": [
{
"name": "<string>",
"required": True,
"max_length": 50000,
"options": ["<string>"],
"label": "<string>",
"placeholder": "<string>",
"help": "<string>",
"default": "<string>"
}
]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"before": [
{
"name": "<string>",
"type": "text",
"required": true,
"max_length": 50000,
"options": [
"<string>"
],
"label": "<string>",
"placeholder": "<string>",
"help": "<string>",
"default": "<string>"
}
],
"after": [
{
"name": "<string>",
"type": "text",
"required": true,
"max_length": 50000,
"options": [
"<string>"
],
"label": "<string>",
"placeholder": "<string>",
"help": "<string>",
"default": "<string>"
}
],
"changed": true,
"applied": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"max_projects": 123,
"projects": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true,
"feature": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"max_projects": 123,
"projects": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true,
"feature": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"max_projects": 123,
"projects": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true,
"feature": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"max_projects": 123,
"projects": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true,
"feature": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"max_projects": 123,
"projects": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true,
"feature": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"max_projects": 123,
"projects": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true,
"feature": "<string>"
}Path Parameters
Body
application/json