> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/partner/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/partner/partner-api/api-reference/whats-app-flows.md).

# Whats App Flows

Endpoints for managing WhatsApp Flows

## Getting all Flows

> To retrieve a list of Flows under a WhatsApp Business Account (WABA), use this request.

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"WhatsApp Flows","description":"Endpoints for managing WhatsApp Flows"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"AllFlowsOut":{"type":"object","properties":{"flows":{"type":"array","items":{"$ref":"#/components/schemas/FlowOut"}},"count":{"type":"integer"},"total":{"type":"integer"}},"additionalProperties":false},"FlowOut":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the Flow."},"name":{"type":"string","description":"The user-defined name of the Flow which is not visible to users"},"status":{"type":"string","description":"Flow status"},"categories":{"type":"array","description":"A list of Flow categories","items":{"type":"string","enum":["SIGN_UP","SIGN_IN","APPOINTMENT_BOOKING","LEAD_GENERATION","CONTACT_US","CUSTOMER_SUPPORT","SURVEY","OTHER"],"description":"Meta Flow category"}},"validation_errors":{"type":"array","items":{"$ref":"#/components/schemas/FlowAssetUpdateError"}},"json_version":{"type":"string","description":"The version specified by the developer in the Flow JSON asset uploaded."},"data_api_version":{"type":"string","description":"The version of the Data API specified by the developer in the Flow JSON asset uploaded. Only for Flows with an Endpoint."},"data_channel_uri":{"type":"string","description":"The URL of the Endpoint specified by the developer in the Flow JSON asset uploaded. Only for Flows with an Endpoint."},"preview":{"description":"The URL to the web preview page to visualize the flow and its expiry time.","allOf":[{"$ref":"#/components/schemas/FlowPreview"}]},"whatsapp_business_account":{"description":"The WhatsApp Business Account which owns the Flow.","allOf":[{"$ref":"#/components/schemas/MetaWABA"}]},"endpoint_uri":{"type":"string","description":"The URL of the WA Flow Endpoint specified by the developer via API or in the Builder UI."},"metric":{"description":"Metric data about the endpoint that is used for the flow.","allOf":[{"$ref":"#/components/schemas/MetaFlowMetric"}]}},"additionalProperties":false},"FlowAssetUpdateError":{"type":"object","properties":{"error":{"type":"string"},"error_type":{"type":"string"},"message":{"type":"string"},"line_start":{"type":"integer"},"line_end":{"type":"integer"},"column_start":{"type":"integer"},"column_end":{"type":"integer"}},"additionalProperties":false},"FlowPreview":{"type":"object","properties":{"preview_url":{"type":"string","format":"url","description":"Flow preview URL"},"expires_at":{"type":"string","description":"Flow preview URL expiration time in ISO8601 format"}},"additionalProperties":false},"MetaWABA":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the WABA account."},"name":{"type":"string","description":"WABA account name"},"currency":{"type":"string","description":"WABA account currency"},"timezone_id":{"type":"string","description":"Meta timezone id"},"message_template_namespace":{"type":"string","description":"Namespace of WABA templates"}},"additionalProperties":false},"MetaFlowMetric":{"type":"object","properties":{"data_points":{"type":"array","description":"A list of data points for metric.","items":{"$ref":"#/components/schemas/MetaFlowMetricDataPoint"}},"name":{"type":"string","description":"Metric name. Example: ENDPOINT_REQUEST_COUNT"},"granularity":{"type":"string","description":"Metric granularity. Example: DAY"}},"additionalProperties":false},"MetaFlowMetricDataPoint":{"type":"object","properties":{"timestamp":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MetaFlowMetricData"}}},"additionalProperties":false},"MetaFlowMetricData":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"number"}},"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows":{"get":{"parameters":[{"in":"query","name":"fields","description":"Flow fields to return. Available: id, name, categories, validation_errors, status, json_version, data_api_version, data_channel_uri, endpoint_uri, preview, whatsapp_business_account, metric","schema":{"type":"array","default":["id","name","categories","validation_errors","status"],"items":{"type":"string"}},"required":false,"explode":true,"style":"form"},{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true},{"in":"path","name":"waba_account_id","description":"The ID of the waba account.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllFlowsOut"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["WhatsApp Flows"],"summary":"Getting all Flows","description":"To retrieve a list of Flows under a WhatsApp Business Account (WABA), use this request.","operationId":"get_whatsapp_flows_partner_api_get_all"}}}}
```

## Creating a Flow

> New Flows are created in DRAFT status. You can then make changes to the Flow by uploading an updated JSON file.

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"WhatsApp Flows","description":"Endpoints for managing WhatsApp Flows"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"FlowOut1":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the Flow."}},"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false},"FlowInput":{"type":"object","properties":{"name":{"type":"string","description":"Flow name"},"categories":{"type":"array","description":"A list of Flow categories","items":{"type":"string","enum":["SIGN_UP","SIGN_IN","APPOINTMENT_BOOKING","LEAD_GENERATION","CONTACT_US","CUSTOMER_SUPPORT","SURVEY","OTHER"],"description":"Meta Flow category"}},"clone_flow_id":{"type":"string","description":"ID of source Flow to clone. You must have permission to access the specified Flow."},"endpoint_uri":{"type":"string","description":"The URL of the WA Flow Endpoint. Starting from Flow JSON version 3.0 this property should be specified .Do not provide this field if you are updating a Flow with Flow JSON version below 3.0."}},"required":["categories","name"],"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows":{"post":{"parameters":[{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true},{"in":"path","name":"waba_account_id","description":"The ID of the waba account.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowOut1"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["WhatsApp Flows"],"summary":"Creating a Flow","description":"New Flows are created in DRAFT status. You can then make changes to the Flow by uploading an updated JSON file.","operationId":"post_whatsapp_flows_partner_api_create_flow","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowInput"}}}}}}}}
```

