Pular para o conteúdo
POST
/Schema
curl --request POST \
--url https://api.chatfood.app/Schema \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json-patch+json' \
--data '{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "createdAt": "2026-04-15T12:00:00Z", "updatedAt": "2026-04-15T12:00:00Z", "name": "example", "createdBy": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "updatedBy": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "provider": 1, "pages": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "createdAt": "2026-04-15T12:00:00Z", "updatedAt": "2026-04-15T12:00:00Z", "accountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "providerId": 1, "referenceId": "example", "name": "example", "createdBy": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "categoryId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "categoryName": "example", "categoryVariableGroupId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "timeZone": "example", "language": "example", "currency": "example", "countryCode": "example", "appId": "example", "metaAppId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metaAppName": "example", "status": 0, "accountName": "example", "lastConnectedAt": "2026-04-15T12:00:00Z", "connectedByName": "example", "connectedProfiles": [ { "id": "example", "name": "example", "hasActiveToken": true } ], "openIssueCount": 1, "loggedIssueCount24h": 1, "leadCount": 1, "leadsToday": 1, "leads7d": 1, "profileCounts": { "total": 1, "active": 1, "blocked": 1, "deleted": 1 }, "connectedApps": [ { "metaAppId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "appId": "example", "channel": 0, "status": 0, "connectedAt": "2026-04-15T12:00:00Z", "connectedByName": "example", "connectedById": "example" } ], "urls": [ { "host": "example", "url": "example", "source": 0, "label": "example", "weight": 1, "health": 0, "healthChangedAt": "2026-04-15T12:00:00Z" } ], "urlCount": 1, "integrityStatus": "example", "integrityStatusChangedAt": "2026-04-15T12:00:00Z", "integrityViolationTypes": [ "example" ], "schemas": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "channelTrigger": 0, "isKeywordOnly": true, "updatedAt": "2026-04-15T12:00:00Z" } ], "issues": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "createdAt": "2026-04-15T12:00:00Z", "updatedAt": "2026-04-15T12:00:00Z", "pageId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "tokenId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metaAppId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "metaAppName": "example", "scope": "example", "type": 0, "status": 0, "severity": 1, "errorCode": 1, "errorSubcode": 1, "message": "example", "occurrenceCount": 1, "firstOccurrenceAt": "2026-04-15T12:00:00Z", "lastOccurrenceAt": "2026-04-15T12:00:00Z", "resolvedAt": "2026-04-15T12:00:00Z", "resolvedBy": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "resolutionNote": "example", "connectionEpoch": 1, "occurredAt": "2026-04-15T12:00:00Z", "isStale": true, "isCurrentConnection": true } ], "pageToken": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "createdAt": "2026-04-15T12:00:00Z", "updatedAt": "2026-04-15T12:00:00Z", "pageId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "accessToken": "example", "status": 0, "channel": 0, "metaAppId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } ], "variables": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "createdAt": "2026-04-15T12:00:00Z", "updatedAt": "2026-04-15T12:00:00Z", "pageId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "key": "example", "value": "example", "dynamicValue": "example", "type": 0 } ], "category": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "createdAt": "2026-04-15T12:00:00Z", "updatedAt": "2026-04-15T12:00:00Z", "accountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "createdBy": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" } } ], "totalPages": 1, "status": 0, "script": "example", "accountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "messageTrigger": "example", "messageTriggers": [ "example" ], "triggerLabels": { "additionalProperty": "example" }, "triggerMatchType": 0, "unsubscribeMessageTriggers": [ "example" ], "unsubscribeTriggerMatchType": 0, "channelTrigger": 0, "language": "example", "translation": { "languages": [ { "language": "example", "script": "example", "status": 0, "scriptHash": "example", "lastAttemptAt": "2026-04-15T12:00:00Z", "completedAt": "2026-04-15T12:00:00Z", "errorMessage": "example" } ], "status": 0, "enable": true, "createdAt": "2026-04-15T12:00:00Z" }, "createdByUser": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "date": "2026-04-15T12:00:00Z" }, "updatedByUser": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "date": "2026-04-15T12:00:00Z" }, "variableValidation": { "status": "example", "totalPages": 1, "pagesWithProblems": 1, "problems": [ { "pageId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "pageName": "example", "referenceId": "example", "missingVariables": [ "example" ] } ], "validatedAt": "2026-04-15T12:00:00Z" }, "categories": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example" } ], "channelTargets": [ { "pageId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "includeProfiles": true, "channelReferenceIds": [ "example" ] } ], "dynamicUpdate": { "enabled": true }, "templates": [ { "pageId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "pageReferenceId": "example", "routeName": "example", "interactionIndex": 1, "templateId": "example", "templateName": "example", "languageCode": "example", "domainSignature": "example", "status": "example", "errorMessage": "example", "componentVariables": [ { "type": "example", "variables": [ "example" ], "parameterNames": [ "example" ], "urlPattern": "example", "lockedBaseUrl": "example", "payload": "example", "fallbackUrlPattern": "example" } ], "components": [ { "type": "example", "parameters": [ { "type": "example", "parameterName": "example", "text": "example", "url": "example", "payload": "example" } ] } ], "requiresReapproval": true, "accountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "flowName": "example", "displayName": "example", "description": "example", "interactionJson": "example", "visibility": 0, "categories": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example" } ], "createdByUser": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "date": "2026-04-15T12:00:00Z" } } ], "trackLinkClicks": true, "conversationSettings": { "whenUnmatched": { "mode": "example", "route": "example", "schemaId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "onEnd": "example" }, "whenFinished": { "mode": "example", "route": "example", "schemaId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "onEnd": "example" }, "whenAlreadyScheduled": "example", "escapeKeywords": [ "example" ] } }'
accountId
string format: uuid
object
id
string format: uuid
createdAt
string format: date-time
updatedAt
string format: date-time
nullable
name
string
nullable
createdBy
string format: uuid
updatedBy
string format: uuid
provider
integer format: int32
Allowed values: 1 2 3
pages
Array<object>
nullable
object
id
string format: uuid
createdAt
string format: date-time
updatedAt
string format: date-time
nullable
accountId
string format: uuid
providerId
integer format: int32
Allowed values: 1 2 3
referenceId
string
nullable
name
string
nullable
createdBy
string format: uuid
categoryId
string format: uuid
nullable
categoryName
string
nullable
categoryVariableGroupId
string format: uuid
nullable
timeZone
string
nullable
language
string
nullable
currency
string
nullable
countryCode
string
nullable
appId
string
nullable
metaAppId
string format: uuid
nullable
metaAppName
string
nullable
status
integer format: int32
Allowed values: 0 1 2 3 -1
accountName
string
nullable
lastConnectedAt
string format: date-time
nullable
connectedByName
string
nullable
connectedProfiles
Array<object>
nullable
object
id
string
nullable
name
string
nullable
hasActiveToken
boolean
openIssueCount
integer format: int32
loggedIssueCount24h
integer format: int32
leadCount
integer format: int64
leadsToday
integer format: int64
leads7d
integer format: int64
profileCounts
object
total
integer format: int64
active
integer format: int64
blocked
integer format: int64
deleted
integer format: int64
connectedApps
Array<object>
nullable
object
metaAppId
string format: uuid
name
string
nullable
appId
string
nullable
channel
integer format: int32
Allowed values: 0 1 2 3
status
integer format: int32
Allowed values: 0 1 -3 -2 -1
connectedAt
string format: date-time
connectedByName
string
nullable
connectedById
string
nullable
urls
Array<object>
nullable
object
host
string
nullable
url
string
nullable
source
integer format: int32
Allowed values: 0 1
label
string
nullable
weight
integer format: int32
nullable
health
integer format: int32
Allowed values: 0 1 2 3 4
healthChangedAt
string format: date-time
nullable
urlCount
integer format: int32
integrityStatus
string
nullable
integrityStatusChangedAt
string format: date-time
nullable
integrityViolationTypes
Array<string>
nullable
schemas
Array<object>
nullable
object
id
string format: uuid
name
string
nullable
channelTrigger
integer format: int32
Allowed values: 0 1 2 3 4 5 -1
isKeywordOnly
boolean
updatedAt
string format: date-time
nullable
issues
Array<object>
nullable
object
id
string format: uuid
createdAt
string format: date-time
updatedAt
string format: date-time
nullable
pageId
string format: uuid
tokenId
string format: uuid
nullable
metaAppId
string format: uuid
nullable
metaAppName
string
nullable
scope
string
nullable
type
integer format: int32
Allowed values: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
status
integer format: int32
Allowed values: 0 1 2 3
severity
integer format: int32
Allowed values: 1 2
errorCode
integer format: int32
nullable
errorSubcode
integer format: int32
nullable
message
string
nullable
occurrenceCount
integer format: int32
firstOccurrenceAt
string format: date-time
lastOccurrenceAt
string format: date-time
resolvedAt
string format: date-time
nullable
resolvedBy
string format: uuid
nullable
resolutionNote
string
nullable
connectionEpoch
integer format: int32
nullable
occurredAt
string format: date-time
nullable
isStale
boolean
isCurrentConnection
boolean
pageToken
Array<object>
nullable
object
id
string format: uuid
createdAt
string format: date-time
updatedAt
string format: date-time
nullable
pageId
string format: uuid
accessToken
string
nullable
status
integer format: int32
Allowed values: 0 1 -3 -2 -1
channel
integer format: int32
Allowed values: 0 1 2 3
metaAppId
string format: uuid
nullable
variables
Array<object>
nullable
object
id
string format: uuid
createdAt
string format: date-time
updatedAt
string format: date-time
nullable
pageId
string format: uuid
key
string
nullable
value
string
nullable
dynamicValue
string
nullable
type
integer format: int32
Allowed values: 0 1 2
category
object
id
string format: uuid
createdAt
string format: date-time
updatedAt
string format: date-time
nullable
accountId
string format: uuid
name
string
nullable
createdBy
string format: uuid
totalPages
integer format: int32
status
integer format: int32
Allowed values: 0 1 -2 -1
script
string
nullable
accountId
string format: uuid
messageTrigger
string
nullable
messageTriggers
Array<string>
nullable
triggerLabels
object
key
additional properties
string
triggerMatchType
integer format: int32
Allowed values: 0 1
unsubscribeMessageTriggers
Array<string>
nullable
unsubscribeTriggerMatchType
integer format: int32
Allowed values: 0 1
channelTrigger
integer format: int32
Allowed values: 0 1 2 3 4 5 -1
language
string
nullable
translation
object
languages
Array<object>
nullable
object
language
string
nullable
script
string
nullable
status
integer format: int32
Allowed values: 0 1 2 3 4 -1
scriptHash
string
nullable
lastAttemptAt
string format: date-time
nullable
completedAt
string format: date-time
nullable
errorMessage
string
nullable
status
integer format: int32
Allowed values: 0 1 2 3 4 -1
enable
boolean
nullable
createdAt
string format: date-time
nullable
createdByUser
object
id
string format: uuid
name
string
nullable
date
string format: date-time
updatedByUser
object
id
string format: uuid
name
string
nullable
date
string format: date-time
variableValidation
object
status
string
nullable
totalPages
integer format: int32
pagesWithProblems
integer format: int32
problems
Array<object>
nullable
object
pageId
string format: uuid
pageName
string
nullable
referenceId
string
nullable
missingVariables
Array<string>
nullable
validatedAt
string format: date-time
nullable
categories
Array<object>
nullable
object
id
string format: uuid
name
string
nullable
channelTargets
Array<object>
nullable
object
pageId
string format: uuid
includeProfiles
boolean
channelReferenceIds
Array<string>
nullable
dynamicUpdate
object
enabled
boolean
templates
Array<object>
nullable
object
pageId
string format: uuid
pageReferenceId
string
nullable
routeName
string
nullable
interactionIndex
integer format: int32
templateId
string
nullable
templateName
string
nullable
languageCode
string
nullable
domainSignature
string
nullable
status
string
nullable
errorMessage
string
nullable
componentVariables
Array<object>
nullable
object
type
string
nullable
variables
Array<string>
nullable
parameterNames
Array<string>
nullable
urlPattern
string
nullable
lockedBaseUrl
string
nullable
payload
string
nullable
fallbackUrlPattern
string
nullable
components
Array<object>
nullable
object
type
string
nullable
parameters
Array<object>
nullable
object
type
string
nullable
parameterName
string
nullable
text
string
nullable
url
string
nullable
payload
string
nullable
requiresReapproval
boolean
accountId
string format: uuid
flowName
string
nullable
displayName
string
nullable
description
string
nullable
interactionJson
string
nullable
visibility
integer format: int32
Allowed values: 0 1
categories
Array<object>
nullable
object
id
string format: uuid
name
string
nullable
createdByUser
object
id
string format: uuid
name
string
nullable
date
string format: date-time
trackLinkClicks
boolean
nullable
conversationSettings
object
whenUnmatched
object
mode
string
nullable
route
string
nullable
schemaId
string format: uuid
nullable
onEnd
string
nullable
whenFinished
object
mode
string
nullable
route
string
nullable
schemaId
string format: uuid
nullable
onEnd
string
nullable
whenAlreadyScheduled
string
nullable
escapeKeywords
Array<string>
nullable

OK