WhatsApp Assets API

Upload and retrieve flow JSON assets

Documentation

Specifications

Schemas & Data

Other Resources

🔗
Reference
https://developers.facebook.com/docs/whatsapp/cloud-api/reference/messages
🔗
Pricing
https://developers.facebook.com/docs/whatsapp/pricing
🔗
StatusPage
https://metastatus.com/
🔗
ChangeLog
https://developers.facebook.com/docs/whatsapp/cloud-api/changelog
🔗
ErrorCodes
https://developers.facebook.com/docs/whatsapp/cloud-api/support/error-codes
🔗
PostmanCollection
https://www.postman.com/meta/whatsapp-business-platform/collection/wlk6lh4/whatsapp-cloud-api
🔗
Node.js SDK
https://github.com/WhatsApp/WhatsApp-Nodejs-SDK
🔗
Sandbox
https://business.whatsapp.com/developers/developer-hub
🔗
Migration Guide
https://developers.facebook.com/docs/whatsapp/cloud-api/migrate-to-cloud-api
🔗
Media Reference
https://developers.facebook.com/docs/whatsapp/cloud-api/reference/media
🔗
Phone Numbers Reference
https://developers.facebook.com/docs/whatsapp/cloud-api/reference/phone-numbers
🔗
Business Profiles Reference
https://developers.facebook.com/docs/whatsapp/cloud-api/reference/business-profiles
🔗
Two-Step Verification
https://developers.facebook.com/docs/whatsapp/cloud-api/reference/two-step-verification
🔗
Versioning
https://developers.facebook.com/docs/graph-api/guides/versioning
🔗
PostmanCollection
https://www.postman.com/meta/whatsapp-business-platform/collection/3kru5r6/whatsapp-business-management-api
🔗
Reference
https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates
🔗
ChangeLog
https://developers.facebook.com/docs/whatsapp/business-management-api/changelog

OpenAPI Specification

whatsapp-assets-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: WhatsApp Business Management Analytics Assets API
  description: The WhatsApp Business Management API enables programmatic management of WhatsApp Business Accounts, phone numbers, message templates, analytics, user assignments, product catalogs, and webhook subscriptions through the Meta Graph API.
  version: '21.0'
  contact:
    name: Meta Platform Support
    url: https://developers.facebook.com/support/
  termsOfService: https://www.whatsapp.com/legal/business-terms
servers:
- url: https://graph.facebook.com/v21.0
  description: Meta Graph API Production Server
security:
- bearerAuth: []
tags:
- name: Assets
  description: Upload and retrieve flow JSON assets
paths:
  /{flow-id}/assets:
    get:
      operationId: getFlowAssets
      summary: WhatsApp Get Flow Assets
      description: Retrieves the assets (flow JSON file) for a flow.
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/FlowId'
      responses:
        '200':
          description: Assets retrieved
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          type: string
                        asset_type:
                          type: string
                        download_url:
                          type: string
                          format: uri
                  paging:
                    $ref: '#/components/schemas/CursorPaging'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: uploadFlowJson
      summary: WhatsApp Upload Flow JSON
      description: Uploads or replaces the flow JSON definition file. The file is validated on upload and any errors are returned in the response.
      tags:
      - Assets
      parameters:
      - $ref: '#/components/parameters/FlowId'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
              - file
              - name
              - asset_type
              properties:
                file:
                  type: string
                  format: binary
                  description: The flow.json file (max 10 MB)
                name:
                  type: string
                  enum:
                  - flow.json
                asset_type:
                  type: string
                  enum:
                  - FLOW_JSON
      responses:
        '200':
          description: Flow JSON uploaded
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  validation_errors:
                    type: array
                    items:
                      $ref: '#/components/schemas/FlowValidationError'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  parameters:
    FlowId:
      name: flow-id
      in: path
      required: true
      description: Flow ID
      schema:
        type: string
  schemas:
    FlowValidationError:
      type: object
      properties:
        error:
          type: string
          example: example_value
        error_type:
          type: string
          example: text
        message:
          type: string
          example: Hello from WhatsApp!
        line_start:
          type: integer
          example: 42
        line_end:
          type: integer
          example: 42
        column_start:
          type: integer
          example: 42
        column_end:
          type: integer
          example: 42
        pointers:
          type: array
          items:
            type: string
    CursorPaging:
      type: object
      properties:
        cursors:
          type: object
          properties:
            before:
              type: string
            after:
              type: string
        next:
          type: string
          format: uri
          example: example_value
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: System User Token with whatsapp_business_management permission
externalDocs:
  description: WhatsApp Business Management API Documentation
  url: https://developers.facebook.com/docs/whatsapp/business-management-api