{
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "",
    "title": "AIsa Messaging",
    "version": "1",
    "x-aisa-capabilities": {
      "idempotency": "Idempotency-Key",
      "max_price": "X-AISA-Max-Price-USD",
      "quote": {
        "header": "X-AISA-Cost-Mode",
        "value": "quote"
      }
    },
    "x-aisa-catalogs": {
      "aisa-messaging": {
        "description": "",
        "title": "AIsa Messaging",
        "x-aisa-capabilities": {
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "header": "X-AISA-Cost-Mode",
            "value": "quote"
          }
        },
        "x-aisa-document": {
          "facts_hash": "3f75dbfba86cc5ac46b20ee9310446322890eeeb034619f5c221a47d6b1064a2",
          "generator_version": "3",
          "protocol_version": "1",
          "schema_version": "1"
        },
        "x-aisa-plans": {
          "builder": 1.0,
          "display_plan": "payg",
          "payg": 1.0,
          "similarweb_payg": 1.0,
          "team": 1.0,
          "version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb"
        }
      }
    },
    "x-aisa-configured-paths": [],
    "x-aisa-document": {
      "composer_version": "31",
      "document_hash": "sha256:989b0c03378fa66fa7653d6c34e54850322e6be4bc7d9f0f130ac18a459676eb",
      "facts_hash": "3f75dbfba86cc5ac46b20ee9310446322890eeeb034619f5c221a47d6b1064a2",
      "generator_version": "3",
      "protocol_version": "1",
      "response_pending": [],
      "schema_version": "1"
    },
    "x-aisa-plans": {
      "builder": 1.0,
      "display_plan": "payg",
      "payg": 1.0,
      "similarweb_payg": 1.0,
      "team": 1.0,
      "version": "e70a0959cd1b93b84ae16dffd7a538273ddb9c1d46277b82823c37ff1b6bc0fb"
    },
    "x-aisa-provider": "aisa-messaging"
  },
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "openapi": "3.1.0",
  "paths": {
    "/apis/v1/social/messaging/business-agent": {
      "get": {
        "description": "Business Agent. One read that says where the merchant is with the Meta Business Agent. It reports:\n\n- whether the number is eligible\n- whether the Meta Business Agent terms are accepted\n- whether an agent exists\n- whether it is on\n- its settings\n\n### Pending steps\n\n- `unverifiedSteps` lists what Meta exposes no state for (the payment method in Billing Hub).\n\nNever fails for those pre-setup states; it reports them as flags.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_43c096",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Where the merchant is in the Meta Business Agent setup for this number.",
                  "properties": {
                    "agentId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "eligible": {
                      "description": "Whether the number can run the agent; null when the terms are not accepted yet (Meta refuses the check).",
                      "type": [
                        "boolean",
                        "null"
                      ]
                    },
                    "enabled": {
                      "description": "The agent answers live conversations.",
                      "type": "boolean"
                    },
                    "manualSteps": {
                      "items": {
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "step": {
                            "enum": [
                              "accept_terms"
                            ],
                            "type": "string"
                          },
                          "url": {
                            "format": "uri",
                            "type": "string"
                          }
                        },
                        "required": [
                          "step",
                          "url",
                          "description"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "onboarded": {
                      "description": "An agent exists on the number (onboard was called).",
                      "type": "boolean"
                    },
                    "settings": {
                      "oneOf": [
                        {
                          "description": "Meta Business Agent settings for one WhatsApp number, as Meta returns them.",
                          "properties": {
                            "agent_id": {
                              "type": "string"
                            },
                            "ai_audience": {
                              "description": "EVERYONE answers all consumers; ALLOWLISTED_ONLY answers only the allowlist and needs no payment method.",
                              "enum": [
                                "EVERYONE",
                                "ALLOWLISTED_ONLY",
                                null
                              ],
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "channel": {
                              "type": "string"
                            },
                            "followup": {
                              "properties": {
                                "enabled": {
                                  "type": "boolean"
                                },
                                "followup_interval_in_seconds": {
                                  "enum": [
                                    0,
                                    300,
                                    900,
                                    1800,
                                    3600,
                                    7200,
                                    28800,
                                    86400
                                  ],
                                  "type": "integer"
                                },
                                "message": {
                                  "type": "string"
                                }
                              },
                              "type": [
                                "object",
                                "null"
                              ]
                            },
                            "handoff": {
                              "properties": {
                                "enabled": {
                                  "description": "Whether the agent releases the thread after sending its handoff message.",
                                  "type": "boolean"
                                },
                                "message": {
                                  "type": "string"
                                },
                                "message_selection": {
                                  "enum": [
                                    "DEFAULT",
                                    "AGENT",
                                    "CUSTOM"
                                  ],
                                  "type": "string"
                                }
                              },
                              "type": [
                                "object",
                                "null"
                              ]
                            },
                            "never_say_phrases": {
                              "description": "Exact phrases the agent must never say.",
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "rollout": {
                              "properties": {
                                "enabled": {
                                  "description": "Whether the agent answers live conversations.",
                                  "type": "boolean"
                                }
                              },
                              "required": [
                                "enabled"
                              ],
                              "type": "object"
                            }
                          },
                          "required": [
                            "agent_id",
                            "channel",
                            "rollout"
                          ],
                          "type": "object"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "termsAccepted": {
                      "description": "False when Meta rejects calls because the merchant has not accepted the terms in WhatsApp Manager.",
                      "type": "boolean"
                    },
                    "unverifiedSteps": {
                      "description": "Steps Meta keeps outside the API and exposes no state for, listed once an agent exists.",
                      "items": {
                        "properties": {
                          "description": {
                            "type": "string"
                          },
                          "step": {
                            "enum": [
                              "attach_payment_method"
                            ],
                            "type": "string"
                          },
                          "url": {
                            "format": "uri",
                            "type": "string"
                          }
                        },
                        "required": [
                          "step",
                          "url",
                          "description"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "eligible",
                    "termsAccepted",
                    "onboarded",
                    "enabled",
                    "agentId",
                    "settings",
                    "manualSteps",
                    "unverifiedSteps"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get agent setup status",
        "x-aisa-capabilities": {
          "capability": "messaging.get_business_agent_status@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_43c096",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "a8c9bf5e9fa6cfbe27d373756a6d692dbe1adfbb37cdd602a3100947ae269602"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_43c096",
          "path": "/apis/v1/social/messaging/business-agent"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/allowlist": {
      "get": {
        "description": "Business Agent. Consumers the agent answers while `ai_audience` is ALLOWLISTED_ONLY.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_36875c",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "entries": {
                      "items": {
                        "properties": {
                          "consumer_phone_number": {
                            "description": "E.164 phone number.",
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "entries"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List allowlisted consumers",
        "x-aisa-capabilities": {
          "capability": "messaging.list_business_agent_allowlist@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_36875c",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "98311e903ccee53bea590bb6112f92a923e2c4ab056f742d6677822b0a361f68"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_36875c",
          "path": "/apis/v1/social/messaging/business-agent/allowlist"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "Business Agent. One E.164 number per call. Not idempotent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_busi_36875c",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "consumer_phone_number": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "consumer_phone_number": {
                    "type": "string"
                  }
                },
                "required": [
                  "consumer_phone_number"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "consumer_phone_number": {
                      "description": "E.164 phone number.",
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Allowlist a consumer",
        "x-aisa-capabilities": {
          "capability": "messaging.add_business_agent_allowlist_entry@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_busi_36875c",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "26ca3655a5bfbe1ee59764a718f226d3ec89ef113baca69f33badb5a5f3e174f"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_busi_36875c",
          "path": "/apis/v1/social/messaging/business-agent/allowlist"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/allowlist/{entryId}": {
      "delete": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_bu_0ffa5c",
        "parameters": [
          {
            "in": "path",
            "name": "entryId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Remove an allowlisted consumer",
        "x-aisa-capabilities": {
          "capability": "messaging.remove_business_agent_allowlist_entry@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_bu_0ffa5c",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "3998e62bf357b458804c4282e778decb708c2c47d1c48a819e2b15dfcc6287f6"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_bu_0ffa5c",
          "path": "/apis/v1/social/messaging/business-agent/allowlist/{entryId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/budget": {
      "get": {
        "description": "Business Agent. Caps over rolling windows for the Business Manager that owns the number. An empty list means unlimited.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_f3c30c",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "budgets": {
                      "items": {
                        "properties": {
                          "budget_id": {
                            "description": "Pass it back to edit an existing budget; omit to add one.",
                            "type": "string"
                          },
                          "max_budget": {
                            "minimum": 1,
                            "type": "integer"
                          },
                          "time_window": {
                            "description": "Rolling window in the WABA timezone.",
                            "enum": [
                              "one_day",
                              "seven_days",
                              "fourteen_days",
                              "thirty_days"
                            ],
                            "type": "string"
                          },
                          "unit_type": {
                            "description": "Tokens count across the Business Manager, AI turns per conversation.",
                            "enum": [
                              "token",
                              "ai_turn"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "unit_type",
                          "time_window",
                          "max_budget"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "budgets"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get usage budgets",
        "x-aisa-capabilities": {
          "capability": "messaging.get_business_agent_budget@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_f3c30c",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "d206e0d3f470b69b5051ef17a5f2be434fa3260e0ee0d37aa85f5bbceb2c396c"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_f3c30c",
          "path": "/apis/v1/social/messaging/business-agent/budget"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "put": {
        "description": "Business Agent. The full desired set: budgets left out are removed, an empty list returns to unlimited. Pass `budget_id` to edit one in place. When a cap is hit the agent finishes its turn, stops answering and hands the thread to a human until the window rolls over.\n\nA write: needs messaging:write and is audited.",
        "operationId": "put_aisa_messaging_apis_v1_social_messaging_busin_f3c30c",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "budgets": [
                  {
                    "max_budget": 1,
                    "time_window": "one_day",
                    "unit_type": "token"
                  }
                ]
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "budgets": {
                    "items": {
                      "properties": {
                        "budget_id": {
                          "description": "Pass it back to edit an existing budget; omit to add one.",
                          "type": "string"
                        },
                        "max_budget": {
                          "minimum": 1,
                          "type": "integer"
                        },
                        "time_window": {
                          "description": "Rolling window in the WABA timezone.",
                          "enum": [
                            "one_day",
                            "seven_days",
                            "fourteen_days",
                            "thirty_days"
                          ],
                          "type": "string"
                        },
                        "unit_type": {
                          "description": "Tokens count across the Business Manager, AI turns per conversation.",
                          "enum": [
                            "token",
                            "ai_turn"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "unit_type",
                        "time_window",
                        "max_budget"
                      ],
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  }
                },
                "required": [
                  "budgets"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "budgets": {
                      "items": {
                        "properties": {
                          "budget_id": {
                            "description": "Pass it back to edit an existing budget; omit to add one.",
                            "type": "string"
                          },
                          "max_budget": {
                            "minimum": 1,
                            "type": "integer"
                          },
                          "time_window": {
                            "description": "Rolling window in the WABA timezone.",
                            "enum": [
                              "one_day",
                              "seven_days",
                              "fourteen_days",
                              "thirty_days"
                            ],
                            "type": "string"
                          },
                          "unit_type": {
                            "description": "Tokens count across the Business Manager, AI turns per conversation.",
                            "enum": [
                              "token",
                              "ai_turn"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "unit_type",
                          "time_window",
                          "max_budget"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "budgets"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Replace usage budgets",
        "x-aisa-capabilities": {
          "capability": "messaging.replace_business_agent_budget@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/put_aisa_messaging_apis_v1_social_messaging_busin_f3c30c",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "c925bd1efd0c3b91d82a8ad3166e5441fbdd4ce17bfa77ae05307b7de4f34c08"
        },
        "x-aisa-runtime-operation": {
          "method": "PUT",
          "operation_id": "put_aisa_messaging_apis_v1_social_messaging_busin_f3c30c",
          "path": "/apis/v1/social/messaging/business-agent/budget"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/business-information": {
      "delete": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_bu_8e111b",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Reset business information",
        "x-aisa-capabilities": {
          "capability": "messaging.reset_business_agent_business_information@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_bu_8e111b",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "707ac3ccb0cc67e3ef5756c8e48461dee8392569630c1decd0ae1545d85b267f"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_bu_8e111b",
          "path": "/apis/v1/social/messaging/business-agent/business-information"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "Business Agent. Payment methods, return policy, how to buy, shipping, description and contact details the agent answers from. Empty values until configured.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_8e111b",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Free-text facts the agent answers from; PUT replaces the whole object.",
                  "properties": {
                    "business_description": {
                      "type": "string"
                    },
                    "contact_info": {
                      "properties": {
                        "address": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "hours_of_operation": {
                          "type": "string"
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "delivery_and_shipping": {
                      "type": "string"
                    },
                    "payment_method": {
                      "type": "string"
                    },
                    "purchase_info": {
                      "type": "string"
                    },
                    "return_policy": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get business information",
        "x-aisa-capabilities": {
          "capability": "messaging.get_business_agent_business_information@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_8e111b",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "c0e8bcc9ee2a93f03d44b02fb7512580aad19d68cfd4d36b5a0f93dd08cab827"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_8e111b",
          "path": "/apis/v1/social/messaging/business-agent/business-information"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "put": {
        "description": "Business Agent. Full replacement: every field you send overwrites the stored value; fields you omit are cleared.\n\nA write: needs messaging:write and is audited.",
        "operationId": "put_aisa_messaging_apis_v1_social_messaging_busin_8e111b",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "payment_method": "example",
                "return_policy": "example"
              },
              "schema": {
                "additionalProperties": false,
                "description": "Free-text facts the agent answers from; PUT replaces the whole object.",
                "properties": {
                  "business_description": {
                    "type": "string"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "contact_info": {
                    "properties": {
                      "address": {
                        "type": "string"
                      },
                      "email": {
                        "type": "string"
                      },
                      "hours_of_operation": {
                        "type": "string"
                      }
                    },
                    "type": [
                      "object",
                      "null"
                    ]
                  },
                  "delivery_and_shipping": {
                    "type": "string"
                  },
                  "payment_method": {
                    "type": "string"
                  },
                  "purchase_info": {
                    "type": "string"
                  },
                  "return_policy": {
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Free-text facts the agent answers from; PUT replaces the whole object.",
                  "properties": {
                    "business_description": {
                      "type": "string"
                    },
                    "contact_info": {
                      "properties": {
                        "address": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "hours_of_operation": {
                          "type": "string"
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "delivery_and_shipping": {
                      "type": "string"
                    },
                    "payment_method": {
                      "type": "string"
                    },
                    "purchase_info": {
                      "type": "string"
                    },
                    "return_policy": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Replace business information",
        "x-aisa-capabilities": {
          "capability": "messaging.replace_business_agent_business_information@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/put_aisa_messaging_apis_v1_social_messaging_busin_8e111b",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "898b866c0834e93c74f486e8eac9e4465b6ed7192b353d656ab1acb0d26cf581"
        },
        "x-aisa-runtime-operation": {
          "method": "PUT",
          "operation_id": "put_aisa_messaging_apis_v1_social_messaging_busin_8e111b",
          "path": "/apis/v1/social/messaging/business-agent/business-information"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/connectors": {
      "get": {
        "description": "Business Agent. External APIs the agent may call. `connection_status` says whether Meta can currently reach each one.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_9506ec",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "connectors": {
                      "items": {
                        "allOf": [
                          {
                            "properties": {
                              "auth_config": {
                                "properties": {
                                  "api_key": {
                                    "description": "Where the connector injects the API key on each call.",
                                    "properties": {
                                      "body_params": {
                                        "items": {
                                          "properties": {
                                            "field_name": {
                                              "type": "string"
                                            },
                                            "prefix": {
                                              "type": "string"
                                            },
                                            "value": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "field_name",
                                            "value"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "headers": {
                                        "items": {
                                          "properties": {
                                            "field_name": {
                                              "type": "string"
                                            },
                                            "prefix": {
                                              "type": "string"
                                            },
                                            "value": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "field_name",
                                            "value"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      },
                                      "query_params": {
                                        "items": {
                                          "properties": {
                                            "field_name": {
                                              "type": "string"
                                            },
                                            "prefix": {
                                              "type": "string"
                                            },
                                            "value": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "field_name",
                                            "value"
                                          ],
                                          "type": "object"
                                        },
                                        "type": "array"
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "oauth2_client_credentials": {
                                    "properties": {
                                      "client_id": {
                                        "type": "string"
                                      },
                                      "client_secret": {
                                        "type": "string"
                                      },
                                      "scopes_to_request": {
                                        "items": {
                                          "type": "string"
                                        },
                                        "type": "array"
                                      },
                                      "token_request_content_type": {
                                        "type": "string"
                                      },
                                      "token_url": {
                                        "format": "uri",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "token_url",
                                      "client_id",
                                      "client_secret"
                                    ],
                                    "type": "object"
                                  }
                                },
                                "type": "object"
                              },
                              "auth_type": {
                                "enum": [
                                  "OAUTH2_CLIENT_CREDENTIALS",
                                  "API_KEY",
                                  "NONE"
                                ],
                                "type": "string"
                              },
                              "base_url": {
                                "description": "Public HTTPS URL reachable from Meta.",
                                "format": "uri",
                                "type": "string"
                              },
                              "connector_protocol": {
                                "type": "string"
                              },
                              "description": {
                                "description": "Tell the agent what the service provides.",
                                "type": "string"
                              },
                              "name": {
                                "description": "Unique per number.",
                                "type": "string"
                              },
                              "requires_certificate": {
                                "type": "boolean"
                              },
                              "user_auth_injection_config": {
                                "properties": {
                                  "field_name": {
                                    "type": "string"
                                  },
                                  "location": {
                                    "type": "string"
                                  },
                                  "prefix": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "location",
                                  "field_name"
                                ],
                                "type": "object"
                              }
                            },
                            "required": [
                              "name",
                              "base_url",
                              "auth_type"
                            ],
                            "type": "object"
                          },
                          {
                            "properties": {
                              "connection_status": {
                                "properties": {
                                  "error_message": {
                                    "type": "string"
                                  },
                                  "status": {
                                    "description": "ACTIVE, PENDING_OAUTH, EXPIRED or ERROR.",
                                    "type": "string"
                                  }
                                },
                                "type": "object"
                              },
                              "id": {
                                "type": "string"
                              },
                              "mcp_tool_sync": {
                                "additionalProperties": true,
                                "type": "object"
                              },
                              "mtls_config": {
                                "additionalProperties": true,
                                "type": "object"
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "type": "object"
                          }
                        ]
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "connectors"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List connectors",
        "x-aisa-capabilities": {
          "capability": "messaging.list_business_agent_connectors@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_9506ec",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "257f60a6c5808c078dfe2abdf982a239312c9108a09f0306ee6c206addc10cbb"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_9506ec",
          "path": "/apis/v1/social/messaging/business-agent/connectors"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "Business Agent. Base URL plus how to authenticate (OAuth client credentials, API key or none). Names are unique per number. Not idempotent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_busi_9506ec",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "auth_type": "OAUTH2_CLIENT_CREDENTIALS",
                "base_url": "https://example.com/item",
                "name": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "auth_config": {
                    "properties": {
                      "api_key": {
                        "description": "Where the connector injects the API key on each call.",
                        "properties": {
                          "body_params": {
                            "items": {
                              "properties": {
                                "field_name": {
                                  "type": "string"
                                },
                                "prefix": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field_name",
                                "value"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "headers": {
                            "items": {
                              "properties": {
                                "field_name": {
                                  "type": "string"
                                },
                                "prefix": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field_name",
                                "value"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "query_params": {
                            "items": {
                              "properties": {
                                "field_name": {
                                  "type": "string"
                                },
                                "prefix": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field_name",
                                "value"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "oauth2_client_credentials": {
                        "properties": {
                          "client_id": {
                            "type": "string"
                          },
                          "client_secret": {
                            "type": "string"
                          },
                          "scopes_to_request": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "token_request_content_type": {
                            "type": "string"
                          },
                          "token_url": {
                            "format": "uri",
                            "type": "string"
                          }
                        },
                        "required": [
                          "token_url",
                          "client_id",
                          "client_secret"
                        ],
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "auth_type": {
                    "enum": [
                      "OAUTH2_CLIENT_CREDENTIALS",
                      "API_KEY",
                      "NONE"
                    ],
                    "type": "string"
                  },
                  "base_url": {
                    "description": "Public HTTPS URL reachable from Meta.",
                    "format": "uri",
                    "type": "string"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "connector_protocol": {
                    "type": "string"
                  },
                  "description": {
                    "description": "Tell the agent what the service provides.",
                    "type": "string"
                  },
                  "name": {
                    "description": "Unique per number.",
                    "type": "string"
                  },
                  "requires_certificate": {
                    "type": "boolean"
                  },
                  "user_auth_injection_config": {
                    "properties": {
                      "field_name": {
                        "type": "string"
                      },
                      "location": {
                        "type": "string"
                      },
                      "prefix": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "location",
                      "field_name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "name",
                  "base_url",
                  "auth_type"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "auth_config": {
                          "properties": {
                            "api_key": {
                              "description": "Where the connector injects the API key on each call.",
                              "properties": {
                                "body_params": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "headers": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "query_params": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "oauth2_client_credentials": {
                              "properties": {
                                "client_id": {
                                  "type": "string"
                                },
                                "client_secret": {
                                  "type": "string"
                                },
                                "scopes_to_request": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "token_request_content_type": {
                                  "type": "string"
                                },
                                "token_url": {
                                  "format": "uri",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "token_url",
                                "client_id",
                                "client_secret"
                              ],
                              "type": "object"
                            }
                          },
                          "type": "object"
                        },
                        "auth_type": {
                          "enum": [
                            "OAUTH2_CLIENT_CREDENTIALS",
                            "API_KEY",
                            "NONE"
                          ],
                          "type": "string"
                        },
                        "base_url": {
                          "description": "Public HTTPS URL reachable from Meta.",
                          "format": "uri",
                          "type": "string"
                        },
                        "connector_protocol": {
                          "type": "string"
                        },
                        "description": {
                          "description": "Tell the agent what the service provides.",
                          "type": "string"
                        },
                        "name": {
                          "description": "Unique per number.",
                          "type": "string"
                        },
                        "requires_certificate": {
                          "type": "boolean"
                        },
                        "user_auth_injection_config": {
                          "properties": {
                            "field_name": {
                              "type": "string"
                            },
                            "location": {
                              "type": "string"
                            },
                            "prefix": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "location",
                            "field_name"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "name",
                        "base_url",
                        "auth_type"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "connection_status": {
                          "properties": {
                            "error_message": {
                              "type": "string"
                            },
                            "status": {
                              "description": "ACTIVE, PENDING_OAUTH, EXPIRED or ERROR.",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "id": {
                          "type": "string"
                        },
                        "mcp_tool_sync": {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        "mtls_config": {
                          "additionalProperties": true,
                          "type": "object"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Create a connector",
        "x-aisa-capabilities": {
          "capability": "messaging.create_business_agent_connector@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_busi_9506ec",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "ca5dd9d826abf3130dee729a2be008f9405680ebc644972072c89ddafe6387c4"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_busi_9506ec",
          "path": "/apis/v1/social/messaging/business-agent/connectors"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/connectors/{connectorId}": {
      "delete": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_bu_941666",
        "parameters": [
          {
            "in": "path",
            "name": "connectorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Delete a connector",
        "x-aisa-capabilities": {
          "capability": "messaging.delete_business_agent_connector@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_bu_941666",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "783f15eac9f44f2069528e602091c2fd38adbc673472c4c61473ef0909218faa"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_bu_941666",
          "path": "/apis/v1/social/messaging/business-agent/connectors/{connectorId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "Business Agent.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_941666",
        "parameters": [
          {
            "in": "path",
            "name": "connectorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "auth_config": {
                          "properties": {
                            "api_key": {
                              "description": "Where the connector injects the API key on each call.",
                              "properties": {
                                "body_params": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "headers": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "query_params": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "oauth2_client_credentials": {
                              "properties": {
                                "client_id": {
                                  "type": "string"
                                },
                                "client_secret": {
                                  "type": "string"
                                },
                                "scopes_to_request": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "token_request_content_type": {
                                  "type": "string"
                                },
                                "token_url": {
                                  "format": "uri",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "token_url",
                                "client_id",
                                "client_secret"
                              ],
                              "type": "object"
                            }
                          },
                          "type": "object"
                        },
                        "auth_type": {
                          "enum": [
                            "OAUTH2_CLIENT_CREDENTIALS",
                            "API_KEY",
                            "NONE"
                          ],
                          "type": "string"
                        },
                        "base_url": {
                          "description": "Public HTTPS URL reachable from Meta.",
                          "format": "uri",
                          "type": "string"
                        },
                        "connector_protocol": {
                          "type": "string"
                        },
                        "description": {
                          "description": "Tell the agent what the service provides.",
                          "type": "string"
                        },
                        "name": {
                          "description": "Unique per number.",
                          "type": "string"
                        },
                        "requires_certificate": {
                          "type": "boolean"
                        },
                        "user_auth_injection_config": {
                          "properties": {
                            "field_name": {
                              "type": "string"
                            },
                            "location": {
                              "type": "string"
                            },
                            "prefix": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "location",
                            "field_name"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "name",
                        "base_url",
                        "auth_type"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "connection_status": {
                          "properties": {
                            "error_message": {
                              "type": "string"
                            },
                            "status": {
                              "description": "ACTIVE, PENDING_OAUTH, EXPIRED or ERROR.",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "id": {
                          "type": "string"
                        },
                        "mcp_tool_sync": {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        "mtls_config": {
                          "additionalProperties": true,
                          "type": "object"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get a connector",
        "x-aisa-capabilities": {
          "capability": "messaging.get_business_agent_connector@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_941666",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "2df2f0047a7cabdd4b7f9b7104d059c8b6fda44f1b5c5d9ca5c25c0a80b146f8"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_941666",
          "path": "/apis/v1/social/messaging/business-agent/connectors/{connectorId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "put": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "put_aisa_messaging_apis_v1_social_messaging_busin_941666",
        "parameters": [
          {
            "in": "path",
            "name": "connectorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "auth_type": "OAUTH2_CLIENT_CREDENTIALS",
                "base_url": "https://example.com/item",
                "name": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "auth_config": {
                    "properties": {
                      "api_key": {
                        "description": "Where the connector injects the API key on each call.",
                        "properties": {
                          "body_params": {
                            "items": {
                              "properties": {
                                "field_name": {
                                  "type": "string"
                                },
                                "prefix": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field_name",
                                "value"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "headers": {
                            "items": {
                              "properties": {
                                "field_name": {
                                  "type": "string"
                                },
                                "prefix": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field_name",
                                "value"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "query_params": {
                            "items": {
                              "properties": {
                                "field_name": {
                                  "type": "string"
                                },
                                "prefix": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field_name",
                                "value"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "oauth2_client_credentials": {
                        "properties": {
                          "client_id": {
                            "type": "string"
                          },
                          "client_secret": {
                            "type": "string"
                          },
                          "scopes_to_request": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "token_request_content_type": {
                            "type": "string"
                          },
                          "token_url": {
                            "format": "uri",
                            "type": "string"
                          }
                        },
                        "required": [
                          "token_url",
                          "client_id",
                          "client_secret"
                        ],
                        "type": "object"
                      }
                    },
                    "type": "object"
                  },
                  "auth_type": {
                    "enum": [
                      "OAUTH2_CLIENT_CREDENTIALS",
                      "API_KEY",
                      "NONE"
                    ],
                    "type": "string"
                  },
                  "base_url": {
                    "description": "Public HTTPS URL reachable from Meta.",
                    "format": "uri",
                    "type": "string"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "connector_protocol": {
                    "type": "string"
                  },
                  "description": {
                    "description": "Tell the agent what the service provides.",
                    "type": "string"
                  },
                  "name": {
                    "description": "Unique per number.",
                    "type": "string"
                  },
                  "requires_certificate": {
                    "type": "boolean"
                  },
                  "user_auth_injection_config": {
                    "properties": {
                      "field_name": {
                        "type": "string"
                      },
                      "location": {
                        "type": "string"
                      },
                      "prefix": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "location",
                      "field_name"
                    ],
                    "type": "object"
                  }
                },
                "required": [
                  "name",
                  "base_url",
                  "auth_type"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "auth_config": {
                          "properties": {
                            "api_key": {
                              "description": "Where the connector injects the API key on each call.",
                              "properties": {
                                "body_params": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "headers": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "query_params": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "oauth2_client_credentials": {
                              "properties": {
                                "client_id": {
                                  "type": "string"
                                },
                                "client_secret": {
                                  "type": "string"
                                },
                                "scopes_to_request": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "token_request_content_type": {
                                  "type": "string"
                                },
                                "token_url": {
                                  "format": "uri",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "token_url",
                                "client_id",
                                "client_secret"
                              ],
                              "type": "object"
                            }
                          },
                          "type": "object"
                        },
                        "auth_type": {
                          "enum": [
                            "OAUTH2_CLIENT_CREDENTIALS",
                            "API_KEY",
                            "NONE"
                          ],
                          "type": "string"
                        },
                        "base_url": {
                          "description": "Public HTTPS URL reachable from Meta.",
                          "format": "uri",
                          "type": "string"
                        },
                        "connector_protocol": {
                          "type": "string"
                        },
                        "description": {
                          "description": "Tell the agent what the service provides.",
                          "type": "string"
                        },
                        "name": {
                          "description": "Unique per number.",
                          "type": "string"
                        },
                        "requires_certificate": {
                          "type": "boolean"
                        },
                        "user_auth_injection_config": {
                          "properties": {
                            "field_name": {
                              "type": "string"
                            },
                            "location": {
                              "type": "string"
                            },
                            "prefix": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "location",
                            "field_name"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "name",
                        "base_url",
                        "auth_type"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "connection_status": {
                          "properties": {
                            "error_message": {
                              "type": "string"
                            },
                            "status": {
                              "description": "ACTIVE, PENDING_OAUTH, EXPIRED or ERROR.",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "id": {
                          "type": "string"
                        },
                        "mcp_tool_sync": {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        "mtls_config": {
                          "additionalProperties": true,
                          "type": "object"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Update a connector",
        "x-aisa-capabilities": {
          "capability": "messaging.update_business_agent_connector@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/put_aisa_messaging_apis_v1_social_messaging_busin_941666",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "771785e7ec41b2b7b72581d9f4ffb6c2794cfb981ad358619af9ab9424049f05"
        },
        "x-aisa-runtime-operation": {
          "method": "PUT",
          "operation_id": "put_aisa_messaging_apis_v1_social_messaging_busin_941666",
          "path": "/apis/v1/social/messaging/business-agent/connectors/{connectorId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/credentials": {
      "post": {
        "description": "Business Agent. Set or rotate the connector's credentials in place: `kind: api_key`, `kind: oauth`\n(client credentials) or `kind: certificate` (mTLS client certificate). Meta has no call\nthat removes a credential layer; change the connector's `auth_type` or delete it instead.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_busi_0c65a5",
        "parameters": [
          {
            "in": "path",
            "name": "connectorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "api_key_config": {
                  "headers": [
                    {
                      "field_name": "example",
                      "value": "example"
                    }
                  ],
                  "query_params": [
                    {
                      "field_name": "example",
                      "value": "example"
                    }
                  ]
                },
                "kind": "api_key"
              },
              "schema": {
                "oneOf": [
                  {
                    "properties": {
                      "api_key_config": {
                        "description": "Where the connector injects the API key on each call.",
                        "properties": {
                          "body_params": {
                            "items": {
                              "properties": {
                                "field_name": {
                                  "type": "string"
                                },
                                "prefix": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field_name",
                                "value"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "headers": {
                            "items": {
                              "properties": {
                                "field_name": {
                                  "type": "string"
                                },
                                "prefix": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field_name",
                                "value"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "query_params": {
                            "items": {
                              "properties": {
                                "field_name": {
                                  "type": "string"
                                },
                                "prefix": {
                                  "type": "string"
                                },
                                "value": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "field_name",
                                "value"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          }
                        },
                        "type": "object"
                      },
                      "connectionId": {
                        "description": "The connection, when not sent as the connectionId query parameter.",
                        "pattern": "^msc_[0-9A-Za-z]+$",
                        "type": "string"
                      },
                      "kind": {
                        "enum": [
                          "api_key"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "api_key_config"
                    ],
                    "type": "object"
                  },
                  {
                    "properties": {
                      "connectionId": {
                        "description": "The connection, when not sent as the connectionId query parameter.",
                        "pattern": "^msc_[0-9A-Za-z]+$",
                        "type": "string"
                      },
                      "kind": {
                        "enum": [
                          "oauth"
                        ],
                        "type": "string"
                      },
                      "oauth_config": {
                        "properties": {
                          "client_id": {
                            "type": "string"
                          },
                          "client_secret": {
                            "type": "string"
                          },
                          "scopes_to_request": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "token_request_content_type": {
                            "type": "string"
                          },
                          "token_url": {
                            "format": "uri",
                            "type": "string"
                          }
                        },
                        "required": [
                          "token_url",
                          "client_id",
                          "client_secret"
                        ],
                        "type": "object"
                      }
                    },
                    "required": [
                      "kind",
                      "oauth_config"
                    ],
                    "type": "object"
                  },
                  {
                    "properties": {
                      "ca_certificate": {
                        "description": "PEM.",
                        "type": "string"
                      },
                      "client_certificate": {
                        "description": "PEM.",
                        "type": "string"
                      },
                      "client_key": {
                        "description": "PEM.",
                        "type": "string"
                      },
                      "connectionId": {
                        "description": "The connection, when not sent as the connectionId query parameter.",
                        "pattern": "^msc_[0-9A-Za-z]+$",
                        "type": "string"
                      },
                      "kind": {
                        "enum": [
                          "certificate"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "kind",
                      "client_certificate",
                      "client_key"
                    ],
                    "type": "object"
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "auth_config": {
                          "properties": {
                            "api_key": {
                              "description": "Where the connector injects the API key on each call.",
                              "properties": {
                                "body_params": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "headers": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "query_params": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "oauth2_client_credentials": {
                              "properties": {
                                "client_id": {
                                  "type": "string"
                                },
                                "client_secret": {
                                  "type": "string"
                                },
                                "scopes_to_request": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "token_request_content_type": {
                                  "type": "string"
                                },
                                "token_url": {
                                  "format": "uri",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "token_url",
                                "client_id",
                                "client_secret"
                              ],
                              "type": "object"
                            }
                          },
                          "type": "object"
                        },
                        "auth_type": {
                          "enum": [
                            "OAUTH2_CLIENT_CREDENTIALS",
                            "API_KEY",
                            "NONE"
                          ],
                          "type": "string"
                        },
                        "base_url": {
                          "description": "Public HTTPS URL reachable from Meta.",
                          "format": "uri",
                          "type": "string"
                        },
                        "connector_protocol": {
                          "type": "string"
                        },
                        "description": {
                          "description": "Tell the agent what the service provides.",
                          "type": "string"
                        },
                        "name": {
                          "description": "Unique per number.",
                          "type": "string"
                        },
                        "requires_certificate": {
                          "type": "boolean"
                        },
                        "user_auth_injection_config": {
                          "properties": {
                            "field_name": {
                              "type": "string"
                            },
                            "location": {
                              "type": "string"
                            },
                            "prefix": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "location",
                            "field_name"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "name",
                        "base_url",
                        "auth_type"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "connection_status": {
                          "properties": {
                            "error_message": {
                              "type": "string"
                            },
                            "status": {
                              "description": "ACTIVE, PENDING_OAUTH, EXPIRED or ERROR.",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "id": {
                          "type": "string"
                        },
                        "mcp_tool_sync": {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        "mtls_config": {
                          "additionalProperties": true,
                          "type": "object"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Set connector credentials",
        "x-aisa-capabilities": {
          "capability": "messaging.set_business_agent_connector_credentials@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_busi_0c65a5",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "8e19228bed6a29324bb973792fe2fdb1162f0552193044eeeed70d5ad9674719"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_busi_0c65a5",
          "path": "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/credentials"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/logs": {
      "get": {
        "description": "Business Agent. Third-party failures over the last 7 days (window at most 7 days, default the last 24 hours). Each entry carries `failure_code_name` and `error_message`.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_908504",
        "parameters": [
          {
            "in": "path",
            "name": "connectorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Unix seconds.",
            "in": "query",
            "name": "startTime",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Unix seconds.",
            "in": "query",
            "name": "endTime",
            "required": false,
            "schema": {
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 1000,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "toolId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Add success rate and latency percentiles.",
            "in": "query",
            "name": "includeStats",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Aggregate failure patterns instead of entries.",
            "in": "query",
            "name": "summaryOnly",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "topN",
            "required": false,
            "schema": {
              "maximum": 50,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "additionalProperties": true,
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "stats": {
                      "additionalProperties": true,
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get connector failure logs",
        "x-aisa-capabilities": {
          "capability": "messaging.get_business_agent_connector_logs@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_908504",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "1cc866b5b4c92bd432108b39181bbfeefc0054f70d1d0ec2dbb03d631d969c60"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_908504",
          "path": "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/logs"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/refresh-tools": {
      "post": {
        "description": "Business Agent. Re-discovers the tools of an MCP connector. A failed discovery keeps the previous tool set and reports an ERROR sync status inside a 200.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_busi_f01be6",
        "parameters": [
          {
            "in": "path",
            "name": "connectorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "auth_config": {
                          "properties": {
                            "api_key": {
                              "description": "Where the connector injects the API key on each call.",
                              "properties": {
                                "body_params": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "headers": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "query_params": {
                                  "items": {
                                    "properties": {
                                      "field_name": {
                                        "type": "string"
                                      },
                                      "prefix": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "field_name",
                                      "value"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "oauth2_client_credentials": {
                              "properties": {
                                "client_id": {
                                  "type": "string"
                                },
                                "client_secret": {
                                  "type": "string"
                                },
                                "scopes_to_request": {
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "token_request_content_type": {
                                  "type": "string"
                                },
                                "token_url": {
                                  "format": "uri",
                                  "type": "string"
                                }
                              },
                              "required": [
                                "token_url",
                                "client_id",
                                "client_secret"
                              ],
                              "type": "object"
                            }
                          },
                          "type": "object"
                        },
                        "auth_type": {
                          "enum": [
                            "OAUTH2_CLIENT_CREDENTIALS",
                            "API_KEY",
                            "NONE"
                          ],
                          "type": "string"
                        },
                        "base_url": {
                          "description": "Public HTTPS URL reachable from Meta.",
                          "format": "uri",
                          "type": "string"
                        },
                        "connector_protocol": {
                          "type": "string"
                        },
                        "description": {
                          "description": "Tell the agent what the service provides.",
                          "type": "string"
                        },
                        "name": {
                          "description": "Unique per number.",
                          "type": "string"
                        },
                        "requires_certificate": {
                          "type": "boolean"
                        },
                        "user_auth_injection_config": {
                          "properties": {
                            "field_name": {
                              "type": "string"
                            },
                            "location": {
                              "type": "string"
                            },
                            "prefix": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "location",
                            "field_name"
                          ],
                          "type": "object"
                        }
                      },
                      "required": [
                        "name",
                        "base_url",
                        "auth_type"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "connection_status": {
                          "properties": {
                            "error_message": {
                              "type": "string"
                            },
                            "status": {
                              "description": "ACTIVE, PENDING_OAUTH, EXPIRED or ERROR.",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "id": {
                          "type": "string"
                        },
                        "mcp_tool_sync": {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        "mtls_config": {
                          "additionalProperties": true,
                          "type": "object"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Refresh MCP connector tools",
        "x-aisa-capabilities": {
          "capability": "messaging.refresh_business_agent_connector_tools@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_busi_f01be6",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "10d4894f95606146510197fdb673351928ed8e71f4c8485f647f45da6afa8d8b"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_busi_f01be6",
          "path": "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/refresh-tools"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/tools": {
      "get": {
        "description": "Business Agent.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_15034a",
        "parameters": [
          {
            "in": "path",
            "name": "connectorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "tools": {
                      "items": {
                        "allOf": [
                          {
                            "properties": {
                              "description": {
                                "description": "When and how the agent should use the operation.",
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "request_definition": {
                                "additionalProperties": true,
                                "description": "Meta request definition: method, path, path_parameters, query_parameters, headers and a typed body schema (content_type, params, required).",
                                "type": "object"
                              },
                              "transformation_spec": {
                                "additionalProperties": true,
                                "type": "object"
                              },
                              "user_auth_action_config": {
                                "additionalProperties": true,
                                "type": "object"
                              },
                              "user_auth_required": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "name",
                              "description",
                              "request_definition"
                            ],
                            "type": "object"
                          },
                          {
                            "properties": {
                              "id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "type": "object"
                          }
                        ]
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "tools"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List connector tools",
        "x-aisa-capabilities": {
          "capability": "messaging.list_business_agent_connector_tools@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_15034a",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "fe9f70b0d1c97b2682b958a74565d5760c6dba9860f65f92f37473b9b5d8d7ca"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_15034a",
          "path": "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/tools"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "Business Agent. One operation on the connector, with the request definition Meta uses to build the outbound call from the conversation. Type the body params explicitly. Not idempotent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_busi_15034a",
        "parameters": [
          {
            "in": "path",
            "name": "connectorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "description": "example",
                "name": "example",
                "request_definition": {}
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "description": {
                    "description": "When and how the agent should use the operation.",
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "request_definition": {
                    "additionalProperties": true,
                    "description": "Meta request definition: method, path, path_parameters, query_parameters, headers and a typed body schema (content_type, params, required).",
                    "type": "object"
                  },
                  "transformation_spec": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "user_auth_action_config": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "user_auth_required": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "description",
                  "request_definition"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "description": {
                          "description": "When and how the agent should use the operation.",
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "request_definition": {
                          "additionalProperties": true,
                          "description": "Meta request definition: method, path, path_parameters, query_parameters, headers and a typed body schema (content_type, params, required).",
                          "type": "object"
                        },
                        "transformation_spec": {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        "user_auth_action_config": {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        "user_auth_required": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name",
                        "description",
                        "request_definition"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Create a connector tool",
        "x-aisa-capabilities": {
          "capability": "messaging.create_business_agent_connector_tool@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_busi_15034a",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "d669ae4343c0fbf7f6401e7b2c80c02c7a9441ba27e6bb82b449b64115af3469"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_busi_15034a",
          "path": "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/tools"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/tools/{toolId}": {
      "delete": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_bu_9f9ecd",
        "parameters": [
          {
            "in": "path",
            "name": "connectorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "toolId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Delete a connector tool",
        "x-aisa-capabilities": {
          "capability": "messaging.delete_business_agent_connector_tool@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_bu_9f9ecd",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "4fd60b5ed99e888e129585f393b0dd2fa0268da3b077ae7857aca257bf48955c"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_bu_9f9ecd",
          "path": "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/tools/{toolId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "Business Agent.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_9f9ecd",
        "parameters": [
          {
            "in": "path",
            "name": "connectorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "toolId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "description": {
                          "description": "When and how the agent should use the operation.",
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "request_definition": {
                          "additionalProperties": true,
                          "description": "Meta request definition: method, path, path_parameters, query_parameters, headers and a typed body schema (content_type, params, required).",
                          "type": "object"
                        },
                        "transformation_spec": {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        "user_auth_action_config": {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        "user_auth_required": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name",
                        "description",
                        "request_definition"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get a connector tool",
        "x-aisa-capabilities": {
          "capability": "messaging.get_business_agent_connector_tool@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_9f9ecd",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "a36b42fdd18dde068f85eefb379e8b1202449e89b78bf8de44301893514e14a5"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_9f9ecd",
          "path": "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/tools/{toolId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "put": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "put_aisa_messaging_apis_v1_social_messaging_busin_9f9ecd",
        "parameters": [
          {
            "in": "path",
            "name": "connectorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "toolId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "description": "example",
                "name": "example",
                "request_definition": {}
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "description": {
                    "description": "When and how the agent should use the operation.",
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "request_definition": {
                    "additionalProperties": true,
                    "description": "Meta request definition: method, path, path_parameters, query_parameters, headers and a typed body schema (content_type, params, required).",
                    "type": "object"
                  },
                  "transformation_spec": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "user_auth_action_config": {
                    "additionalProperties": true,
                    "type": "object"
                  },
                  "user_auth_required": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "description",
                  "request_definition"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "description": {
                          "description": "When and how the agent should use the operation.",
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "request_definition": {
                          "additionalProperties": true,
                          "description": "Meta request definition: method, path, path_parameters, query_parameters, headers and a typed body schema (content_type, params, required).",
                          "type": "object"
                        },
                        "transformation_spec": {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        "user_auth_action_config": {
                          "additionalProperties": true,
                          "type": "object"
                        },
                        "user_auth_required": {
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "name",
                        "description",
                        "request_definition"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Update a connector tool",
        "x-aisa-capabilities": {
          "capability": "messaging.update_business_agent_connector_tool@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/put_aisa_messaging_apis_v1_social_messaging_busin_9f9ecd",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "246e9ffb9370f3764a0e058a500328c8467e943a19b15f0de3ebad946c25795e"
        },
        "x-aisa-runtime-operation": {
          "method": "PUT",
          "operation_id": "put_aisa_messaging_apis_v1_social_messaging_busin_9f9ecd",
          "path": "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/tools/{toolId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/tools/{toolId}/run": {
      "post": {
        "description": "Business Agent. Executes the tool against the merchant API and returns the raw upstream result, to check a connector before the agent relies on it.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_busi_dabda9",
        "parameters": [
          {
            "in": "path",
            "name": "connectorId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "toolId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "input": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "input": {
                    "description": "JSON string with the tool arguments.",
                    "type": "string"
                  }
                },
                "required": [
                  "input"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "output": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Run a connector tool once",
        "x-aisa-capabilities": {
          "capability": "messaging.run_business_agent_connector_tool@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_busi_dabda9",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "8e2241f087cad3def2201b9608820a7e3f7763d2a1bf1e5a2621bd87637b0b41"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_busi_dabda9",
          "path": "/apis/v1/social/messaging/business-agent/connectors/{connectorId}/tools/{toolId}/run"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/evals": {
      "get": {
        "description": "Business Agent. Without query parameters, lists the evaluation scenarios (`eval_cases`). With `jobId`,\npolls a run started with POST. With `summaryIds`, returns the aggregated insight reports. With `evalIds`, returns per-conversation evaluation details. One of the three at a time.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_958669",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "jobId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Comma-separated summary ids.",
            "in": "query",
            "name": "summaryIds",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Comma-separated evaluation ids.",
            "in": "query",
            "name": "evalIds",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Read evaluation data",
        "x-aisa-capabilities": {
          "capability": "messaging.read_business_agent_evals@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_958669",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "9f7233aa875341af22a7edd54b17399e4015e5897ca3ae753bd26ab182209980"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_958669",
          "path": "/apis/v1/social/messaging/business-agent/evals"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "Business Agent. Simulates the given scenarios against the agent and scores them. Answers 202 with a `job_id` to poll with GET.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_busi_958669",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "evalCaseIds": [
                  "example"
                ]
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "evalCaseIds": {
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 100,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "evalCaseIds"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "job_id": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "job_id",
                    "status"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Start an evaluation run",
        "x-aisa-capabilities": {
          "capability": "messaging.start_business_agent_eval_run@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_busi_958669",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "b6c912aebf55f8d385aed73031087de440d4f20f4203655cc0c11d6c1d3bf6e2"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_busi_958669",
          "path": "/apis/v1/social/messaging/business-agent/evals"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/events/{eventId}": {
      "get": {
        "description": "Business Agent.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_5965f7",
        "parameters": [
          {
            "in": "path",
            "name": "eventId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "error_message": {
                      "type": "string"
                    },
                    "event_type": {
                      "type": "string"
                    },
                    "skipped_reason": {
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "request_received",
                        "processing",
                        "sent",
                        "failed",
                        "skipped",
                        "success"
                      ],
                      "type": "string"
                    },
                    "updated_at": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "status",
                    "event_type",
                    "created_at",
                    "updated_at"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get a business event status",
        "x-aisa-capabilities": {
          "capability": "messaging.get_business_agent_event@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_5965f7",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "c9cd99a773458a1d628cc5bc908895a0615eb87821cd58498f870ff904bc289b"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_5965f7",
          "path": "/apis/v1/social/messaging/business-agent/events/{eventId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/faqs": {
      "get": {
        "description": "Business Agent.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_7200e1",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "faqs": {
                      "items": {
                        "allOf": [
                          {
                            "properties": {
                              "answer": {
                                "description": "Self-contained; the agent retrieves entries independently.",
                                "maxLength": 8000,
                                "type": "string"
                              },
                              "metadata": {
                                "additionalProperties": {
                                  "type": "string"
                                },
                                "type": "object"
                              },
                              "question": {
                                "description": "Phrase it the way a customer would ask it; one topic per entry.",
                                "maxLength": 1000,
                                "type": "string"
                              }
                            },
                            "required": [
                              "question",
                              "answer"
                            ],
                            "type": "object"
                          },
                          {
                            "properties": {
                              "created_at": {
                                "description": "Unix seconds.",
                                "type": "integer"
                              },
                              "id": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "type": "object"
                          }
                        ]
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "faqs"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List FAQs",
        "x-aisa-capabilities": {
          "capability": "messaging.list_business_agent_faqs@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_7200e1",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "178fdb031e06ee3b73dafedf4d442355040ec67bf0d88d971d0a03c8247a8994"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_7200e1",
          "path": "/apis/v1/social/messaging/business-agent/faqs"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "Business Agent. One specific question per entry; beyond a few hundred entries retrieval quality drops. Not idempotent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_busi_7200e1",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "answer": "example",
                "question": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "answer": {
                    "description": "Self-contained; the agent retrieves entries independently.",
                    "maxLength": 8000,
                    "type": "string"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "question": {
                    "description": "Phrase it the way a customer would ask it; one topic per entry.",
                    "maxLength": 1000,
                    "type": "string"
                  }
                },
                "required": [
                  "question",
                  "answer"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "answer": {
                          "description": "Self-contained; the agent retrieves entries independently.",
                          "maxLength": 8000,
                          "type": "string"
                        },
                        "metadata": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "question": {
                          "description": "Phrase it the way a customer would ask it; one topic per entry.",
                          "maxLength": 1000,
                          "type": "string"
                        }
                      },
                      "required": [
                        "question",
                        "answer"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "created_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Create a FAQ",
        "x-aisa-capabilities": {
          "capability": "messaging.create_business_agent_faq@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_busi_7200e1",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "890daa6c427af3b25e2ef7a6eab193fbd90e964be38728c4b61267222c2ccc5d"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_busi_7200e1",
          "path": "/apis/v1/social/messaging/business-agent/faqs"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/faqs/{faqId}": {
      "delete": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_bu_6585bb",
        "parameters": [
          {
            "in": "path",
            "name": "faqId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Delete a FAQ",
        "x-aisa-capabilities": {
          "capability": "messaging.delete_business_agent_faq@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_bu_6585bb",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "895a9560f53fa3b1832a950d6b6412d4385a4cd4682f33678e266ec4befe5156"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_bu_6585bb",
          "path": "/apis/v1/social/messaging/business-agent/faqs/{faqId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "Business Agent.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_6585bb",
        "parameters": [
          {
            "in": "path",
            "name": "faqId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "answer": {
                          "description": "Self-contained; the agent retrieves entries independently.",
                          "maxLength": 8000,
                          "type": "string"
                        },
                        "metadata": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "question": {
                          "description": "Phrase it the way a customer would ask it; one topic per entry.",
                          "maxLength": 1000,
                          "type": "string"
                        }
                      },
                      "required": [
                        "question",
                        "answer"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "created_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get a FAQ",
        "x-aisa-capabilities": {
          "capability": "messaging.get_business_agent_faq@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_6585bb",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "bf78c2fcfd2ff393308a90ba7af5ece0ab58bccd4f68b6c1a4ab7b206e091457"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_6585bb",
          "path": "/apis/v1/social/messaging/business-agent/faqs/{faqId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "put": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "put_aisa_messaging_apis_v1_social_messaging_busin_6585bb",
        "parameters": [
          {
            "in": "path",
            "name": "faqId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "answer": "example",
                "question": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "answer": {
                    "description": "Self-contained; the agent retrieves entries independently.",
                    "maxLength": 8000,
                    "type": "string"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "metadata": {
                    "additionalProperties": {
                      "type": "string"
                    },
                    "type": "object"
                  },
                  "question": {
                    "description": "Phrase it the way a customer would ask it; one topic per entry.",
                    "maxLength": 1000,
                    "type": "string"
                  }
                },
                "required": [
                  "question",
                  "answer"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "answer": {
                          "description": "Self-contained; the agent retrieves entries independently.",
                          "maxLength": 8000,
                          "type": "string"
                        },
                        "metadata": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "question": {
                          "description": "Phrase it the way a customer would ask it; one topic per entry.",
                          "maxLength": 1000,
                          "type": "string"
                        }
                      },
                      "required": [
                        "question",
                        "answer"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "created_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Update a FAQ",
        "x-aisa-capabilities": {
          "capability": "messaging.update_business_agent_faq@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/put_aisa_messaging_apis_v1_social_messaging_busin_6585bb",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "6c1fd504c9d18657cbfb2875a3081348f24dfab6a37652b578475bba5cfe726d"
        },
        "x-aisa-runtime-operation": {
          "method": "PUT",
          "operation_id": "put_aisa_messaging_apis_v1_social_messaging_busin_6585bb",
          "path": "/apis/v1/social/messaging/business-agent/faqs/{faqId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/files": {
      "get": {
        "description": "Business Agent.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_77f6a4",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "files": {
                      "items": {
                        "properties": {
                          "file_name": {
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "id",
                          "file_name"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "files"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List knowledge files",
        "x-aisa-capabilities": {
          "capability": "messaging.list_business_agent_files@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_77f6a4",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "6a38d27431ef6c79ed86acec7e7f731bbe32d1e324cc00ffa36ee84179f75355"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_77f6a4",
          "path": "/apis/v1/social/messaging/business-agent/files"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "Business Agent. Uploads a knowledge file. Not idempotent.\n\nAccepted types: pdf, doc, docx, png, jpg, jpeg, plus csv and xlsx when Meta enabled extraction on the asset. Meta's limit is 100 MB.\n\n### Two ways to send the file\n\nUse this for anything above a few megabytes. - multipart form-data with a `file` part (and an optional `fileName`): bounded by the request body limit of about 4.5 MB. Larger uploads must use the `url` form.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_busi_77f6a4",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "url": "https://example.com/item"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "fileName": {
                    "description": "Defaults to the last path segment of the URL.",
                    "type": "string"
                  },
                  "url": {
                    "description": "Publicly downloadable file URL.",
                    "format": "uri",
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "file_name": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "file_name"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Upload a knowledge file",
        "x-aisa-capabilities": {
          "capability": "messaging.upload_business_agent_file@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_busi_77f6a4",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "3c4a01860c9220c3184a48be726c338b2e91684d2518f7a9b119fae0fb75419c"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_busi_77f6a4",
          "path": "/apis/v1/social/messaging/business-agent/files"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/files/{fileId}": {
      "delete": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_bu_442b0f",
        "parameters": [
          {
            "in": "path",
            "name": "fileId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Delete a knowledge file",
        "x-aisa-capabilities": {
          "capability": "messaging.delete_business_agent_file@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_bu_442b0f",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "0095dc10b3f870d5fa45076443ae58a99f9d91e14c135538b3387a4acfc01a09"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_bu_442b0f",
          "path": "/apis/v1/social/messaging/business-agent/files/{fileId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "Business Agent.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_442b0f",
        "parameters": [
          {
            "in": "path",
            "name": "fileId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "file_name": {
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "file_name"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get a knowledge file",
        "x-aisa-capabilities": {
          "capability": "messaging.get_business_agent_file@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_442b0f",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "f7efecdc0fd5ffb8f36dcfde2699365d63d46615eefce3de087abd5e5a2f8d54"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_442b0f",
          "path": "/apis/v1/social/messaging/business-agent/files/{fileId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/onboard": {
      "post": {
        "description": "Business Agent. Creates the Meta Business Agent on the number and schedules Meta's data preparation.\n\nRequires the terms to be accepted. Eligibility is checked first, and an ineligible number answers 403 `business_agent_not_eligible`.\n\n### Setup order\n\nNot idempotent: call it once, then:\n\n1. Configure knowledge and skills.\n2. Enable it through the settings.\n\nConfiguration calls made in the first minute can still answer `business_agent_not_found` while Meta prepares the workspace.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_busi_fb8332",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "agentId": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "agentId"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Create the agent",
        "x-aisa-capabilities": {
          "capability": "messaging.onboard_business_agent@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_busi_fb8332",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "a683b8b4582ca308aeea1fc08b3cd2012cfeb766d54733384bee5d9381ba6bb4"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_busi_fb8332",
          "path": "/apis/v1/social/messaging/business-agent/onboard"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/settings": {
      "get": {
        "description": "Business Agent. Settings of every agent configured on the number (normally one). Pass `agentId` to read one.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_3272ae",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "agentId",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "settings": {
                      "items": {
                        "description": "Meta Business Agent settings for one WhatsApp number, as Meta returns them.",
                        "properties": {
                          "agent_id": {
                            "type": "string"
                          },
                          "ai_audience": {
                            "description": "EVERYONE answers all consumers; ALLOWLISTED_ONLY answers only the allowlist and needs no payment method.",
                            "enum": [
                              "EVERYONE",
                              "ALLOWLISTED_ONLY",
                              null
                            ],
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "channel": {
                            "type": "string"
                          },
                          "followup": {
                            "properties": {
                              "enabled": {
                                "type": "boolean"
                              },
                              "followup_interval_in_seconds": {
                                "enum": [
                                  0,
                                  300,
                                  900,
                                  1800,
                                  3600,
                                  7200,
                                  28800,
                                  86400
                                ],
                                "type": "integer"
                              },
                              "message": {
                                "type": "string"
                              }
                            },
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "handoff": {
                            "properties": {
                              "enabled": {
                                "description": "Whether the agent releases the thread after sending its handoff message.",
                                "type": "boolean"
                              },
                              "message": {
                                "type": "string"
                              },
                              "message_selection": {
                                "enum": [
                                  "DEFAULT",
                                  "AGENT",
                                  "CUSTOM"
                                ],
                                "type": "string"
                              }
                            },
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "never_say_phrases": {
                            "description": "Exact phrases the agent must never say.",
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "rollout": {
                            "properties": {
                              "enabled": {
                                "description": "Whether the agent answers live conversations.",
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "enabled"
                            ],
                            "type": "object"
                          }
                        },
                        "required": [
                          "agent_id",
                          "channel",
                          "rollout"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "settings"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List agent settings",
        "x-aisa-capabilities": {
          "capability": "messaging.list_business_agent_settings@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_3272ae",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "ce22872e2b14416ed397e170606e1226611d3ccda51f15fcf9927eac4602f19b"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_3272ae",
          "path": "/apis/v1/social/messaging/business-agent/settings"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "patch": {
        "description": "Business Agent. Partial update: fields you omit keep their value.\n\n- `rollout.enabled: true` turns the agent on for new conversations; `false` stops it on every thread. - Turning it on for `EVERYONE` needs a payment method on the Business Agent billable account (Meta accepts the call but delivers nothing without one). - `ALLOWLISTED_ONLY` does not need one, which is how you test with a few numbers before billing. - `never_say_phrases` replaces the whole list.\n\nA write: needs messaging:write and is audited.",
        "operationId": "patch_aisa_messaging_apis_v1_social_messaging_bus_3272ae",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "agentId",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "handoff": {
                  "enabled": true
                },
                "rollout": {
                  "enabled": true
                }
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "ai_audience": {
                    "enum": [
                      "EVERYONE",
                      "ALLOWLISTED_ONLY"
                    ],
                    "type": "string"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "followup": {
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "followup_interval_in_seconds": {
                        "enum": [
                          0,
                          300,
                          900,
                          1800,
                          3600,
                          7200,
                          28800,
                          86400
                        ],
                        "type": "integer"
                      },
                      "message": {
                        "maxLength": 1024,
                        "type": "string"
                      }
                    },
                    "required": [
                      "enabled"
                    ],
                    "type": "object"
                  },
                  "handoff": {
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      },
                      "message": {
                        "maxLength": 1024,
                        "type": "string"
                      },
                      "message_selection": {
                        "enum": [
                          "DEFAULT",
                          "AGENT",
                          "CUSTOM"
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "enabled"
                    ],
                    "type": "object"
                  },
                  "never_say_phrases": {
                    "description": "Exact phrases the agent must never say; the full replacement list.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "rollout": {
                    "properties": {
                      "enabled": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "enabled"
                    ],
                    "type": "object"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "description": "Meta Business Agent settings for one WhatsApp number, as Meta returns them.",
                  "properties": {
                    "agent_id": {
                      "type": "string"
                    },
                    "ai_audience": {
                      "description": "EVERYONE answers all consumers; ALLOWLISTED_ONLY answers only the allowlist and needs no payment method.",
                      "enum": [
                        "EVERYONE",
                        "ALLOWLISTED_ONLY",
                        null
                      ],
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "channel": {
                      "type": "string"
                    },
                    "followup": {
                      "properties": {
                        "enabled": {
                          "type": "boolean"
                        },
                        "followup_interval_in_seconds": {
                          "enum": [
                            0,
                            300,
                            900,
                            1800,
                            3600,
                            7200,
                            28800,
                            86400
                          ],
                          "type": "integer"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "handoff": {
                      "properties": {
                        "enabled": {
                          "description": "Whether the agent releases the thread after sending its handoff message.",
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        },
                        "message_selection": {
                          "enum": [
                            "DEFAULT",
                            "AGENT",
                            "CUSTOM"
                          ],
                          "type": "string"
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "never_say_phrases": {
                      "description": "Exact phrases the agent must never say.",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "rollout": {
                      "properties": {
                        "enabled": {
                          "description": "Whether the agent answers live conversations.",
                          "type": "boolean"
                        }
                      },
                      "required": [
                        "enabled"
                      ],
                      "type": "object"
                    }
                  },
                  "required": [
                    "agent_id",
                    "channel",
                    "rollout"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Update agent settings",
        "x-aisa-capabilities": {
          "capability": "messaging.update_business_agent_settings@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/patch_aisa_messaging_apis_v1_social_messaging_bus_3272ae",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "ec6a97768837249c8ceaa06b84aca7aacd42cb54543681245c4ebb81715fc6f2"
        },
        "x-aisa-runtime-operation": {
          "method": "PATCH",
          "operation_id": "patch_aisa_messaging_apis_v1_social_messaging_bus_3272ae",
          "path": "/apis/v1/social/messaging/business-agent/settings"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/skills": {
      "get": {
        "description": "Business Agent.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_15f093",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "skills": {
                      "items": {
                        "allOf": [
                          {
                            "properties": {
                              "description": {
                                "description": "When the agent should apply the skill.",
                                "maxLength": 1024,
                                "type": "string"
                              },
                              "skill": {
                                "description": "The instructions themselves. Avoid two skills that both claim priority for the same situation.",
                                "maxLength": 20000,
                                "type": "string"
                              },
                              "title": {
                                "description": "Lowercase letters, digits and hyphens, e.g. greeting-skill.",
                                "maxLength": 64,
                                "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "skill"
                            ],
                            "type": "object"
                          },
                          {
                            "properties": {
                              "channel": {
                                "type": "string"
                              },
                              "created_at": {
                                "description": "Unix seconds.",
                                "type": "integer"
                              },
                              "id": {
                                "type": "string"
                              },
                              "status": {
                                "description": "pending_review right after a write; blocked means Meta content review rejected it and the agent never applies it.",
                                "enum": [
                                  "active",
                                  "pending_review",
                                  "blocked"
                                ],
                                "type": "string"
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "type": "object"
                          }
                        ]
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "skills"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List skills",
        "x-aisa-capabilities": {
          "capability": "messaging.list_business_agent_skills@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_15f093",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "c36c984d04ea253885da509506b60c452c85399fe8fd3f01e2be6b41ec33fa76"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_15f093",
          "path": "/apis/v1/social/messaging/business-agent/skills"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "Business Agent. Behavioral instructions in the brand voice. Reads back `pending_review` until Meta content review passes it. Not idempotent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_busi_15f093",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "skill": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "description": {
                    "description": "When the agent should apply the skill.",
                    "maxLength": 1024,
                    "type": "string"
                  },
                  "skill": {
                    "description": "The instructions themselves. Avoid two skills that both claim priority for the same situation.",
                    "maxLength": 20000,
                    "type": "string"
                  },
                  "title": {
                    "description": "Lowercase letters, digits and hyphens, e.g. greeting-skill.",
                    "maxLength": 64,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                    "type": "string"
                  }
                },
                "required": [
                  "skill"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "description": {
                          "description": "When the agent should apply the skill.",
                          "maxLength": 1024,
                          "type": "string"
                        },
                        "skill": {
                          "description": "The instructions themselves. Avoid two skills that both claim priority for the same situation.",
                          "maxLength": 20000,
                          "type": "string"
                        },
                        "title": {
                          "description": "Lowercase letters, digits and hyphens, e.g. greeting-skill.",
                          "maxLength": 64,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "skill"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "channel": {
                          "type": "string"
                        },
                        "created_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        },
                        "status": {
                          "description": "pending_review right after a write; blocked means Meta content review rejected it and the agent never applies it.",
                          "enum": [
                            "active",
                            "pending_review",
                            "blocked"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Create a skill",
        "x-aisa-capabilities": {
          "capability": "messaging.create_business_agent_skill@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_busi_15f093",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "7370eda3898e6e34290a99c577fae96141ef456111186d8411c43a8a16cd40b2"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_busi_15f093",
          "path": "/apis/v1/social/messaging/business-agent/skills"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/skills/{skillId}": {
      "delete": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_bu_6af84b",
        "parameters": [
          {
            "in": "path",
            "name": "skillId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Delete a skill",
        "x-aisa-capabilities": {
          "capability": "messaging.delete_business_agent_skill@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_bu_6af84b",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "5587e72f44b8582a65c09582a783233d406b33c11f824f966b656440ea81ecae"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_bu_6af84b",
          "path": "/apis/v1/social/messaging/business-agent/skills/{skillId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "Business Agent.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_6af84b",
        "parameters": [
          {
            "in": "path",
            "name": "skillId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "description": {
                          "description": "When the agent should apply the skill.",
                          "maxLength": 1024,
                          "type": "string"
                        },
                        "skill": {
                          "description": "The instructions themselves. Avoid two skills that both claim priority for the same situation.",
                          "maxLength": 20000,
                          "type": "string"
                        },
                        "title": {
                          "description": "Lowercase letters, digits and hyphens, e.g. greeting-skill.",
                          "maxLength": 64,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "skill"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "channel": {
                          "type": "string"
                        },
                        "created_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        },
                        "status": {
                          "description": "pending_review right after a write; blocked means Meta content review rejected it and the agent never applies it.",
                          "enum": [
                            "active",
                            "pending_review",
                            "blocked"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get a skill",
        "x-aisa-capabilities": {
          "capability": "messaging.get_business_agent_skill@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_6af84b",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "5b990dc919900aa4a940508846e357385d1ce89778aae7e5b91bfa338079c931"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_6af84b",
          "path": "/apis/v1/social/messaging/business-agent/skills/{skillId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "put": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "put_aisa_messaging_apis_v1_social_messaging_busin_6af84b",
        "parameters": [
          {
            "in": "path",
            "name": "skillId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "skill": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "description": {
                    "description": "When the agent should apply the skill.",
                    "maxLength": 1024,
                    "type": "string"
                  },
                  "skill": {
                    "description": "The instructions themselves. Avoid two skills that both claim priority for the same situation.",
                    "maxLength": 20000,
                    "type": "string"
                  },
                  "title": {
                    "description": "Lowercase letters, digits and hyphens, e.g. greeting-skill.",
                    "maxLength": 64,
                    "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                    "type": "string"
                  }
                },
                "required": [
                  "skill"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "description": {
                          "description": "When the agent should apply the skill.",
                          "maxLength": 1024,
                          "type": "string"
                        },
                        "skill": {
                          "description": "The instructions themselves. Avoid two skills that both claim priority for the same situation.",
                          "maxLength": 20000,
                          "type": "string"
                        },
                        "title": {
                          "description": "Lowercase letters, digits and hyphens, e.g. greeting-skill.",
                          "maxLength": 64,
                          "pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "skill"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "channel": {
                          "type": "string"
                        },
                        "created_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        },
                        "status": {
                          "description": "pending_review right after a write; blocked means Meta content review rejected it and the agent never applies it.",
                          "enum": [
                            "active",
                            "pending_review",
                            "blocked"
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Update a skill",
        "x-aisa-capabilities": {
          "capability": "messaging.update_business_agent_skill@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/put_aisa_messaging_apis_v1_social_messaging_busin_6af84b",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "38047cc2278e2fb7bea49cd3450194d9f3506280887543fcb0fe57e1ea57018e"
        },
        "x-aisa-runtime-operation": {
          "method": "PUT",
          "operation_id": "put_aisa_messaging_apis_v1_social_messaging_busin_6af84b",
          "path": "/apis/v1/social/messaging/business-agent/skills/{skillId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/test-messages": {
      "post": {
        "description": "Business Agent. Runs the message through the full agent pipeline in Meta sandbox with no WhatsApp user and no token billing. Pass back `conversationId` to continue a thread. Meta rate-limits it per number per hour.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_busi_d51c10",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "message": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "conversationId": {
                    "type": "string"
                  },
                  "message": {
                    "maxLength": 4096,
                    "type": "string"
                  }
                },
                "required": [
                  "message"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "agent_response": {
                      "type": "string"
                    },
                    "conversation_id": {
                      "description": "Pass it back as conversationId to continue the thread.",
                      "type": "string"
                    },
                    "handoff_reason": {
                      "type": "string"
                    },
                    "message_id": {
                      "type": "string"
                    },
                    "no_response_reason": {
                      "type": "string"
                    },
                    "product_variant_ids": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "quick_replies": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "timestamp": {
                      "description": "Unix seconds.",
                      "type": "integer"
                    }
                  },
                  "required": [
                    "message_id",
                    "agent_response",
                    "conversation_id"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Send a test message",
        "x-aisa-capabilities": {
          "capability": "messaging.send_business_agent_test_message@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_busi_d51c10",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "af5a88903d399454ea0ee19729db1e707d303c77120b72c2555b776c5d54b4f9"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_busi_d51c10",
          "path": "/apis/v1/social/messaging/business-agent/test-messages"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/ui-skills": {
      "get": {
        "description": "Business Agent. Cursor paged; follow `paging.cursors.after` until `paging.next` is absent.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_0a61a7",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "paging": {
                      "additionalProperties": true,
                      "type": "object"
                    },
                    "uiSkills": {
                      "items": {
                        "allOf": [
                          {
                            "properties": {
                              "component_type": {
                                "enum": [
                                  "carousel_quick_reply",
                                  "carousel_url",
                                  "cta_url",
                                  "flow",
                                  "image",
                                  "interactive_list",
                                  "interactive_reply_buttons",
                                  "location",
                                  "location_request"
                                ],
                                "type": "string"
                              },
                              "flow_id": {
                                "description": "Required for component_type flow, rejected otherwise.",
                                "type": "integer"
                              },
                              "instruction": {
                                "description": "When to send the component and everything needed to fill its fields.",
                                "type": "string"
                              },
                              "status": {
                                "enum": [
                                  "enabled",
                                  "disabled"
                                ],
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "component_type",
                              "status",
                              "instruction"
                            ],
                            "type": "object"
                          },
                          {
                            "properties": {
                              "created_at": {
                                "description": "Unix seconds.",
                                "type": "integer"
                              },
                              "id": {
                                "type": "string"
                              },
                              "updated_at": {
                                "description": "Unix seconds.",
                                "type": "integer"
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "type": "object"
                          }
                        ]
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "uiSkills"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List UI skills",
        "x-aisa-capabilities": {
          "capability": "messaging.list_business_agent_ui_skills@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_0a61a7",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "449aac788bbf21ca2c8b95d634e0b96095d30724e4d4e9a1b3debb9c2ba05884"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_0a61a7",
          "path": "/apis/v1/social/messaging/business-agent/ui-skills"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "Business Agent. Tells the agent when to send a rich component (CTA URL button, image, carousel, list, reply buttons, location, Flow) and what to put in it. Not idempotent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_busi_0a61a7",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "component_type": "carousel_quick_reply",
                "instruction": "example",
                "status": "enabled"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "component_type": {
                    "enum": [
                      "carousel_quick_reply",
                      "carousel_url",
                      "cta_url",
                      "flow",
                      "image",
                      "interactive_list",
                      "interactive_reply_buttons",
                      "location",
                      "location_request"
                    ],
                    "type": "string"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "flow_id": {
                    "description": "Required for component_type flow, rejected otherwise.",
                    "type": "integer"
                  },
                  "instruction": {
                    "description": "When to send the component and everything needed to fill its fields.",
                    "type": "string"
                  },
                  "status": {
                    "enum": [
                      "enabled",
                      "disabled"
                    ],
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  }
                },
                "required": [
                  "component_type",
                  "status",
                  "instruction"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "component_type": {
                          "enum": [
                            "carousel_quick_reply",
                            "carousel_url",
                            "cta_url",
                            "flow",
                            "image",
                            "interactive_list",
                            "interactive_reply_buttons",
                            "location",
                            "location_request"
                          ],
                          "type": "string"
                        },
                        "flow_id": {
                          "description": "Required for component_type flow, rejected otherwise.",
                          "type": "integer"
                        },
                        "instruction": {
                          "description": "When to send the component and everything needed to fill its fields.",
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "enabled",
                            "disabled"
                          ],
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "component_type",
                        "status",
                        "instruction"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "created_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        },
                        "updated_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Create a UI skill",
        "x-aisa-capabilities": {
          "capability": "messaging.create_business_agent_ui_skill@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_busi_0a61a7",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "cefffc695de5001e865231218f85ebea0d9ec142bc2901f03f76dc3fe9951555"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_busi_0a61a7",
          "path": "/apis/v1/social/messaging/business-agent/ui-skills"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/ui-skills/{uiSkillId}": {
      "delete": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_bu_71364c",
        "parameters": [
          {
            "in": "path",
            "name": "uiSkillId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Delete a UI skill",
        "x-aisa-capabilities": {
          "capability": "messaging.delete_business_agent_ui_skill@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_bu_71364c",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "45c87620379eb53bd7b858b001ac64b20ac8ae302902289b92d228928540fe34"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_bu_71364c",
          "path": "/apis/v1/social/messaging/business-agent/ui-skills/{uiSkillId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "Business Agent.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_71364c",
        "parameters": [
          {
            "in": "path",
            "name": "uiSkillId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "component_type": {
                          "enum": [
                            "carousel_quick_reply",
                            "carousel_url",
                            "cta_url",
                            "flow",
                            "image",
                            "interactive_list",
                            "interactive_reply_buttons",
                            "location",
                            "location_request"
                          ],
                          "type": "string"
                        },
                        "flow_id": {
                          "description": "Required for component_type flow, rejected otherwise.",
                          "type": "integer"
                        },
                        "instruction": {
                          "description": "When to send the component and everything needed to fill its fields.",
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "enabled",
                            "disabled"
                          ],
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "component_type",
                        "status",
                        "instruction"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "created_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        },
                        "updated_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get a UI skill",
        "x-aisa-capabilities": {
          "capability": "messaging.get_business_agent_ui_skill@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_71364c",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "63b01739b5b6b2ee0b90e4f706a2bb1ba6acbc875332e10cfd945878d8ce3bf2"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_71364c",
          "path": "/apis/v1/social/messaging/business-agent/ui-skills/{uiSkillId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "put": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "put_aisa_messaging_apis_v1_social_messaging_busin_71364c",
        "parameters": [
          {
            "in": "path",
            "name": "uiSkillId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "component_type": "carousel_quick_reply",
                "instruction": "example",
                "status": "enabled"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "component_type": {
                    "enum": [
                      "carousel_quick_reply",
                      "carousel_url",
                      "cta_url",
                      "flow",
                      "image",
                      "interactive_list",
                      "interactive_reply_buttons",
                      "location",
                      "location_request"
                    ],
                    "type": "string"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "flow_id": {
                    "description": "Required for component_type flow, rejected otherwise.",
                    "type": "integer"
                  },
                  "instruction": {
                    "description": "When to send the component and everything needed to fill its fields.",
                    "type": "string"
                  },
                  "status": {
                    "enum": [
                      "enabled",
                      "disabled"
                    ],
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  }
                },
                "required": [
                  "component_type",
                  "status",
                  "instruction"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "component_type": {
                          "enum": [
                            "carousel_quick_reply",
                            "carousel_url",
                            "cta_url",
                            "flow",
                            "image",
                            "interactive_list",
                            "interactive_reply_buttons",
                            "location",
                            "location_request"
                          ],
                          "type": "string"
                        },
                        "flow_id": {
                          "description": "Required for component_type flow, rejected otherwise.",
                          "type": "integer"
                        },
                        "instruction": {
                          "description": "When to send the component and everything needed to fill its fields.",
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "enabled",
                            "disabled"
                          ],
                          "type": "string"
                        },
                        "title": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "component_type",
                        "status",
                        "instruction"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "created_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        },
                        "updated_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Update a UI skill",
        "x-aisa-capabilities": {
          "capability": "messaging.update_business_agent_ui_skill@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/put_aisa_messaging_apis_v1_social_messaging_busin_71364c",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "be19ff926faa1b34f30b0c9546775f5a7ef2ec19a3db298c33d078ae1684569f"
        },
        "x-aisa-runtime-operation": {
          "method": "PUT",
          "operation_id": "put_aisa_messaging_apis_v1_social_messaging_busin_71364c",
          "path": "/apis/v1/social/messaging/business-agent/ui-skills/{uiSkillId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/websites": {
      "get": {
        "description": "Business Agent.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_48075b",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "websites": {
                      "items": {
                        "allOf": [
                          {
                            "properties": {
                              "excluded_sub_domains": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "excluded_url_patterns": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "included_sub_domains": {
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "included_url_patterns": {
                                "description": "Only URLs containing one of these substrings are ingested.",
                                "items": {
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "single_urls": {
                                "description": "Crawl only these exact pages instead of the whole site.",
                                "items": {
                                  "format": "uri",
                                  "type": "string"
                                },
                                "type": "array"
                              },
                              "url": {
                                "format": "uri",
                                "type": "string"
                              }
                            },
                            "required": [
                              "url"
                            ],
                            "type": "object"
                          },
                          {
                            "properties": {
                              "crawl_error": {
                                "type": "string"
                              },
                              "crawl_status": {
                                "description": "not_started, pending, in_progress, completed, completed_no_data or failed (see crawl_error).",
                                "type": "string"
                              },
                              "created_at": {
                                "description": "Unix seconds.",
                                "type": "integer"
                              },
                              "id": {
                                "type": "string"
                              },
                              "last_crawled_at": {
                                "description": "Unix seconds.",
                                "type": "integer"
                              },
                              "pages_crawled": {
                                "type": "integer"
                              }
                            },
                            "required": [
                              "id"
                            ],
                            "type": "object"
                          }
                        ]
                      },
                      "type": "array"
                    }
                  },
                  "required": [
                    "websites"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List crawled websites",
        "x-aisa-capabilities": {
          "capability": "messaging.list_business_agent_websites@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_48075b",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "c41c9cd7ba61308b1bae33fdc939f313553884c6ca88f891f9b04d45eb412c88"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_48075b",
          "path": "/apis/v1/social/messaging/business-agent/websites"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "Business Agent. Meta crawls the site into the agent knowledge and recrawls it periodically; check `crawl_status` and `crawl_error` on read. Not idempotent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_busi_48075b",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "url": "https://example.com/item"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "excluded_sub_domains": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "excluded_url_patterns": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "included_sub_domains": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "included_url_patterns": {
                    "description": "Only URLs containing one of these substrings are ingested.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "single_urls": {
                    "description": "Crawl only these exact pages instead of the whole site.",
                    "items": {
                      "format": "uri",
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "url": {
                    "format": "uri",
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "excluded_sub_domains": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "excluded_url_patterns": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "included_sub_domains": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "included_url_patterns": {
                          "description": "Only URLs containing one of these substrings are ingested.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "single_urls": {
                          "description": "Crawl only these exact pages instead of the whole site.",
                          "items": {
                            "format": "uri",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "url": {
                          "format": "uri",
                          "type": "string"
                        }
                      },
                      "required": [
                        "url"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "crawl_error": {
                          "type": "string"
                        },
                        "crawl_status": {
                          "description": "not_started, pending, in_progress, completed, completed_no_data or failed (see crawl_error).",
                          "type": "string"
                        },
                        "created_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        },
                        "last_crawled_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "pages_crawled": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Add a website to crawl",
        "x-aisa-capabilities": {
          "capability": "messaging.add_business_agent_website@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_busi_48075b",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "66ef236a71075669bcddc1bbad0208e90981d1b9fdc2261c5545144230592c12"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_busi_48075b",
          "path": "/apis/v1/social/messaging/business-agent/websites"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/business-agent/websites/{websiteId}": {
      "delete": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_bu_b3bf72",
        "parameters": [
          {
            "in": "path",
            "name": "websiteId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "success"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Remove a crawled website",
        "x-aisa-capabilities": {
          "capability": "messaging.delete_business_agent_website@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_bu_b3bf72",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "2247c4d5c4b9234e4e941103e1203bd61f97012ad3b7cfdc54e907afd7d6be6a"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_bu_b3bf72",
          "path": "/apis/v1/social/messaging/business-agent/websites/{websiteId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "Business Agent.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_busin_b3bf72",
        "parameters": [
          {
            "in": "path",
            "name": "websiteId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "excluded_sub_domains": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "excluded_url_patterns": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "included_sub_domains": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "included_url_patterns": {
                          "description": "Only URLs containing one of these substrings are ingested.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "single_urls": {
                          "description": "Crawl only these exact pages instead of the whole site.",
                          "items": {
                            "format": "uri",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "url": {
                          "format": "uri",
                          "type": "string"
                        }
                      },
                      "required": [
                        "url"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "crawl_error": {
                          "type": "string"
                        },
                        "crawl_status": {
                          "description": "not_started, pending, in_progress, completed, completed_no_data or failed (see crawl_error).",
                          "type": "string"
                        },
                        "created_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        },
                        "last_crawled_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "pages_crawled": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get a crawled website",
        "x-aisa-capabilities": {
          "capability": "messaging.get_business_agent_website@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_busin_b3bf72",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "f9676e0314bf3ae78f1a2e152ed99ab0320f85b45cd3e7246dbb33bcc7ebdb6a"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_busin_b3bf72",
          "path": "/apis/v1/social/messaging/business-agent/websites/{websiteId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "put": {
        "description": "Business Agent.\n\nA write: needs messaging:write and is audited.",
        "operationId": "put_aisa_messaging_apis_v1_social_messaging_busin_b3bf72",
        "parameters": [
          {
            "in": "path",
            "name": "websiteId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "url": "https://example.com/item"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "excluded_sub_domains": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "excluded_url_patterns": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "included_sub_domains": {
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "included_url_patterns": {
                    "description": "Only URLs containing one of these substrings are ingested.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "single_urls": {
                    "description": "Crawl only these exact pages instead of the whole site.",
                    "items": {
                      "format": "uri",
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "url": {
                    "format": "uri",
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "properties": {
                        "excluded_sub_domains": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "excluded_url_patterns": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "included_sub_domains": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "included_url_patterns": {
                          "description": "Only URLs containing one of these substrings are ingested.",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "single_urls": {
                          "description": "Crawl only these exact pages instead of the whole site.",
                          "items": {
                            "format": "uri",
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "url": {
                          "format": "uri",
                          "type": "string"
                        }
                      },
                      "required": [
                        "url"
                      ],
                      "type": "object"
                    },
                    {
                      "properties": {
                        "crawl_error": {
                          "type": "string"
                        },
                        "crawl_status": {
                          "description": "not_started, pending, in_progress, completed, completed_no_data or failed (see crawl_error).",
                          "type": "string"
                        },
                        "created_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "id": {
                          "type": "string"
                        },
                        "last_crawled_at": {
                          "description": "Unix seconds.",
                          "type": "integer"
                        },
                        "pages_crawled": {
                          "type": "integer"
                        }
                      },
                      "required": [
                        "id"
                      ],
                      "type": "object"
                    }
                  ]
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Update a crawled website",
        "x-aisa-capabilities": {
          "capability": "messaging.update_business_agent_website@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/put_aisa_messaging_apis_v1_social_messaging_busin_b3bf72",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "93a5d4df0256c16e1eb5d2660ee8a04e7199a1228b4e37b4026be0479bc87e01"
        },
        "x-aisa-runtime-operation": {
          "method": "PUT",
          "operation_id": "put_aisa_messaging_apis_v1_social_messaging_busin_b3bf72",
          "path": "/apis/v1/social/messaging/business-agent/websites/{websiteId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/connect/sessions/{sessionId}": {
      "get": {
        "description": "A connect session you started: its state and, once completed, the connection it made.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_conne_49a514",
        "parameters": [
          {
            "in": "path",
            "name": "sessionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "connectionId": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "error": {
                      "properties": {
                        "code": {
                          "type": "string"
                        },
                        "isUserFixable": {
                          "type": "boolean"
                        },
                        "message": {
                          "type": "string"
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    },
                    "expiresAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "id": {
                      "type": "string"
                    },
                    "platform": {
                      "type": "string"
                    },
                    "state": {
                      "enum": [
                        "created",
                        "authorizing",
                        "selecting",
                        "completed",
                        "failed",
                        "expired"
                      ],
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "platform",
                    "state",
                    "connectionId",
                    "error",
                    "expiresAt"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get a connect session",
        "x-aisa-capabilities": {
          "capability": "messaging.connection.get_connect_session@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_conne_49a514",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "a31c6a7afa0333cce2bb330441603d4c61cedde5b6ceee9936613ff053f4f2e6"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_conne_49a514",
          "path": "/apis/v1/social/messaging/connect/sessions/{sessionId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/connect/{platform}": {
      "get": {
        "description": "Starts connecting whatsapp, google, microsoft under one of your social profiles. Open authUrl in a browser and poll the connect session; when the platform was already connected under the profile the answer is the connection (alreadyConnected).",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_conne_08724c",
        "parameters": [
          {
            "in": "path",
            "name": "platform",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your social profile (prf_...); the default profile when omitted.",
            "in": "query",
            "name": "profileId",
            "required": false,
            "schema": {
              "pattern": "^prf_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Where the browser goes when the flow ends; it must be on your redirect allowlist.",
            "in": "query",
            "name": "redirectUrl",
            "required": false,
            "schema": {
              "format": "uri",
              "type": "string"
            }
          },
          {
            "description": "WhatsApp only: api for a number used only through the API, business_app (the default) for a number that stays on the WhatsApp Business app.",
            "in": "query",
            "name": "onboarding",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The mailbox address, to preselect it on the account picker.",
            "in": "query",
            "name": "loginHint",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "alreadyConnected": {
                      "type": "boolean"
                    },
                    "authUrl": {
                      "description": "Open this in a browser to authorize the platform, then poll the connect session.",
                      "format": "uri",
                      "type": "string"
                    },
                    "connectSessionId": {
                      "type": "string"
                    },
                    "connection": {
                      "properties": {
                        "connectedAt": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "displayName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "id": {
                          "pattern": "^msc_[0-9A-Za-z]+$",
                          "type": "string"
                        },
                        "platform": {
                          "enum": [
                            "whatsapp",
                            "google",
                            "microsoft"
                          ],
                          "type": "string"
                        },
                        "profileId": {
                          "description": "The social profile (prf_...) the connection was made under.",
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "active",
                            "needs_reconnect",
                            "disconnected"
                          ],
                          "type": "string"
                        },
                        "syncedAt": {
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "username": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "required": [
                        "id",
                        "platform",
                        "profileId",
                        "displayName",
                        "username",
                        "status",
                        "connectedAt",
                        "syncedAt"
                      ],
                      "type": "object"
                    },
                    "expiresAt": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "alreadyConnected"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Connect a platform",
        "x-aisa-capabilities": {
          "capability": "messaging.connection.start_connect@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_conne_08724c",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "1558af275a05a30f92145bbb84402e912545ddecdfca7cc5e43bc138a6fdbfb5"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_conne_08724c",
          "path": "/apis/v1/social/messaging/connect/{platform}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/connect/{platform}/credentials": {
      "post": {
        "description": "Connects whatsapp with credentials from the platform itself. They are passed to the platform's integration once; AIsa neither stores nor returns them.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_conn_aaf1e3",
        "parameters": [
          {
            "in": "path",
            "name": "platform",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "accessToken": "<accessToken>",
                "phoneNumberId": "<phoneNumberId>",
                "wabaId": "<wabaId>"
              },
              "schema": {
                "additionalProperties": false,
                "description": "The members each platform needs: whatsapp: accessToken, wabaId, phoneNumberId. They are passed to the platform's integration once; AIsa neither stores nor returns them.",
                "properties": {
                  "accessToken": {
                    "description": "WhatsApp: a permanent system user access token with the whatsapp_business_management and whatsapp_business_messaging permissions.",
                    "minLength": 1,
                    "type": "string"
                  },
                  "phoneNumberId": {
                    "description": "WhatsApp: the phone number id of the number to connect.",
                    "minLength": 1,
                    "type": "string"
                  },
                  "pin": {
                    "description": "WhatsApp: the six-digit two-step verification PIN of the number, when it has one.",
                    "minLength": 1,
                    "type": "string"
                  },
                  "profileId": {
                    "description": "Your social profile (prf_...); the default profile when omitted.",
                    "pattern": "^prf_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "wabaId": {
                    "description": "WhatsApp: the WhatsApp Business Account id.",
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "connectedAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "displayName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "pattern": "^msc_[0-9A-Za-z]+$",
                      "type": "string"
                    },
                    "platform": {
                      "enum": [
                        "whatsapp",
                        "google",
                        "microsoft"
                      ],
                      "type": "string"
                    },
                    "profileId": {
                      "description": "The social profile (prf_...) the connection was made under.",
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "active",
                        "needs_reconnect",
                        "disconnected"
                      ],
                      "type": "string"
                    },
                    "syncedAt": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "username": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "platform",
                    "profileId",
                    "displayName",
                    "username",
                    "status",
                    "connectedAt",
                    "syncedAt"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Connect a platform with its credentials",
        "x-aisa-capabilities": {
          "capability": "messaging.connection.connect_with_credentials@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_conn_aaf1e3",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "963716700a7935d2c4cb3290ca45fdc636cb7e37641e0e3009b9ae07046f82aa"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_conn_aaf1e3",
          "path": "/apis/v1/social/messaging/connect/{platform}/credentials"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/connections": {
      "get": {
        "description": "Your messaging connections, refreshed from the platform integration at most once a minute (refresh=true forces it). Operations that need one name it by connectionId.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_connections",
        "parameters": [
          {
            "in": "query",
            "name": "platform",
            "required": false,
            "schema": {
              "enum": [
                "whatsapp",
                "google",
                "microsoft"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "refresh",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "properties": {
                          "connectedAt": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "displayName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "pattern": "^msc_[0-9A-Za-z]+$",
                            "type": "string"
                          },
                          "platform": {
                            "enum": [
                              "whatsapp",
                              "google",
                              "microsoft"
                            ],
                            "type": "string"
                          },
                          "profileId": {
                            "description": "The social profile (prf_...) the connection was made under.",
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "active",
                              "needs_reconnect",
                              "disconnected"
                            ],
                            "type": "string"
                          },
                          "syncedAt": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "username": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "platform",
                          "profileId",
                          "displayName",
                          "username",
                          "status",
                          "connectedAt",
                          "syncedAt"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "nextCursor": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List messaging connections",
        "x-aisa-capabilities": {
          "capability": "messaging.connection.list_connections@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_connections",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "fec795d543921ca7f1933a828ecc7c2d99b3e655d60e4cf84ddba942f4f3ebfb"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_connections",
          "path": "/apis/v1/social/messaging/connections"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/connections/{connectionId}": {
      "delete": {
        "description": "Removes the authorization at the platform integration and marks the connection disconnected; audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_co_f7b8df",
        "parameters": [
          {
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "connectedAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "displayName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "pattern": "^msc_[0-9A-Za-z]+$",
                      "type": "string"
                    },
                    "platform": {
                      "enum": [
                        "whatsapp",
                        "google",
                        "microsoft"
                      ],
                      "type": "string"
                    },
                    "profileId": {
                      "description": "The social profile (prf_...) the connection was made under.",
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "active",
                        "needs_reconnect",
                        "disconnected"
                      ],
                      "type": "string"
                    },
                    "syncedAt": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "username": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "platform",
                    "profileId",
                    "displayName",
                    "username",
                    "status",
                    "connectedAt",
                    "syncedAt"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Disconnect a messaging connection",
        "x-aisa-capabilities": {
          "capability": "messaging.connection.disconnect_connection@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_co_f7b8df",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "a8d935c1045370b96adbbe13fd3f3a3d175c339a14a1ab470ff2583b2865f5c4"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_co_f7b8df",
          "path": "/apis/v1/social/messaging/connections/{connectionId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "One of your messaging connections.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_conne_f7b8df",
        "parameters": [
          {
            "in": "path",
            "name": "connectionId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "connectedAt": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "displayName": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "pattern": "^msc_[0-9A-Za-z]+$",
                      "type": "string"
                    },
                    "platform": {
                      "enum": [
                        "whatsapp",
                        "google",
                        "microsoft"
                      ],
                      "type": "string"
                    },
                    "profileId": {
                      "description": "The social profile (prf_...) the connection was made under.",
                      "type": "string"
                    },
                    "status": {
                      "enum": [
                        "active",
                        "needs_reconnect",
                        "disconnected"
                      ],
                      "type": "string"
                    },
                    "syncedAt": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "username": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "platform",
                    "profileId",
                    "displayName",
                    "username",
                    "status",
                    "connectedAt",
                    "syncedAt"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get a messaging connection",
        "x-aisa-capabilities": {
          "capability": "messaging.connection.get_connection@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_conne_f7b8df",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "e25d9a32e637ec3eaa81c19c7d6dba7712b018c9e743d629fb36a9a87935fcdf"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_conne_f7b8df",
          "path": "/apis/v1/social/messaging/connections/{connectionId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/email/attachments/{attachmentId}": {
      "get": {
        "description": "Email. Streams the attachment bytes with its `Content-Type` and a `Content-Disposition` carrying the filename.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_email_af34e1",
        "parameters": [
          {
            "in": "path",
            "name": "attachmentId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "messageId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Download an attachment",
        "x-aisa-capabilities": {
          "capability": "messaging.download_email_attachment@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_email_af34e1",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "4790183c120be42d2bab6ee140b48142101d2157d0a39d15feeccb333ecde642"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_email_af34e1",
          "path": "/apis/v1/social/messaging/email/attachments/{attachmentId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/email/folders": {
      "get": {
        "description": "Email. On Google, folders are Gmail labels (system labels carry `wellKnown`; `unreadCount` and `totalCount` are present only where Gmail reports them). There is no archive folder on Google; archived mail is listed with `folder=archive`.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_email_388f68",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "properties": {
                          "connectionId": {
                            "description": "One of your connections, or null when it is not one of yours.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "provider": {
                            "enum": [
                              "google",
                              "microsoft"
                            ],
                            "type": "string"
                          },
                          "totalCount": {
                            "type": "integer"
                          },
                          "unreadCount": {
                            "type": "integer"
                          },
                          "wellKnown": {
                            "enum": [
                              "inbox",
                              "sent",
                              "drafts",
                              "trash",
                              "spam",
                              "archive"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List mailbox folders",
        "x-aisa-capabilities": {
          "capability": "messaging.list_email_folders@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_email_388f68",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "9f7eb99dfe0f44531590435df2c29b32d1d697a1ce095c8be7008937b8cbf56d"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_email_388f68",
          "path": "/apis/v1/social/messaging/email/folders"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/email/messages": {
      "get": {
        "description": "Email. Same filters and envelope as `GET /apis/v1/social/messaging/email/threads`, one row per message. Bodies are omitted; fetch a message to read `text` and `html`.\n\n### On Google\n\n- List rows also omit `attachments` (Gmail's metadata pages carry headers only); `hasAttachment=true` still filters server-side. - `sortOrder=asc` reverses the fetched page. - `archive` means mail without the inbox, trash or spam labels.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_email_ee3658",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "folder",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "unread",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "starred",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "hasAttachment",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "subject",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cc",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "bcc",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "anyEmail",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "searchQueryNative",
            "required": false,
            "schema": {
              "maxLength": 500,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sortOrder",
            "required": false,
            "schema": {
              "default": "desc",
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "properties": {
                          "attachments": {
                            "items": {
                              "properties": {
                                "contentId": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "contentType": {
                                  "type": "string"
                                },
                                "filename": {
                                  "type": "string"
                                },
                                "id": {
                                  "type": "string"
                                },
                                "isInline": {
                                  "type": "boolean"
                                },
                                "size": {
                                  "type": "integer"
                                }
                              },
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "bcc": {
                            "items": {
                              "properties": {
                                "email": {
                                  "format": "email",
                                  "type": "string"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "email"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "cc": {
                            "items": {
                              "properties": {
                                "email": {
                                  "format": "email",
                                  "type": "string"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "email"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "connectionId": {
                            "description": "One of your connections, or null when it is not one of yours.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "date": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "folders": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "from": {
                            "oneOf": [
                              {
                                "properties": {
                                  "email": {
                                    "format": "email",
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "email"
                                ],
                                "type": "object"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "headers": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "description": "Only with `includeHeaders=true`.",
                            "type": "object"
                          },
                          "html": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "description": "The provider's message id.",
                            "type": "string"
                          },
                          "metadata": {
                            "additionalProperties": {
                              "type": "string"
                            },
                            "type": "object"
                          },
                          "provider": {
                            "enum": [
                              "google",
                              "microsoft"
                            ],
                            "type": "string"
                          },
                          "raw": {
                            "description": "MIME source, only with `raw=true`.",
                            "type": "string"
                          },
                          "replyTo": {
                            "items": {
                              "properties": {
                                "email": {
                                  "format": "email",
                                  "type": "string"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "email"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "snippet": {
                            "type": "string"
                          },
                          "starred": {
                            "type": "boolean"
                          },
                          "subject": {
                            "type": "string"
                          },
                          "text": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "threadId": {
                            "type": "string"
                          },
                          "to": {
                            "items": {
                              "properties": {
                                "email": {
                                  "format": "email",
                                  "type": "string"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "email"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "unread": {
                            "type": "boolean"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "filteredClientSide": {
                          "description": "The filters the provider could not apply server-side, so they were applied to the fetched page (Microsoft: `bcc`, `anyEmail`, and every other filter when `searchQueryNative` is set).",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "pagination": {
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "description": "Opaque; pass it back as `cursor`.",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List email messages",
        "x-aisa-capabilities": {
          "capability": "messaging.list_email_messages@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_email_ee3658",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "3cff55c22d45318c291258c60d1bb37d8bc24feaffe7f52c25c458ae7643ea7d"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_email_ee3658",
          "path": "/apis/v1/social/messaging/email/messages"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/email/messages/send": {
      "post": {
        "description": "Email. Send an email.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_emai_7a2d4d",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Passed to the platform integration: a retry with the same key returns the first result instead of acting twice. AIsa never retries a write for you.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 191,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "subject": "Your order",
                "text": "Your order is ready.",
                "to": [
                  {
                    "email": "customer@example.com"
                  }
                ]
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "html": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "subject": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "text": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "to": {
                    "items": {
                      "additionalProperties": false,
                      "properties": {
                        "email": {
                          "format": "email",
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "email"
                      ],
                      "type": "object"
                    },
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "to",
                  "subject"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "attachments": {
                          "items": {
                            "properties": {
                              "contentId": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "contentType": {
                                "type": "string"
                              },
                              "filename": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "isInline": {
                                "type": "boolean"
                              },
                              "size": {
                                "type": "integer"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "bcc": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "cc": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "connectionId": {
                          "description": "One of your connections, or null when it is not one of yours.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "date": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "folders": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "from": {
                          "oneOf": [
                            {
                              "properties": {
                                "email": {
                                  "format": "email",
                                  "type": "string"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "email"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "headers": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Only with `includeHeaders=true`.",
                          "type": "object"
                        },
                        "html": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "id": {
                          "description": "The provider's message id.",
                          "type": "string"
                        },
                        "metadata": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "provider": {
                          "enum": [
                            "google",
                            "microsoft"
                          ],
                          "type": "string"
                        },
                        "raw": {
                          "description": "MIME source, only with `raw=true`.",
                          "type": "string"
                        },
                        "replyTo": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "snippet": {
                          "type": "string"
                        },
                        "starred": {
                          "type": "boolean"
                        },
                        "subject": {
                          "type": "string"
                        },
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "threadId": {
                          "type": "string"
                        },
                        "to": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "unread": {
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Send an email",
        "x-aisa-capabilities": {
          "capability": "messaging.send_email_message@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_emai_7a2d4d",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "customer_micros_usd": 1000,
          "customer_pricing_ref": "messaging.send_email_message.v1.pricing@1",
          "description": "Charged once when the provider accepts the send. Failed and unconfirmed sends are free.",
          "kind": "fixed_request"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "94a0a8603c2b3678427afb97ad0e258afe854a1f0867711b8dbe22fc6d377ede"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_emai_7a2d4d",
          "path": "/apis/v1/social/messaging/email/messages/send"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/email/messages/{messageId}": {
      "delete": {
        "description": "Email.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_em_76a5e1",
        "parameters": [
          {
            "in": "path",
            "name": "messageId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "trashed": {
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Move a message to trash",
        "x-aisa-capabilities": {
          "capability": "messaging.trash_email_message@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_em_76a5e1",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "cc4a8fac74db14a030ba4771e18da88c67bc316936f94f6ebba9bbedb24e1946"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_em_76a5e1",
          "path": "/apis/v1/social/messaging/email/messages/{messageId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "Email.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_email_76a5e1",
        "parameters": [
          {
            "in": "path",
            "name": "messageId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Include the raw internet headers under `headers`.",
            "in": "query",
            "name": "includeHeaders",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          },
          {
            "description": "Include the MIME source under `raw`.",
            "in": "query",
            "name": "raw",
            "required": false,
            "schema": {
              "default": false,
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "attachments": {
                          "items": {
                            "properties": {
                              "contentId": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "contentType": {
                                "type": "string"
                              },
                              "filename": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "isInline": {
                                "type": "boolean"
                              },
                              "size": {
                                "type": "integer"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "bcc": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "cc": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "connectionId": {
                          "description": "One of your connections, or null when it is not one of yours.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "date": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "folders": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "from": {
                          "oneOf": [
                            {
                              "properties": {
                                "email": {
                                  "format": "email",
                                  "type": "string"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "email"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "headers": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Only with `includeHeaders=true`.",
                          "type": "object"
                        },
                        "html": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "id": {
                          "description": "The provider's message id.",
                          "type": "string"
                        },
                        "metadata": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "provider": {
                          "enum": [
                            "google",
                            "microsoft"
                          ],
                          "type": "string"
                        },
                        "raw": {
                          "description": "MIME source, only with `raw=true`.",
                          "type": "string"
                        },
                        "replyTo": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "snippet": {
                          "type": "string"
                        },
                        "starred": {
                          "type": "boolean"
                        },
                        "subject": {
                          "type": "string"
                        },
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "threadId": {
                          "type": "string"
                        },
                        "to": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "unread": {
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get an email message",
        "x-aisa-capabilities": {
          "capability": "messaging.get_email_message@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_email_76a5e1",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "68cf31ddbe034f935281727cf8b15664a3e48e0d144b2d292b8b5a96acf205be"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_email_76a5e1",
          "path": "/apis/v1/social/messaging/email/messages/{messageId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "patch": {
        "description": "Email. `folder` moves the message. On Google a move swaps the inbox, trash and spam labels and keeps every other label; `archive` removes the inbox label.\n\nA write: needs messaging:write and is audited.",
        "operationId": "patch_aisa_messaging_apis_v1_social_messaging_ema_76a5e1",
        "parameters": [
          {
            "in": "path",
            "name": "messageId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "starred": true,
                "unread": true
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "folder": {
                    "description": "Well-known folder name or folder id to move into.",
                    "type": "string"
                  },
                  "starred": {
                    "type": "boolean"
                  },
                  "unread": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "attachments": {
                          "items": {
                            "properties": {
                              "contentId": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "contentType": {
                                "type": "string"
                              },
                              "filename": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "isInline": {
                                "type": "boolean"
                              },
                              "size": {
                                "type": "integer"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "bcc": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "cc": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "connectionId": {
                          "description": "One of your connections, or null when it is not one of yours.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "date": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "folders": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "from": {
                          "oneOf": [
                            {
                              "properties": {
                                "email": {
                                  "format": "email",
                                  "type": "string"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "email"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "headers": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Only with `includeHeaders=true`.",
                          "type": "object"
                        },
                        "html": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "id": {
                          "description": "The provider's message id.",
                          "type": "string"
                        },
                        "metadata": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "provider": {
                          "enum": [
                            "google",
                            "microsoft"
                          ],
                          "type": "string"
                        },
                        "raw": {
                          "description": "MIME source, only with `raw=true`.",
                          "type": "string"
                        },
                        "replyTo": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "snippet": {
                          "type": "string"
                        },
                        "starred": {
                          "type": "boolean"
                        },
                        "subject": {
                          "type": "string"
                        },
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "threadId": {
                          "type": "string"
                        },
                        "to": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "unread": {
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Mark read or starred, or move a message",
        "x-aisa-capabilities": {
          "capability": "messaging.update_email_message@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/patch_aisa_messaging_apis_v1_social_messaging_ema_76a5e1",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "fc8b16efaaf52536ada32ac4c184898c43065c76339069c80d0776d2e4db1a18"
        },
        "x-aisa-runtime-operation": {
          "method": "PATCH",
          "operation_id": "patch_aisa_messaging_apis_v1_social_messaging_ema_76a5e1",
          "path": "/apis/v1/social/messaging/email/messages/{messageId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/email/messages/{messageId}/reply": {
      "post": {
        "description": "Email. Reply to an email.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_emai_fed66d",
        "parameters": [
          {
            "in": "path",
            "name": "messageId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Passed to the platform integration: a retry with the same key returns the first result instead of acting twice. AIsa never retries a write for you.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 191,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "text": "Your order is ready."
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "html": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "text": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "attachments": {
                          "items": {
                            "properties": {
                              "contentId": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "contentType": {
                                "type": "string"
                              },
                              "filename": {
                                "type": "string"
                              },
                              "id": {
                                "type": "string"
                              },
                              "isInline": {
                                "type": "boolean"
                              },
                              "size": {
                                "type": "integer"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "bcc": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "cc": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "connectionId": {
                          "description": "One of your connections, or null when it is not one of yours.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "date": {
                          "format": "date-time",
                          "type": "string"
                        },
                        "folders": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "from": {
                          "oneOf": [
                            {
                              "properties": {
                                "email": {
                                  "format": "email",
                                  "type": "string"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "email"
                              ],
                              "type": "object"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        },
                        "headers": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "description": "Only with `includeHeaders=true`.",
                          "type": "object"
                        },
                        "html": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "id": {
                          "description": "The provider's message id.",
                          "type": "string"
                        },
                        "metadata": {
                          "additionalProperties": {
                            "type": "string"
                          },
                          "type": "object"
                        },
                        "provider": {
                          "enum": [
                            "google",
                            "microsoft"
                          ],
                          "type": "string"
                        },
                        "raw": {
                          "description": "MIME source, only with `raw=true`.",
                          "type": "string"
                        },
                        "replyTo": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "snippet": {
                          "type": "string"
                        },
                        "starred": {
                          "type": "boolean"
                        },
                        "subject": {
                          "type": "string"
                        },
                        "text": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "threadId": {
                          "type": "string"
                        },
                        "to": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "unread": {
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Reply to an email",
        "x-aisa-capabilities": {
          "capability": "messaging.reply_email_message@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_emai_fed66d",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "customer_micros_usd": 1000,
          "customer_pricing_ref": "messaging.reply_email_message.v1.pricing@1",
          "description": "Charged once when the provider accepts the send. Failed and unconfirmed sends are free.",
          "kind": "fixed_request"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "a05bfd8c67d57744532ab8d5d43233410cafae661a28d25efa1bee9b24c69684"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_emai_fed66d",
          "path": "/apis/v1/social/messaging/email/messages/{messageId}/reply"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/email/threads": {
      "get": {
        "description": "Email. Threads of a connected Google or Microsoft mailbox, newest first. Every filter that the provider cannot apply server-side is applied to the fetched page instead and named in `meta.filteredClientSide`, so a filtered page can hold fewer than `limit` items while `pagination.hasMore` stays true.\n\nOn Google, folders are Gmail labels: `folder` takes a well-known name or a label id, `archive` means mail carrying none of the inbox, trash or spam labels, and `sortOrder=asc` reverses the fetched page (Gmail lists newest first only).",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_email_f221e4",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Well-known folder (`inbox`, `sent`, `drafts`, `trash`, `spam`, `archive`) or a provider folder id from `GET /apis/v1/social/messaging/email/folders`. Default inbox.",
            "in": "query",
            "name": "folder",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "unread",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "starred",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "hasAttachment",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Substring match on the subject.",
            "in": "query",
            "name": "subject",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Sender address.",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A recipient address.",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cc",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Applied client-side on Microsoft.",
            "in": "query",
            "name": "bcc",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Matches from, to, cc or bcc. Applied client-side on Microsoft.",
            "in": "query",
            "name": "anyEmail",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "before",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "The provider's own search syntax (Gmail search operators, Microsoft KQL). On Microsoft it cannot be combined with other filters or server-side ordering; those are applied to the page.",
            "in": "query",
            "name": "searchQueryNative",
            "required": false,
            "schema": {
              "maxLength": 500,
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sortOrder",
            "required": false,
            "schema": {
              "default": "desc",
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "properties": {
                          "connectionId": {
                            "description": "One of your connections, or null when it is not one of yours.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "draftIds": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "earliestMessageAt": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "folders": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "hasAttachments": {
                            "type": "boolean"
                          },
                          "hasDrafts": {
                            "type": "boolean"
                          },
                          "id": {
                            "type": "string"
                          },
                          "latestMessageReceivedAt": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "latestMessageSentAt": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "messageIds": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "participants": {
                            "items": {
                              "properties": {
                                "email": {
                                  "format": "email",
                                  "type": "string"
                                },
                                "name": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "email"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "provider": {
                            "enum": [
                              "google",
                              "microsoft"
                            ],
                            "type": "string"
                          },
                          "snippet": {
                            "type": "string"
                          },
                          "starred": {
                            "type": "boolean"
                          },
                          "subject": {
                            "type": "string"
                          },
                          "unread": {
                            "type": "boolean"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "filteredClientSide": {
                          "description": "The filters the provider could not apply server-side, so they were applied to the fetched page (Microsoft: `bcc`, `anyEmail`, and every other filter when `searchQueryNative` is set).",
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "pagination": {
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "description": "Opaque; pass it back as `cursor`.",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List email threads",
        "x-aisa-capabilities": {
          "capability": "messaging.list_email_threads@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_email_f221e4",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "42d4a671c1e018c4a7e58987a0a929e062f07d1e36917f800470c09c8f0176f1"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_email_f221e4",
          "path": "/apis/v1/social/messaging/email/threads"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/email/threads/{threadId}": {
      "get": {
        "description": "Email.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_email_4669a3",
        "parameters": [
          {
            "in": "path",
            "name": "threadId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "allOf": [
                        {
                          "properties": {
                            "connectionId": {
                              "description": "One of your connections, or null when it is not one of yours.",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "draftIds": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "earliestMessageAt": {
                              "format": "date-time",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "folders": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "hasAttachments": {
                              "type": "boolean"
                            },
                            "hasDrafts": {
                              "type": "boolean"
                            },
                            "id": {
                              "type": "string"
                            },
                            "latestMessageReceivedAt": {
                              "format": "date-time",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "latestMessageSentAt": {
                              "format": "date-time",
                              "type": [
                                "string",
                                "null"
                              ]
                            },
                            "messageIds": {
                              "items": {
                                "type": "string"
                              },
                              "type": "array"
                            },
                            "participants": {
                              "items": {
                                "properties": {
                                  "email": {
                                    "format": "email",
                                    "type": "string"
                                  },
                                  "name": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  }
                                },
                                "required": [
                                  "email"
                                ],
                                "type": "object"
                              },
                              "type": "array"
                            },
                            "provider": {
                              "enum": [
                                "google",
                                "microsoft"
                              ],
                              "type": "string"
                            },
                            "snippet": {
                              "type": "string"
                            },
                            "starred": {
                              "type": "boolean"
                            },
                            "subject": {
                              "type": "string"
                            },
                            "unread": {
                              "type": "boolean"
                            }
                          },
                          "type": "object"
                        },
                        {
                          "properties": {
                            "messages": {
                              "items": {
                                "properties": {
                                  "attachments": {
                                    "items": {
                                      "properties": {
                                        "contentId": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        },
                                        "contentType": {
                                          "type": "string"
                                        },
                                        "filename": {
                                          "type": "string"
                                        },
                                        "id": {
                                          "type": "string"
                                        },
                                        "isInline": {
                                          "type": "boolean"
                                        },
                                        "size": {
                                          "type": "integer"
                                        }
                                      },
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "bcc": {
                                    "items": {
                                      "properties": {
                                        "email": {
                                          "format": "email",
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "email"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "cc": {
                                    "items": {
                                      "properties": {
                                        "email": {
                                          "format": "email",
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "email"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "connectionId": {
                                    "description": "One of your connections, or null when it is not one of yours.",
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "date": {
                                    "format": "date-time",
                                    "type": "string"
                                  },
                                  "folders": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "from": {
                                    "oneOf": [
                                      {
                                        "properties": {
                                          "email": {
                                            "format": "email",
                                            "type": "string"
                                          },
                                          "name": {
                                            "type": [
                                              "string",
                                              "null"
                                            ]
                                          }
                                        },
                                        "required": [
                                          "email"
                                        ],
                                        "type": "object"
                                      },
                                      {
                                        "type": "null"
                                      }
                                    ]
                                  },
                                  "headers": {
                                    "additionalProperties": {
                                      "type": "string"
                                    },
                                    "description": "Only with `includeHeaders=true`.",
                                    "type": "object"
                                  },
                                  "html": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "id": {
                                    "description": "The provider's message id.",
                                    "type": "string"
                                  },
                                  "metadata": {
                                    "additionalProperties": {
                                      "type": "string"
                                    },
                                    "type": "object"
                                  },
                                  "provider": {
                                    "enum": [
                                      "google",
                                      "microsoft"
                                    ],
                                    "type": "string"
                                  },
                                  "raw": {
                                    "description": "MIME source, only with `raw=true`.",
                                    "type": "string"
                                  },
                                  "replyTo": {
                                    "items": {
                                      "properties": {
                                        "email": {
                                          "format": "email",
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "email"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "snippet": {
                                    "type": "string"
                                  },
                                  "starred": {
                                    "type": "boolean"
                                  },
                                  "subject": {
                                    "type": "string"
                                  },
                                  "text": {
                                    "type": [
                                      "string",
                                      "null"
                                    ]
                                  },
                                  "threadId": {
                                    "type": "string"
                                  },
                                  "to": {
                                    "items": {
                                      "properties": {
                                        "email": {
                                          "format": "email",
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "email"
                                      ],
                                      "type": "object"
                                    },
                                    "type": "array"
                                  },
                                  "unread": {
                                    "type": "boolean"
                                  }
                                },
                                "type": "object"
                              },
                              "type": "array"
                            }
                          },
                          "type": "object"
                        }
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get an email thread with its messages",
        "x-aisa-capabilities": {
          "capability": "messaging.get_email_thread@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_email_4669a3",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "39b321ecf704a84a8c7809eec3c66b2cb39c89f2ed1ba8345a39bfbac1a258ee"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_email_4669a3",
          "path": "/apis/v1/social/messaging/email/threads/{threadId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "patch": {
        "description": "Email. Applies `unread`, `starred` or a `folder` move to each message of the thread.\n\nA write: needs messaging:write and is audited.",
        "operationId": "patch_aisa_messaging_apis_v1_social_messaging_ema_4669a3",
        "parameters": [
          {
            "in": "path",
            "name": "threadId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "starred": true,
                "unread": true
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "folder": {
                    "description": "Well-known folder name or folder id to move into.",
                    "type": "string"
                  },
                  "starred": {
                    "type": "boolean"
                  },
                  "unread": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "connectionId": {
                          "description": "One of your connections, or null when it is not one of yours.",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "draftIds": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "earliestMessageAt": {
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "folders": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "hasAttachments": {
                          "type": "boolean"
                        },
                        "hasDrafts": {
                          "type": "boolean"
                        },
                        "id": {
                          "type": "string"
                        },
                        "latestMessageReceivedAt": {
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "latestMessageSentAt": {
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "messageIds": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "participants": {
                          "items": {
                            "properties": {
                              "email": {
                                "format": "email",
                                "type": "string"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              }
                            },
                            "required": [
                              "email"
                            ],
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "provider": {
                          "enum": [
                            "google",
                            "microsoft"
                          ],
                          "type": "string"
                        },
                        "snippet": {
                          "type": "string"
                        },
                        "starred": {
                          "type": "boolean"
                        },
                        "subject": {
                          "type": "string"
                        },
                        "unread": {
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Update every message in a thread",
        "x-aisa-capabilities": {
          "capability": "messaging.update_email_thread@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/patch_aisa_messaging_apis_v1_social_messaging_ema_4669a3",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "44b66cd7259f65217d07ea8b880a91f87520cd2975755fb0d83b537a22f2247f"
        },
        "x-aisa-runtime-operation": {
          "method": "PATCH",
          "operation_id": "patch_aisa_messaging_apis_v1_social_messaging_ema_4669a3",
          "path": "/apis/v1/social/messaging/email/threads/{threadId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/account-events": {
      "get": {
        "description": "WhatsApp. Returns Meta-originated events recorded for a WhatsApp account, newest first:\n\n- template review outcomes (approved, rejected, paused, category changes)\n- WABA status changes (restricted, disabled, reinstated, disconnected)\n\nEvents are captured from Meta webhooks as they happen. The feed starts at the account's first recorded event and is not backfilled.\n\nComplements the push events `whatsapp.template.status_updated` and `account.disconnected` with a pollable history.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_c00842",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Maximum events to return",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "events": {
                      "items": {
                        "properties": {
                          "connectionId": {
                            "description": "One of your connections, or null when it is not one of yours.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "createdAt": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "detail": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "severity": {
                            "enum": [
                              "info",
                              "success",
                              "warning",
                              "critical"
                            ],
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "type": {
                            "description": "Event kind, e.g. template_approved, template_rejected, account_restricted, account_disconnected",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List account notifications",
        "x-aisa-capabilities": {
          "capability": "messaging.list_whatsapp_account_events@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_c00842",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "8ce2960be5832e55614c6731813e821f0fc5cf9412902516b4a7d49e22de7f83"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_c00842",
          "path": "/apis/v1/social/messaging/whatsapp/account-events"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/block-users": {
      "delete": {
        "description": "WhatsApp. Unblock one or more previously blocked WhatsApp users on this number. Up to 1,000 users per request; per-user failures are reported in\n`failed` without failing the rest of the batch.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_wh_8ce90c",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "users": [
                  "example"
                ]
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "users": {
                    "description": "Phone numbers (E.164) or WhatsApp user IDs to unblock.",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 1000,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "users"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "failed": {
                      "description": "Users that could not be unblocked, with reasons.",
                      "items": {
                        "properties": {
                          "errors": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "input": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "unblocked": {
                      "description": "Users successfully unblocked.",
                      "items": {
                        "properties": {
                          "input": {
                            "description": "The value you sent.",
                            "type": "string"
                          },
                          "waId": {
                            "description": "Resolved WhatsApp user ID.",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Unblock users",
        "x-aisa-capabilities": {
          "capability": "messaging.unblock_whatsapp_users@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_wh_8ce90c",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "9f48c38efaee4d004c3c963c625abf3f332a49941410287c5db71770bebfc9c7"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_wh_8ce90c",
          "path": "/apis/v1/social/messaging/whatsapp/block-users"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "WhatsApp. List the WhatsApp users blocked on this number. Cursor-paginated; pass\n`nextCursor` back as `after` to fetch the next page. The blocklist holds\nup to 64,000 users.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_8ce90c",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Page size.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "Cursor from a previous response's `nextCursor`.",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "blockedUsers": {
                      "items": {
                        "properties": {
                          "waId": {
                            "description": "WhatsApp user ID (usually the phone number without `+`).",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "nextCursor": {
                      "description": "Pass as `after` to fetch the next page. Null when there are no more pages.",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List blocked users",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_blocked_users@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_8ce90c",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "007f893b256de648f274d83027095aab1fa0417f13623a18bf132a8ce3a45438"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_8ce90c",
          "path": "/apis/v1/social/messaging/whatsapp/block-users"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp. Block one or more WhatsApp users on this number. Blocked users cannot message your number or see that you are online, and your sends to them return an error.\n\n### Meta constraints\n\nThese are surfaced per-user in `failed`; the request itself still succeeds for the rest of the batch.\n\n- Only users who messaged your business within the last 24 hours can be blocked (failures outside the window report \"Re-engagement required\"). - Up to 1,000 users per request; the blocklist caps at 64,000. - Other WhatsApp Business accounts cannot be blocked.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_8ce90c",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "users": [
                  "example"
                ]
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "users": {
                    "description": "Phone numbers (E.164, e.g. \"+16505551234\") or WhatsApp user IDs to block.",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 1000,
                    "minItems": 1,
                    "type": "array"
                  }
                },
                "required": [
                  "users"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "blocked": {
                      "description": "Users successfully blocked.",
                      "items": {
                        "properties": {
                          "input": {
                            "description": "The value you sent.",
                            "type": "string"
                          },
                          "waId": {
                            "description": "Resolved WhatsApp user ID.",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "failed": {
                      "description": "Users that could not be blocked, with reasons.",
                      "items": {
                        "properties": {
                          "errors": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "input": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Block users",
        "x-aisa-capabilities": {
          "capability": "messaging.block_whatsapp_users@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_8ce90c",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "f7187c23bfa5b23d5a707ecc7288ea9903e45295356cb6cbf98ec0bf061b4cf3"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_8ce90c",
          "path": "/apis/v1/social/messaging/whatsapp/block-users"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/block-users/status": {
      "get": {
        "description": "WhatsApp. Definitive blocked-state lookup for a single contact. Constant-time regardless\nof blocklist size.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_22756f",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Consumer wa_id or E.164 phone (leading + optional)",
            "in": "query",
            "name": "user",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "blocked": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Check if a user is blocked",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_block_status@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_22756f",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "eee456ed20bf4ae64d674ffab6eb5ee7ce0b36413fcea0b5e42109d50ace55e0"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_22756f",
          "path": "/apis/v1/social/messaging/whatsapp/block-users/status"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/business-profile": {
      "get": {
        "description": "WhatsApp. Retrieve the WhatsApp Business profile for the account (about, address, description, email, websites, etc.).",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_3d280b",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "businessProfile": {
                      "properties": {
                        "about": {
                          "description": "Short description (max 139 chars)",
                          "type": "string"
                        },
                        "address": {
                          "type": "string"
                        },
                        "description": {
                          "description": "Full description (max 512 chars)",
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        },
                        "profilePictureUrl": {
                          "format": "uri",
                          "type": "string"
                        },
                        "vertical": {
                          "description": "Business category",
                          "type": "string"
                        },
                        "websites": {
                          "items": {
                            "type": "string"
                          },
                          "maxItems": 2,
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get business profile",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_business_profile@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_3d280b",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "e5adf0e42382bdacf0d088f942b5ef5d9ff2b82394bc661616b0e5ffe0cb716b"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_3d280b",
          "path": "/apis/v1/social/messaging/whatsapp/business-profile"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp. Update the WhatsApp Business profile. All fields are optional; only provided fields will be updated. Constraints: about max 139 chars, description max 512 chars, max 2 websites.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_3d280b",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "about": "example",
                "address": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "about": {
                    "description": "Short business description (max 139 characters)",
                    "maxLength": 139,
                    "type": "string"
                  },
                  "address": {
                    "description": "Business address",
                    "type": "string"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "description": {
                    "description": "Full business description (max 512 characters)",
                    "maxLength": 512,
                    "type": "string"
                  },
                  "email": {
                    "description": "Business email",
                    "format": "email",
                    "type": "string"
                  },
                  "profilePictureHandle": {
                    "description": "Handle from resumable upload for profile picture",
                    "type": "string"
                  },
                  "vertical": {
                    "description": "Business category, one of Meta's keys (e.g. AUTO, ENTERTAIN, RETAIL, PROF_SERVICES, OTHER)",
                    "type": "string"
                  },
                  "websites": {
                    "description": "Business websites (max 2)",
                    "items": {
                      "format": "uri",
                      "type": "string"
                    },
                    "maxItems": 2,
                    "type": "array"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Update business profile",
        "x-aisa-capabilities": {
          "capability": "messaging.update_whatsapp_business_profile@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_3d280b",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "5531d4001e70924054750200f5ac9729fd53ff1b24d7122ee1f36a3227264e53"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_3d280b",
          "path": "/apis/v1/social/messaging/whatsapp/business-profile"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/business-profile/display-name": {
      "get": {
        "description": "WhatsApp. Fetch the current display name and its Meta review status for a WhatsApp Business account. Display name changes require Meta approval and can take 1-3 business days.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_31a19b",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "displayName": {
                      "properties": {
                        "name": {
                          "description": "Current verified display name",
                          "type": "string"
                        },
                        "phoneNumber": {
                          "description": "Display phone number",
                          "type": "string"
                        },
                        "status": {
                          "description": "Meta review status for the display name",
                          "enum": [
                            "APPROVED",
                            "PENDING_REVIEW",
                            "DECLINED",
                            "NONE"
                          ],
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get display name status",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_display_name@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_31a19b",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "83e1b2918faa497bb00cd7576540aa55593609faf47570e7798f5f9bc13a2e94"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_31a19b",
          "path": "/apis/v1/social/messaging/whatsapp/business-profile/display-name"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp. Submit a display name change request for the WhatsApp Business account. The new name must follow WhatsApp naming guidelines (3-512 characters, must represent your business). Changes require Meta review and approval, which typically takes 1-3 business days.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_31a19b",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "displayName": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "displayName": {
                    "description": "New display name (must follow WhatsApp naming guidelines)",
                    "maxLength": 512,
                    "minLength": 3,
                    "type": "string"
                  }
                },
                "required": [
                  "displayName"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "displayName": {
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "status": {
                          "enum": [
                            "PENDING_REVIEW"
                          ],
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Request display name change",
        "x-aisa-capabilities": {
          "capability": "messaging.update_whatsapp_display_name@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_31a19b",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "82ac8208cefe64ffed373f6f33a850bd94fbf4cc19693a18216202e1bd879b46"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_31a19b",
          "path": "/apis/v1/social/messaging/whatsapp/business-profile/display-name"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/business-profile/photo": {
      "post": {
        "description": "WhatsApp. Upload a new profile picture for the WhatsApp Business Profile. Uses Meta's resumable upload API under the hood: creates an upload session,\nuploads the image bytes, then updates the business profile with the resulting handle.\n\nProvide the image either as a binary upload (`multipart/form-data` with `file`)\nor as a download URL (`application/json` with `url`). With a URL we fetch the\nimage server-side and upload the bytes for you. Meta's profile-photo API is\nbytes-only, so there is no direct URL passthrough. JPEG/PNG, max 5MB either way.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_0be576",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "url": "https://example.com/item"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "url": {
                    "description": "Publicly reachable https URL of the image (JPEG or PNG, max 5MB, recommended 640x640). Fetched server-side; must resolve directly without redirects.",
                    "format": "uri",
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Upload profile picture",
        "x-aisa-capabilities": {
          "capability": "messaging.upload_whatsapp_profile_photo@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_0be576",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "ef2000616c2798f54776f18a164e7e19a423bc4c8b6215829c36f64cbde3cdaa"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_0be576",
          "path": "/apis/v1/social/messaging/whatsapp/business-profile/photo"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/business-profile/username": {
      "delete": {
        "description": "WhatsApp. Release the currently claimed WhatsApp Business username from the account. After deletion the username becomes available for other accounts to claim.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_wh_12aeec",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Delete business username",
        "x-aisa-capabilities": {
          "capability": "messaging.delete_whatsapp_business_username@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_wh_12aeec",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "6efadd3f82986cd67ed3b8121b550db36da7acb37e8802c686a4ed912494570b"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_wh_12aeec",
          "path": "/apis/v1/social/messaging/whatsapp/business-profile/username"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "WhatsApp. Fetch the current WhatsApp Business username and its approval status. Username status can be `approved` (active), `reserved` (pending activation), or `none` (no username set). If Meta has not granted username management for the WhatsApp Business Account, the API returns the\nstandard error envelope with code `insufficient_permissions`.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_12aeec",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "description": "Approval state of the username",
                      "enum": [
                        "approved",
                        "reserved",
                        "none"
                      ],
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    },
                    "username": {
                      "description": "The current username, or null if none is set",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get business username",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_business_username@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_12aeec",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "03c1350cee6fcda2ff6ad3e3ee3c63c1f66a64ac914f9a0f0f2dfa8e08967d98"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_12aeec",
          "path": "/apis/v1/social/messaging/whatsapp/business-profile/username"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp. Claim or transfer a WhatsApp Business username for the account.\n\n### Username rules\n\n- 3-35 characters\n- letters/digits/period/underscore only\n- must contain at least one letter\n- no leading or trailing periods\n- no consecutive periods\n- no `www` prefix\n- no domain TLD suffix (e.g. `.com`)\n\n### Transfers\n\nIf the desired username is currently held by another account, pass `transferAction: \"force_transfer\"` to request a transfer.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_12aeec",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "username": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "transferAction": {
                    "default": "none",
                    "description": "Pass `force_transfer` to request a transfer if the username is held by another account",
                    "enum": [
                      "none",
                      "force_transfer"
                    ],
                    "type": "string"
                  },
                  "username": {
                    "description": "Desired username. Letters, digits, period, and underscore only. Must contain at least one letter. No leading, trailing, or consecutive periods. No www prefix. No domain TLD suffix.",
                    "maxLength": 35,
                    "minLength": 3,
                    "type": "string"
                  }
                },
                "required": [
                  "username"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "status": {
                      "enum": [
                        "approved",
                        "reserved",
                        "none"
                      ],
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    },
                    "username": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Set business username",
        "x-aisa-capabilities": {
          "capability": "messaging.set_whatsapp_business_username@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_12aeec",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "104c08e36948f713727fabb5bfca498bdfab32957ca0573e766049f2f4b961b6"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_12aeec",
          "path": "/apis/v1/social/messaging/whatsapp/business-profile/username"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/business-profile/username/suggestions": {
      "get": {
        "description": "WhatsApp. Retrieve a list of available WhatsApp Business username suggestions based on the account's\nbusiness profile name. Use these to help users discover valid, unclaimed usernames.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_d15821",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "suggestions": {
                      "description": "List of available username suggestions",
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get username suggestions",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_business_username_suggestions@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_d15821",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "5dac3763174005c42600b2702bdedbb9a5b66b13e67e65349b13c3fc59f257ad"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_d15821",
          "path": "/apis/v1/social/messaging/whatsapp/business-profile/username/suggestions"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/catalogs": {
      "delete": {
        "description": "WhatsApp.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_wh_331381",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Your ads connection (adc_...) holding the catalog, from GET /apis/v1/ads/connections.",
            "in": "query",
            "name": "catalogConnectionId",
            "required": false,
            "schema": {
              "pattern": "^adc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Meta catalog ID",
            "in": "query",
            "name": "catalogId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "catalogId": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    },
                    "wabaId": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Unlink a catalog from a WhatsApp number",
        "x-aisa-capabilities": {
          "capability": "messaging.unlink_whatsapp_catalog@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_wh_331381",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "971cc67e3a2cb20f8806532cd6e742ebe13b49d4b791c31981f1acdac5d49dff"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_wh_331381",
          "path": "/apis/v1/social/messaging/whatsapp/catalogs"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "WhatsApp. Lists the Meta Commerce catalogs connected to the number's WhatsApp Business Account.\n\nPass `catalogAccountId`. The WhatsApp connection's own (embedded signup) token answers an empty list even when a catalog is linked; only a Meta login with catalog_management sees the link.\n\nIt is also what customers browse in the WhatsApp app.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_331381",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Your ads connection (adc_...) holding the catalog, from GET /apis/v1/ads/connections.",
            "in": "query",
            "name": "catalogConnectionId",
            "required": false,
            "schema": {
              "pattern": "^adc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "catalogs": {
                      "items": {
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "wabaId": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List the catalogs linked to a WhatsApp number",
        "x-aisa-capabilities": {
          "capability": "messaging.list_whatsapp_catalogs@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_331381",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "070da82fda565ccba379f5c15ef6053934c9d21ce463bea65d5d3fcfb5ef07af"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_331381",
          "path": "/apis/v1/social/messaging/whatsapp/catalogs"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp. Connects a Meta Commerce catalog (owned by the same business portfolio as the WhatsApp Business Account) to the number's WABA. The WhatsApp connection's own token cannot do this, so pass `catalogAccountId` naming a facebook, instagram or metaads account whose Meta login carries catalog_management.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_331381",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "catalogId": "id_123"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "catalogConnectionId": {
                    "description": "Your ads connection (adc_...) holding the catalog, from GET /apis/v1/ads/connections.",
                    "pattern": "^adc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "catalogId": {
                    "description": "Meta catalog ID",
                    "type": "string"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  }
                },
                "required": [
                  "catalogId"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "catalogs": {
                      "items": {
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "wabaId": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Link a catalog to a WhatsApp number",
        "x-aisa-capabilities": {
          "capability": "messaging.link_whatsapp_catalog@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_331381",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "d94eae31ab110a7689e4e234fef1f68c0c9cae5c5125ba88130ee54356317a46"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_331381",
          "path": "/apis/v1/social/messaging/whatsapp/catalogs"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/commerce-settings": {
      "get": {
        "description": "WhatsApp. Whether the linked catalog is shown on the business profile (`isCatalogVisible`) and whether customers can build a cart (`isCartEnabled`).",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_ba5c63",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Your ads connection (adc_...) holding the catalog, from GET /apis/v1/ads/connections.",
            "in": "query",
            "name": "catalogConnectionId",
            "required": false,
            "schema": {
              "pattern": "^adc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "settings": {
                      "properties": {
                        "isCartEnabled": {
                          "type": "boolean"
                        },
                        "isCatalogVisible": {
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get a number's commerce settings",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_commerce_settings@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_ba5c63",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "1ffec03c5a31ab7b753cf91265e0b2542a57c9aaf5e47b4ebb9de2c01864327e"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_ba5c63",
          "path": "/apis/v1/social/messaging/whatsapp/commerce-settings"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "put": {
        "description": "WhatsApp.\n\nA write: needs messaging:write and is audited.",
        "operationId": "put_aisa_messaging_apis_v1_social_messaging_whats_ba5c63",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "isCartEnabled": true,
                "isCatalogVisible": true
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "catalogConnectionId": {
                    "description": "Your ads connection (adc_...) holding the catalog, from GET /apis/v1/ads/connections.",
                    "pattern": "^adc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "isCartEnabled": {
                    "type": "boolean"
                  },
                  "isCatalogVisible": {
                    "type": "boolean"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "settings": {
                      "properties": {
                        "isCartEnabled": {
                          "type": "boolean"
                        },
                        "isCatalogVisible": {
                          "type": "boolean"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Update a number's commerce settings",
        "x-aisa-capabilities": {
          "capability": "messaging.update_whatsapp_commerce_settings@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/put_aisa_messaging_apis_v1_social_messaging_whats_ba5c63",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "0c3cdef15df1cf6c4419d4c94752096a7aa1e5ac8ed6a00cc6e685097f3933e3"
        },
        "x-aisa-runtime-operation": {
          "method": "PUT",
          "operation_id": "put_aisa_messaging_apis_v1_social_messaging_whats_ba5c63",
          "path": "/apis/v1/social/messaging/whatsapp/commerce-settings"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/conversational-automation": {
      "delete": {
        "description": "WhatsApp. Remove every prompt and command and turn the welcome message off.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_wh_9ef6f1",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Clear ice breakers and commands",
        "x-aisa-capabilities": {
          "capability": "messaging.delete_whatsapp_conversational_automation@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_wh_9ef6f1",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "f678bc19f8fc94d08fe1fe63968fa50e0b9bc08bc74d492aea51787505c70b4c"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_wh_9ef6f1",
          "path": "/apis/v1/social/messaging/whatsapp/conversational-automation"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "WhatsApp. Read the number's conversational automation (Meta's `conversational_automation`): ice breaker prompts, slash commands and the welcome-message flag. A number with none set returns the empty configuration.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_9ef6f1",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "commands": {
                          "description": "Slash commands shown when a person types `/`. Names are unique, letters, digits and underscores, without the slash.",
                          "items": {
                            "properties": {
                              "command_description": {
                                "maxLength": 256,
                                "minLength": 1,
                                "type": "string"
                              },
                              "command_name": {
                                "maxLength": 30,
                                "minLength": 1,
                                "pattern": "^[a-zA-Z0-9_]+$",
                                "type": "string"
                              }
                            },
                            "required": [
                              "command_name",
                              "command_description"
                            ],
                            "type": "object"
                          },
                          "maxItems": 30,
                          "type": "array"
                        },
                        "enable_welcome_message": {
                          "description": "When true, Meta sends a `request_welcome` event the first time a person opens a chat with the number.",
                          "type": "boolean"
                        },
                        "prompts": {
                          "description": "Ice breakers shown to a person opening a chat. Tapping one sends its text as a normal message.",
                          "items": {
                            "maxLength": 80,
                            "minLength": 1,
                            "type": "string"
                          },
                          "maxItems": 3,
                          "type": "array"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get ice breakers and commands",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_conversational_automation@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_9ef6f1",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "65a43c49614f754cbd194908837733772f181eb3477f29726349813afbd9ec37"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_9ef6f1",
          "path": "/apis/v1/social/messaging/whatsapp/conversational-automation"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp. Set ice breaker prompts (up to 3, 80 characters each), slash commands (up to 30) and the welcome-message flag on the number. Only the fields you send are changed. A tapped prompt arrives as a normal `message.received` carrying its text.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_9ef6f1",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "enable_welcome_message": true,
                "prompts": [
                  "example"
                ]
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "commands": {
                    "description": "Slash commands shown when a person types `/`. Names are unique, letters, digits and underscores, without the slash.",
                    "items": {
                      "properties": {
                        "command_description": {
                          "maxLength": 256,
                          "minLength": 1,
                          "type": "string"
                        },
                        "command_name": {
                          "maxLength": 30,
                          "minLength": 1,
                          "pattern": "^[a-zA-Z0-9_]+$",
                          "type": "string"
                        }
                      },
                      "required": [
                        "command_name",
                        "command_description"
                      ],
                      "type": "object"
                    },
                    "maxItems": 30,
                    "type": "array"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "enable_welcome_message": {
                    "description": "When true, Meta sends a `request_welcome` event the first time a person opens a chat with the number.",
                    "type": "boolean"
                  },
                  "prompts": {
                    "description": "Ice breakers shown to a person opening a chat. Tapping one sends its text as a normal message.",
                    "items": {
                      "maxLength": 80,
                      "minLength": 1,
                      "type": "string"
                    },
                    "maxItems": 3,
                    "type": "array"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Set ice breakers and commands",
        "x-aisa-capabilities": {
          "capability": "messaging.set_whatsapp_conversational_automation@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_9ef6f1",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "b518f7badb7e98ae2706be5b1ed1af6ebbbe9b7affcbe5a708304b45bb5489bc"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_9ef6f1",
          "path": "/apis/v1/social/messaging/whatsapp/conversational-automation"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/conversations": {
      "get": {
        "description": "WhatsApp Inbox. List WhatsApp conversations.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_ef0748",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "updatedSince",
            "required": false,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sortOrder",
            "required": false,
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "items": {
                        "properties": {
                          "accountUsername": {
                            "type": "string"
                          },
                          "adAttribution": {
                            "properties": {
                              "adAccountId": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "adAccountName": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "adId": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "adSetId": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "adSetName": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "campaignId": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "campaignName": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "isExternal": {
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "platformPostId": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "synced": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "adId",
                              "name",
                              "synced",
                              "campaignId",
                              "campaignName",
                              "adSetId",
                              "adSetName",
                              "adAccountId",
                              "adAccountName",
                              "platformPostId",
                              "isExternal"
                            ],
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "businessScopedUserId": {
                            "type": "string"
                          },
                          "connectionId": {
                            "type": "string"
                          },
                          "contentNotRetained": {
                            "type": "boolean"
                          },
                          "folder": {
                            "enum": [
                              "requests"
                            ],
                            "type": "string"
                          },
                          "id": {
                            "type": "string"
                          },
                          "instagramProfile": {
                            "properties": {
                              "fetchedAt": {
                                "format": "date-time",
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "followerCount": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              },
                              "isFollower": {
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              },
                              "isFollowing": {
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              },
                              "isVerified": {
                                "type": [
                                  "boolean",
                                  "null"
                                ]
                              }
                            },
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "isGroup": {
                            "type": "boolean"
                          },
                          "lastMessage": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "metadata": {
                            "properties": {
                              "ctwa_body": {
                                "type": "string"
                              },
                              "ctwa_captured_at": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "ctwa_clid": {
                                "type": "string"
                              },
                              "ctwa_headline": {
                                "type": "string"
                              },
                              "ctwa_image_url": {
                                "type": "string"
                              },
                              "ctwa_media_type": {
                                "type": "string"
                              },
                              "ctwa_message_id": {
                                "type": "string"
                              },
                              "ctwa_source_id": {
                                "type": "string"
                              },
                              "ctwa_source_type": {
                                "type": "string"
                              },
                              "ctwa_source_url": {
                                "type": "string"
                              },
                              "ctwa_thumbnail_url": {
                                "type": "string"
                              },
                              "ctwa_video_url": {
                                "type": "string"
                              },
                              "meta_ad_captured_at": {
                                "format": "date-time",
                                "type": "string"
                              },
                              "meta_ad_flow_id": {
                                "type": "string"
                              },
                              "meta_ad_id": {
                                "type": "string"
                              },
                              "meta_ad_photo_url": {
                                "type": "string"
                              },
                              "meta_ad_post_id": {
                                "type": "string"
                              },
                              "meta_ad_product_id": {
                                "type": "string"
                              },
                              "meta_ad_ref": {
                                "type": "string"
                              },
                              "meta_ad_source": {
                                "type": "string"
                              },
                              "meta_ad_title": {
                                "type": "string"
                              },
                              "meta_ad_type": {
                                "type": "string"
                              },
                              "meta_ad_video_url": {
                                "type": "string"
                              }
                            },
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "pageId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "participantId": {
                            "type": "string"
                          },
                          "participantName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "participantPicture": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "participantVerifiedType": {
                            "enum": [
                              "blue",
                              "government",
                              "business",
                              "none"
                            ],
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "platform": {
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "active",
                              "archived"
                            ],
                            "type": "string"
                          },
                          "threadControl": {
                            "enum": [
                              "app",
                              "ai_agent",
                              "other"
                            ],
                            "type": "string"
                          },
                          "unreadCount": {
                            "maximum": 1000,
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "updatedAt": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "updatedTime": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "url": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "whatsappUsername": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "meta": {
                      "properties": {
                        "accountsFailed": {
                          "type": "integer"
                        },
                        "accountsQueried": {
                          "type": "integer"
                        },
                        "accountsSkipped": {
                          "items": {
                            "properties": {
                              "connectionId": {
                                "type": "string"
                              },
                              "platform": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "failedAccounts": {
                          "items": {
                            "properties": {
                              "accountUsername": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "code": {
                                "type": [
                                  "string",
                                  "null"
                                ]
                              },
                              "connectionId": {
                                "type": "string"
                              },
                              "error": {
                                "type": "string"
                              },
                              "platform": {
                                "type": "string"
                              },
                              "retryAfter": {
                                "type": [
                                  "integer",
                                  "null"
                                ]
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "lastUpdated": {
                          "format": "date-time",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "pagination": {
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": "object"
                    },
                    "sync": {
                      "properties": {
                        "nextUpdatedSince": {
                          "format": "date-time",
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List WhatsApp conversations",
        "x-aisa-capabilities": {
          "capability": "messaging.list_whatsapp_conversations@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_ef0748",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "94beb43096103d27c3395572c85101cb4a326a29cd7d7e7a521234652e37d302"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_ef0748",
          "path": "/apis/v1/social/messaging/whatsapp/conversations"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/conversations/{conversationId}/messages": {
      "get": {
        "description": "WhatsApp Inbox. Read WhatsApp messages.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_278259",
        "parameters": [
          {
            "in": "path",
            "name": "conversationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "sortOrder",
            "required": false,
            "schema": {
              "enum": [
                "asc",
                "desc"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "lastUpdated": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "messages": {
                      "items": {
                        "properties": {
                          "attachments": {
                            "items": {
                              "properties": {
                                "filename": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "id": {
                                  "type": "string"
                                },
                                "mimeType": {
                                  "type": "string"
                                },
                                "originalType": {
                                  "type": "string"
                                },
                                "payload": {
                                  "additionalProperties": true,
                                  "type": "object"
                                },
                                "previewUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "refreshUrl": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "type": {
                                  "enum": [
                                    "image",
                                    "video",
                                    "audio",
                                    "file",
                                    "sticker",
                                    "share",
                                    "template",
                                    "unsupported_type"
                                  ],
                                  "type": "string"
                                },
                                "url": {
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "connectionId": {
                            "type": "string"
                          },
                          "contentNotRetained": {
                            "type": "boolean"
                          },
                          "conversationId": {
                            "type": "string"
                          },
                          "createdAt": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "deletedAt": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "deliveredAt": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "deliveryError": {
                            "properties": {
                              "code": {
                                "type": "integer"
                              },
                              "details": {
                                "type": "string"
                              },
                              "href": {
                                "format": "uri",
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "title": {
                                "type": "string"
                              }
                            },
                            "type": [
                              "object",
                              "null"
                            ]
                          },
                          "deliveryStatus": {
                            "enum": [
                              "sent",
                              "delivered",
                              "read",
                              "played",
                              "failed",
                              "deleted"
                            ],
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "direction": {
                            "enum": [
                              "incoming",
                              "outgoing"
                            ],
                            "type": "string"
                          },
                          "editCount": {
                            "type": "integer"
                          },
                          "editHistory": {
                            "items": {
                              "properties": {
                                "attachments": {
                                  "items": {
                                    "properties": {
                                      "payload": {
                                        "type": "object"
                                      },
                                      "type": {
                                        "type": "string"
                                      },
                                      "url": {
                                        "type": "string"
                                      }
                                    },
                                    "type": "object"
                                  },
                                  "type": "array"
                                },
                                "editedAt": {
                                  "format": "date-time",
                                  "type": "string"
                                },
                                "text": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                }
                              },
                              "required": [
                                "text",
                                "attachments",
                                "editedAt"
                              ],
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "editedAt": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "type": "string"
                          },
                          "isDeleted": {
                            "type": "boolean"
                          },
                          "isEdited": {
                            "type": "boolean"
                          },
                          "isStoryMention": {
                            "type": "boolean"
                          },
                          "message": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "metadata": {
                            "additionalProperties": true,
                            "type": "object"
                          },
                          "noRenderableContent": {
                            "type": "boolean"
                          },
                          "platform": {
                            "type": "string"
                          },
                          "reactions": {
                            "items": {
                              "properties": {
                                "emoji": {
                                  "type": "string"
                                },
                                "fromMe": {
                                  "type": "boolean"
                                },
                                "reactedAt": {
                                  "format": "date-time",
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "readAt": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "senderId": {
                            "type": "string"
                          },
                          "senderName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "senderVerifiedType": {
                            "enum": [
                              "blue",
                              "government",
                              "business",
                              "none"
                            ],
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sentAt": {
                            "format": "date-time",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "sentVia": {
                            "enum": [
                              "human",
                              "api",
                              "broadcast",
                              "sequence",
                              "workflow",
                              "comment_automation",
                              "bulk-api",
                              null
                            ],
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "storyReply": {
                            "properties": {
                              "storyId": {
                                "type": "string"
                              },
                              "storyUrl": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "subject": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "pagination": {
                      "properties": {
                        "hasMore": {
                          "type": "boolean"
                        },
                        "nextCursor": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": "object"
                    },
                    "sortOrderApplied": {
                      "enum": [
                        "asc",
                        "desc"
                      ],
                      "type": "string"
                    },
                    "status": {
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Read WhatsApp messages",
        "x-aisa-capabilities": {
          "capability": "messaging.read_whatsapp_messages@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_278259",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "599c3ed96fcc6ab6206182a6f83ea39ed3ac062cd78b64db54f87b5e9c6daa16"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_278259",
          "path": "/apis/v1/social/messaging/whatsapp/conversations/{conversationId}/messages"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/conversations/{conversationId}/reply": {
      "post": {
        "description": "WhatsApp Inbox. Reply to a WhatsApp conversation.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_666fdd",
        "parameters": [
          {
            "in": "path",
            "name": "conversationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Passed to the platform integration: a retry with the same key returns the first result instead of acting twice. AIsa never retries a write for you.",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "maxLength": 191,
              "minLength": 1,
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "message": "Your order is ready."
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "message": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "message"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "attachments": {
                          "items": {
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "url": {
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "conversationId": {
                          "type": "string"
                        },
                        "messageId": {
                          "type": "string"
                        },
                        "messageIds": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "partialFailure": {
                          "properties": {
                            "error": {
                              "type": "string"
                            },
                            "part": {
                              "enum": [
                                "text"
                              ],
                              "type": "string"
                            },
                            "platformError": {
                              "properties": {
                                "code": {
                                  "type": "integer"
                                },
                                "fbtraceId": {
                                  "type": "string"
                                },
                                "subcode": {
                                  "type": "integer"
                                },
                                "type": {
                                  "type": "string"
                                }
                              },
                              "type": "object"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    },
                    "success": {
                      "type": "boolean"
                    },
                    "warnings": {
                      "items": {
                        "properties": {
                          "code": {
                            "enum": [
                              "ignored_field"
                            ],
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          },
                          "param": {
                            "enum": [
                              "replyTo"
                            ],
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "param",
                          "message"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Reply to a WhatsApp conversation",
        "x-aisa-capabilities": {
          "capability": "messaging.reply_whatsapp_message@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_666fdd",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "customer_micros_usd": 1000,
          "customer_pricing_ref": "messaging.reply_whatsapp_message.v1.pricing@1",
          "description": "Charged once when the provider accepts the send. Failed and unconfirmed sends are free.",
          "kind": "fixed_request"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "a8a5c1f5a79f25916fcfcd94a623e4451f29eca5c00578ab7adc4f6a8f3f3eb1"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_666fdd",
          "path": "/apis/v1/social/messaging/whatsapp/conversations/{conversationId}/reply"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/conversions": {
      "get": {
        "description": "WhatsApp. Returns the most recent conversion events sent through `POST /apis/v1/social/messaging/whatsapp/conversions` for the given WhatsApp account.\n\nIt is sourced from delivery logs (Axiom `late` dataset), so the visible window is bounded by log retention (about 30 days). Useful for rendering a \"recent activity\" panel on the conversions setup tab without standing up a parallel persistence layer.\n\n### Per-event payload\n\nIt mirrors the structured log we write on every successful send:\n\n- `eventName`\n- `conversationId`\n- `eventsReceived`\n- `eventsFailed`\n- `traceId`\n- `durationMs`\n- the wall-clock `timestamp`",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_cea3ba",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Max events to return (1-200, default 50).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "events": {
                      "items": {
                        "properties": {
                          "conversationId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "durationMs": {
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "eventName": {
                            "description": "One of LeadSubmitted, QualifiedLead, Purchase, AddToCart, InitiateCheckout, ViewContent, OrderCreated, OrderCanceled, OrderReturned.",
                            "type": "string"
                          },
                          "eventsFailed": {
                            "description": "Number of events Meta rejected (usually 0).",
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "eventsReceived": {
                            "description": "Number of events Meta accepted on this send (usually 1).",
                            "type": [
                              "integer",
                              "null"
                            ]
                          },
                          "timestamp": {
                            "description": "When the event was sent to Meta.",
                            "format": "date-time",
                            "type": "string"
                          },
                          "traceId": {
                            "description": "Meta fbtrace_id for cross-referencing in Events Manager.",
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List conversion events",
        "x-aisa-capabilities": {
          "capability": "messaging.list_whatsapp_conversions@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_cea3ba",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "4f72e5b1a438d92e7a66e8c18f3fbd224acb714398fa46e734853c5a4e8114ef"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_cea3ba",
          "path": "/apis/v1/social/messaging/whatsapp/conversions"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp. Forward a WhatsApp Business Messaging conversion event to Meta's Conversions API with `action_source = business_messaging` and `messaging_channel = whatsapp`.\n\nSupported events:\n\n- `LeadSubmitted`\n- `QualifiedLead`\n- `Purchase`\n- `AddToCart`\n- `InitiateCheckout`\n- `ViewContent`\n- `OrderCreated`\n- `OrderCanceled`\n- `OrderReturned`\n\nThe endpoint looks up the originating CTWA click ID (`ctwa_clid`) captured on the first inbound message of the conversation. It replays it on every event so Meta can attribute the conversion back to the Click-to-WhatsApp ad that drove the chat.\n\nIdentify the conversation by phoneE164 (digits only, no +): the most recent ad-attributed conversation of that phone on the connection is used.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_cea3ba",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "eventId": "id_123",
                "eventName": "LeadSubmitted"
              },
              "schema": {
                "additionalProperties": false,
                "description": "In addition to the `required` list, at least one of\n`conversationId` or `phoneE164` must be supplied (used to\nresolve the originating CTWA conversation). The route enforces\nthis at the Zod boundary; OpenAPI's `required` cannot express\nOR-required cleanly.",
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "contentIds": {
                    "description": "Optional product / content identifiers.",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  },
                  "currency": {
                    "description": "ISO 4217 currency code (e.g. `USD`).",
                    "maxLength": 3,
                    "minLength": 3,
                    "type": "string"
                  },
                  "email": {
                    "description": "User email. Normalized + SHA-256 hashed before sending to Meta.",
                    "format": "email",
                    "type": "string"
                  },
                  "eventId": {
                    "description": "Stable dedup key. Reuse to suppress duplicate events\n(Meta dedupes against pixel events with the same id).",
                    "minLength": 1,
                    "type": "string"
                  },
                  "eventName": {
                    "description": "Event names accepted by Meta's CAPI for Business\nMessaging. Other standard pixel events including `Lead`,\n`CompleteRegistration`, `Subscribe`, `Schedule`, `Contact`,\n`StartTrial`, `AddPaymentInfo`, `Search`, and\n`SubmitApplication` are rejected with subcode 2804066\n(\"Messaging Event Invalid Event Type\") on\n`action_source = business_messaging` events. Custom event\nnames are also rejected.\n\nUse `LeadSubmitted` (NOT `Lead`) when a lead comes in and\n`QualifiedLead` once your team qualifies it.",
                    "enum": [
                      "LeadSubmitted",
                      "QualifiedLead",
                      "Purchase",
                      "AddToCart",
                      "InitiateCheckout",
                      "ViewContent",
                      "OrderCreated",
                      "OrderCanceled",
                      "OrderReturned"
                    ],
                    "type": "string"
                  },
                  "eventTime": {
                    "description": "Unix seconds. Defaults to the time of the request when\nomitted. Meta's attribution window is 7 days from click;\nevents older than that lose attribution.",
                    "type": "number"
                  },
                  "externalId": {
                    "description": "Stable customer identifier. Lowercased + SHA-256 hashed\nbefore sending to Meta.",
                    "type": "string"
                  },
                  "phoneE164": {
                    "description": "Contact phone number, digits only with no '+'. When used\nin lieu of `conversationId`, the handler resolves to the\nmost recent CTWA-attributed conversation for this phone\non the supplied account.",
                    "minLength": 1,
                    "type": "string"
                  },
                  "testCode": {
                    "description": "Meta `test_event_code` passthrough, sent at the request root\n(a root-level `test_event_code` is accepted as an alias). The\nevent shows in Events Manager's Test Events tab for the\ndataset whose current test code matches. Meta still\nprocesses it like any other event, so remove it in production.",
                    "type": "string"
                  },
                  "value": {
                    "description": "Conversion value (e.g. order total).",
                    "type": "number"
                  }
                },
                "required": [
                  "eventName",
                  "eventId"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "eventsFailed": {
                      "description": "Events rejected by Meta (see failures).",
                      "type": "integer"
                    },
                    "eventsReceived": {
                      "description": "Events accepted by Meta.",
                      "type": "integer"
                    },
                    "failures": {
                      "description": "Per-event failure detail. Empty when all events were\naccepted.",
                      "items": {
                        "properties": {
                          "code": {
                            "oneOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "integer"
                              }
                            ]
                          },
                          "eventId": {
                            "description": "Echoes back the eventId of the failed event.",
                            "type": "string"
                          },
                          "eventIndex": {
                            "description": "Index into the submitted events array.",
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          },
                          "platformError": {
                            "additionalProperties": true,
                            "description": "Meta's own error for the rejected event, with credentials redacted:\n`message`, `type`, `code`, `error_subcode`, `error_user_title`,\n`error_user_msg` and `fbtrace_id` when Meta sends them. `message` above\nalready ends with `error_user_msg`. Absent when Meta returned no error body.",
                            "type": "object"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "platform": {
                      "enum": [
                        "metaads"
                      ],
                      "type": "string"
                    },
                    "testCode": {
                      "description": "The test code sent to Meta, or `null` when the request carried none.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "traceId": {
                      "description": "Meta `fbtrace_id` for debugging. Surface in support\ntickets.",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Send WhatsApp conversion event",
        "x-aisa-capabilities": {
          "capability": "messaging.send_whatsapp_conversion@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_cea3ba",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "913fab82d4aef5390fafa1e46f30bca9dd5401a22667781a0f0d213dd925e2dc"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_cea3ba",
          "path": "/apis/v1/social/messaging/whatsapp/conversions"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/dataset": {
      "get": {
        "description": "WhatsApp. Returns the Meta Click-to-WhatsApp conversions dataset currently linked\nto the WhatsApp account, if one has been provisioned. Reads only from\nthe stored `metadata.metaCapiDatasetId`, never hits Meta, never\ncreates a dataset. Use this to detect whether `POST /apis/v1/social/messaging/whatsapp/conversions`\nis configured for an account.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_e0fed9",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "datasetId": {
                      "description": "Meta dataset ID linked to the WABA, or null if not provisioned yet",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get CTWA conversions dataset",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_dataset@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_e0fed9",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "2e2af30d932c2cf265f47b472550edd0fcd61ea7bcad158eb8d64d2828f5c36e"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_e0fed9",
          "path": "/apis/v1/social/messaging/whatsapp/dataset"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp. Creates (or fetches, if one already exists) the Meta dataset that\nClick-to-WhatsApp ad events are reported against via the Conversions\nAPI, and persists its ID on the account as `metadata.metaCapiDatasetId`.\n\nThe call is GET-first idempotent: a WABA can only own one CTWA\ndataset, so a second call after a successful provision is a safe no-op\nthat returns the same ID with `created: false`.\n\nRequires the connected WhatsApp account's token to carry the\n`whatsapp_business_manage_events` permission.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_e0fed9",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "created": {
                      "description": "True if Meta created a new dataset on this call; false if one already existed",
                      "type": "boolean"
                    },
                    "datasetId": {
                      "description": "Meta dataset ID linked to the WABA",
                      "type": "string"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Provision CTWA dataset",
        "x-aisa-capabilities": {
          "capability": "messaging.create_whatsapp_dataset@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_e0fed9",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "6b1ae08eedb577c63a62f2eb7b4e30833a3232ad02a746c887e45e52fd045de5"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_e0fed9",
          "path": "/apis/v1/social/messaging/whatsapp/dataset"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/flow-responses": {
      "get": {
        "description": "WhatsApp flows. List the responses customers submitted when completing a flow (parsed from the nfm_reply messages received via webhook), newest first.\n\nScope to a single flow with `flowId`.\n\nResponses sent with a custom integrator-supplied flow_token are not attributed to a flow.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_dd64d5",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Scope to responses for this flow",
            "in": "query",
            "name": "flowId",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Max responses to return",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 50,
              "maximum": 200,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "responses": {
                      "items": {
                        "properties": {
                          "conversationId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "data": {
                            "description": "Submitted field values (flow_token removed)",
                            "type": "object"
                          },
                          "flowToken": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "from": {
                            "description": "Sender wa_id / phone",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "id": {
                            "description": "Message ID",
                            "type": "string"
                          },
                          "raw": {
                            "description": "Raw response_json string",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "receivedAt": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "senderName": {
                            "type": [
                              "string",
                              "null"
                            ]
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List flow responses",
        "x-aisa-capabilities": {
          "capability": "messaging.list_whatsapp_flow_responses@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_dd64d5",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "4f7b076a30cb4736e5e8ba8b67de4184710f8027d58bb466a9b030a4343e2d44"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_dd64d5",
          "path": "/apis/v1/social/messaging/whatsapp/flow-responses"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/flows": {
      "get": {
        "description": "WhatsApp flows. List all WhatsApp Flows for the Business Account (WABA) associated with the given account.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_0d3084",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "flows": {
                      "items": {
                        "properties": {
                          "categories": {
                            "items": {
                              "type": "string"
                            },
                            "type": "array"
                          },
                          "id": {
                            "type": "string"
                          },
                          "lineageId": {
                            "description": "Stable group key for the flow's version lineage (the root flow's ID).",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "DRAFT",
                              "PUBLISHED",
                              "DEPRECATED",
                              "BLOCKED",
                              "THROTTLED"
                            ],
                            "type": "string"
                          },
                          "validation_errors": {
                            "items": {
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "version": {
                            "description": "Standalone flows are version 1.",
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List flows",
        "x-aisa-capabilities": {
          "capability": "messaging.list_whatsapp_flows@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_0d3084",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "0fb3bb807f48ef59d2d515937d7026a3be06f50593dd609c73e50e892a772af1"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_0d3084",
          "path": "/apis/v1/social/messaging/whatsapp/flows"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp flows. Create a new WhatsApp Flow in DRAFT status. Optionally clone an existing flow. After creating, upload a Flow JSON definition, then publish to make it sendable.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_0d3084",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "categories": [
                  "SIGN_UP"
                ],
                "name": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "asVersion": {
                    "description": "When cloning, true keeps the clone in cloneFlowId's version lineage (auto-numbered next version); false/absent creates an independent flow. Ignored without cloneFlowId.",
                    "type": "boolean"
                  },
                  "categories": {
                    "description": "Flow categories",
                    "items": {
                      "enum": [
                        "SIGN_UP",
                        "SIGN_IN",
                        "APPOINTMENT_BOOKING",
                        "LEAD_GENERATION",
                        "CONTACT_US",
                        "CUSTOMER_SUPPORT",
                        "SURVEY",
                        "OTHER"
                      ],
                      "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "cloneFlowId": {
                    "description": "Optional: ID of an existing flow to clone the Flow JSON from",
                    "type": "string"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "endpointUri": {
                    "description": "HTTPS-only data exchange endpoint for the flow. Settable only while the flow is in DRAFT, and the flow's uploaded Flow JSON must declare data_api_version \"3.0\" for the endpoint to be used.",
                    "format": "uri",
                    "type": "string"
                  },
                  "name": {
                    "description": "Flow display name",
                    "maxLength": 128,
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "categories"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "flow": {
                      "properties": {
                        "categories": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "id": {
                          "type": "string"
                        },
                        "lineageId": {
                          "description": "Version-lineage group key",
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        },
                        "version": {
                          "description": "Version within the clone lineage",
                          "type": "integer"
                        }
                      },
                      "type": "object"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Create flow",
        "x-aisa-capabilities": {
          "capability": "messaging.create_whatsapp_flow@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_0d3084",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "efe3ba38c549de957ceec1c81784faced91874742129d159802d6dc76a93def4"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_0d3084",
          "path": "/apis/v1/social/messaging/whatsapp/flows"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/flows/encryption-key": {
      "get": {
        "description": "WhatsApp flows. Read the RSA business public key registered on the phone number for WhatsApp Flows endpoint encryption. Only one key is active per phone number at a time.\n\n### Why the key matters\n\n- Flows that use flow_action: data_exchange (an endpoint-backed flow) stop working at runtime until the endpoint serves the matching private key. - Meta rejects publish with error code 139002 (\"Missing Flows Signed Public Key\") when no key is registered.\n\n### Reading the status\n\n`registered` reflects whether a key is present, never `signatureStatus` alone.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_660dd1",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "publicKey": {
                      "description": "The registered RSA public key in PEM format, or null when none is registered.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "registered": {
                      "description": "Whether a key is currently registered. Derived from publicKey, not signatureStatus.",
                      "type": "boolean"
                    },
                    "signatureStatus": {
                      "description": "VALID (key matches Meta's records) or MISMATCH (no key registered, or the key does not match); null when unknown.",
                      "enum": [
                        "VALID",
                        "MISMATCH"
                      ],
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get Flows encryption key status",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_flows_encryption_key@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_660dd1",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "701eb66b5d45ef0d599ded26fdc403f42e62a0a2c2b597e736544902746bbd04"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_660dd1",
          "path": "/apis/v1/social/messaging/whatsapp/flows/encryption-key"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp flows. Register (or replace) the RSA business public key for WhatsApp Flows endpoint encryption on the phone number.\n\n- Uploading a new key replaces the previous one: only one key is active per phone number. - The corresponding private key must be served by the flow's endpoint. Otherwise endpoint-backed flows (flow_action: data_exchange) will fail at runtime even though the key is registered.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_660dd1",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "businessPublicKey": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "businessPublicKey": {
                    "description": "RSA public key in PEM format. Rejected if it is a private key or not a valid RSA public key PEM.",
                    "type": "string"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  }
                },
                "required": [
                  "businessPublicKey"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Register a Flows encryption key",
        "x-aisa-capabilities": {
          "capability": "messaging.set_whatsapp_flows_encryption_key@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_660dd1",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "080c11e76856152348c93d5c56076b8c5bec4efdfca517d96ac34af36f9ea888"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_660dd1",
          "path": "/apis/v1/social/messaging/whatsapp/flows/encryption-key"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/flows/{flowId}": {
      "delete": {
        "description": "WhatsApp flows. Delete a DRAFT flow. This is irreversible. Only flows in DRAFT status can be deleted.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_wh_244ce7",
        "parameters": [
          {
            "description": "Flow ID",
            "in": "path",
            "name": "flowId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Delete flow",
        "x-aisa-capabilities": {
          "capability": "messaging.delete_whatsapp_flow@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_wh_244ce7",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "5417be235482cf6d217ec34f1985605307963243ccd5472717aee7a6696a9efb"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_wh_244ce7",
          "path": "/apis/v1/social/messaging/whatsapp/flows/{flowId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "WhatsApp flows. Get details for a specific flow, including status, categories, validation errors, and preview URL.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_244ce7",
        "parameters": [
          {
            "description": "Flow ID",
            "in": "path",
            "name": "flowId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated fields to return (default: id,name,status,categories,validation_errors,json_version,preview,data_api_version,endpoint_uri)",
            "in": "query",
            "name": "fields",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "flow": {
                      "properties": {
                        "categories": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "id": {
                          "type": "string"
                        },
                        "json_version": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "preview": {
                          "properties": {
                            "expires_at": {
                              "type": "string"
                            },
                            "preview_url": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "status": {
                          "type": "string"
                        },
                        "validation_errors": {
                          "items": {
                            "type": "object"
                          },
                          "type": "array"
                        }
                      },
                      "type": "object"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get flow",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_flow@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_244ce7",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "d4a01d399e285db96dbe41b074b250bc6d36e3745924501c61312a8c001fd1eb"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_244ce7",
          "path": "/apis/v1/social/messaging/whatsapp/flows/{flowId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "patch": {
        "description": "WhatsApp flows. Update metadata (name, categories, endpointUri) of a DRAFT flow. Published flows are immutable.\n\nA write: needs messaging:write and is audited.",
        "operationId": "patch_aisa_messaging_apis_v1_social_messaging_wha_244ce7",
        "parameters": [
          {
            "description": "Flow ID",
            "in": "path",
            "name": "flowId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "categories": [
                  "SIGN_UP"
                ],
                "name": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "categories": {
                    "items": {
                      "enum": [
                        "SIGN_UP",
                        "SIGN_IN",
                        "APPOINTMENT_BOOKING",
                        "LEAD_GENERATION",
                        "CONTACT_US",
                        "CUSTOMER_SUPPORT",
                        "SURVEY",
                        "OTHER"
                      ],
                      "type": "string"
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "endpointUri": {
                    "description": "HTTPS-only data exchange endpoint for the flow. Settable only while the flow is in DRAFT, and the flow's uploaded Flow JSON must declare data_api_version \"3.0\" for the endpoint to be used.",
                    "format": "uri",
                    "type": "string"
                  },
                  "name": {
                    "description": "New flow name",
                    "maxLength": 128,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Update flow",
        "x-aisa-capabilities": {
          "capability": "messaging.update_whatsapp_flow@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/patch_aisa_messaging_apis_v1_social_messaging_wha_244ce7",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "1b77b01fbe04a68dc7d63449e6813404975031b73b3a6ca359f50411c7296986"
        },
        "x-aisa-runtime-operation": {
          "method": "PATCH",
          "operation_id": "patch_aisa_messaging_apis_v1_social_messaging_wha_244ce7",
          "path": "/apis/v1/social/messaging/whatsapp/flows/{flowId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/flows/{flowId}/deprecate": {
      "post": {
        "description": "WhatsApp flows. Deprecate a PUBLISHED flow. This is irreversible. Deprecated flows cannot be sent\nor opened, but existing active sessions may continue until they complete.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_735114",
        "parameters": [
          {
            "description": "Flow ID",
            "in": "path",
            "name": "flowId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Deprecate flow",
        "x-aisa-capabilities": {
          "capability": "messaging.deprecate_whatsapp_flow@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_735114",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "7ea0a5d219c9c24a26391f51943cc170fb2630cdffcf25d13fd39515b163e091"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_735114",
          "path": "/apis/v1/social/messaging/whatsapp/flows/{flowId}/deprecate"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/flows/{flowId}/json": {
      "get": {
        "description": "WhatsApp flows. Get the flow JSON asset metadata, including a temporary download URL for the Flow JSON file.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_879b14",
        "parameters": [
          {
            "description": "Flow ID",
            "in": "path",
            "name": "flowId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "assets": {
                      "items": {
                        "properties": {
                          "asset_type": {
                            "type": "string"
                          },
                          "download_url": {
                            "description": "Temporary URL to download the flow JSON",
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get flow JSON asset",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_flow_json@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_879b14",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "c4c62d07f0da8c42fff532b61a003a38853d6cb934264fa1e2622eef160a3d54"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_879b14",
          "path": "/apis/v1/social/messaging/whatsapp/flows/{flowId}/json"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "put": {
        "description": "WhatsApp flows. Upload or update the Flow JSON for a DRAFT flow. The Flow JSON defines all screens,\ncomponents (text inputs, dropdowns, date pickers, etc.), and navigation.\n\nMeta validates the JSON on upload and returns any validation errors.\n\nA write: needs messaging:write and is audited.",
        "operationId": "put_aisa_messaging_apis_v1_social_messaging_whats_879b14",
        "parameters": [
          {
            "description": "Flow ID",
            "in": "path",
            "name": "flowId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "flow_json": {}
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "flow_json": {
                    "description": "The Flow JSON content. Pass as a JSON object or a JSON string.",
                    "oneOf": [
                      {
                        "type": "object"
                      },
                      {
                        "type": "string"
                      }
                    ]
                  }
                },
                "required": [
                  "flow_json"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "validation_errors": {
                      "description": "Empty array if valid; otherwise, contains validation error details from Meta",
                      "items": {
                        "properties": {
                          "column_end": {
                            "type": "integer"
                          },
                          "column_start": {
                            "type": "integer"
                          },
                          "error": {
                            "type": "string"
                          },
                          "error_type": {
                            "type": "string"
                          },
                          "line_end": {
                            "type": "integer"
                          },
                          "line_start": {
                            "type": "integer"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Upload flow JSON",
        "x-aisa-capabilities": {
          "capability": "messaging.upload_whatsapp_flow_json@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/put_aisa_messaging_apis_v1_social_messaging_whats_879b14",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "58f7ec3d4c82d61bcc3b807498230986c08e4d437f82986f179d13f11b895f3f"
        },
        "x-aisa-runtime-operation": {
          "method": "PUT",
          "operation_id": "put_aisa_messaging_apis_v1_social_messaging_whats_879b14",
          "path": "/apis/v1/social/messaging/whatsapp/flows/{flowId}/json"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/flows/{flowId}/preview": {
      "get": {
        "description": "WhatsApp flows. Get Meta's public web-preview URL for a flow (drafts included), embeddable as an\ninteractive iframe. The link is reused across calls (valid ~30 days); pass\ninvalidate=true to mint a fresh one (the previous link stops working).",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_ad846e",
        "parameters": [
          {
            "description": "Flow ID",
            "in": "path",
            "name": "flowId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Mint a fresh preview link (default false)",
            "in": "query",
            "name": "invalidate",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "expires_at": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "preview_url": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get flow preview URL",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_flow_preview@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_ad846e",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "ef50e1f150350cf95f9787792075f81e387115ed1339f48e8c93cd868b2d4f37"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_ad846e",
          "path": "/apis/v1/social/messaging/whatsapp/flows/{flowId}/preview"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/flows/{flowId}/publish": {
      "post": {
        "description": "WhatsApp flows. Publish a DRAFT flow. This is irreversible. Once published, the flow and its JSON\nbecome immutable and the flow can be sent to users. To update a published flow,\ncreate a new flow (optionally cloning this one via cloneFlowId).\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_3295e7",
        "parameters": [
          {
            "description": "Flow ID",
            "in": "path",
            "name": "flowId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {},
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Publish flow",
        "x-aisa-capabilities": {
          "capability": "messaging.publish_whatsapp_flow@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_3295e7",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "47d262a92d462e8fc11ec62f233e7ea86bd03a926dde09e30055cda0c1e51735"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_3295e7",
          "path": "/apis/v1/social/messaging/whatsapp/flows/{flowId}/publish"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/flows/{flowId}/versions": {
      "get": {
        "description": "WhatsApp flows. Each entry is enriched with the version's\nlive name and status from Meta. A flow with no lineage returns only itself as version 1.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_32305c",
        "parameters": [
          {
            "description": "Flow ID",
            "in": "path",
            "name": "flowId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "versions": {
                      "items": {
                        "properties": {
                          "flowId": {
                            "type": "string"
                          },
                          "missing": {
                            "description": "True when Meta no longer has this flow",
                            "type": "boolean"
                          },
                          "name": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "parentFlowId": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "status": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "version": {
                            "type": "integer"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List flow versions",
        "x-aisa-capabilities": {
          "capability": "messaging.list_whatsapp_flow_versions@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_32305c",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "d06f1808bda29639a347fc3ea67939e020336d05b079b9e662da8127be2a11d8"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_32305c",
          "path": "/apis/v1/social/messaging/whatsapp/flows/{flowId}/versions"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/media/{mediaId}": {
      "get": {
        "description": "WhatsApp. Streams the binary for a WhatsApp attachment. This is the endpoint the `url` on a WhatsApp `attachments[]` entry points at, in both the `message.received` webhook and the List messages response.\n\n### This is an authenticated endpoint, not a public link\n\nSend `Authorization: Bearer <your API key>` exactly as you would for any other call. Passing the URL straight to a browser, an LLM vision API, or a no-code \"download file\" step without the header returns `401`.\n\nThis is the most common integration mistake on this endpoint.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_5e1d82",
        "parameters": [
          {
            "description": "The media id from `attachments[].payload.id`.",
            "in": "path",
            "name": "mediaId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/octet-stream": {
                "schema": {
                  "format": "binary",
                  "type": "string"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Download WhatsApp media",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_media@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_5e1d82",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "0461739e2d2acc8df062a9d56353a1d6b77689d91ce44d2b060f02c11687722a"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_5e1d82",
          "path": "/apis/v1/social/messaging/whatsapp/media/{mediaId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/messages/send": {
      "post": {
        "description": "WhatsApp Inbox. Send an approved WhatsApp template to one phone number.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_f9872b",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "participantId": "15550100123",
                "templateLanguage": "en_US",
                "templateName": "order_update"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "participantId": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "templateLanguage": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "templateName": {
                    "minLength": 1,
                    "type": "string"
                  },
                  "templateParams": {
                    "items": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "participantId",
                  "templateName",
                  "templateLanguage"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "data": {
                      "properties": {
                        "conversationId": {
                          "type": "string"
                        },
                        "messageId": {
                          "type": "string"
                        },
                        "participantId": {
                          "type": "string"
                        },
                        "participantName": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "participantUsername": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": "object"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Send an approved WhatsApp template to one phone number",
        "x-aisa-capabilities": {
          "capability": "messaging.send_whatsapp_template@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_f9872b",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "customer_micros_usd": 1000,
          "customer_pricing_ref": "messaging.send_whatsapp_template.v1.pricing@1",
          "description": "Charged once when the provider accepts the send. Failed and unconfirmed sends are free.",
          "kind": "fixed_request"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "233275d44b1bf5bd010feed79411d9c480246d490345a2968a875f19d7b3eb89"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_f9872b",
          "path": "/apis/v1/social/messaging/whatsapp/messages/send"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/number-info": {
      "get": {
        "description": "WhatsApp. Live snapshot of a connected number straight from Meta.\n\n### Phone-number node\n\n- display number\n- display name + approval\n- quality rating\n- messaging-limit tier\n- throughput\n- official-business badge\n- connection status\n- health_status\n\n### Owning WhatsApp Business Account\n\n- name\n- business verification\n- timezone\n- health_status\n\n### Why live\n\nIt is fetched live because Meta updates quality/tier/name/health over time. The call also refreshes the cached values shown on the connection card.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_8522df",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "phone": {
                      "properties": {
                        "display_phone_number": {
                          "type": "string"
                        },
                        "health_status": {
                          "description": "Meta's can_send_message health object (messaging + calling signals)",
                          "type": "object"
                        },
                        "is_official_business_account": {
                          "type": "boolean"
                        },
                        "messaging_limit_tier": {
                          "description": "e.g. TIER_250, TIER_1K, TIER_UNLIMITED",
                          "type": "string"
                        },
                        "name_status": {
                          "description": "APPROVED, AVAILABLE_WITHOUT_REVIEW, PENDING_REVIEW, DECLINED, EXPIRED, NONE",
                          "type": "string"
                        },
                        "platform_type": {
                          "description": "e.g. CLOUD_API",
                          "type": "string"
                        },
                        "quality_rating": {
                          "description": "GREEN, YELLOW, RED, UNKNOWN",
                          "type": "string"
                        },
                        "status": {
                          "description": "e.g. CONNECTED",
                          "type": "string"
                        },
                        "throughput": {
                          "properties": {
                            "level": {
                              "description": "STANDARD or HIGH",
                              "type": "string"
                            }
                          },
                          "type": "object"
                        },
                        "verified_name": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "waba": {
                      "properties": {
                        "business_verification_status": {
                          "description": "verified, not_verified, pending, ...",
                          "type": "string"
                        },
                        "health_status": {
                          "type": "object"
                        },
                        "name": {
                          "type": "string"
                        },
                        "timezone_id": {
                          "description": "Meta integer timezone-enum id",
                          "type": "string"
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get number status",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_number_info@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_8522df",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "c2fc13c51b00096841d43ef643d3c143dc9f089ad668cc7d043e76527f1d936a"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_8522df",
          "path": "/apis/v1/social/messaging/whatsapp/number-info"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/pricing-analytics": {
      "get": {
        "description": "WhatsApp. Message volume and approximate cost for one connected WhatsApp number. Read live from Meta's `pricing_analytics` on the WhatsApp Business Account and scoped to that account's phone number.\n\nMeta's figures are approximate and can lag; Meta bills from its own invoice.\n\nMeta limits how far back and how fine the data goes (for example HALF_HOUR only over short ranges), and answers out-of-range requests with an error.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_a49313",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Range start, ISO 8601 date or date-time.",
            "in": "query",
            "name": "start",
            "required": true,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Range end, ISO 8601 date or date-time. Must be after start.",
            "in": "query",
            "name": "end",
            "required": true,
            "schema": {
              "format": "date-time",
              "type": "string"
            }
          },
          {
            "description": "Size of each data point. Use DAILY for short or month-to-date ranges.\n\nMeta refuses MONTHLY when the range is too short for a monthly bucket (for example a range that starts at the beginning of the current month and ends today). That is a 400 with `param: granularity` and Meta's reason in `error`.",
            "in": "query",
            "name": "granularity",
            "required": true,
            "schema": {
              "enum": [
                "HALF_HOUR",
                "DAILY",
                "MONTHLY"
              ],
              "type": "string"
            }
          },
          {
            "description": "Comma-separated breakdowns: COUNTRY, PHONE, PRICING_CATEGORY, PRICING_TYPE, TIER. Without it each data point is a total for the interval.",
            "in": "query",
            "name": "dimensions",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Comma-separated: COST, VOLUME. Defaults to both.",
            "in": "query",
            "name": "metricTypes",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Comma-separated filter: REGULAR, FREE_CUSTOMER_SERVICE, FREE_ENTRY_POINT.",
            "in": "query",
            "name": "pricingTypes",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Comma-separated filter of Meta pricing categories, for example MARKETING, MARKETING_LITE, UTILITY, AUTHENTICATION, AUTHENTICATION_INTERNATIONAL, SERVICE, REFERRAL_CONVERSION.",
            "in": "query",
            "name": "pricingCategories",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Comma-separated ISO 3166-1 alpha-2 country codes to filter on.",
            "in": "query",
            "name": "countryCodes",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "connectionId": {
                      "description": "One of your connections, or null when it is not one of yours.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "dataPoints": {
                      "items": {
                        "properties": {
                          "cost": {
                            "description": "Approximate charge, in the currency of the WABA's payment method.",
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "country": {
                            "description": "Set when dimensions includes COUNTRY.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "end": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "phoneNumber": {
                            "description": "Set when dimensions includes PHONE.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "pricingCategory": {
                            "description": "Set when dimensions includes PRICING_CATEGORY.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "pricingType": {
                            "description": "Set when dimensions includes PRICING_TYPE.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "start": {
                            "format": "date-time",
                            "type": "string"
                          },
                          "tier": {
                            "description": "Volume pricing tier. Set when dimensions includes TIER.",
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "volume": {
                            "description": "Messages delivered.",
                            "type": [
                              "integer",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "start",
                          "end",
                          "phoneNumber",
                          "country",
                          "tier",
                          "pricingType",
                          "pricingCategory",
                          "volume",
                          "cost"
                        ],
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "end": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "granularity": {
                      "enum": [
                        "HALF_HOUR",
                        "DAILY",
                        "MONTHLY"
                      ],
                      "type": "string"
                    },
                    "phoneNumber": {
                      "description": "The number the data is scoped to, digits only.",
                      "type": "string"
                    },
                    "start": {
                      "format": "date-time",
                      "type": "string"
                    }
                  },
                  "required": [
                    "connectionId",
                    "phoneNumber",
                    "granularity",
                    "start",
                    "end",
                    "dataPoints"
                  ],
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get pricing analytics",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_pricing_analytics@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_a49313",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "efe08232c0cdb57ded50ec1731e17e588f2e09c807163cd66515486b5a107fe1"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_a49313",
          "path": "/apis/v1/social/messaging/whatsapp/pricing-analytics"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/register": {
      "post": {
        "description": "WhatsApp. Re-runs Meta's Cloud API registration for a WhatsApp account that is already connected.\n\nUse it when the number has its own two-step verification PIN. The connect flows register with a default PIN, and Meta rejects that with error 133005.\n\nThe number then fails every send with the misleading '(#200) You do not have the necessary permission to send messages' while the account still shows as connected.\n\nThe PIN is used for this call only and is not stored.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_1a4150",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "pin": "123456"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "pin": {
                    "description": "The 6-digit two-step verification PIN set on the number.",
                    "pattern": "^\\d{6}$",
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "connectionId": {
                      "description": "One of your connections, or null when it is not one of yours.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phoneNumberId": {
                      "type": "string"
                    },
                    "registered": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Register a connected WhatsApp number on the Cloud API",
        "x-aisa-capabilities": {
          "capability": "messaging.register_whatsapp_number@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_1a4150",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "702df44b8c48cecf32c078d7fceb7dec91dbce1bbd70259962d63220c84987fb"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_1a4150",
          "path": "/apis/v1/social/messaging/whatsapp/register"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/request-code": {
      "post": {
        "description": "WhatsApp. Requests a new OTP from Meta for a bring-your-own WhatsApp number (its own WABA, migrated off another BSP) that Meta demoted to re-verification.\n\nThe code lands on the customer's own handset, so verifying it is necessarily self-service. Call `POST /apis/v1/social/messaging/whatsapp/verify-code` with the code once it arrives.\n\nRate-limited to one request per 10 minutes per account, and Meta enforces its own cooldown on top of that.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_80dc71",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "language": "en_US",
                "method": "SMS"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "language": {
                    "default": "en_US",
                    "description": "Meta locale code for the verification message, e.g. en_US.",
                    "type": "string"
                  },
                  "method": {
                    "default": "SMS",
                    "enum": [
                      "SMS",
                      "VOICE"
                    ],
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "alreadyActive": {
                      "type": "boolean"
                    },
                    "connectionId": {
                      "description": "One of your connections, or null when it is not one of yours.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "method": {
                      "type": "string"
                    },
                    "phoneNumberId": {
                      "type": "string"
                    },
                    "requested": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Request a Meta re-verification code for a BYO WhatsApp number",
        "x-aisa-capabilities": {
          "capability": "messaging.request_whatsapp_verification_code@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_80dc71",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "6d800ed96202734bb2e89f0b8d9e7be8ec05064bdf47a2ea5569b53ca881e868"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_80dc71",
          "path": "/apis/v1/social/messaging/whatsapp/request-code"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/template-library": {
      "get": {
        "description": "WhatsApp templates. Look up a single pre-approved Template Library template by its exact name, to introspect its structure before importing it.\n\nMost importantly, it returns the template's `buttons`. A library template with `URL` / `PHONE_NUMBER` buttons must be created with a matching `library_template_button_inputs` array (see Create Template), or Meta rejects it. Use this to discover which inputs to collect.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_cd1fed",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Exact library template name",
            "in": "query",
            "name": "name",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Desired language variant (e.g. es, en_US). If the template is not offered in it, the first available variant is returned and named in the response language field.",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "template": {
                      "properties": {
                        "availableLanguages": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "body": {
                          "type": "string"
                        },
                        "body_params": {
                          "items": {
                            "type": "string"
                          },
                          "type": "array"
                        },
                        "buttons": {
                          "items": {
                            "properties": {
                              "text": {
                                "type": "string"
                              },
                              "type": {
                                "description": "QUICK_REPLY, URL, PHONE_NUMBER, OTP, FLOW, ...",
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "category": {
                          "type": "string"
                        },
                        "language": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Look up a library template",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_library_template@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_cd1fed",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "a9fafac22110b0749c660603a00a3877bde917b0ffe14f99837c967319d59dbc"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_cd1fed",
          "path": "/apis/v1/social/messaging/whatsapp/template-library"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/templates": {
      "get": {
        "description": "WhatsApp. List message templates for the WhatsApp Business Account (WABA) associated with the given account. Templates are fetched directly from the WhatsApp Cloud API. One entry per **name + language**:\na multi-language template appears once per language, each with its own Meta `id`.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_d4bd65",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Exact template name; returns every language variant of that family.",
            "in": "query",
            "name": "name",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Exact language code (e.g. en_US).",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "enum": [
                "APPROVED",
                "REJECTED",
                "PENDING",
                "PAUSED",
                "DISABLED",
                "IN_APPEAL",
                "PENDING_DELETION"
              ],
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "templates": {
                      "items": {
                        "properties": {
                          "category": {
                            "enum": [
                              "AUTHENTICATION",
                              "MARKETING",
                              "UTILITY"
                            ],
                            "type": "string"
                          },
                          "components": {
                            "items": {
                              "type": "object"
                            },
                            "type": "array"
                          },
                          "id": {
                            "description": "WhatsApp template ID",
                            "type": "string"
                          },
                          "language": {
                            "type": "string"
                          },
                          "message_send_ttl_seconds": {
                            "description": "Only when a custom TTL is set; absent while the category default applies.",
                            "type": "integer"
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "enum": [
                              "APPROVED",
                              "PENDING",
                              "REJECTED"
                            ],
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List templates",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_templates@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_d4bd65",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "d66c9399cc973c7199f189660c11a4d0f37501cda38424117bff05a466d7aabe"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_d4bd65",
          "path": "/apis/v1/social/messaging/whatsapp/templates"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp. Create a new message template. Supports two modes:\n\nCustom template: Provide components with your own content. Submitted to Meta for review (can take up to 24h).\n\nLibrary template: Provide library_template_name instead of components to use a pre-built template\nfrom Meta's template library. Library templates are pre-approved (no review wait). You can optionally\ncustomize parameters and buttons via library_template_body_inputs and library_template_button_inputs.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_d4bd65",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "category": "AUTHENTICATION",
                "language": "example",
                "name": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "category": {
                    "description": "Template category",
                    "enum": [
                      "AUTHENTICATION",
                      "MARKETING",
                      "UTILITY"
                    ],
                    "type": "string"
                  },
                  "components": {
                    "description": "Template components (header, body, footer, buttons, carousel, limited_time_offer). Required for custom templates, omit when using library_template_name.",
                    "items": {
                      "oneOf": [
                        {
                          "properties": {
                            "example": {
                              "properties": {
                                "header_handle": {
                                  "description": "When the header format is a media type (image, video, gif, document), provide a public URL here.",
                                  "items": {
                                    "format": "uri",
                                    "type": "string"
                                  },
                                  "maxItems": 1,
                                  "minItems": 1,
                                  "type": "array"
                                },
                                "header_text": {
                                  "description": "Sample values for header text variables",
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "header_text_named_params": {
                                  "description": "Sample values for NAMED header variables (templates using {{customer_name}}-style tokens with parameter_format: NAMED).",
                                  "items": {
                                    "properties": {
                                      "example": {
                                        "description": "Sample value for this variable.",
                                        "type": "string"
                                      },
                                      "param_name": {
                                        "description": "Variable name as it appears in the text, without braces (e.g. customer_name for {{customer_name}}).",
                                        "pattern": "^[a-z0-9_]+$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "param_name",
                                      "example"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "format": {
                              "enum": [
                                "text",
                                "image",
                                "video",
                                "gif",
                                "document",
                                "location"
                              ],
                              "type": "string"
                            },
                            "text": {
                              "description": "Header text (may include {{1}} variable). Used when format is TEXT.",
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "header"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "format"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "add_security_recommendation": {
                              "description": "Add security recommendation text (authentication templates only)",
                              "type": "boolean"
                            },
                            "example": {
                              "properties": {
                                "body_text": {
                                  "description": "Sample values for body variables (array of arrays)",
                                  "items": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "type": "array"
                                },
                                "body_text_named_params": {
                                  "description": "Sample values for NAMED body variables (templates using {{customer_name}}-style tokens with parameter_format: NAMED).",
                                  "items": {
                                    "properties": {
                                      "example": {
                                        "description": "Sample value for this variable.",
                                        "type": "string"
                                      },
                                      "param_name": {
                                        "description": "Variable name as it appears in the text, without braces (e.g. customer_name for {{customer_name}}).",
                                        "pattern": "^[a-z0-9_]+$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "param_name",
                                      "example"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "text": {
                              "description": "Body text with optional {{n}} variables",
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "body"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "code_expiration_minutes": {
                              "description": "OTP code expiry in minutes (authentication templates only)",
                              "minimum": 1,
                              "type": "integer"
                            },
                            "text": {
                              "description": "Static footer text",
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "footer"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "buttons": {
                              "items": {
                                "properties": {
                                  "autofill_text": {
                                    "type": "string"
                                  },
                                  "example": {
                                    "description": "Example value(s). Accepts either a string or an array of strings. For URL buttons, an array of URL-suffix samples; for copy_code (marketing) buttons, the coupon code as a single string. Left untyped (string | string[]) on purpose: a typed oneOf of string-vs-array breaks several SDK code generators."
                                  },
                                  "flow_action": {
                                    "type": "string"
                                  },
                                  "flow_id": {
                                    "type": "string"
                                  },
                                  "flow_json": {
                                    "type": "string"
                                  },
                                  "flow_name": {
                                    "type": "string"
                                  },
                                  "navigate_screen": {
                                    "type": "string"
                                  },
                                  "otp_type": {
                                    "description": "Required when type is otp",
                                    "enum": [
                                      "copy_code",
                                      "one_tap",
                                      "zero_tap"
                                    ],
                                    "type": "string"
                                  },
                                  "package_name": {
                                    "type": "string"
                                  },
                                  "phone_number": {
                                    "description": "Required when type is phone_number",
                                    "type": "string"
                                  },
                                  "signature_hash": {
                                    "type": "string"
                                  },
                                  "text": {
                                    "description": "Visible button label. Required for all types except copy_code (whose label is fixed by WhatsApp) and otp (omit it and WhatsApp supplies its own label, localized to the template language; an English label on a non-English template is rejected).",
                                    "type": "string"
                                  },
                                  "type": {
                                    "enum": [
                                      "quick_reply",
                                      "url",
                                      "phone_number",
                                      "otp",
                                      "copy_code",
                                      "flow",
                                      "mpm",
                                      "catalog"
                                    ],
                                    "type": "string"
                                  },
                                  "url": {
                                    "description": "Required when type is URL",
                                    "format": "uri",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "type": "object"
                              },
                              "minItems": 1,
                              "type": "array"
                            },
                            "type": {
                              "enum": [
                                "buttons"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "buttons"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "cards": {
                              "description": "2-10 cards. Meta requires all cards to share the same component structure; a mismatch surfaces as a rejected_reason. MARKETING category only.",
                              "items": {
                                "properties": {
                                  "components": {
                                    "description": "Per-card components. Each card carries its own media header + optional body + up to 2 buttons. Footer and nested carousel are not allowed inside cards.",
                                    "items": {
                                      "oneOf": [
                                        {
                                          "properties": {
                                            "example": {
                                              "properties": {
                                                "header_handle": {
                                                  "description": "When the header format is a media type (image, video, gif, document), provide a public URL here.",
                                                  "items": {
                                                    "format": "uri",
                                                    "type": "string"
                                                  },
                                                  "maxItems": 1,
                                                  "minItems": 1,
                                                  "type": "array"
                                                },
                                                "header_text": {
                                                  "description": "Sample values for header text variables",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                },
                                                "header_text_named_params": {
                                                  "description": "Sample values for NAMED header variables (templates using {{customer_name}}-style tokens with parameter_format: NAMED).",
                                                  "items": {
                                                    "properties": {
                                                      "example": {
                                                        "description": "Sample value for this variable.",
                                                        "type": "string"
                                                      },
                                                      "param_name": {
                                                        "description": "Variable name as it appears in the text, without braces (e.g. customer_name for {{customer_name}}).",
                                                        "pattern": "^[a-z0-9_]+$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "param_name",
                                                      "example"
                                                    ],
                                                    "type": "object"
                                                  },
                                                  "type": "array"
                                                }
                                              },
                                              "type": "object"
                                            },
                                            "format": {
                                              "enum": [
                                                "text",
                                                "image",
                                                "video",
                                                "gif",
                                                "document",
                                                "location"
                                              ],
                                              "type": "string"
                                            },
                                            "text": {
                                              "description": "Header text (may include {{1}} variable). Used when format is TEXT.",
                                              "type": "string"
                                            },
                                            "type": {
                                              "enum": [
                                                "header"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "format"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "properties": {
                                            "add_security_recommendation": {
                                              "description": "Add security recommendation text (authentication templates only)",
                                              "type": "boolean"
                                            },
                                            "example": {
                                              "properties": {
                                                "body_text": {
                                                  "description": "Sample values for body variables (array of arrays)",
                                                  "items": {
                                                    "items": {
                                                      "type": "string"
                                                    },
                                                    "type": "array"
                                                  },
                                                  "type": "array"
                                                },
                                                "body_text_named_params": {
                                                  "description": "Sample values for NAMED body variables (templates using {{customer_name}}-style tokens with parameter_format: NAMED).",
                                                  "items": {
                                                    "properties": {
                                                      "example": {
                                                        "description": "Sample value for this variable.",
                                                        "type": "string"
                                                      },
                                                      "param_name": {
                                                        "description": "Variable name as it appears in the text, without braces (e.g. customer_name for {{customer_name}}).",
                                                        "pattern": "^[a-z0-9_]+$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "param_name",
                                                      "example"
                                                    ],
                                                    "type": "object"
                                                  },
                                                  "type": "array"
                                                }
                                              },
                                              "type": "object"
                                            },
                                            "text": {
                                              "description": "Body text with optional {{n}} variables",
                                              "type": "string"
                                            },
                                            "type": {
                                              "enum": [
                                                "body"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "text"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "properties": {
                                            "buttons": {
                                              "items": {
                                                "properties": {
                                                  "autofill_text": {
                                                    "type": "string"
                                                  },
                                                  "example": {
                                                    "description": "Example value(s). Accepts either a string or an array of strings. For URL buttons, an array of URL-suffix samples; for copy_code (marketing) buttons, the coupon code as a single string. Left untyped (string | string[]) on purpose: a typed oneOf of string-vs-array breaks several SDK code generators."
                                                  },
                                                  "flow_action": {
                                                    "type": "string"
                                                  },
                                                  "flow_id": {
                                                    "type": "string"
                                                  },
                                                  "flow_json": {
                                                    "type": "string"
                                                  },
                                                  "flow_name": {
                                                    "type": "string"
                                                  },
                                                  "navigate_screen": {
                                                    "type": "string"
                                                  },
                                                  "otp_type": {
                                                    "description": "Required when type is otp",
                                                    "enum": [
                                                      "copy_code",
                                                      "one_tap",
                                                      "zero_tap"
                                                    ],
                                                    "type": "string"
                                                  },
                                                  "package_name": {
                                                    "type": "string"
                                                  },
                                                  "phone_number": {
                                                    "description": "Required when type is phone_number",
                                                    "type": "string"
                                                  },
                                                  "signature_hash": {
                                                    "type": "string"
                                                  },
                                                  "text": {
                                                    "description": "Visible button label. Required for all types except copy_code (whose label is fixed by WhatsApp) and otp (omit it and WhatsApp supplies its own label, localized to the template language; an English label on a non-English template is rejected).",
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "enum": [
                                                      "quick_reply",
                                                      "url",
                                                      "phone_number",
                                                      "otp",
                                                      "copy_code",
                                                      "flow",
                                                      "mpm",
                                                      "catalog"
                                                    ],
                                                    "type": "string"
                                                  },
                                                  "url": {
                                                    "description": "Required when type is URL",
                                                    "format": "uri",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type"
                                                ],
                                                "type": "object"
                                              },
                                              "minItems": 1,
                                              "type": "array"
                                            },
                                            "type": {
                                              "enum": [
                                                "buttons"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "buttons"
                                          ],
                                          "type": "object"
                                        }
                                      ]
                                    },
                                    "minItems": 1,
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "components"
                                ],
                                "type": "object"
                              },
                              "maxItems": 10,
                              "minItems": 2,
                              "type": "array"
                            },
                            "type": {
                              "enum": [
                                "carousel"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "cards"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "limited_time_offer": {
                              "properties": {
                                "has_expiration": {
                                  "description": "Toggles the countdown timer. The actual coupon code + expiry are bound at SEND time, not here.",
                                  "type": "boolean"
                                },
                                "text": {
                                  "description": "Short offer label (<=16 chars). MARKETING only.",
                                  "maxLength": 16,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "text"
                              ],
                              "type": "object"
                            },
                            "type": {
                              "enum": [
                                "limited_time_offer"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "limited_time_offer"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "language": {
                    "description": "Template language code (e.g., en_US)",
                    "type": "string"
                  },
                  "library_template_body_inputs": {
                    "description": "Optional body customizations for library templates. Available options depend on the\ntemplate (e.g., add_contact_number, add_learn_more_link, add_security_recommendation,\nadd_track_package_link, code_expiration_minutes).",
                    "type": "object"
                  },
                  "library_template_button_inputs": {
                    "description": "Optional button customizations for library templates. Each item specifies button type\nand configuration (e.g., URL, phone number, quick reply).",
                    "items": {
                      "properties": {
                        "phone_number": {
                          "type": "string"
                        },
                        "type": {
                          "enum": [
                            "quick_reply",
                            "url",
                            "phone_number"
                          ],
                          "type": "string"
                        },
                        "url": {
                          "properties": {
                            "base_url": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    },
                    "type": "array"
                  },
                  "library_template_name": {
                    "description": "Name of a pre-built template from Meta's template library (e.g., \"appointment_reminder\",\n\"auto_pay_reminder_1\", \"address_update\"). When provided, the template is pre-approved\nby Meta with no review wait. Omit components when using this field.",
                    "type": "string"
                  },
                  "message_send_ttl_seconds": {
                    "description": "Delivery validity window in seconds: a message not delivered within it is dropped. Range by category:\n\n- AUTHENTICATION: 30 to 900. - UTILITY: 30 to 43200 (12h). - MARKETING: 43200 to 2592000 (30 days).\n\n-1 (create only) keeps the 30-day default on AUTHENTICATION and UTILITY. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise. If Meta later recategorises the template, it clears the TTL (read it back to check).",
                    "type": "integer"
                  },
                  "name": {
                    "description": "Template name (lowercase, letters/numbers/underscores, must start with a letter)",
                    "pattern": "^[a-z][a-z0-9_]*$",
                    "type": "string"
                  },
                  "parameter_format": {
                    "description": "Variable style: POSITIONAL ({{1}}, the default) or NAMED ({{customer_name}}). Named templates provide examples via body_text_named_params / header_text_named_params. Inferred as NAMED when omitted but a named-params example is present.",
                    "enum": [
                      "POSITIONAL",
                      "NAMED",
                      "positional",
                      "named"
                    ],
                    "type": "string"
                  }
                },
                "required": [
                  "name",
                  "category",
                  "language"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "template": {
                      "properties": {
                        "category": {
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "language": {
                          "type": "string"
                        },
                        "message_send_ttl_seconds": {
                          "description": "Echoed when supplied on the request.",
                          "type": "integer"
                        },
                        "name": {
                          "type": "string"
                        },
                        "status": {
                          "description": "APPROVED for library templates, PENDING for custom",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Create template",
        "x-aisa-capabilities": {
          "capability": "messaging.create_whatsapp_template@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_d4bd65",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "84ee462a632ca70bcfc47d95cde925d04969914a82dfd996158a855145a3e238"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_d4bd65",
          "path": "/apis/v1/social/messaging/whatsapp/templates"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/templates/id/{templateId}": {
      "delete": {
        "description": "WhatsApp. Delete one language variant by its Meta id. Other languages of the same name are untouched. The name cannot be reused for 30 days once its last variant is deleted.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_wh_443769",
        "parameters": [
          {
            "description": "Meta template id (numeric).",
            "in": "path",
            "name": "templateId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "language": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "scope": {
                      "enum": [
                        "language"
                      ],
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Delete template by id",
        "x-aisa-capabilities": {
          "capability": "messaging.delete_whatsapp_template_by_id@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_wh_443769",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "80c3880a6e3cc8a5304c5b3a5fa3e02ca866428eea375ce56f4b49d1e92e770c"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_wh_443769",
          "path": "/apis/v1/social/messaging/whatsapp/templates/id/{templateId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "WhatsApp. Retrieve one template variant by its Meta id, the id every variant of a family has on its own\nand the one the `whatsapp.template.status_updated` webhook carries.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_443769",
        "parameters": [
          {
            "description": "Meta template id (numeric).",
            "in": "path",
            "name": "templateId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "template": {
                      "properties": {
                        "category": {
                          "type": "string"
                        },
                        "components": {
                          "items": {
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "id": {
                          "description": "Meta template id. Unique per language variant; usable on `/apis/v1/social/messaging/whatsapp/templates/id/{templateId}`.",
                          "type": "string"
                        },
                        "language": {
                          "description": "The variant actually returned.",
                          "type": "string"
                        },
                        "message_send_ttl_seconds": {
                          "description": "Only when a custom TTL is set; absent while the category default applies.",
                          "type": "integer"
                        },
                        "name": {
                          "type": "string"
                        },
                        "quality_score": {
                          "description": "Post-approval quality (GREEN/YELLOW/RED), when Meta reports one.",
                          "type": "object"
                        },
                        "rejected_reason": {
                          "description": "Only when status is REJECTED.",
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get template by id",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_template_by_id@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_443769",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "2e90ac7fd76069f708c6414c736f811e8fce34c0b0d91219047c6d45c4cd9f1d"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_443769",
          "path": "/apis/v1/social/messaging/whatsapp/templates/id/{templateId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "patch": {
        "description": "WhatsApp. Update one variant's components and/or its message_send_ttl_seconds by its Meta id. Name, language and category cannot change.\n\n### Editing limits\n\n- Meta only allows editing templates in `APPROVED`, `REJECTED` or `PAUSED` state. - An approved template can be edited once per 24 hours and up to 10 times per 30 days. - A variant already in `PENDING` cannot be edited again until Meta finishes reviewing it.\n\n### Review\n\nA component update sends the variant back to Meta for review, so the `status` returned here is normally `PENDING`. A TTL-only update keeps an APPROVED variant approved.\n\nA write: needs messaging:write and is audited.",
        "operationId": "patch_aisa_messaging_apis_v1_social_messaging_wha_443769",
        "parameters": [
          {
            "description": "Meta template id (numeric).",
            "in": "path",
            "name": "templateId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "components": [
                  {
                    "format": "text",
                    "type": "header"
                  }
                ],
                "message_send_ttl_seconds": 1
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "components": {
                    "description": "Updated template components. Optional when only message_send_ttl_seconds changes; at least one of the two is required.",
                    "items": {
                      "oneOf": [
                        {
                          "properties": {
                            "example": {
                              "properties": {
                                "header_handle": {
                                  "description": "When the header format is a media type (image, video, gif, document), provide a public URL here.",
                                  "items": {
                                    "format": "uri",
                                    "type": "string"
                                  },
                                  "maxItems": 1,
                                  "minItems": 1,
                                  "type": "array"
                                },
                                "header_text": {
                                  "description": "Sample values for header text variables",
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "header_text_named_params": {
                                  "description": "Sample values for NAMED header variables (templates using {{customer_name}}-style tokens with parameter_format: NAMED).",
                                  "items": {
                                    "properties": {
                                      "example": {
                                        "description": "Sample value for this variable.",
                                        "type": "string"
                                      },
                                      "param_name": {
                                        "description": "Variable name as it appears in the text, without braces (e.g. customer_name for {{customer_name}}).",
                                        "pattern": "^[a-z0-9_]+$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "param_name",
                                      "example"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "format": {
                              "enum": [
                                "text",
                                "image",
                                "video",
                                "gif",
                                "document",
                                "location"
                              ],
                              "type": "string"
                            },
                            "text": {
                              "description": "Header text (may include {{1}} variable). Used when format is TEXT.",
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "header"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "format"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "add_security_recommendation": {
                              "description": "Add security recommendation text (authentication templates only)",
                              "type": "boolean"
                            },
                            "example": {
                              "properties": {
                                "body_text": {
                                  "description": "Sample values for body variables (array of arrays)",
                                  "items": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "type": "array"
                                },
                                "body_text_named_params": {
                                  "description": "Sample values for NAMED body variables (templates using {{customer_name}}-style tokens with parameter_format: NAMED).",
                                  "items": {
                                    "properties": {
                                      "example": {
                                        "description": "Sample value for this variable.",
                                        "type": "string"
                                      },
                                      "param_name": {
                                        "description": "Variable name as it appears in the text, without braces (e.g. customer_name for {{customer_name}}).",
                                        "pattern": "^[a-z0-9_]+$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "param_name",
                                      "example"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "text": {
                              "description": "Body text with optional {{n}} variables",
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "body"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "code_expiration_minutes": {
                              "description": "OTP code expiry in minutes (authentication templates only)",
                              "minimum": 1,
                              "type": "integer"
                            },
                            "text": {
                              "description": "Static footer text",
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "footer"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "buttons": {
                              "items": {
                                "properties": {
                                  "autofill_text": {
                                    "type": "string"
                                  },
                                  "example": {
                                    "description": "Example value(s). Accepts either a string or an array of strings. For URL buttons, an array of URL-suffix samples; for copy_code (marketing) buttons, the coupon code as a single string. Left untyped (string | string[]) on purpose: a typed oneOf of string-vs-array breaks several SDK code generators."
                                  },
                                  "flow_action": {
                                    "type": "string"
                                  },
                                  "flow_id": {
                                    "type": "string"
                                  },
                                  "flow_json": {
                                    "type": "string"
                                  },
                                  "flow_name": {
                                    "type": "string"
                                  },
                                  "navigate_screen": {
                                    "type": "string"
                                  },
                                  "otp_type": {
                                    "description": "Required when type is otp",
                                    "enum": [
                                      "copy_code",
                                      "one_tap",
                                      "zero_tap"
                                    ],
                                    "type": "string"
                                  },
                                  "package_name": {
                                    "type": "string"
                                  },
                                  "phone_number": {
                                    "description": "Required when type is phone_number",
                                    "type": "string"
                                  },
                                  "signature_hash": {
                                    "type": "string"
                                  },
                                  "text": {
                                    "description": "Visible button label. Required for all types except copy_code (whose label is fixed by WhatsApp) and otp (omit it and WhatsApp supplies its own label, localized to the template language; an English label on a non-English template is rejected).",
                                    "type": "string"
                                  },
                                  "type": {
                                    "enum": [
                                      "quick_reply",
                                      "url",
                                      "phone_number",
                                      "otp",
                                      "copy_code",
                                      "flow",
                                      "mpm",
                                      "catalog"
                                    ],
                                    "type": "string"
                                  },
                                  "url": {
                                    "description": "Required when type is URL",
                                    "format": "uri",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "type": "object"
                              },
                              "minItems": 1,
                              "type": "array"
                            },
                            "type": {
                              "enum": [
                                "buttons"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "buttons"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "cards": {
                              "description": "2-10 cards. Meta requires all cards to share the same component structure; a mismatch surfaces as a rejected_reason. MARKETING category only.",
                              "items": {
                                "properties": {
                                  "components": {
                                    "description": "Per-card components. Each card carries its own media header + optional body + up to 2 buttons. Footer and nested carousel are not allowed inside cards.",
                                    "items": {
                                      "oneOf": [
                                        {
                                          "properties": {
                                            "example": {
                                              "properties": {
                                                "header_handle": {
                                                  "description": "When the header format is a media type (image, video, gif, document), provide a public URL here.",
                                                  "items": {
                                                    "format": "uri",
                                                    "type": "string"
                                                  },
                                                  "maxItems": 1,
                                                  "minItems": 1,
                                                  "type": "array"
                                                },
                                                "header_text": {
                                                  "description": "Sample values for header text variables",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                },
                                                "header_text_named_params": {
                                                  "description": "Sample values for NAMED header variables (templates using {{customer_name}}-style tokens with parameter_format: NAMED).",
                                                  "items": {
                                                    "properties": {
                                                      "example": {
                                                        "description": "Sample value for this variable.",
                                                        "type": "string"
                                                      },
                                                      "param_name": {
                                                        "description": "Variable name as it appears in the text, without braces (e.g. customer_name for {{customer_name}}).",
                                                        "pattern": "^[a-z0-9_]+$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "param_name",
                                                      "example"
                                                    ],
                                                    "type": "object"
                                                  },
                                                  "type": "array"
                                                }
                                              },
                                              "type": "object"
                                            },
                                            "format": {
                                              "enum": [
                                                "text",
                                                "image",
                                                "video",
                                                "gif",
                                                "document",
                                                "location"
                                              ],
                                              "type": "string"
                                            },
                                            "text": {
                                              "description": "Header text (may include {{1}} variable). Used when format is TEXT.",
                                              "type": "string"
                                            },
                                            "type": {
                                              "enum": [
                                                "header"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "format"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "properties": {
                                            "add_security_recommendation": {
                                              "description": "Add security recommendation text (authentication templates only)",
                                              "type": "boolean"
                                            },
                                            "example": {
                                              "properties": {
                                                "body_text": {
                                                  "description": "Sample values for body variables (array of arrays)",
                                                  "items": {
                                                    "items": {
                                                      "type": "string"
                                                    },
                                                    "type": "array"
                                                  },
                                                  "type": "array"
                                                },
                                                "body_text_named_params": {
                                                  "description": "Sample values for NAMED body variables (templates using {{customer_name}}-style tokens with parameter_format: NAMED).",
                                                  "items": {
                                                    "properties": {
                                                      "example": {
                                                        "description": "Sample value for this variable.",
                                                        "type": "string"
                                                      },
                                                      "param_name": {
                                                        "description": "Variable name as it appears in the text, without braces (e.g. customer_name for {{customer_name}}).",
                                                        "pattern": "^[a-z0-9_]+$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "param_name",
                                                      "example"
                                                    ],
                                                    "type": "object"
                                                  },
                                                  "type": "array"
                                                }
                                              },
                                              "type": "object"
                                            },
                                            "text": {
                                              "description": "Body text with optional {{n}} variables",
                                              "type": "string"
                                            },
                                            "type": {
                                              "enum": [
                                                "body"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "text"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "properties": {
                                            "buttons": {
                                              "items": {
                                                "properties": {
                                                  "autofill_text": {
                                                    "type": "string"
                                                  },
                                                  "example": {
                                                    "description": "Example value(s). Accepts either a string or an array of strings. For URL buttons, an array of URL-suffix samples; for copy_code (marketing) buttons, the coupon code as a single string. Left untyped (string | string[]) on purpose: a typed oneOf of string-vs-array breaks several SDK code generators."
                                                  },
                                                  "flow_action": {
                                                    "type": "string"
                                                  },
                                                  "flow_id": {
                                                    "type": "string"
                                                  },
                                                  "flow_json": {
                                                    "type": "string"
                                                  },
                                                  "flow_name": {
                                                    "type": "string"
                                                  },
                                                  "navigate_screen": {
                                                    "type": "string"
                                                  },
                                                  "otp_type": {
                                                    "description": "Required when type is otp",
                                                    "enum": [
                                                      "copy_code",
                                                      "one_tap",
                                                      "zero_tap"
                                                    ],
                                                    "type": "string"
                                                  },
                                                  "package_name": {
                                                    "type": "string"
                                                  },
                                                  "phone_number": {
                                                    "description": "Required when type is phone_number",
                                                    "type": "string"
                                                  },
                                                  "signature_hash": {
                                                    "type": "string"
                                                  },
                                                  "text": {
                                                    "description": "Visible button label. Required for all types except copy_code (whose label is fixed by WhatsApp) and otp (omit it and WhatsApp supplies its own label, localized to the template language; an English label on a non-English template is rejected).",
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "enum": [
                                                      "quick_reply",
                                                      "url",
                                                      "phone_number",
                                                      "otp",
                                                      "copy_code",
                                                      "flow",
                                                      "mpm",
                                                      "catalog"
                                                    ],
                                                    "type": "string"
                                                  },
                                                  "url": {
                                                    "description": "Required when type is URL",
                                                    "format": "uri",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type"
                                                ],
                                                "type": "object"
                                              },
                                              "minItems": 1,
                                              "type": "array"
                                            },
                                            "type": {
                                              "enum": [
                                                "buttons"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "buttons"
                                          ],
                                          "type": "object"
                                        }
                                      ]
                                    },
                                    "minItems": 1,
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "components"
                                ],
                                "type": "object"
                              },
                              "maxItems": 10,
                              "minItems": 2,
                              "type": "array"
                            },
                            "type": {
                              "enum": [
                                "carousel"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "cards"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "limited_time_offer": {
                              "properties": {
                                "has_expiration": {
                                  "description": "Toggles the countdown timer. The actual coupon code + expiry are bound at SEND time, not here.",
                                  "type": "boolean"
                                },
                                "text": {
                                  "description": "Short offer label (<=16 chars). MARKETING only.",
                                  "maxLength": 16,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "text"
                              ],
                              "type": "object"
                            },
                            "type": {
                              "enum": [
                                "limited_time_offer"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "limited_time_offer"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "message_send_ttl_seconds": {
                    "description": "Delivery validity window in seconds: a message not delivered within it is dropped.\n\n**Range by category:**\n\n- AUTHENTICATION: 30 to 900. - UTILITY: 30 to 43200 (12h). - MARKETING: 43200 to 2592000 (30 days).\n\nThe value -1 is not accepted here (Meta treats it as an empty edit); send a value in range. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise.\n\nA TTL-only edit keeps an APPROVED template approved, with no re-review. If Meta later recategorises the template, it clears the TTL (read it back to check).",
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "template": {
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "language": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "status": {
                          "description": "Approval state read back from Meta after the update, normally PENDING. If the state cannot be read back, the last known status is returned instead.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Update template by id",
        "x-aisa-capabilities": {
          "capability": "messaging.update_whatsapp_template_by_id@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/patch_aisa_messaging_apis_v1_social_messaging_wha_443769",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "7331455e107f48cfcf700c64cae9c0893e53f83f02ac4d8e77fb7b91322197bb"
        },
        "x-aisa-runtime-operation": {
          "method": "PATCH",
          "operation_id": "patch_aisa_messaging_apis_v1_social_messaging_wha_443769",
          "path": "/apis/v1/social/messaging/whatsapp/templates/id/{templateId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/templates/{templateName}": {
      "delete": {
        "description": "WhatsApp. Permanently delete a message template.\n\n**Without `language` this deletes every language variant of the name** (Meta's own\ncontract for deletion by name). Pass `language` to delete one variant only; the response\n`scope` says which happened. Meta keeps a deleted approved template in `PENDING_DELETION`\nfor a while and the name cannot be reused for 30 days.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_wh_63f36d",
        "parameters": [
          {
            "description": "Template name (the family).",
            "in": "path",
            "name": "templateName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Delete only this language variant (e.g. es). Omit to delete the whole family.",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "language": {
                      "description": "The deleted variant; only when scope is language.",
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    },
                    "scope": {
                      "description": "Whether the whole family or one variant was deleted.",
                      "enum": [
                        "all_languages",
                        "language"
                      ],
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Delete template",
        "x-aisa-capabilities": {
          "capability": "messaging.delete_whatsapp_template@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_wh_63f36d",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "45454fab0d4794b02384eaa9a94e5f43fcf13c9365ecad4932a6634743f1cad2"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_wh_63f36d",
          "path": "/apis/v1/social/messaging/whatsapp/templates/{templateName}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "WhatsApp. Retrieve one message template variant by name.\n\nMeta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass `language` to address one variant.\n\n### How the variant is resolved\n\n- Without `language`, a name with a single variant resolves to that variant. - Without `language`, a name with several returns `409 ambiguous_template` with `details.languages`. - A bare language (`es`) matches a single regional variant (`es_ES`). If the family has several regional variants for it, that is also a 409.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_63f36d",
        "parameters": [
          {
            "description": "Template name (the family).",
            "in": "path",
            "name": "templateName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Language code of the variant (e.g. en_US, es, pt_BR). Required when the family has several languages.",
            "in": "query",
            "name": "language",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "template": {
                      "properties": {
                        "category": {
                          "type": "string"
                        },
                        "components": {
                          "items": {
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "id": {
                          "description": "Meta template id. Unique per language variant; usable on `/apis/v1/social/messaging/whatsapp/templates/id/{templateId}`.",
                          "type": "string"
                        },
                        "language": {
                          "description": "The variant actually returned.",
                          "type": "string"
                        },
                        "message_send_ttl_seconds": {
                          "description": "Only when a custom TTL is set; absent while the category default applies.",
                          "type": "integer"
                        },
                        "name": {
                          "type": "string"
                        },
                        "quality_score": {
                          "description": "Post-approval quality (GREEN/YELLOW/RED), when Meta reports one.",
                          "type": "object"
                        },
                        "rejected_reason": {
                          "description": "Only when status is REJECTED.",
                          "type": "string"
                        },
                        "status": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get template",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_template@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_63f36d",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "5734efc65701e0292d467a31852a75ba1670df498820bf5bb753fcb556689d58"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_63f36d",
          "path": "/apis/v1/social/messaging/whatsapp/templates/{templateName}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "patch": {
        "description": "WhatsApp. Update one variant's components and/or its message_send_ttl_seconds. Name, language and category cannot change after creation.\n\n### Choosing the variant\n\nMeta stores one template per **name + language**, so a name identifies a family of variants, each with its own Meta id. Pass `language` to address one variant.\n\n- Without `language`, a name with a single variant resolves to that variant. A name with several returns `409 ambiguous_template` with `details.languages`. - A bare language (`es`) matches a single regional variant (`es_ES`).\n\nA write: needs messaging:write and is audited.",
        "operationId": "patch_aisa_messaging_apis_v1_social_messaging_wha_63f36d",
        "parameters": [
          {
            "description": "Template name (the family).",
            "in": "path",
            "name": "templateName",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "components": [
                  {
                    "format": "text",
                    "type": "header"
                  }
                ],
                "language": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "components": {
                    "description": "Updated template components. Optional when only message_send_ttl_seconds changes; at least one of the two is required.",
                    "items": {
                      "oneOf": [
                        {
                          "properties": {
                            "example": {
                              "properties": {
                                "header_handle": {
                                  "description": "When the header format is a media type (image, video, gif, document), provide a public URL here.",
                                  "items": {
                                    "format": "uri",
                                    "type": "string"
                                  },
                                  "maxItems": 1,
                                  "minItems": 1,
                                  "type": "array"
                                },
                                "header_text": {
                                  "description": "Sample values for header text variables",
                                  "items": {
                                    "type": "string"
                                  },
                                  "type": "array"
                                },
                                "header_text_named_params": {
                                  "description": "Sample values for NAMED header variables (templates using {{customer_name}}-style tokens with parameter_format: NAMED).",
                                  "items": {
                                    "properties": {
                                      "example": {
                                        "description": "Sample value for this variable.",
                                        "type": "string"
                                      },
                                      "param_name": {
                                        "description": "Variable name as it appears in the text, without braces (e.g. customer_name for {{customer_name}}).",
                                        "pattern": "^[a-z0-9_]+$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "param_name",
                                      "example"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "format": {
                              "enum": [
                                "text",
                                "image",
                                "video",
                                "gif",
                                "document",
                                "location"
                              ],
                              "type": "string"
                            },
                            "text": {
                              "description": "Header text (may include {{1}} variable). Used when format is TEXT.",
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "header"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "format"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "add_security_recommendation": {
                              "description": "Add security recommendation text (authentication templates only)",
                              "type": "boolean"
                            },
                            "example": {
                              "properties": {
                                "body_text": {
                                  "description": "Sample values for body variables (array of arrays)",
                                  "items": {
                                    "items": {
                                      "type": "string"
                                    },
                                    "type": "array"
                                  },
                                  "type": "array"
                                },
                                "body_text_named_params": {
                                  "description": "Sample values for NAMED body variables (templates using {{customer_name}}-style tokens with parameter_format: NAMED).",
                                  "items": {
                                    "properties": {
                                      "example": {
                                        "description": "Sample value for this variable.",
                                        "type": "string"
                                      },
                                      "param_name": {
                                        "description": "Variable name as it appears in the text, without braces (e.g. customer_name for {{customer_name}}).",
                                        "pattern": "^[a-z0-9_]+$",
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "param_name",
                                      "example"
                                    ],
                                    "type": "object"
                                  },
                                  "type": "array"
                                }
                              },
                              "type": "object"
                            },
                            "text": {
                              "description": "Body text with optional {{n}} variables",
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "body"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "text"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "code_expiration_minutes": {
                              "description": "OTP code expiry in minutes (authentication templates only)",
                              "minimum": 1,
                              "type": "integer"
                            },
                            "text": {
                              "description": "Static footer text",
                              "type": "string"
                            },
                            "type": {
                              "enum": [
                                "footer"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "buttons": {
                              "items": {
                                "properties": {
                                  "autofill_text": {
                                    "type": "string"
                                  },
                                  "example": {
                                    "description": "Example value(s). Accepts either a string or an array of strings. For URL buttons, an array of URL-suffix samples; for copy_code (marketing) buttons, the coupon code as a single string. Left untyped (string | string[]) on purpose: a typed oneOf of string-vs-array breaks several SDK code generators."
                                  },
                                  "flow_action": {
                                    "type": "string"
                                  },
                                  "flow_id": {
                                    "type": "string"
                                  },
                                  "flow_json": {
                                    "type": "string"
                                  },
                                  "flow_name": {
                                    "type": "string"
                                  },
                                  "navigate_screen": {
                                    "type": "string"
                                  },
                                  "otp_type": {
                                    "description": "Required when type is otp",
                                    "enum": [
                                      "copy_code",
                                      "one_tap",
                                      "zero_tap"
                                    ],
                                    "type": "string"
                                  },
                                  "package_name": {
                                    "type": "string"
                                  },
                                  "phone_number": {
                                    "description": "Required when type is phone_number",
                                    "type": "string"
                                  },
                                  "signature_hash": {
                                    "type": "string"
                                  },
                                  "text": {
                                    "description": "Visible button label. Required for all types except copy_code (whose label is fixed by WhatsApp) and otp (omit it and WhatsApp supplies its own label, localized to the template language; an English label on a non-English template is rejected).",
                                    "type": "string"
                                  },
                                  "type": {
                                    "enum": [
                                      "quick_reply",
                                      "url",
                                      "phone_number",
                                      "otp",
                                      "copy_code",
                                      "flow",
                                      "mpm",
                                      "catalog"
                                    ],
                                    "type": "string"
                                  },
                                  "url": {
                                    "description": "Required when type is URL",
                                    "format": "uri",
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type"
                                ],
                                "type": "object"
                              },
                              "minItems": 1,
                              "type": "array"
                            },
                            "type": {
                              "enum": [
                                "buttons"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "buttons"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "cards": {
                              "description": "2-10 cards. Meta requires all cards to share the same component structure; a mismatch surfaces as a rejected_reason. MARKETING category only.",
                              "items": {
                                "properties": {
                                  "components": {
                                    "description": "Per-card components. Each card carries its own media header + optional body + up to 2 buttons. Footer and nested carousel are not allowed inside cards.",
                                    "items": {
                                      "oneOf": [
                                        {
                                          "properties": {
                                            "example": {
                                              "properties": {
                                                "header_handle": {
                                                  "description": "When the header format is a media type (image, video, gif, document), provide a public URL here.",
                                                  "items": {
                                                    "format": "uri",
                                                    "type": "string"
                                                  },
                                                  "maxItems": 1,
                                                  "minItems": 1,
                                                  "type": "array"
                                                },
                                                "header_text": {
                                                  "description": "Sample values for header text variables",
                                                  "items": {
                                                    "type": "string"
                                                  },
                                                  "type": "array"
                                                },
                                                "header_text_named_params": {
                                                  "description": "Sample values for NAMED header variables (templates using {{customer_name}}-style tokens with parameter_format: NAMED).",
                                                  "items": {
                                                    "properties": {
                                                      "example": {
                                                        "description": "Sample value for this variable.",
                                                        "type": "string"
                                                      },
                                                      "param_name": {
                                                        "description": "Variable name as it appears in the text, without braces (e.g. customer_name for {{customer_name}}).",
                                                        "pattern": "^[a-z0-9_]+$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "param_name",
                                                      "example"
                                                    ],
                                                    "type": "object"
                                                  },
                                                  "type": "array"
                                                }
                                              },
                                              "type": "object"
                                            },
                                            "format": {
                                              "enum": [
                                                "text",
                                                "image",
                                                "video",
                                                "gif",
                                                "document",
                                                "location"
                                              ],
                                              "type": "string"
                                            },
                                            "text": {
                                              "description": "Header text (may include {{1}} variable). Used when format is TEXT.",
                                              "type": "string"
                                            },
                                            "type": {
                                              "enum": [
                                                "header"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "format"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "properties": {
                                            "add_security_recommendation": {
                                              "description": "Add security recommendation text (authentication templates only)",
                                              "type": "boolean"
                                            },
                                            "example": {
                                              "properties": {
                                                "body_text": {
                                                  "description": "Sample values for body variables (array of arrays)",
                                                  "items": {
                                                    "items": {
                                                      "type": "string"
                                                    },
                                                    "type": "array"
                                                  },
                                                  "type": "array"
                                                },
                                                "body_text_named_params": {
                                                  "description": "Sample values for NAMED body variables (templates using {{customer_name}}-style tokens with parameter_format: NAMED).",
                                                  "items": {
                                                    "properties": {
                                                      "example": {
                                                        "description": "Sample value for this variable.",
                                                        "type": "string"
                                                      },
                                                      "param_name": {
                                                        "description": "Variable name as it appears in the text, without braces (e.g. customer_name for {{customer_name}}).",
                                                        "pattern": "^[a-z0-9_]+$",
                                                        "type": "string"
                                                      }
                                                    },
                                                    "required": [
                                                      "param_name",
                                                      "example"
                                                    ],
                                                    "type": "object"
                                                  },
                                                  "type": "array"
                                                }
                                              },
                                              "type": "object"
                                            },
                                            "text": {
                                              "description": "Body text with optional {{n}} variables",
                                              "type": "string"
                                            },
                                            "type": {
                                              "enum": [
                                                "body"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "text"
                                          ],
                                          "type": "object"
                                        },
                                        {
                                          "properties": {
                                            "buttons": {
                                              "items": {
                                                "properties": {
                                                  "autofill_text": {
                                                    "type": "string"
                                                  },
                                                  "example": {
                                                    "description": "Example value(s). Accepts either a string or an array of strings. For URL buttons, an array of URL-suffix samples; for copy_code (marketing) buttons, the coupon code as a single string. Left untyped (string | string[]) on purpose: a typed oneOf of string-vs-array breaks several SDK code generators."
                                                  },
                                                  "flow_action": {
                                                    "type": "string"
                                                  },
                                                  "flow_id": {
                                                    "type": "string"
                                                  },
                                                  "flow_json": {
                                                    "type": "string"
                                                  },
                                                  "flow_name": {
                                                    "type": "string"
                                                  },
                                                  "navigate_screen": {
                                                    "type": "string"
                                                  },
                                                  "otp_type": {
                                                    "description": "Required when type is otp",
                                                    "enum": [
                                                      "copy_code",
                                                      "one_tap",
                                                      "zero_tap"
                                                    ],
                                                    "type": "string"
                                                  },
                                                  "package_name": {
                                                    "type": "string"
                                                  },
                                                  "phone_number": {
                                                    "description": "Required when type is phone_number",
                                                    "type": "string"
                                                  },
                                                  "signature_hash": {
                                                    "type": "string"
                                                  },
                                                  "text": {
                                                    "description": "Visible button label. Required for all types except copy_code (whose label is fixed by WhatsApp) and otp (omit it and WhatsApp supplies its own label, localized to the template language; an English label on a non-English template is rejected).",
                                                    "type": "string"
                                                  },
                                                  "type": {
                                                    "enum": [
                                                      "quick_reply",
                                                      "url",
                                                      "phone_number",
                                                      "otp",
                                                      "copy_code",
                                                      "flow",
                                                      "mpm",
                                                      "catalog"
                                                    ],
                                                    "type": "string"
                                                  },
                                                  "url": {
                                                    "description": "Required when type is URL",
                                                    "format": "uri",
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type"
                                                ],
                                                "type": "object"
                                              },
                                              "minItems": 1,
                                              "type": "array"
                                            },
                                            "type": {
                                              "enum": [
                                                "buttons"
                                              ],
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "type",
                                            "buttons"
                                          ],
                                          "type": "object"
                                        }
                                      ]
                                    },
                                    "minItems": 1,
                                    "type": "array"
                                  }
                                },
                                "required": [
                                  "components"
                                ],
                                "type": "object"
                              },
                              "maxItems": 10,
                              "minItems": 2,
                              "type": "array"
                            },
                            "type": {
                              "enum": [
                                "carousel"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "cards"
                          ],
                          "type": "object"
                        },
                        {
                          "properties": {
                            "limited_time_offer": {
                              "properties": {
                                "has_expiration": {
                                  "description": "Toggles the countdown timer. The actual coupon code + expiry are bound at SEND time, not here.",
                                  "type": "boolean"
                                },
                                "text": {
                                  "description": "Short offer label (<=16 chars). MARKETING only.",
                                  "maxLength": 16,
                                  "minLength": 1,
                                  "type": "string"
                                }
                              },
                              "required": [
                                "text"
                              ],
                              "type": "object"
                            },
                            "type": {
                              "enum": [
                                "limited_time_offer"
                              ],
                              "type": "string"
                            }
                          },
                          "required": [
                            "type",
                            "limited_time_offer"
                          ],
                          "type": "object"
                        }
                      ]
                    },
                    "minItems": 1,
                    "type": "array"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "language": {
                    "description": "Language code of the variant to edit (e.g. en_US, es, pt_BR). Required when the family has several languages. Body only: a language query parameter on PATCH is a 400.",
                    "type": "string"
                  },
                  "message_send_ttl_seconds": {
                    "description": "Delivery validity window in seconds: a message not delivered within it is dropped. Range by category:\n\n- AUTHENTICATION: 30 to 900. - UTILITY: 30 to 43200 (12h). - MARKETING: 43200 to 2592000 (30 days).\n\n-1 is not accepted here (Meta treats it as an empty edit); send a value in range. Meta defaults to 600 for AUTHENTICATION and 30 days otherwise.\n\nA TTL-only edit keeps an APPROVED template approved, no re-review. If Meta later recategorises the template, it clears the TTL (read it back to check).",
                    "type": "integer"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "template": {
                      "properties": {
                        "id": {
                          "description": "Meta id of the edited variant.",
                          "type": "string"
                        },
                        "language": {
                          "description": "The variant that was edited.",
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "status": {
                          "description": "Approval state read back from Meta after the update, normally PENDING. If the state cannot be read back, the last known status is returned instead.",
                          "type": "string"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Update template",
        "x-aisa-capabilities": {
          "capability": "messaging.update_whatsapp_template@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/patch_aisa_messaging_apis_v1_social_messaging_wha_63f36d",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "f6a11c68f7f8077231c6fecd320911a1006c1811832e8a8498393eaf1ed03153"
        },
        "x-aisa-runtime-operation": {
          "method": "PATCH",
          "operation_id": "patch_aisa_messaging_apis_v1_social_messaging_wha_63f36d",
          "path": "/apis/v1/social/messaging/whatsapp/templates/{templateName}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/verify-code": {
      "post": {
        "description": "WhatsApp. Submits the OTP Meta sent in response to `POST /apis/v1/social/messaging/whatsapp/request-code`. This only verifies the number with Meta; it does not register it on the Cloud API. Call `POST /apis/v1/social/messaging/whatsapp/register` afterward to complete activation.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_ac046a",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "code": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "code": {
                    "description": "The 6-digit code Meta sent to the phone. Non-digit separators (e.g. \"749-456\") are stripped automatically.",
                    "type": "string"
                  },
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  }
                },
                "required": [
                  "code"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "connectionId": {
                      "description": "One of your connections, or null when it is not one of yours.",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "phoneNumberId": {
                      "type": "string"
                    },
                    "verified": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Verify the Meta re-verification code for a BYO WhatsApp number",
        "x-aisa-capabilities": {
          "capability": "messaging.verify_whatsapp_number@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_ac046a",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "1583cc787e12e7273cc576122cb7216ea6988a57381a02c30b52d7342141c278"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_ac046a",
          "path": "/apis/v1/social/messaging/whatsapp/verify-code"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/wa-groups": {
      "get": {
        "description": "WhatsApp. List active WhatsApp group chats for a business phone number. These are actual WhatsApp group conversations on the platform.\n\nNot available on [Coexistence](/platforms/whatsapp/connect#whatsapp-business-app-coexistence) numbers. Requires a Cloud API-only number.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_174d92",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          },
          {
            "description": "Max groups to return",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "default": 25,
              "maximum": 1024,
              "type": "integer"
            }
          },
          {
            "description": "Pagination cursor",
            "in": "query",
            "name": "after",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "groups": {
                      "items": {
                        "properties": {
                          "createdAt": {
                            "description": "Group creation timestamp",
                            "type": "string"
                          },
                          "id": {
                            "description": "Group ID",
                            "type": "string"
                          },
                          "subject": {
                            "description": "Group name",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "paging": {
                      "properties": {
                        "cursors": {
                          "properties": {
                            "after": {
                              "type": "string"
                            },
                            "before": {
                              "type": "string"
                            }
                          },
                          "type": "object"
                        }
                      },
                      "type": "object"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List active groups",
        "x-aisa-capabilities": {
          "capability": "messaging.list_whatsapp_group_chats@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_174d92",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "2a79c92e2b58bf34860b255ced977c59412f1d1421f1042f1b05c1daaa6f109b"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_174d92",
          "path": "/apis/v1/social/messaging/whatsapp/wa-groups"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp. Create a new WhatsApp group chat. Returns the group ID and optionally an invite link.\n\nNot available on [Coexistence](/platforms/whatsapp/connect#whatsapp-business-app-coexistence) numbers. Requires a Cloud API-only number.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_174d92",
        "parameters": [
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "subject": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "description": {
                    "description": "Group description (max 2048 characters)",
                    "maxLength": 2048,
                    "type": "string"
                  },
                  "joinApprovalMode": {
                    "description": "Whether users need approval to join via invite link",
                    "enum": [
                      "approval_required",
                      "auto_approve"
                    ],
                    "type": "string"
                  },
                  "subject": {
                    "description": "Group name (max 128 characters)",
                    "maxLength": 128,
                    "type": "string"
                  }
                },
                "required": [
                  "subject"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "group": {
                      "properties": {
                        "groupId": {
                          "type": "string"
                        },
                        "inviteLink": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Create group",
        "x-aisa-capabilities": {
          "capability": "messaging.create_whatsapp_group_chat@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_174d92",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "0c5888a87476ca0bf596a9c6281e9353daf332ef28ef57d63656ba378cfcaf00"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_174d92",
          "path": "/apis/v1/social/messaging/whatsapp/wa-groups"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/wa-groups/{groupId}": {
      "delete": {
        "description": "WhatsApp. Delete a WhatsApp group and remove all participants.\n\nNot available on [Coexistence](/platforms/whatsapp/connect#whatsapp-business-app-coexistence) numbers. Requires a Cloud API-only number.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_wh_648749",
        "parameters": [
          {
            "description": "Group ID",
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Delete group",
        "x-aisa-capabilities": {
          "capability": "messaging.delete_whatsapp_group_chat@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_wh_648749",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "2e38afd31f38261b1acbc141937f1d7290a358e717d9b25e2e6ca0a61c073aa6"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_wh_648749",
          "path": "/apis/v1/social/messaging/whatsapp/wa-groups/{groupId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "WhatsApp. Retrieve metadata about a WhatsApp group including subject, description,\nparticipants, and settings.\n\nNot available on [Coexistence](/platforms/whatsapp/connect#whatsapp-business-app-coexistence) numbers. Requires a Cloud API-only number.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_648749",
        "parameters": [
          {
            "description": "Group ID",
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "group": {
                      "properties": {
                        "createdAt": {
                          "description": "UNIX timestamp",
                          "type": "integer"
                        },
                        "description": {
                          "type": "string"
                        },
                        "id": {
                          "type": "string"
                        },
                        "isSuspended": {
                          "type": "boolean"
                        },
                        "joinApprovalMode": {
                          "type": "string"
                        },
                        "participantCount": {
                          "type": "integer"
                        },
                        "participants": {
                          "items": {
                            "properties": {
                              "admin": {
                                "type": "string"
                              },
                              "user": {
                                "description": "电话号码",
                                "type": "string"
                              }
                            },
                            "type": "object"
                          },
                          "type": "array"
                        },
                        "subject": {
                          "type": "string"
                        }
                      },
                      "type": "object"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Get group info",
        "x-aisa-capabilities": {
          "capability": "messaging.get_whatsapp_group_chat@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_648749",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "76b06f02655155672e8809534180a4cced1e65b942912d6277806d83bb7ea00e"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_648749",
          "path": "/apis/v1/social/messaging/whatsapp/wa-groups/{groupId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp. Update the subject, description, or join approval mode of a WhatsApp group.\n\nNot available on [Coexistence](/platforms/whatsapp/connect#whatsapp-business-app-coexistence) numbers. Requires a Cloud API-only number.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_648749",
        "parameters": [
          {
            "description": "Group ID",
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "description": "example",
                "subject": "example"
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "description": {
                    "maxLength": 2048,
                    "type": "string"
                  },
                  "joinApprovalMode": {
                    "enum": [
                      "approval_required",
                      "auto_approve"
                    ],
                    "type": "string"
                  },
                  "subject": {
                    "maxLength": 128,
                    "type": "string"
                  }
                },
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Update group settings",
        "x-aisa-capabilities": {
          "capability": "messaging.update_whatsapp_group_chat@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_648749",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "e189768767e8f657fa573f959317093d55589ef0b7355b244582856c8c38f3f0"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_648749",
          "path": "/apis/v1/social/messaging/whatsapp/wa-groups/{groupId}"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/wa-groups/{groupId}/invite-link": {
      "post": {
        "description": "WhatsApp. Create a new invite link for a WhatsApp group. The previous link is revoked.\n\nNot available on [Coexistence](/platforms/whatsapp/connect#whatsapp-business-app-coexistence) numbers. Requires a Cloud API-only number.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_bae7bd",
        "parameters": [
          {
            "description": "Group ID",
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "inviteLink": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Create invite link",
        "x-aisa-capabilities": {
          "capability": "messaging.create_whatsapp_group_invite_link@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_bae7bd",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "b61c04fb5ca293e2738406b9b591f2c5c3f70cdee7ed42879ed7c73626df3417"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_bae7bd",
          "path": "/apis/v1/social/messaging/whatsapp/wa-groups/{groupId}/invite-link"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/wa-groups/{groupId}/join-requests": {
      "delete": {
        "description": "WhatsApp. Reject pending join requests for a WhatsApp group.\n\nNot available on [Coexistence](/platforms/whatsapp/connect#whatsapp-business-app-coexistence) numbers. Requires a Cloud API-only number.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_wh_23f412",
        "parameters": [
          {
            "description": "Group ID",
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "phoneNumbers": [
                  "example"
                ]
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "phoneNumbers": {
                    "description": "Phone numbers to reject",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "phoneNumbers"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Reject join requests",
        "x-aisa-capabilities": {
          "capability": "messaging.reject_whatsapp_group_join_requests@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_wh_23f412",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "f7992764665351aefaef30cada225064a6ccbf30995c7ac66876ce9969d91cd6"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_wh_23f412",
          "path": "/apis/v1/social/messaging/whatsapp/wa-groups/{groupId}/join-requests"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "get": {
        "description": "WhatsApp. List pending join requests for a WhatsApp group (only for groups with approval_required mode).\n\nNot available on [Coexistence](/platforms/whatsapp/connect#whatsapp-business-app-coexistence) numbers. Requires a Cloud API-only number.",
        "operationId": "get_aisa_messaging_apis_v1_social_messaging_whats_23f412",
        "parameters": [
          {
            "description": "Group ID",
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "joinRequests": {
                      "items": {
                        "properties": {
                          "timestamp": {
                            "description": "UNIX timestamp of request",
                            "type": "integer"
                          },
                          "user": {
                            "description": "电话号码",
                            "type": "string"
                          }
                        },
                        "type": "object"
                      },
                      "type": "array"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "List join requests",
        "x-aisa-capabilities": {
          "capability": "messaging.list_whatsapp_group_join_requests@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:read"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/get_aisa_messaging_apis_v1_social_messaging_whats_23f412",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "aa65009fcf42f6645d39e005b7d16d48adf35591cc30a89b74c0865f5d990044"
        },
        "x-aisa-runtime-operation": {
          "method": "GET",
          "operation_id": "get_aisa_messaging_apis_v1_social_messaging_whats_23f412",
          "path": "/apis/v1/social/messaging/whatsapp/wa-groups/{groupId}/join-requests"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp. Approve pending join requests for a WhatsApp group.\n\nNot available on [Coexistence](/platforms/whatsapp/connect#whatsapp-business-app-coexistence) numbers. Requires a Cloud API-only number.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_23f412",
        "parameters": [
          {
            "description": "Group ID",
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "phoneNumbers": [
                  "example"
                ]
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "phoneNumbers": {
                    "description": "Phone numbers to approve",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "phoneNumbers"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Approve join requests",
        "x-aisa-capabilities": {
          "capability": "messaging.approve_whatsapp_group_join_requests@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_23f412",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "097aec94349afa66239080e8b5444ae072f742ca3b99cfb3d06e7f5d7c381856"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_23f412",
          "path": "/apis/v1/social/messaging/whatsapp/wa-groups/{groupId}/join-requests"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    },
    "/apis/v1/social/messaging/whatsapp/wa-groups/{groupId}/participants": {
      "delete": {
        "description": "WhatsApp. Remove participants from a WhatsApp group.\n\nNot available on [Coexistence](/platforms/whatsapp/connect#whatsapp-business-app-coexistence) numbers. Requires a Cloud API-only number.\n\nA write: needs messaging:write and is audited.",
        "operationId": "delete_aisa_messaging_apis_v1_social_messaging_wh_ae55b5",
        "parameters": [
          {
            "description": "Group ID",
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "phoneNumbers": [
                  "example"
                ]
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "phoneNumbers": {
                    "description": "Phone numbers to remove",
                    "items": {
                      "type": "string"
                    },
                    "type": "array"
                  }
                },
                "required": [
                  "phoneNumbers"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Remove participants",
        "x-aisa-capabilities": {
          "capability": "messaging.remove_whatsapp_group_participants@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/delete_aisa_messaging_apis_v1_social_messaging_wh_ae55b5",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "2ff732606ba8aef2df09418bfba8faf4422e2a955ffc8582d4cae76774fb89be"
        },
        "x-aisa-runtime-operation": {
          "method": "DELETE",
          "operation_id": "delete_aisa_messaging_apis_v1_social_messaging_wh_ae55b5",
          "path": "/apis/v1/social/messaging/whatsapp/wa-groups/{groupId}/participants"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      },
      "post": {
        "description": "WhatsApp. Add participants to a WhatsApp group. Maximum 8 participants per request. A group holds at most 8 participants in total (a Meta limit), so later requests cannot grow a group past 8. Meta documents groups as invite-only, so people normally join through the group's invite link.\n\nNot available on [Coexistence](/platforms/whatsapp/connect#whatsapp-business-app-coexistence) numbers. Requires a Cloud API-only number.\n\nA write: needs messaging:write and is audited.",
        "operationId": "post_aisa_messaging_apis_v1_social_messaging_what_ae55b5",
        "parameters": [
          {
            "description": "Group ID",
            "in": "path",
            "name": "groupId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Your messaging connection (msc_...), from GET /apis/v1/social/messaging/connections. On a request with a JSON body it may be sent as a top-level body member instead.",
            "in": "query",
            "name": "connectionId",
            "required": true,
            "schema": {
              "pattern": "^msc_[0-9A-Za-z]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "example": {
                "phoneNumbers": [
                  "example"
                ]
              },
              "schema": {
                "additionalProperties": false,
                "properties": {
                  "connectionId": {
                    "description": "The connection, when not sent as the connectionId query parameter.",
                    "pattern": "^msc_[0-9A-Za-z]+$",
                    "type": "string"
                  },
                  "phoneNumbers": {
                    "description": "Phone numbers in E.164 format (max 8)",
                    "items": {
                      "type": "string"
                    },
                    "maxItems": 8,
                    "type": "array"
                  }
                },
                "required": [
                  "phoneNumbers"
                ],
                "type": "object"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "success": {
                      "type": "boolean"
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Success"
          },
          "default": {
            "content": {
              "application/json": {
                "schema": {
                  "properties": {
                    "error": {
                      "properties": {
                        "code": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "details": {
                          "additionalProperties": {},
                          "type": [
                            "object",
                            "null"
                          ]
                        },
                        "message": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "param": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryHint": {
                          "type": [
                            "string",
                            "null"
                          ]
                        },
                        "retryable": {
                          "type": [
                            "boolean",
                            "null"
                          ]
                        },
                        "type": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "type": [
                        "object",
                        "null"
                      ]
                    }
                  },
                  "type": "object"
                }
              }
            },
            "description": "Error. The code field is stable; see the error catalog."
          }
        },
        "summary": "Add participants",
        "x-aisa-capabilities": {
          "capability": "messaging.add_whatsapp_group_participants@1",
          "idempotency": "Idempotency-Key",
          "max_price": "X-AISA-Max-Price-USD",
          "quote": {
            "reason": "not_quoted",
            "supported": false
          },
          "required_scope": "messaging:write"
        },
        "x-aisa-catalog-id": "aisa-messaging",
        "x-aisa-contract-source": "handler",
        "x-aisa-docs-url": "https://aisa.one/docs/api-reference/aisa-messaging/post_aisa_messaging_apis_v1_social_messaging_what_ae55b5",
        "x-aisa-identity-source": "derived",
        "x-aisa-pricing": {
          "description": "This operation is free.",
          "kind": "no_customer_charge"
        },
        "x-aisa-revision": {
          "handler_contract_hash": "15ee5b54a5ebd873c0cbe6b6da1dc4333e75829225d5aa76852d9904dde01c2d"
        },
        "x-aisa-runtime-operation": {
          "method": "POST",
          "operation_id": "post_aisa_messaging_apis_v1_social_messaging_what_ae55b5",
          "path": "/apis/v1/social/messaging/whatsapp/wa-groups/{groupId}/participants"
        },
        "x-aisa-status": "enabled",
        "x-aisa-validation": "runtime"
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "servers": [
    {
      "url": "https://api.aisa.one"
    }
  ]
}