## Migrate flows from one WABA to another.

> Migrate Flows from one WhatsApp Business Account (WABA) to another. Migration doesn't move the source Flows, it creates copies of them with the same names in the destination WABA.

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"WhatsApp Flows","description":"Endpoints for managing WhatsApp Flows"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"FlowMigrateOut":{"type":"object","properties":{"migrated_flows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}},"failed_flows":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"}}}},"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false},"FlowMigrateIn":{"type":"object","properties":{"source_waba_account_id":{"type":"string","description":"Source WhatsApp Business Account ID to copy flows from"},"source_flow_names":{"type":"array","description":"List of source flow names to migrate. If not provided, all flows will be migrated.","items":{"type":"string"}}},"required":["source_waba_account_id"],"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/migrate_flows":{"post":{"parameters":[{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true},{"in":"path","name":"waba_account_id","description":"The ID of the waba account.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowMigrateOut"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["WhatsApp Flows"],"summary":"Migrate flows from one WABA to another.","description":"Migrate Flows from one WhatsApp Business Account (WABA) to another. Migration doesn't move the source Flows, it creates copies of them with the same names in the destination WABA.","operationId":"post_whatsapp_flows_partner_api_migrate_flows","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowMigrateIn"}}}}}}}}
```

## Getting Flow details

> This request will return a single Flow's details.

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"WhatsApp Flows","description":"Endpoints for managing WhatsApp Flows"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"FlowOut":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the Flow."},"name":{"type":"string","description":"The user-defined name of the Flow which is not visible to users"},"status":{"type":"string","description":"Flow status"},"categories":{"type":"array","description":"A list of Flow categories","items":{"type":"string","enum":["SIGN_UP","SIGN_IN","APPOINTMENT_BOOKING","LEAD_GENERATION","CONTACT_US","CUSTOMER_SUPPORT","SURVEY","OTHER"],"description":"Meta Flow category"}},"validation_errors":{"type":"array","items":{"$ref":"#/components/schemas/FlowAssetUpdateError"}},"json_version":{"type":"string","description":"The version specified by the developer in the Flow JSON asset uploaded."},"data_api_version":{"type":"string","description":"The version of the Data API specified by the developer in the Flow JSON asset uploaded. Only for Flows with an Endpoint."},"data_channel_uri":{"type":"string","description":"The URL of the Endpoint specified by the developer in the Flow JSON asset uploaded. Only for Flows with an Endpoint."},"preview":{"description":"The URL to the web preview page to visualize the flow and its expiry time.","allOf":[{"$ref":"#/components/schemas/FlowPreview"}]},"whatsapp_business_account":{"description":"The WhatsApp Business Account which owns the Flow.","allOf":[{"$ref":"#/components/schemas/MetaWABA"}]},"endpoint_uri":{"type":"string","description":"The URL of the WA Flow Endpoint specified by the developer via API or in the Builder UI."},"metric":{"description":"Metric data about the endpoint that is used for the flow.","allOf":[{"$ref":"#/components/schemas/MetaFlowMetric"}]}},"additionalProperties":false},"FlowAssetUpdateError":{"type":"object","properties":{"error":{"type":"string"},"error_type":{"type":"string"},"message":{"type":"string"},"line_start":{"type":"integer"},"line_end":{"type":"integer"},"column_start":{"type":"integer"},"column_end":{"type":"integer"}},"additionalProperties":false},"FlowPreview":{"type":"object","properties":{"preview_url":{"type":"string","format":"url","description":"Flow preview URL"},"expires_at":{"type":"string","description":"Flow preview URL expiration time in ISO8601 format"}},"additionalProperties":false},"MetaWABA":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the WABA account."},"name":{"type":"string","description":"WABA account name"},"currency":{"type":"string","description":"WABA account currency"},"timezone_id":{"type":"string","description":"Meta timezone id"},"message_template_namespace":{"type":"string","description":"Namespace of WABA templates"}},"additionalProperties":false},"MetaFlowMetric":{"type":"object","properties":{"data_points":{"type":"array","description":"A list of data points for metric.","items":{"$ref":"#/components/schemas/MetaFlowMetricDataPoint"}},"name":{"type":"string","description":"Metric name. Example: ENDPOINT_REQUEST_COUNT"},"granularity":{"type":"string","description":"Metric granularity. Example: DAY"}},"additionalProperties":false},"MetaFlowMetricDataPoint":{"type":"object","properties":{"timestamp":{"type":"string"},"data":{"type":"array","items":{"$ref":"#/components/schemas/MetaFlowMetricData"}}},"additionalProperties":false},"MetaFlowMetricData":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"number"}},"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}":{"get":{"parameters":[{"in":"query","name":"fields","description":"Flow fields to return. Available: id, name, categories, validation_errors, status, json_version, data_api_version, data_channel_uri, endpoint_uri, preview, whatsapp_business_account, metric","schema":{"type":"array","default":["id","name","categories","validation_errors","status"],"items":{"type":"string"}},"required":false,"explode":true,"style":"form"},{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true},{"in":"path","name":"waba_account_id","description":"The ID of the waba account.","schema":{"type":"string"},"required":true},{"in":"path","name":"flow_external_id","description":"Flow id.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowOut"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["WhatsApp Flows"],"summary":"Getting Flow details","description":"This request will return a single Flow's details.","operationId":"get_whatsapp_flows_partner_api_get"}}}}
```

