updateWhatsAppFlowAssets method
Updates the Flow JSON definition (assets) of a WhatsApp Flow. Updating a published Flow's assets reverts it to DRAFT status, requiring re-publishing.
May throw AccessDeniedByMetaException.
May throw DependencyException.
May throw InternalServiceException.
May throw InvalidParametersException.
May throw ResourceNotFoundException.
May throw ThrottledRequestException.
Parameter flowId :
The unique identifier of the Flow whose assets to update.
Parameter flowJson :
The updated Flow JSON definition. Maximum size is 10 MB.
Parameter id :
The ID of the WhatsApp Business Account associated with this Flow.
Implementation
Future<UpdateWhatsAppFlowAssetsOutput> updateWhatsAppFlowAssets({
required String flowId,
required Uint8List flowJson,
required String id,
}) async {
final $payload = <String, dynamic>{
'flowId': flowId,
'flowJson': base64Encode(flowJson),
'id': id,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/v1/whatsapp/flow/assets/update',
exceptionFnMap: _exceptionFns,
);
return UpdateWhatsAppFlowAssetsOutput.fromJson(response);
}