Allo

Publier le flux d'appel

Publie le brouillon de travail, ce qui en fait le flux d'appel en direct du numéro. Le paramètre de chemin est le numéro Allo au format E.164.

POST/v2/api/numbers/{number}/call_flow/publish

Comportement

Publie le brouillon de travail, ce qui en fait le flux d'appel en direct du numéro. Le paramètre de chemin {number} est le numéro Allo au format E.164.

Passez la lock_version du brouillon que vous publiez. Récupérez-la avec Récupérer le brouillon du flux d'appel.

La publication conserve l'engine_subset du brouillon. Un flux NESTED_IVR n'exécute que son menu téléphonique racine sur les appels réels : enregistrez le brouillon avec "engine_subset": "FULL_FLOW" pour exécuter l'arbre entier. Voir Sous-ensemble du moteur.

La publication exécute la validation complète, plus stricte que la validation souple appliquée à l'enregistrement d'un brouillon : un brouillon enregistré avec succès peut donc échouer à la publication. Si une règle échoue, toute la publication est annulée et le flux précédemment en direct continue de router les appels.

La publication consomme le brouillon : la version brouillon devient la version publiée, le numéro se retrouve donc sans brouillon et la réponse ne contient pas de confirmation_url. Commencez le cycle d'édition suivant par un nouveau PUT …/call_flow/draft.

Erreurs

  • 400 CALL_FLOW_INVALID : le brouillon a échoué à la validation complète.
  • 400 CALL_FLOW_ROOT_MENU_TOO_SMALL : le numéro utilise un SVI et ce flux laisserait son menu avec moins de 2 options.
  • 400 CALL_FLOW_CONTACT_PROPERTY_KEY_REQUIRED : un nœud CONTACT_PROPERTY n'a pas de propertyKey.
  • 400 CALL_FLOW_CONTACT_PROPERTY_VALUE_REQUIRED : un nœud CONTACT_PROPERTY n'a pas d'expectedValue.
  • 400 CALL_FLOW_CONTACT_PROPERTY_UNKNOWN : la propertyKey d'un nœud CONTACT_PROPERTY ne correspond à aucune propriété de personne personnalisée de votre équipe. Renommer ou supprimer une propriété dans le CRM invalide un flux qui s'appuie dessus.
  • 404 CALL_FLOW_DRAFT_NOT_FOUND : il n'y a aucun brouillon à publier. Enregistrez-en un d'abord avec PUT /v2/api/numbers/{number}/call_flow/draft.
  • 404 PHONE_NUMBER_NOT_FOUND : le numéro ne fait pas partie des numéros de votre compte.
  • 409 CALL_FLOW_STALE_LOCK : la lock_version est périmée ; récupérez à nouveau le brouillon et réessayez.

Autorisation

Authorizationstring · headerrequis

Api-Key ak_live_…

Paramètres de chemin

numberstringrequis

Allo phone number in E.164 format

Corps

lock_versionintegerrequis

The lock_version of the draft you are publishing.

Réponses

200The published call flow
dataobject

A version of a phone number's call flow.

11 champs
idstring | null

The call flow version ID. Null for a synthesized (never-persisted) flow.

flow_idstring | null

The parent call flow ID. Null for a synthesized flow.

versioninteger

Monotonic version number within the flow.

statusenum<string>

DRAFT (working copy), PUBLISHED (live), or SYNTHESIZED (in-memory representation of a legacy IVR-only line).

DRAFTPUBLISHEDSYNTHESIZED

lock_versioninteger

Optimistic-concurrency token; pass it back on the next draft save.

schema_versioninteger

The call flow schema version this definition conforms to.

engine_subsetenum<string>

FULL_FLOW runs the whole tree on live calls. NESTED_IVR runs only the root phone menu: its keys that lead to a nested menu, a condition or a voicemail node do nothing.

NESTED_IVRFULL_FLOW

numberstring | null

E.164 of the line this flow routes. Null for a never-persisted SYNTHESIZED flow.

confirmation_urlstring | null

A link where a signed-in user reviews this draft and publishes it. Present only on a DRAFT (a PUBLISHED or SYNTHESIZED version has nothing to confirm). Use it when a person should approve the change; to go live without one, call POST /v2/api/numbers/{number}/call_flow/publish. Treat it as opaque: pass it through verbatim, and never construct or parse it.

entry_node_idstring

The id of the entry node in definition.nodes.

definitionobject

The call flow tree document (opaque; camelCase keys).

400
401
404
409
429