## Deleting a Flow

> While a Flow is in DRAFT status, it can be deleted. Use this request for that purpose.

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"WhatsApp Flows","description":"Endpoints for managing WhatsApp Flows"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"MetaSimpleOut":{"type":"object","properties":{"success":{"type":"boolean","description":"Meta result of operation"}},"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}":{"delete":{"parameters":[{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true},{"in":"path","name":"waba_account_id","description":"The ID of the waba account.","schema":{"type":"string"},"required":true},{"in":"path","name":"flow_external_id","description":"Flow id.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaSimpleOut"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["WhatsApp Flows"],"summary":"Deleting a Flow","description":"While a Flow is in DRAFT status, it can be deleted. Use this request for that purpose.","operationId":"delete_whatsapp_flows_partner_api_delete_flow"}}}}
```

## Updating a Flow

> After you have created your Flow, you can update the name or categories using the update request.

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"WhatsApp Flows","description":"Endpoints for managing WhatsApp Flows"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"MetaSimpleOut":{"type":"object","properties":{"success":{"type":"boolean","description":"Meta result of operation"}},"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false},"FlowUpdate":{"type":"object","properties":{"name":{"type":"string","description":"Flow name"},"categories":{"type":"array","description":"A list of Flow categories","items":{"type":"string","enum":["SIGN_UP","SIGN_IN","APPOINTMENT_BOOKING","LEAD_GENERATION","CONTACT_US","CUSTOMER_SUPPORT","SURVEY","OTHER"],"description":"Meta Flow category"}},"endpoint_uri":{"type":"string","description":"The URL of the WA Flow Endpoint. Starting from Flow JSON version 3.0 this property should be specified .Do not provide this field if you are updating a Flow with Flow JSON version below 3.0."}},"required":["name"],"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}":{"patch":{"parameters":[{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true},{"in":"path","name":"waba_account_id","description":"The ID of the waba account.","schema":{"type":"string"},"required":true},{"in":"path","name":"flow_external_id","description":"Flow id.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaSimpleOut"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["WhatsApp Flows"],"summary":"Updating a Flow","description":"After you have created your Flow, you can update the name or categories using the update request.","operationId":"patch_whatsapp_flows_partner_api_update_flow","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowUpdate"}}}}}}}}
```

## Getting Flow assets

> Returns all assets attached to a specified Flow.

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"WhatsApp Flows","description":"Endpoints for managing WhatsApp Flows"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"FlowAssetsOut":{"type":"object","properties":{"assets":{"type":"array","items":{"$ref":"#/components/schemas/AssetOut"}},"count":{"type":"integer"},"total":{"type":"integer"}},"additionalProperties":false},"AssetOut":{"type":"object","properties":{"name":{"type":"string","description":"Flow asset name"},"asset_type":{"type":"string","description":"Asset type"},"download_url":{"type":"string","description":"File URL with the JSON content"}},"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}/assets":{"get":{"parameters":[{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true},{"in":"path","name":"waba_account_id","description":"The ID of the waba account.","schema":{"type":"string"},"required":true},{"in":"path","name":"flow_external_id","description":"Flow id.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowAssetsOut"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["WhatsApp Flows"],"summary":"Getting Flow assets","description":"Returns all assets attached to a specified Flow.","operationId":"get_whatsapp_flows_partner_api_get_assets"}}}}
```

## Updating a Flow's Flow JSON

> You can update a Flow's Flow JSON by uploading a new JSON file. The new JSON file must be a valid Flow JSON file.

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"WhatsApp Flows","description":"Endpoints for managing WhatsApp Flows"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"FlowAssetUpdateOut":{"type":"object","properties":{"success":{"type":"boolean"},"validation_errors":{"type":"array","items":{"$ref":"#/components/schemas/FlowAssetUpdateError"}}},"additionalProperties":false},"FlowAssetUpdateError":{"type":"object","properties":{"error":{"type":"string"},"error_type":{"type":"string"},"message":{"type":"string"},"line_start":{"type":"integer"},"line_end":{"type":"integer"},"column_start":{"type":"integer"},"column_end":{"type":"integer"}},"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false},"FlowAssetFileIn":{"type":"object","properties":{"file":{"description":"Flow asset file. Currently only flow.json file is supported.","type":"string","format":"binary"},"name":{"type":"string","description":"Flow asset name. Currently supported value is only 'flow.json'."},"asset_type":{"type":"string","description":"Flow asset type. Currently only supported value is 'FLOW_JSON'."}},"required":["asset_type","file","name"],"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}/assets":{"post":{"parameters":[{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true},{"in":"path","name":"waba_account_id","description":"The ID of the waba account.","schema":{"type":"string"},"required":true},{"in":"path","name":"flow_external_id","description":"Flow id.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowAssetUpdateOut"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["WhatsApp Flows"],"summary":"Updating a Flow's Flow JSON","description":"You can update a Flow's Flow JSON by uploading a new JSON file. The new JSON file must be a valid Flow JSON file.","operationId":"post_whatsapp_flows_partner_api_update_assets","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/FlowAssetFileIn"}}}}}}}}
```

## Publish a Flow

> This request updates the status of the Flow to "PUBLISHED". This action is not reversible.\
> The Flow and its assets become immutable once published.\
> To update the Flow after that, you must create a new Flow.\
> You specify the existing Flow ID as the clone\_flow\_id parameter while creating to copy the existing flow.\
> \
> You can publish your Flow once you have ensured that:\
> \
> \- All validation errors have been fixed\
> \- The Flow meets the design principles of WhatsApp Flows\
> \- The Flow complies with WhatsApp Terms of Service, the WhatsApp Business Messaging Policy and, if applicable, the WhatsApp Commerce Policy

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"WhatsApp Flows","description":"Endpoints for managing WhatsApp Flows"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"MetaSimpleOut":{"type":"object","properties":{"success":{"type":"boolean","description":"Meta result of operation"}},"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}/publish":{"post":{"parameters":[{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true},{"in":"path","name":"waba_account_id","description":"The ID of the waba account.","schema":{"type":"string"},"required":true},{"in":"path","name":"flow_external_id","description":"Flow id.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaSimpleOut"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["WhatsApp Flows"],"summary":"Publish a Flow","description":"This request updates the status of the Flow to \"PUBLISHED\". This action is not reversible.\nThe Flow and its assets become immutable once published.\nTo update the Flow after that, you must create a new Flow.\nYou specify the existing Flow ID as the clone_flow_id parameter while creating to copy the existing flow.\n\nYou can publish your Flow once you have ensured that:\n\n- All validation errors have been fixed\n- The Flow meets the design principles of WhatsApp Flows\n- The Flow complies with WhatsApp Terms of Service, the WhatsApp Business Messaging Policy and, if applicable, the WhatsApp Commerce Policy","operationId":"post_whatsapp_flows_partner_api_publish_flow"}}}}
```

## Preview a Flow

> In order to visualize the Flows created, you can generate a web preview URL with this request. The preview URL is public and can be shared with different stakeholders to visualize the Flow.\
> Note: Web preview URLs are only used to visualize how the screens will look - they will not be interactive. The final screens will render slightly differently for the end user.

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"WhatsApp Flows","description":"Endpoints for managing WhatsApp Flows"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"FlowOut2":{"type":"object","properties":{"id":{"type":"string","description":"The unique ID of the Flow."},"preview":{"description":"The URL to the web preview page to visualize the flow and its expiry time.","allOf":[{"$ref":"#/components/schemas/FlowPreview"}]}},"additionalProperties":false},"FlowPreview":{"type":"object","properties":{"preview_url":{"type":"string","format":"url","description":"Flow preview URL"},"expires_at":{"type":"string","description":"Flow preview URL expiration time in ISO8601 format"}},"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}/preview":{"get":{"parameters":[{"in":"query","name":"invalidate","description":"invalidate=true will generate a new link.","schema":{"type":"boolean","default":false},"required":false},{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true},{"in":"path","name":"waba_account_id","description":"The ID of the waba account.","schema":{"type":"string"},"required":true},{"in":"path","name":"flow_external_id","description":"Flow id.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlowOut2"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["WhatsApp Flows"],"summary":"Preview a Flow","description":"In order to visualize the Flows created, you can generate a web preview URL with this request. The preview URL is public and can be shared with different stakeholders to visualize the Flow.\nNote: Web preview URLs are only used to visualize how the screens will look - they will not be interactive. The final screens will render slightly differently for the end user.","operationId":"get_whatsapp_flows_partner_api_preview_flow"}}}}
```

## Deprecate a Flow

> Once a Flow is published, it cannot be modified or deleted, but can be marked as deprecated.

```json
{"openapi":"3.1.0","info":{"title":"Partners V2 API","version":"2.0.0"},"tags":[{"name":"WhatsApp Flows","description":"Endpoints for managing WhatsApp Flows"}],"servers":[{"description":"Production Server","url":"https://hub.360dialog.io"}],"security":[{"PartnerApiKeyV2":[]},{"Bearer":[]}],"components":{"securitySchemes":{"PartnerApiKeyV2":{"type":"apiKey","name":"X-API-Key","in":"header","description":"API Key for V2 authentication. Send your Partner API key in the X-API-Key header. Preferred authentication method."},"Bearer":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication. Token obtained via /api/v2/token endpoint."}},"schemas":{"MetaSimpleOut":{"type":"object","properties":{"success":{"type":"boolean","description":"Meta result of operation"}},"additionalProperties":false},"DefaultValidationError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/MetaSchemaErrorWithDetails"}]}},"required":["meta"],"additionalProperties":false},"MetaSchemaErrorWithDetails":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"},"details":{"type":"object","description":"Additional error data","additionalProperties":{}}},"required":["developer_message","http_code","success"],"additionalProperties":false},"DefaultHttpError":{"type":"object","properties":{"meta":{"allOf":[{"$ref":"#/components/schemas/_MetaSchemaError"}]}},"required":["meta"],"additionalProperties":false},"_MetaSchemaError":{"type":"object","properties":{"developer_message":{"type":"string"},"http_code":{"type":"integer"},"success":{"type":"boolean"},"360dialog_trace_id":{"type":"string","description":"Trace ID for debugging purposes"}},"required":["developer_message","http_code","success"],"additionalProperties":false}}},"paths":{"/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/flows/{flow_external_id}/deprecate":{"post":{"parameters":[{"in":"path","name":"partner_id","description":"The ID of the partner.","schema":{"type":"string"},"required":true},{"in":"path","name":"waba_account_id","description":"The ID of the waba account.","schema":{"type":"string"},"required":true},{"in":"path","name":"flow_external_id","description":"Flow id.","schema":{"type":"string"},"required":true}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MetaSimpleOut"}}},"description":"Successful response"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultValidationError"}}},"description":"Wrong payload"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultHttpError"}}},"description":"Not found"}},"tags":["WhatsApp Flows"],"summary":"Deprecate a Flow","description":"Once a Flow is published, it cannot be modified or deleted, but can be marked as deprecated.","operationId":"post_whatsapp_flows_partner_api_deprecate_flow"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.360dialog.com/partner/partner-api/api-reference/whats-app-flows.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
