{
  "openapi": "3.0.1",
  "info": {
    "title": "WhatsApp Business Cloud API Automation",
    "description": "Connect your applications to WhatsApp effortlessly using this high-performance Apify Actor powered by the official Meta WhatsApp Business Cloud API. Perfect for e-commerce notifications, transactional alerts, multi-channel marketing campaigns, and customer support workflows.",
    "version": "0.0",
    "x-build-id": "cNsIn7AHQtlSpHwbT"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/c4rbanak~whatsapp-business-cloud-api-automation/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-c4rbanak-whatsapp-business-cloud-api-automation",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/c4rbanak~whatsapp-business-cloud-api-automation/runs": {
      "post": {
        "operationId": "runs-sync-c4rbanak-whatsapp-business-cloud-api-automation",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/c4rbanak~whatsapp-business-cloud-api-automation/run-sync": {
      "post": {
        "operationId": "run-sync-c4rbanak-whatsapp-business-cloud-api-automation",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "action": {
            "title": "Action",
            "enum": [
              "getConfig",
              "createConnectSession",
              "connectNumber",
              "disconnectNumber",
              "listNumbers",
              "listTemplates",
              "getTemplateOptions",
              "createTemplate",
              "saveTemplate",
              "syncTemplates",
              "send"
            ],
            "type": "string",
            "description": "Platform action. Prefer createConnectSession so Facebook login runs on watext.io (no partner domain allowlist). createTemplate / syncTemplates for templates, send to deliver.",
            "default": "getConfig"
          },
          "returnUrl": {
            "title": "Return URL",
            "type": "string",
            "description": "Required for createConnectSession. After WhatsApp connects, the browser is sent back here with ?whatsapp=connected&id=…"
          },
          "code": {
            "title": "Embedded Signup code",
            "type": "string",
            "description": "OAuth code from FB.login after Embedded Signup. Only needed if you run Facebook login on your own domain instead of createConnectSession."
          },
          "wabaId": {
            "title": "WABA ID",
            "type": "string",
            "description": "whatsapp_business_account_id from the Embedded Signup WA_EMBEDDED_SIGNUP message."
          },
          "phoneNumberId": {
            "title": "Phone number ID",
            "type": "string",
            "description": "phone_number_id from the Embedded Signup WA_EMBEDDED_SIGNUP message."
          },
          "id": {
            "title": "Number ID",
            "type": "string",
            "description": "Connected number id from listNumbers. Used by disconnectNumber."
          },
          "name": {
            "title": "Template name",
            "type": "string",
            "description": "Lowercase template name, e.g. spring_sale_2026. Meta name is normalized from this."
          },
          "category": {
            "title": "Template category",
            "enum": [
              "MARKETING",
              "UTILITY",
              "AUTHENTICATION"
            ],
            "type": "string",
            "description": "Same as the builder: MARKETING, UTILITY, or AUTHENTICATION.",
            "default": "UTILITY"
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Meta template language code, e.g. tr, en_US, de. Full list: getTemplateOptions / GET /api/v1/templates/options."
          },
          "format": {
            "title": "Template type",
            "enum": [
              "standard",
              "catalog",
              "carousel",
              "limited_time_offer"
            ],
            "type": "string",
            "description": "Same as the builder: Standard, Catalog, Carousel, Limited time offers.",
            "default": "standard"
          },
          "headerType": {
            "title": "Header type",
            "enum": [
              "none",
              "text",
              "image",
              "video",
              "document",
              "gif"
            ],
            "type": "string",
            "description": "none, text, image (JPEG/PNG), video (MP4/3GPP), document (PDF), or gif.",
            "default": "none"
          },
          "header": {
            "title": "Header text",
            "type": "string",
            "description": "Used when headerType is text."
          },
          "headerMedia": {
            "title": "Header media",
            "type": "string",
            "description": "data URL or https URL for image/video/document/gif. Or upload via POST /api/v1/templates/media and set headerMediaHandle in draft."
          },
          "body": {
            "title": "Template body",
            "type": "string",
            "description": "Body text. Variables {{1}} or {{name}}. Formatting: *bold*, _italic_, ~strikethrough~."
          },
          "footer": {
            "title": "Template footer",
            "type": "string",
            "description": "Optional footer, max 60 characters."
          },
          "buttons": {
            "title": "Buttons",
            "type": "array",
            "description": "URL, PHONE_NUMBER, VOICE_CALL, QUICK_REPLY, COPY_CODE. Example: [{\"type\":\"QUICK_REPLY\",\"text\":\"Help\"}]",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "copyCode": {
            "title": "Copy offer / coupon code",
            "type": "string",
            "description": "Same as Add button → Copy offer code in the builder. Adds a COPY_CODE button with this example (e.g. SAVE20). For LTO templates this is the Copy code example field."
          },
          "catalogId": {
            "title": "Catalog ID",
            "type": "string",
            "description": "Required for format catalog. From getTemplateOptions.catalogs after connect."
          },
          "draft": {
            "title": "Full builder draft",
            "type": "object",
            "description": "Same payload as the watext New template screen (NewTemplateDraft). Overrides flat fields. Use this for carousel cards, LTO, and media handles.",
            "additionalProperties": true
          },
          "saveAsDraft": {
            "title": "Save as draft",
            "type": "boolean",
            "description": "If true, do not submit to Meta (same as Save as draft in the builder).",
            "default": false
          },
          "to": {
            "title": "Recipient phone",
            "type": "string",
            "description": "International WhatsApp number, e.g. +905321234567. Required when action is send."
          },
          "templateName": {
            "title": "Approved template name",
            "type": "string",
            "description": "Approved template on the connected number. Required for send unless you send a 24-hour session text."
          },
          "languageCode": {
            "title": "Language",
            "type": "string",
            "description": "Template language code, e.g. tr or en_US.",
            "default": "tr"
          },
          "parameters": {
            "title": "Template parameters",
            "type": "array",
            "description": "Positional body variables mapped to {{1}}, {{2}}, and so on.",
            "items": {
              "type": "string"
            }
          },
          "text": {
            "title": "Session text",
            "type": "string",
            "description": "Free-form text. Only works inside the 24-hour customer service window. Ignored if templateName is set."
          },
          "from": {
            "title": "WhatsApp number ID",
            "type": "string",
            "description": "Optional. One of your number ids from listNumbers. Leave empty to use the workspace default."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}