WhatsApp · Arazzo Workflow

WhatsApp Upload Media and Send Image Message

Version 1.0.0

Upload an image to WhatsApp servers and send it to a recipient by media ID.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub ArazzoWorkflows

Provider

whatsapp

Workflows

upload-media-send-image
Upload an image and deliver it to a WhatsApp user as an image message.
Uploads an image file to the WhatsApp media store to obtain a media ID, then sends an image message that references the uploaded media ID to the supplied recipient.
2 steps inputs: accessToken, caption, file, fileType, phoneNumberId, to outputs: mediaId, messageId
1
uploadImage
Upload the binary image file to the WhatsApp media endpoint, returning a media ID that persists for 30 days.
2
sendImage
Send an image message to the recipient that references the uploaded media ID, optionally including a caption.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: WhatsApp Upload Media and Send Image Message
  summary: Upload an image to WhatsApp servers and send it to a recipient by media ID.
  description: >-
    The canonical media messaging pattern for the WhatsApp Cloud API. The
    workflow first uploads a binary image file to Meta's media endpoint, which
    returns a reusable media ID, and then sends an image message to a recipient
    that references that media ID along with an optional caption. 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: mediaApi
  url: ../openapi/whatsapp-media-api-openapi.yml
  type: openapi
- name: messagesApi
  url: ../openapi/whatsapp-messages-api-openapi.yml
  type: openapi
workflows:
- workflowId: upload-media-send-image
  summary: Upload an image and deliver it to a WhatsApp user as an image message.
  description: >-
    Uploads an image file to the WhatsApp media store to obtain a media ID, then
    sends an image message that references the uploaded media ID to the supplied
    recipient.
  inputs:
    type: object
    required:
    - accessToken
    - phoneNumberId
    - to
    - file
    - fileType
    properties:
      accessToken:
        type: string
        description: System User or User Access Token with whatsapp_business_messaging permission.
      phoneNumberId:
        type: string
        description: The WhatsApp phone number ID that sends the message.
      to:
        type: string
        description: Recipient phone number in E.164 format without the leading plus.
      file:
        type: string
        description: The binary image file content to upload.
      fileType:
        type: string
        description: MIME type of the image (e.g. image/jpeg).
      caption:
        type: string
        description: Optional caption text to display under the image.
  steps:
  - stepId: uploadImage
    description: >-
      Upload the binary image file to the WhatsApp media endpoint, returning a
      media ID that persists for 30 days.
    operationId: uploadMedia
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.accessToken
    - name: phone-number-id
      in: path
      value: $inputs.phoneNumberId
    requestBody:
      contentType: multipart/form-data
      payload:
        file: $inputs.file
        type: $inputs.fileType
        messaging_product: whatsapp
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      mediaId: $response.body#/id
  - stepId: sendImage
    description: >-
      Send an image message to the recipient that references the uploaded media
      ID, optionally including a caption.
    operationId: sendMessage
    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
        recipient_type: individual
        to: $inputs.to
        type: image
        image:
          id: $steps.uploadImage.outputs.mediaId
          caption: $inputs.caption
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      messageId: $response.body#/messages/0/id
      contactWaId: $response.body#/contacts/0/wa_id
  outputs:
    mediaId: $steps.uploadImage.outputs.mediaId
    messageId: $steps.sendImage.outputs.messageId

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/whatsapp-upload-media-send-image-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

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.

A second provider on the same verified email joins the account you already have.