Pular para o conteúdo

POST /v1/model-library/flows/{slug}

POST
/v1/model-library/flows/{slug}
curl --request POST \
--url https://seu-endereco-da-api/v1/model-library/flows/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example" }'

Permissão que a Chave de acesso precisa: Gerenciar fluxos (flows:manage).

slug
required
string
Media typeapplication/json
object
name
required
string
>= 1 characters <= 120 characters

Example generated

{
"name": "example"
}

Creates a draft flow from the model and sends its suggested templates to Meta for approval

Media typeapplication/json
object
flow
required
object
id
required
string
name
required
string
status
required
string
folderId
required
string
nullable
triggerType
required
string
triggerKeyword
required
string
nullable
triggerChannel
required
string
triggerAccounts
required

Ids dos canais do gatilho; vazio atende todos os canais

Array<string>
version
required
number
origin
required
string
companionAgentId
required

Agente de IA que criou o fluxo junto com ele, quando veio de uma IA pronta

string
nullable
publishedAt
required
string format: date-time
nullable
ownerUserId
required

Who receives the notice when the flow holds or fails messages

string
nullable
ownerName
required
string
nullable
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
nodeCount
number
warnings
Array<object>
object
graph
required
object
hasWebhookToken
required
boolean
aiAction

Present on the detail: what the AI did to create this flow, if it did.

object
notice
required

Notice the model shows before publishing

string
nullable
suggestedTemplates
required

Utility templates queued for Meta approval

Array<object>
object
name
required
string
language
required
string

Example generated

{
"flow": {
"id": "example",
"name": "example",
"status": "example",
"folderId": "example",
"triggerType": "example",
"triggerKeyword": "example",
"triggerChannel": "example",
"triggerAccounts": [
"example"
],
"version": 1,
"origin": "example",
"companionAgentId": "example",
"publishedAt": "2026-04-15T12:00:00Z",
"ownerUserId": "example",
"ownerName": "example",
"createdAt": "2026-04-15T12:00:00Z",
"updatedAt": "2026-04-15T12:00:00Z",
"nodeCount": 1,
"warnings": [
{}
],
"graph": {},
"hasWebhookToken": true,
"aiAction": {}
},
"notice": "example",
"suggestedTemplates": [
{
"name": "example",
"language": "example"
}
]
}

Missing the flows permission or module

Model_library_item_not_found