arazzo: 1.0.1
info:
title: WhatsApp Read and Update Business Profile
summary: Read the current business profile, then apply updates to it.
description: >-
Keeps a WhatsApp Business profile current. The workflow first reads the
existing profile for the phone number so the caller can see the current
values, and then applies an update with new about text, description, email,
address, and websites. Every step spells out its request inline so the flow
can be read and executed without opening the underlying OpenAPI description.
version: 1.0.0
sourceDescriptions:
- name: businessProfileApi
url: ../openapi/whatsapp-business-profile-api-openapi.yml
type: openapi
workflows:
- workflowId: update-business-profile
summary: Fetch the current business profile and then update it.
description: >-
Reads the current WhatsApp Business profile for the phone number and then
submits an update with the supplied profile fields.
inputs:
type: object
required:
- accessToken
- phoneNumberId
properties:
accessToken:
type: string
description: Access token with whatsapp_business_messaging permission.
phoneNumberId:
type: string
description: The WhatsApp phone number ID whose profile is updated.
about:
type: string
description: New about text (max 139 characters).
description:
type: string
description: New business description (max 512 characters).
email:
type: string
description: New contact email address.
address:
type: string
description: New business address.
websites:
type: array
description: Up to two website URLs.
items:
type: string
steps:
- stepId: readProfile
description: >-
Read the current WhatsApp Business profile fields for the phone number.
operationId: getBusinessProfile
parameters:
- name: Authorization
in: header
value: Bearer $inputs.accessToken
- name: phone-number-id
in: path
value: $inputs.phoneNumberId
- name: fields
in: query
value: about,address,description,email,profile_picture_url,websites,vertical
successCriteria:
- condition: $statusCode == 200
outputs:
currentAbout: $response.body#/data/0/about
currentDescription: $response.body#/data/0/description
- stepId: applyProfileUpdate
description: >-
Submit an update to the WhatsApp Business profile with the supplied fields.
operationId: updateBusinessProfile
parameters:
- name: Authorization
in: header
value: Bearer $inputs.accessToken
- name: phone-number-id
in: path
value: $inputs.phoneNumberId
requestBody:
contentType: application/json
payload:
messaging_product: whatsapp
about: $inputs.about
description: $inputs.description
email: $inputs.email
address: $inputs.address
websites: $inputs.websites
successCriteria:
- condition: $statusCode == 200
outputs:
success: $response.body#/success
outputs:
previousAbout: $steps.readProfile.outputs.currentAbout
updated: $steps.applyProfileUpdate.outputs.success
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.