{
  "openapi": "3.0.3",
  "info": {
    "title": "Auto Appy WhatsApp API",
    "version": "2026-09-22.2",
    "description": "Auto Appy native application API reference, independent of workflow actions. Use the coverage report and exclusions to audit available endpoints. Third-party adapter endpoints are internal-only. Authentication and resource permissions still apply; see each operation for its authentication contract."
  },
  "servers": [
    {
      "url": "https://whatsappapi.autoappy.com"
    }
  ],
  "security": [
    {
      "ApiKeyBearer": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "Auto Appy application API key"
      },
      "UserBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "OAuth access token",
        "description": "Signed-in Auto Appy actor with platform scope and access to the requested products and records. Connector credentials are not accepted."
      }
    }
  },
  "paths": {
    "/api/bots/turn-result": {
      "post": {
        "summary": "Create bot turn result",
        "operationId": "POST_api_bots_turn_result",
        "tags": [
          "Bot turn result"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\BotTurnResultController@store",
        "x-auth-middleware": [
          "api"
        ],
        "description": "Store for bot turn result. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {
                    "type": "string",
                    "description": "Body. Optional. "
                  }
                }
              }
            }
          }
        }
      }
    },
    "/me": {
      "get": {
        "summary": "Me user",
        "operationId": "GET_me",
        "tags": [
          "User"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\UserController@me",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Me for user. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/api/auth/me": {
      "get": {
        "summary": "Resolve selected organisation",
        "description": "",
        "operationId": "whatsapp_get_me",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "data",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "format": "email",
              "description": "Data. Optional. "
            },
            "description": "Data. Optional. "
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response; inspect resource/business state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "current_workspace": {
                          "type": "object",
                          "properties": {
                            "id": {
                              "type": "string",
                              "format": "uuid"
                            }
                          }
                        },
                        "local_workspace_id": {
                          "type": "string",
                          "format": "uuid"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Connection"
        ],
        "x-controller": "App\\Http\\Controllers\\AutoAppyAuthController@me",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "autoappy.session:force"
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/organisation-connections": {
      "get": {
        "summary": "List organisation connection",
        "operationId": "GET_organisation_connections",
        "tags": [
          "Organisation connection"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\OrganisationConnectionController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform"
        ],
        "description": "Index for organisation connection. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/me/settings": {
      "get": {
        "summary": "Get user setting",
        "operationId": "GET_me_settings",
        "tags": [
          "User setting"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\UserSettingController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform"
        ],
        "description": "Show for user setting. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Update user setting",
        "operationId": "PUT_me_settings",
        "tags": [
          "User setting"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\UserSettingController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform"
        ],
        "description": "Update for user setting. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "active_workspace_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Active workspace id. Optional. Limits: max:64."
                  },
                  "active_whatsapp_account_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Active whatsapp account id. Optional. Limits: max:64."
                  },
                  "active_phone_number_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Active phone number id. Optional. Limits: max:64."
                  },
                  "preferences": {
                    "type": "string",
                    "nullable": true,
                    "description": "Preferences. Optional. "
                  },
                  "use_as_workspace_default": {
                    "type": "string",
                    "description": "Use as workspace default. Optional. "
                  }
                }
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      },
      "patch": {
        "summary": "Update user setting",
        "operationId": "PATCH_me_settings",
        "tags": [
          "User setting"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\UserSettingController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform"
        ],
        "description": "Update for user setting. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "active_workspace_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Active workspace id. Optional. Limits: max:64."
                  },
                  "active_whatsapp_account_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Active whatsapp account id. Optional. Limits: max:64."
                  },
                  "active_phone_number_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Active phone number id. Optional. Limits: max:64."
                  },
                  "preferences": {
                    "type": "string",
                    "nullable": true,
                    "description": "Preferences. Optional. "
                  },
                  "use_as_workspace_default": {
                    "type": "string",
                    "description": "Use as workspace default. Optional. "
                  }
                }
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/users": {
      "get": {
        "summary": "List user",
        "operationId": "GET_users",
        "tags": [
          "User"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\UserController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Index for user. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create user",
        "operationId": "POST_users",
        "tags": [
          "User"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\UserController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Store for user. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:255."
                  },
                  "username": {
                    "type": "string",
                    "description": "Username. Required. Limits: max:255."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Email. Required. Limits: max:255."
                  },
                  "password": {
                    "type": "string",
                    "description": "Password. Required. Limits: min:8."
                  }
                },
                "required": [
                  "name",
                  "username",
                  "email",
                  "password"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/users/{user}": {
      "get": {
        "summary": "Get user",
        "operationId": "GET_users__user_",
        "tags": [
          "User"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\UserController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Show for user. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "user",
            "in": "path",
            "required": true,
            "description": "User identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Update user",
        "operationId": "PUT_users__user_",
        "tags": [
          "User"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\UserController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Update for user. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "user",
            "in": "path",
            "required": true,
            "description": "User identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:255."
                  },
                  "username": {
                    "type": "string",
                    "description": "Username. Required. Limits: max:255."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "description": "Email. Required. Limits: max:255."
                  },
                  "password": {
                    "type": "string",
                    "nullable": true,
                    "description": "Password. Optional. Limits: min:8."
                  }
                },
                "required": [
                  "name",
                  "username",
                  "email"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      },
      "delete": {
        "summary": "Delete user",
        "operationId": "DELETE_users__user_",
        "tags": [
          "User"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\UserController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Destroy for user. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "user",
            "in": "path",
            "required": true,
            "description": "User identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces": {
      "get": {
        "summary": "List workspace",
        "operationId": "GET_workspaces",
        "tags": [
          "Workspace"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess",
          "AutoAppy\\Platform\\CentralManagementOnly"
        ],
        "description": "Index for workspace. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}": {
      "get": {
        "summary": "Get workspace",
        "operationId": "GET_workspaces__workspace_",
        "tags": [
          "Workspace"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess",
          "AutoAppy\\Platform\\CentralManagementOnly"
        ],
        "description": "Show for workspace. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/users": {
      "get": {
        "summary": "List workspace user",
        "operationId": "GET_workspaces__workspace__users",
        "tags": [
          "Workspace user"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceUserController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Index for workspace user. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/users/{workspaceUser}": {
      "get": {
        "summary": "Get workspace user",
        "operationId": "GET_workspaces__workspace__users__workspaceUser_",
        "tags": [
          "Workspace user"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceUserController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Show for workspace user. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspaceUser",
            "in": "path",
            "required": true,
            "description": "Workspace user identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts": {
      "get": {
        "summary": "List WhatsApp accounts",
        "description": "\n\nLookup `account_id`: read `data[].id` as the value and `data[].business_name` as the label. Use identifiers only within their authorised workspace.",
        "operationId": "whatsapp_get_workspaces_workspace_whatsapp_accounts",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Local resource identifier; see README."
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response; inspect resource/business state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    }
                  }
                },
                "examples": {
                  "account_id": {
                    "summary": "Lookup fields for account_id",
                    "description": "Synthetic example showing the relevant identifier and label fields. Other response fields are omitted.",
                    "value": {
                      "data": [
                        {
                          "id": "example-account_id",
                          "business_name": "Example account id"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Accounts & templates"
        ],
        "x-controller": "App\\Http\\Controllers\\WorkspaceWhatsappAccountController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess",
          "App\\Http\\Middleware\\ManageWhatsappConnection"
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create workspace whatsapp account",
        "operationId": "POST_workspaces__workspace__whatsapp_accounts",
        "tags": [
          "Workspace whatsapp account"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceWhatsappAccountController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess",
          "App\\Http\\Middleware\\ManageWhatsappConnection"
        ],
        "description": "Store for workspace whatsapp account. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "business_name": {
                    "type": "string",
                    "description": "Business name. Required. Limits: max:255."
                  },
                  "business_id": {
                    "type": "string",
                    "description": "Business id. Required. Limits: max:255."
                  },
                  "waba_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Waba id. Optional. Limits: max:255."
                  },
                  "access_token": {
                    "type": "string",
                    "description": "Access token. Required. "
                  },
                  "app_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "App id. Optional. Limits: max:255."
                  },
                  "app_secret": {
                    "type": "string",
                    "description": "App secret. Required. "
                  },
                  "webhook_verify_token": {
                    "type": "string",
                    "description": "Webhook verify token. Required. Limits: max:255."
                  }
                },
                "required": [
                  "business_name",
                  "business_id",
                  "access_token",
                  "app_secret",
                  "webhook_verify_token"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsapp_account}": {
      "get": {
        "summary": "Get workspace whatsapp account",
        "operationId": "GET_workspaces__workspace__whatsapp_accounts__whatsapp_account_",
        "tags": [
          "Workspace whatsapp account"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceWhatsappAccountController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess",
          "App\\Http\\Middleware\\ManageWhatsappConnection"
        ],
        "description": "Show for workspace whatsapp account. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsapp_account",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Update workspace whatsapp account",
        "operationId": "PUT_workspaces__workspace__whatsapp_accounts__whatsapp_account_",
        "tags": [
          "Workspace whatsapp account"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceWhatsappAccountController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess",
          "App\\Http\\Middleware\\ManageWhatsappConnection"
        ],
        "description": "Update for workspace whatsapp account. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsapp_account",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "business_name": {
                    "type": "string",
                    "description": "Business name. Optional. Limits: max:255."
                  },
                  "business_id": {
                    "type": "string",
                    "description": "Business id. Optional. Limits: max:255."
                  },
                  "waba_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Waba id. Optional. Limits: max:255."
                  },
                  "access_token": {
                    "type": "string",
                    "description": "Access token. Optional. "
                  },
                  "app_id": {
                    "type": "string",
                    "description": "App id. Optional. Limits: max:255."
                  },
                  "app_secret": {
                    "type": "string",
                    "description": "App secret. Optional. "
                  },
                  "webhook_verify_token": {
                    "type": "string",
                    "description": "Webhook verify token. Optional. Limits: max:255."
                  },
                  "status": {
                    "type": "string",
                    "description": "Status. Optional. "
                  }
                }
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      },
      "patch": {
        "summary": "Update workspace whatsapp account",
        "operationId": "PATCH_workspaces__workspace__whatsapp_accounts__whatsapp_account_",
        "tags": [
          "Workspace whatsapp account"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceWhatsappAccountController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess",
          "App\\Http\\Middleware\\ManageWhatsappConnection"
        ],
        "description": "Update for workspace whatsapp account. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsapp_account",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "business_name": {
                    "type": "string",
                    "description": "Business name. Optional. Limits: max:255."
                  },
                  "business_id": {
                    "type": "string",
                    "description": "Business id. Optional. Limits: max:255."
                  },
                  "waba_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Waba id. Optional. Limits: max:255."
                  },
                  "access_token": {
                    "type": "string",
                    "description": "Access token. Optional. "
                  },
                  "app_id": {
                    "type": "string",
                    "description": "App id. Optional. Limits: max:255."
                  },
                  "app_secret": {
                    "type": "string",
                    "description": "App secret. Optional. "
                  },
                  "webhook_verify_token": {
                    "type": "string",
                    "description": "Webhook verify token. Optional. Limits: max:255."
                  },
                  "status": {
                    "type": "string",
                    "description": "Status. Optional. "
                  }
                }
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      },
      "delete": {
        "summary": "Delete workspace whatsapp account",
        "operationId": "DELETE_workspaces__workspace__whatsapp_accounts__whatsapp_account_",
        "tags": [
          "Workspace whatsapp account"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceWhatsappAccountController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess",
          "App\\Http\\Middleware\\ManageWhatsappConnection"
        ],
        "description": "Destroy for workspace whatsapp account. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsapp_account",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/tags": {
      "get": {
        "summary": "List whatsapp tag",
        "operationId": "GET_workspaces__workspace__tags",
        "tags": [
          "Whatsapp tag"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappTagController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Index for whatsapp tag. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create whatsapp tag",
        "operationId": "POST_workspaces__workspace__tags",
        "tags": [
          "Whatsapp tag"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappTagController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Store for whatsapp tag. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:60."
                  },
                  "color": {
                    "type": "string",
                    "description": "Color. Optional. "
                  },
                  "icon": {
                    "type": "string",
                    "description": "Icon. Optional. Limits: max:40."
                  },
                  "description": {
                    "type": "string",
                    "description": "Description. Optional. Limits: max:255."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/tags/{tag}": {
      "put": {
        "summary": "Update whatsapp tag",
        "operationId": "PUT_workspaces__workspace__tags__tag_",
        "tags": [
          "Whatsapp tag"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappTagController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Update for whatsapp tag. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "description": "Tag identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:60."
                  },
                  "color": {
                    "type": "string",
                    "nullable": true,
                    "description": "Color. Optional. "
                  },
                  "icon": {
                    "type": "string",
                    "nullable": true,
                    "description": "Icon. Optional. Limits: max:40."
                  },
                  "description": {
                    "type": "string",
                    "nullable": true,
                    "description": "Description. Optional. Limits: max:255."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      },
      "patch": {
        "summary": "Update whatsapp tag",
        "operationId": "PATCH_workspaces__workspace__tags__tag_",
        "tags": [
          "Whatsapp tag"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappTagController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Update for whatsapp tag. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "description": "Tag identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:60."
                  },
                  "color": {
                    "type": "string",
                    "nullable": true,
                    "description": "Color. Optional. "
                  },
                  "icon": {
                    "type": "string",
                    "nullable": true,
                    "description": "Icon. Optional. Limits: max:40."
                  },
                  "description": {
                    "type": "string",
                    "nullable": true,
                    "description": "Description. Optional. Limits: max:255."
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      },
      "delete": {
        "summary": "Delete whatsapp tag",
        "operationId": "DELETE_workspaces__workspace__tags__tag_",
        "tags": [
          "Whatsapp tag"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappTagController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Destroy for whatsapp tag. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "path",
            "required": true,
            "description": "Tag identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsappAccount}/phone-numbers": {
      "get": {
        "summary": "List phone numbers",
        "description": "\n\nLookup `phone_number_id`: read `data[].id` as the value and `data[].phone_number` as the label. Use identifiers only within their authorised workspace.",
        "operationId": "whatsapp_get_workspaces_workspace_whatsapp_accounts_whatsappAccount_phone_numbers",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Local resource identifier; see README."
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Local resource identifier; see README."
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response; inspect resource/business state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    }
                  }
                },
                "examples": {
                  "phone_number_id": {
                    "summary": "Lookup fields for phone_number_id",
                    "description": "Synthetic example showing the relevant identifier and label fields. Other response fields are omitted.",
                    "value": {
                      "data": [
                        {
                          "id": "example-phone_number_id",
                          "phone_number": "Example phone number id"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Accounts & templates"
        ],
        "x-controller": "App\\Http\\Controllers\\WorkspaceWhatsappPhoneNumberController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess",
          "App\\Http\\Middleware\\ManageWhatsappConnection"
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create workspace whatsapp phone number",
        "operationId": "POST_workspaces__workspace__whatsapp_accounts__whatsappAccount__phone_numbers",
        "tags": [
          "Workspace whatsapp phone number"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceWhatsappPhoneNumberController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess",
          "App\\Http\\Middleware\\ManageWhatsappConnection"
        ],
        "description": "Store for workspace whatsapp phone number. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "display_name": {
                    "type": "string",
                    "description": "Display name. Required. Limits: max:150."
                  },
                  "verified_name": {
                    "type": "string",
                    "nullable": true,
                    "description": "Verified name. Optional. Limits: max:150."
                  },
                  "phone_number": {
                    "type": "string",
                    "description": "Phone number. Required. Limits: max:30."
                  },
                  "phone_number_id": {
                    "type": "string",
                    "description": "Phone number id. Required. Limits: max:255."
                  },
                  "quality_rating": {
                    "type": "string",
                    "nullable": true,
                    "description": "Quality rating. Optional. "
                  },
                  "verification_status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Verification status. Optional. "
                  },
                  "status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Status. Optional. "
                  }
                },
                "required": [
                  "display_name",
                  "phone_number",
                  "phone_number_id"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsappAccount}/phone-numbers/{phoneNumber}": {
      "get": {
        "summary": "Get workspace whatsapp phone number",
        "operationId": "GET_workspaces__workspace__whatsapp_accounts__whatsappAccount__phone_numbers__phoneNumber_",
        "tags": [
          "Workspace whatsapp phone number"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceWhatsappPhoneNumberController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess",
          "App\\Http\\Middleware\\ManageWhatsappConnection"
        ],
        "description": "Show for workspace whatsapp phone number. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Update workspace whatsapp phone number",
        "operationId": "PUT_workspaces__workspace__whatsapp_accounts__whatsappAccount__phone_numbers__phoneNumber_",
        "tags": [
          "Workspace whatsapp phone number"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceWhatsappPhoneNumberController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess",
          "App\\Http\\Middleware\\ManageWhatsappConnection"
        ],
        "description": "Update for workspace whatsapp phone number. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "display_name": {
                    "type": "string",
                    "description": "Display name. Optional. Limits: max:150."
                  },
                  "verified_name": {
                    "type": "string",
                    "nullable": true,
                    "description": "Verified name. Optional. Limits: max:150."
                  },
                  "phone_number": {
                    "type": "string",
                    "description": "Phone number. Optional. Limits: max:30."
                  },
                  "phone_number_id": {
                    "type": "string",
                    "description": "Phone number id. Optional. Limits: max:255."
                  },
                  "quality_rating": {
                    "type": "string",
                    "description": "Quality rating. Optional. "
                  },
                  "verification_status": {
                    "type": "string",
                    "description": "Verification status. Optional. "
                  },
                  "status": {
                    "type": "string",
                    "description": "Status. Optional. "
                  }
                }
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      },
      "patch": {
        "summary": "Update workspace whatsapp phone number",
        "operationId": "PATCH_workspaces__workspace__whatsapp_accounts__whatsappAccount__phone_numbers__phoneNumber_",
        "tags": [
          "Workspace whatsapp phone number"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceWhatsappPhoneNumberController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess",
          "App\\Http\\Middleware\\ManageWhatsappConnection"
        ],
        "description": "Update for workspace whatsapp phone number. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "display_name": {
                    "type": "string",
                    "description": "Display name. Optional. Limits: max:150."
                  },
                  "verified_name": {
                    "type": "string",
                    "nullable": true,
                    "description": "Verified name. Optional. Limits: max:150."
                  },
                  "phone_number": {
                    "type": "string",
                    "description": "Phone number. Optional. Limits: max:30."
                  },
                  "phone_number_id": {
                    "type": "string",
                    "description": "Phone number id. Optional. Limits: max:255."
                  },
                  "quality_rating": {
                    "type": "string",
                    "description": "Quality rating. Optional. "
                  },
                  "verification_status": {
                    "type": "string",
                    "description": "Verification status. Optional. "
                  },
                  "status": {
                    "type": "string",
                    "description": "Status. Optional. "
                  }
                }
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      },
      "delete": {
        "summary": "Delete workspace whatsapp phone number",
        "operationId": "DELETE_workspaces__workspace__whatsapp_accounts__whatsappAccount__phone_numbers__phoneNumber_",
        "tags": [
          "Workspace whatsapp phone number"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceWhatsappPhoneNumberController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess",
          "App\\Http\\Middleware\\ManageWhatsappConnection"
        ],
        "description": "Destroy for workspace whatsapp phone number. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsappAccount}/waba-candidates": {
      "get": {
        "summary": "Waba candidates whatsapp template",
        "operationId": "GET_workspaces__workspace__whatsapp_accounts__whatsappAccount__waba_candidates",
        "tags": [
          "Whatsapp template"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappTemplateController@wabaCandidates",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Waba candidates for whatsapp template. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsappAccount}/waba": {
      "post": {
        "summary": "Set waba whatsapp template",
        "operationId": "POST_workspaces__workspace__whatsapp_accounts__whatsappAccount__waba",
        "tags": [
          "Whatsapp template"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappTemplateController@setWaba",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Set waba for whatsapp template. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsappAccount}/usage": {
      "get": {
        "summary": "Get whatsapp usage",
        "operationId": "GET_workspaces__workspace__whatsapp_accounts__whatsappAccount__usage",
        "tags": [
          "Whatsapp usage"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappUsageController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Show for whatsapp usage. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Days."
            },
            "description": "Days."
          },
          {
            "name": "refresh",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Refresh."
            },
            "description": "Refresh."
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsappAccount}/templates": {
      "get": {
        "summary": "List whatsapp template",
        "operationId": "GET_workspaces__workspace__whatsapp_accounts__whatsappAccount__templates",
        "tags": [
          "Whatsapp template"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappTemplateController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Index for whatsapp template. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create whatsapp template",
        "operationId": "POST_workspaces__workspace__whatsapp_accounts__whatsappAccount__templates",
        "tags": [
          "Whatsapp template"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappTemplateController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Store for whatsapp template. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:512."
                  },
                  "language": {
                    "type": "string",
                    "description": "Language. Required. Limits: max:15."
                  },
                  "category": {
                    "type": "string",
                    "description": "Category. Required. ",
                    "enum": [
                      "MARKETING",
                      "UTILITY",
                      "AUTHENTICATION"
                    ]
                  },
                  "template_type": {
                    "type": "string",
                    "description": "Template type. Optional. ",
                    "enum": [
                      "STANDARD",
                      "CAROUSEL"
                    ]
                  },
                  "message_send_ttl_seconds": {
                    "type": "integer",
                    "description": "Message send ttl seconds. Optional. Limits: min:30, max:2592000."
                  },
                  "header": {
                    "type": "string",
                    "description": "Header. Optional. "
                  },
                  "footer": {
                    "type": "string",
                    "description": "Footer. Optional. "
                  },
                  "buttons": {
                    "type": "array",
                    "items": {},
                    "description": "Buttons. Optional. Limits: max:10."
                  }
                },
                "required": [
                  "name",
                  "language",
                  "category"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsappAccount}/templates/media": {
      "post": {
        "summary": "Upload header media whatsapp template",
        "operationId": "POST_workspaces__workspace__whatsapp_accounts__whatsappAccount__templates_media",
        "tags": [
          "Whatsapp template"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappTemplateController@uploadHeaderMedia",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Upload header media for whatsapp template. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "description": "File. Required. Limits: max:16384."
                  }
                },
                "required": [
                  "file"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsappAccount}/templates/sync": {
      "post": {
        "summary": "Sync whatsapp template",
        "operationId": "POST_workspaces__workspace__whatsapp_accounts__whatsappAccount__templates_sync",
        "tags": [
          "Whatsapp template"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappTemplateController@sync",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Sync for whatsapp template. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsappAccount}/templates/{template}": {
      "get": {
        "summary": "Get whatsapp template",
        "operationId": "GET_workspaces__workspace__whatsapp_accounts__whatsappAccount__templates__template_",
        "tags": [
          "Whatsapp template"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappTemplateController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Show for whatsapp template. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "template",
            "in": "path",
            "required": true,
            "description": "Template identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/phone-numbers/{phoneNumber}": {
      "get": {
        "summary": "Get phone number details workspace whatsapp phone number",
        "operationId": "GET_phone_numbers__phoneNumber_",
        "tags": [
          "Workspace whatsapp phone number"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceWhatsappPhoneNumberController@getPhoneNumberDetails",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Get phone number details for workspace whatsapp phone number. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/phone-numbers/{phoneNumber}/dashboard": {
      "get": {
        "summary": "Get whatsapp dashboard",
        "operationId": "GET_phone_numbers__phoneNumber__dashboard",
        "tags": [
          "Whatsapp dashboard"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappDashboardController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Show for whatsapp dashboard. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Start date. Optional. "
            },
            "description": "Start date. Optional. "
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "End date. Optional. "
            },
            "description": "End date. Optional. "
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/phone-numbers/{phoneNumber}/templates": {
      "get": {
        "summary": "List templates",
        "description": "",
        "operationId": "whatsapp_get_phone_numbers_phoneNumber_templates",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Local resource identifier; see README."
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response; inspect resource/business state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Accounts & templates"
        ],
        "x-controller": "App\\Http\\Controllers\\WhatsappTemplateController@forPhoneNumber",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsappAccount}/phone-numbers/{phoneNumber}/contacts/import/google-sheet": {
      "post": {
        "summary": "Google sheet whatsapp contact import",
        "operationId": "POST_workspaces__workspace__whatsapp_accounts__whatsappAccount__phone_numbers__phoneNumber__contacts_import_google_sheet",
        "tags": [
          "Whatsapp contact import"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappContactImportController@googleSheet",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Google sheet for whatsapp contact import. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {
                    "type": "string",
                    "description": "Url. Required. Limits: max:2048."
                  }
                },
                "required": [
                  "url"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsappAccount}/phone-numbers/{phoneNumber}/contacts/import": {
      "post": {
        "summary": "Create whatsapp contact import",
        "operationId": "POST_workspaces__workspace__whatsapp_accounts__whatsappAccount__phone_numbers__phoneNumber__contacts_import",
        "tags": [
          "Whatsapp contact import"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappContactImportController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Store for whatsapp contact import. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mapping": {
                    "type": "string",
                    "description": "Mapping. Required. "
                  },
                  "metadata_columns": {
                    "type": "string",
                    "description": "Metadata columns. Optional. "
                  },
                  "rows": {
                    "type": "array",
                    "items": {},
                    "description": "Rows. Required. Limits: min:1."
                  }
                },
                "required": [
                  "mapping",
                  "rows"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsappAccount}/phone-numbers/{phoneNumber}/contacts/{contact}/tags": {
      "put": {
        "summary": "Sync tags whatsapp contact",
        "operationId": "PUT_workspaces__workspace__whatsapp_accounts__whatsappAccount__phone_numbers__phoneNumber__contacts__contact__tags",
        "tags": [
          "Whatsapp contact"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappContactController@syncTags",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Sync tags for whatsapp contact. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact",
            "in": "path",
            "required": true,
            "description": "Contact identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tag_ids": {
                    "type": "string",
                    "description": "Tag ids. Optional. "
                  }
                }
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsappAccount}/phone-numbers/{phoneNumber}/contacts": {
      "get": {
        "summary": "Find contacts",
        "description": "\n\nLookup `contact_id`: read `data[].id` as the value and `data[].name` as the label. Use identifiers only within their authorised workspace.\n\nLookup `search`: read `data[].phone_number` as the value and `data[].name` as the label. Use identifiers only within their authorised workspace.",
        "operationId": "whatsapp_get_workspaces_workspace_whatsapp_accounts_whatsappAccount_phone_numbers_phoneNumber_contacts",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 200
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 60
            }
          },
          {
            "name": "is_blocked",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Is blocked. Optional. "
            },
            "description": "Is blocked. Optional. "
          },
          {
            "name": "tag_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "nullable": true,
              "description": "Tag id. Optional. Limits: max:100."
            },
            "description": "Tag id. Optional. Limits: max:100."
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Sort. Optional. "
            },
            "description": "Sort. Optional. "
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Order. Optional. "
            },
            "description": "Order. Optional. "
          },
          {
            "name": "quick_filter",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Quick filter. Optional. "
            },
            "description": "Quick filter. Optional. "
          },
          {
            "name": "created_from",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Created from. Optional. "
            },
            "description": "Created from. Optional. "
          },
          {
            "name": "created_to",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Created to. Optional. "
            },
            "description": "Created to. Optional. "
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response. Inspect data and business state.",
            "content": {
              "application/json": {
                "examples": {
                  "contact_id": {
                    "summary": "Lookup fields for contact_id",
                    "description": "Synthetic example showing the relevant identifier and label fields. Other response fields are omitted.",
                    "value": {
                      "data": [
                        {
                          "id": "example-contact_id",
                          "name": "Example contact id"
                        }
                      ]
                    }
                  },
                  "search": {
                    "summary": "Lookup fields for search",
                    "description": "Synthetic example showing the relevant identifier and label fields. Other response fields are omitted.",
                    "value": {
                      "data": [
                        {
                          "phone_number": "example-search",
                          "name": "Example search"
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid credential"
          },
          "403": {
            "description": "Insufficient access"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Version conflict"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Contacts"
        ],
        "x-controller": "App\\Http\\Controllers\\WhatsappContactController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create contact",
        "description": "",
        "operationId": "whatsapp_post_workspaces_workspace_whatsapp_accounts_whatsappAccount_phone_numbers_phoneNumber_contacts",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "401": {
            "description": "Invalid credential"
          },
          "403": {
            "description": "Insufficient access"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Version conflict"
          },
          "422": {
            "description": "Validation failed"
          },
          "201": {
            "description": "Successful response. Inspect data and business state."
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "phone_number": {
                    "type": "string",
                    "maxLength": 30
                  },
                  "country_code": {
                    "type": "string",
                    "maxLength": 10,
                    "nullable": true
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "nullable": true
                  },
                  "wa_id": {
                    "type": "string",
                    "maxLength": 100,
                    "nullable": true
                  },
                  "profile_picture_url": {
                    "type": "string",
                    "format": "uri",
                    "nullable": true
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 50,
                    "nullable": true
                  },
                  "last_seen_at": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true
                  },
                  "notes": {
                    "type": "string",
                    "nullable": true
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 2000,
                      "nullable": true
                    }
                  }
                },
                "required": [
                  "name",
                  "phone_number"
                ]
              },
              "example": {
                "name": "Example",
                "phone_number": "+15555550123",
                "email": "example@example.com"
              }
            }
          }
        },
        "tags": [
          "Contacts"
        ],
        "x-controller": "App\\Http\\Controllers\\WhatsappContactController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/whatsapp-accounts/{whatsappAccount}/phone-numbers/{phoneNumber}/contacts/{contact}": {
      "get": {
        "summary": "Get whatsapp contact",
        "operationId": "GET_workspaces__workspace__whatsapp_accounts__whatsappAccount__phone_numbers__phoneNumber__contacts__contact_",
        "tags": [
          "Whatsapp contact"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappContactController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Show for whatsapp contact. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact",
            "in": "path",
            "required": true,
            "description": "Contact identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Update whatsapp contact",
        "operationId": "PUT_workspaces__workspace__whatsapp_accounts__whatsappAccount__phone_numbers__phoneNumber__contacts__contact_",
        "tags": [
          "Whatsapp contact"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappContactController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Update for whatsapp contact. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact",
            "in": "path",
            "required": true,
            "description": "Contact identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Optional. Limits: max:255."
                  },
                  "phone_number": {
                    "type": "string",
                    "description": "Phone number. Optional. Limits: max:30."
                  },
                  "country_code": {
                    "type": "string",
                    "nullable": true,
                    "description": "Country code. Optional. Limits: max:10."
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "nullable": true,
                    "description": "Email. Optional. Limits: max:255."
                  },
                  "wa_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Wa id. Optional. Limits: max:100."
                  },
                  "profile_picture_url": {
                    "type": "string",
                    "format": "uri",
                    "nullable": true,
                    "description": "Profile picture url. Optional. Limits: max:2048."
                  },
                  "status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Status. Optional. Limits: max:50."
                  },
                  "last_seen_at": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true,
                    "description": "Last seen at. Optional. "
                  },
                  "notes": {
                    "type": "string",
                    "nullable": true,
                    "description": "Notes. Optional. "
                  },
                  "metadata": {
                    "type": "array",
                    "items": {},
                    "nullable": true,
                    "description": "Metadata. Optional. "
                  }
                }
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      },
      "patch": {
        "summary": "Update contact",
        "description": "",
        "operationId": "whatsapp_patch_workspaces_workspace_whatsapp_accounts_whatsappAccount_phone_numbers_phoneNumber_contacts_contact",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response. Inspect data and business state."
          },
          "401": {
            "description": "Invalid credential"
          },
          "403": {
            "description": "Insufficient access"
          },
          "404": {
            "description": "Resource unavailable"
          },
          "409": {
            "description": "Version conflict"
          },
          "422": {
            "description": "Validation failed"
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "phone_number": {
                    "type": "string",
                    "maxLength": 30
                  },
                  "country_code": {
                    "type": "string",
                    "maxLength": 10,
                    "nullable": true
                  },
                  "email": {
                    "type": "string",
                    "format": "email",
                    "nullable": true
                  },
                  "wa_id": {
                    "type": "string",
                    "maxLength": 100,
                    "nullable": true
                  },
                  "profile_picture_url": {
                    "type": "string",
                    "format": "uri",
                    "nullable": true
                  },
                  "status": {
                    "type": "string",
                    "maxLength": 50,
                    "nullable": true
                  },
                  "last_seen_at": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true
                  },
                  "notes": {
                    "type": "string",
                    "nullable": true
                  },
                  "metadata": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "string",
                      "maxLength": 2000,
                      "nullable": true
                    }
                  }
                }
              },
              "example": {
                "notes": "Requested follow-up"
              }
            }
          }
        },
        "tags": [
          "Contacts"
        ],
        "x-controller": "App\\Http\\Controllers\\WhatsappContactController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "x-authentication": "application-api-key"
      },
      "delete": {
        "summary": "Delete whatsapp contact",
        "operationId": "DELETE_workspaces__workspace__whatsapp_accounts__whatsappAccount__phone_numbers__phoneNumber__contacts__contact_",
        "tags": [
          "Whatsapp contact"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappContactController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Destroy for whatsapp contact. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "whatsappAccount",
            "in": "path",
            "required": true,
            "description": "Whatsapp account identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "contact",
            "in": "path",
            "required": true,
            "description": "Contact identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/phone-numbers/{phoneNumber}/conversations": {
      "get": {
        "summary": "List conversations",
        "description": "",
        "operationId": "whatsapp_get_phone_numbers_phoneNumber_conversations",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Local resource identifier; see README."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response; inspect resource/business state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Conversations"
        ],
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create whatsapp conversation",
        "operationId": "POST_phone_numbers__phoneNumber__conversations",
        "tags": [
          "Whatsapp conversation"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Store for whatsapp conversation. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "whatsapp_contact_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Whatsapp contact id. Required. "
                  },
                  "assigned_user_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "Assigned user id. Optional. "
                  },
                  "status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Status. Optional. "
                  }
                },
                "required": [
                  "whatsapp_contact_id"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/phone-numbers/{phoneNumber}/conversations/{conversation}": {
      "get": {
        "summary": "Get whatsapp conversation",
        "operationId": "GET_phone_numbers__phoneNumber__conversations__conversation_",
        "tags": [
          "Whatsapp conversation"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Show for whatsapp conversation. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Update whatsapp conversation",
        "operationId": "PUT_phone_numbers__phoneNumber__conversations__conversation_",
        "tags": [
          "Whatsapp conversation"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Update for whatsapp conversation. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "assigned_user_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "Assigned user id. Optional. "
                  },
                  "status": {
                    "type": "string",
                    "nullable": true,
                    "description": "Status. Optional. "
                  },
                  "is_archived": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Is archived. Optional. "
                  }
                }
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      },
      "delete": {
        "summary": "Delete whatsapp conversation",
        "operationId": "DELETE_phone_numbers__phoneNumber__conversations__conversation_",
        "tags": [
          "Whatsapp conversation"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Destroy for whatsapp conversation. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/phone-numbers/{phoneNumber}/conversations/{conversation}/assign": {
      "post": {
        "summary": "Assign whatsapp conversation",
        "operationId": "POST_phone_numbers__phoneNumber__conversations__conversation__assign",
        "tags": [
          "Whatsapp conversation"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationController@assign",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Assign for whatsapp conversation. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "user_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "User id. Required. "
                  }
                },
                "required": [
                  "user_id"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/phone-numbers/{phoneNumber}/conversations/{conversation}/unassign": {
      "post": {
        "summary": "Unassign whatsapp conversation",
        "operationId": "POST_phone_numbers__phoneNumber__conversations__conversation__unassign",
        "tags": [
          "Whatsapp conversation"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationController@unassign",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Unassign for whatsapp conversation. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/phone-numbers/{phoneNumber}/conversations/{conversation}/archive": {
      "post": {
        "summary": "Archive whatsapp conversation",
        "operationId": "POST_phone_numbers__phoneNumber__conversations__conversation__archive",
        "tags": [
          "Whatsapp conversation"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationController@archive",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Archive for whatsapp conversation. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/phone-numbers/{phoneNumber}/conversations/{conversation}/unarchive": {
      "post": {
        "summary": "Unarchive whatsapp conversation",
        "operationId": "POST_phone_numbers__phoneNumber__conversations__conversation__unarchive",
        "tags": [
          "Whatsapp conversation"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationController@unarchive",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Unarchive for whatsapp conversation. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/phone-numbers/{phoneNumber}/conversations/{conversation}/close": {
      "post": {
        "summary": "Close whatsapp conversation",
        "operationId": "POST_phone_numbers__phoneNumber__conversations__conversation__close",
        "tags": [
          "Whatsapp conversation"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationController@close",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Close for whatsapp conversation. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/phone-numbers/{phoneNumber}/conversations/{conversation}/reopen": {
      "post": {
        "summary": "Reopen whatsapp conversation",
        "operationId": "POST_phone_numbers__phoneNumber__conversations__conversation__reopen",
        "tags": [
          "Whatsapp conversation"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationController@reopen",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Reopen for whatsapp conversation. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/phone-numbers/{phoneNumber}/conversations/{conversation}/mark-as-read": {
      "post": {
        "summary": "Mark as read whatsapp conversation",
        "operationId": "POST_phone_numbers__phoneNumber__conversations__conversation__mark_as_read",
        "tags": [
          "Whatsapp conversation"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationController@markAsRead",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Mark as read for whatsapp conversation. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "phoneNumber",
            "in": "path",
            "required": true,
            "description": "Phone number identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/sendAMessage": {
      "post": {
        "summary": "Send a WhatsApp message",
        "description": "Real provider send. Not idempotent. Read message/provider state before retrying uncertain requests. Template payload passes name, language:{code}, components to Meta.",
        "operationId": "whatsapp_post_sendAMessage",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response; inspect resource/business state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspace_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "workspace_whatsapp_phone_number_id": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "phone_no": {
                    "type": "string",
                    "maxLength": 30
                  },
                  "name": {
                    "type": "string",
                    "maxLength": 255
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "text",
                      "image",
                      "video",
                      "audio",
                      "document",
                      "sticker",
                      "location",
                      "contacts",
                      "reaction",
                      "template",
                      "interactive"
                    ]
                  },
                  "payload": {
                    "oneOf": [
                      {
                        "type": "object",
                        "description": "Type-specific provider payload; see README examples."
                      },
                      {
                        "type": "array",
                        "items": {
                          "type": "object"
                        },
                        "description": "Contact-card array when type is contacts."
                      }
                    ]
                  },
                  "reply_to_message_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "workspace_id",
                  "phone_no",
                  "type",
                  "payload"
                ]
              },
              "example": {
                "workspace_id": "{{local_workspace_id}}",
                "workspace_whatsapp_phone_number_id": "{{phone_number_id}}",
                "phone_no": "+15555550123",
                "type": "text",
                "payload": {
                  "body": "Example message"
                }
              }
            }
          }
        },
        "tags": [
          "Messages"
        ],
        "x-controller": "App\\Http\\Controllers\\WhatsappMessageController@sendAMessage",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/conversations/{conversation}/messages": {
      "get": {
        "summary": "List messages",
        "description": "",
        "operationId": "whatsapp_get_conversations_conversation_messages",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Local resource identifier; see README."
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 255
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response; inspect resource/business state.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {}
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        },
        "tags": [
          "Conversations"
        ],
        "x-controller": "App\\Http\\Controllers\\WhatsappMessageController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create whatsapp message",
        "operationId": "POST_conversations__conversation__messages",
        "tags": [
          "Whatsapp message"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappMessageController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Store for whatsapp message. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "Type. Required. "
                  },
                  "payload": {
                    "type": "array",
                    "items": {},
                    "description": "Payload. Required. "
                  },
                  "reply_to_message_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "Reply to message id. Optional. "
                  }
                },
                "required": [
                  "type",
                  "payload"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/conversations/{conversation}/messages/{message}": {
      "get": {
        "summary": "Get whatsapp message",
        "operationId": "GET_conversations__conversation__messages__message_",
        "tags": [
          "Whatsapp message"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappMessageController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Show for whatsapp message. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message",
            "in": "path",
            "required": true,
            "description": "Message identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Update whatsapp message",
        "operationId": "PUT_conversations__conversation__messages__message_",
        "tags": [
          "Whatsapp message"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappMessageController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Update for whatsapp message. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message",
            "in": "path",
            "required": true,
            "description": "Message identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payload": {
                    "type": "array",
                    "items": {},
                    "description": "Payload. Optional. "
                  },
                  "reply_to_message_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "Reply to message id. Optional. "
                  }
                }
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      },
      "delete": {
        "summary": "Delete whatsapp message",
        "operationId": "DELETE_conversations__conversation__messages__message_",
        "tags": [
          "Whatsapp message"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappMessageController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Destroy for whatsapp message. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "message",
            "in": "path",
            "required": true,
            "description": "Message identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/conversations/{conversation}/messages/mark-as-read": {
      "post": {
        "summary": "Mark as read whatsapp message",
        "operationId": "POST_conversations__conversation__messages_mark_as_read",
        "tags": [
          "Whatsapp message"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappMessageController@markAsRead",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Mark as read for whatsapp message. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-bots/types": {
      "get": {
        "summary": "Types whatsapp bot",
        "operationId": "GET_whatsapp_bots_types",
        "tags": [
          "Whatsapp bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotController@types",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Types for whatsapp bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-bots/ai-directory": {
      "get": {
        "summary": "Ai directory whatsapp bot",
        "operationId": "GET_whatsapp_bots_ai_directory",
        "tags": [
          "Whatsapp bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotController@aiDirectory",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Ai directory for whatsapp bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-bots/workspace/{workspace}": {
      "get": {
        "summary": "List whatsapp bot",
        "operationId": "GET_whatsapp_bots_workspace__workspace_",
        "tags": [
          "Whatsapp bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Index for whatsapp bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-bots/{bot}": {
      "get": {
        "summary": "Get whatsapp bot",
        "operationId": "GET_whatsapp_bots__bot_",
        "tags": [
          "Whatsapp bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Show for whatsapp bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Update whatsapp bot",
        "operationId": "PUT_whatsapp_bots__bot_",
        "tags": [
          "Whatsapp bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Update for whatsapp bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspace_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Workspace id. Optional. "
                  },
                  "name": {
                    "type": "string",
                    "description": "Name. Optional. Limits: max:150."
                  },
                  "description": {
                    "type": "string",
                    "nullable": true,
                    "description": "Description. Optional. "
                  },
                  "routing_description": {
                    "type": "string",
                    "nullable": true,
                    "description": "Routing description. Optional. "
                  },
                  "type": {
                    "type": "string",
                    "description": "Type. Optional. "
                  },
                  "config": {
                    "type": "array",
                    "items": {},
                    "nullable": true,
                    "description": "Config. Optional. "
                  },
                  "icon": {
                    "type": "string",
                    "nullable": true,
                    "description": "Icon. Optional. Limits: max:255."
                  },
                  "is_default": {
                    "type": "boolean",
                    "description": "Is default. Optional. "
                  },
                  "is_active": {
                    "type": "boolean",
                    "description": "Is active. Optional. "
                  }
                }
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      },
      "delete": {
        "summary": "Delete whatsapp bot",
        "operationId": "DELETE_whatsapp_bots__bot_",
        "tags": [
          "Whatsapp bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Destroy for whatsapp bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-bots": {
      "post": {
        "summary": "Create whatsapp bot",
        "operationId": "POST_whatsapp_bots",
        "tags": [
          "Whatsapp bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Store for whatsapp bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workspace_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Workspace id. Required. "
                  },
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:150."
                  },
                  "description": {
                    "type": "string",
                    "nullable": true,
                    "description": "Description. Optional. "
                  },
                  "routing_description": {
                    "type": "string",
                    "nullable": true,
                    "description": "Routing description. Optional. "
                  },
                  "type": {
                    "type": "string",
                    "nullable": true,
                    "description": "Type. Optional. "
                  },
                  "config": {
                    "type": "array",
                    "items": {},
                    "nullable": true,
                    "description": "Config. Optional. "
                  },
                  "icon": {
                    "type": "string",
                    "nullable": true,
                    "description": "Icon. Optional. Limits: max:255."
                  },
                  "is_default": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Is default. Optional. "
                  },
                  "is_active": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Is active. Optional. "
                  }
                },
                "required": [
                  "workspace_id",
                  "name"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-bots/{bot}/toggle-status": {
      "patch": {
        "summary": "Toggle status whatsapp bot",
        "operationId": "PATCH_whatsapp_bots__bot__toggle_status",
        "tags": [
          "Whatsapp bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotController@toggleStatus",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Toggle status for whatsapp bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-bots/{bot}/set-default": {
      "patch": {
        "summary": "Set default whatsapp bot",
        "operationId": "PATCH_whatsapp_bots__bot__set_default",
        "tags": [
          "Whatsapp bot"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotController@setDefault",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Set default for whatsapp bot. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-bots/{bot}/stages": {
      "get": {
        "summary": "List whatsapp bot stage",
        "operationId": "GET_whatsapp_bots__bot__stages",
        "tags": [
          "Whatsapp bot stage"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotStageController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Index for whatsapp bot stage. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create whatsapp bot stage",
        "operationId": "POST_whatsapp_bots__bot__stages",
        "tags": [
          "Whatsapp bot stage"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotStageController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Store for whatsapp bot stage. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Required. Limits: max:150."
                  },
                  "description": {
                    "type": "string",
                    "nullable": true,
                    "description": "Description. Optional. "
                  },
                  "workflow_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "Workflow id. Optional. "
                  },
                  "is_entry_stage": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Is entry stage. Optional. "
                  },
                  "is_terminal": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Is terminal. Optional. "
                  },
                  "is_active": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Is active. Optional. "
                  }
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-bots/{bot}/stages/{stage}": {
      "get": {
        "summary": "Get whatsapp bot stage",
        "operationId": "GET_whatsapp_bots__bot__stages__stage_",
        "tags": [
          "Whatsapp bot stage"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotStageController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Show for whatsapp bot stage. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stage",
            "in": "path",
            "required": true,
            "description": "Stage identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Update whatsapp bot stage",
        "operationId": "PUT_whatsapp_bots__bot__stages__stage_",
        "tags": [
          "Whatsapp bot stage"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotStageController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Update for whatsapp bot stage. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stage",
            "in": "path",
            "required": true,
            "description": "Stage identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "Name. Optional. Limits: max:150."
                  },
                  "description": {
                    "type": "string",
                    "nullable": true,
                    "description": "Description. Optional. "
                  },
                  "workflow_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "Workflow id. Optional. "
                  },
                  "is_entry_stage": {
                    "type": "boolean",
                    "description": "Is entry stage. Optional. "
                  },
                  "is_terminal": {
                    "type": "boolean",
                    "description": "Is terminal. Optional. "
                  },
                  "is_active": {
                    "type": "boolean",
                    "description": "Is active. Optional. "
                  }
                }
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      },
      "delete": {
        "summary": "Delete whatsapp bot stage",
        "operationId": "DELETE_whatsapp_bots__bot__stages__stage_",
        "tags": [
          "Whatsapp bot stage"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotStageController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Destroy for whatsapp bot stage. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "stage",
            "in": "path",
            "required": true,
            "description": "Stage identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-bots/{bot}/stages/reorder": {
      "post": {
        "summary": "Reorder whatsapp bot stage",
        "operationId": "POST_whatsapp_bots__bot__stages_reorder",
        "tags": [
          "Whatsapp bot stage"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappBotStageController@reorder",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Reorder for whatsapp bot stage. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "stages": {
                    "type": "array",
                    "items": {},
                    "description": "Stages. Required. Limits: min:1."
                  }
                },
                "required": [
                  "stages"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-bots/{bot}/transitions": {
      "get": {
        "summary": "List whatsapp stage transition",
        "operationId": "GET_whatsapp_bots__bot__transitions",
        "tags": [
          "Whatsapp stage transition"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappStageTransitionController@index",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Index for whatsapp stage transition. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "post": {
        "summary": "Create whatsapp stage transition",
        "operationId": "POST_whatsapp_bots__bot__transitions",
        "tags": [
          "Whatsapp stage transition"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappStageTransitionController@store",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Store for whatsapp stage transition. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from_stage_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "From stage id. Required. "
                  },
                  "to_stage_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "To stage id. Required. "
                  },
                  "transition_key": {
                    "type": "string",
                    "description": "Transition key. Required. Limits: max:100."
                  },
                  "label": {
                    "type": "string",
                    "description": "Label. Required. Limits: max:150."
                  },
                  "description": {
                    "type": "string",
                    "nullable": true,
                    "description": "Description. Optional. "
                  },
                  "is_active": {
                    "type": "boolean",
                    "nullable": true,
                    "description": "Is active. Optional. "
                  }
                },
                "required": [
                  "from_stage_id",
                  "to_stage_id",
                  "transition_key",
                  "label"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-bots/{bot}/transitions/{transition}": {
      "delete": {
        "summary": "Delete whatsapp stage transition",
        "operationId": "DELETE_whatsapp_bots__bot__transitions__transition_",
        "tags": [
          "Whatsapp stage transition"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappStageTransitionController@destroy",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Destroy for whatsapp stage transition. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "bot",
            "in": "path",
            "required": true,
            "description": "Bot identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "transition",
            "in": "path",
            "required": true,
            "description": "Transition identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/runtime": {
      "get": {
        "summary": "Get whatsapp conversation runtime",
        "operationId": "GET_whatsapp_conversations__conversation__runtime",
        "tags": [
          "Whatsapp conversation runtime"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationRuntimeController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Show for whatsapp conversation runtime. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/runtime/history": {
      "get": {
        "summary": "History whatsapp conversation runtime",
        "operationId": "GET_whatsapp_conversations__conversation__runtime_history",
        "tags": [
          "Whatsapp conversation runtime"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationRuntimeController@history",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "History for whatsapp conversation runtime. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/runtime/actions/assign-bot": {
      "post": {
        "summary": "Assign bot whatsapp conversation runtime",
        "operationId": "POST_whatsapp_conversations__conversation__runtime_actions_assign_bot",
        "tags": [
          "Whatsapp conversation runtime"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationRuntimeController@assignBot",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Assign bot for whatsapp conversation runtime. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "whatsapp_bot_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Whatsapp bot id. Required. "
                  }
                },
                "required": [
                  "whatsapp_bot_id"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/runtime/actions/change-mode": {
      "post": {
        "summary": "Change mode whatsapp conversation runtime",
        "operationId": "POST_whatsapp_conversations__conversation__runtime_actions_change_mode",
        "tags": [
          "Whatsapp conversation runtime"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationRuntimeController@changeMode",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Change mode for whatsapp conversation runtime. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "description": "Mode. Required. "
                  }
                },
                "required": [
                  "mode"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/runtime/actions/assign-user": {
      "post": {
        "summary": "Assign user whatsapp conversation runtime",
        "operationId": "POST_whatsapp_conversations__conversation__runtime_actions_assign_user",
        "tags": [
          "Whatsapp conversation runtime"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationRuntimeController@assignUser",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Assign user for whatsapp conversation runtime. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "assigned_user_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "Assigned user id. Optional. "
                  }
                }
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/runtime/actions/pause": {
      "post": {
        "summary": "Pause whatsapp conversation runtime",
        "operationId": "POST_whatsapp_conversations__conversation__runtime_actions_pause",
        "tags": [
          "Whatsapp conversation runtime"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationRuntimeController@pause",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Pause for whatsapp conversation runtime. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "paused_until": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Paused until. Required. "
                  }
                },
                "required": [
                  "paused_until"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/runtime/actions/resume": {
      "post": {
        "summary": "Resume whatsapp conversation runtime",
        "operationId": "POST_whatsapp_conversations__conversation__runtime_actions_resume",
        "tags": [
          "Whatsapp conversation runtime"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationRuntimeController@resume",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Resume for whatsapp conversation runtime. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/runtime/actions/close": {
      "post": {
        "summary": "Close whatsapp conversation runtime",
        "operationId": "POST_whatsapp_conversations__conversation__runtime_actions_close",
        "tags": [
          "Whatsapp conversation runtime"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationRuntimeController@close",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Close for whatsapp conversation runtime. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/runtime/actions/restart": {
      "post": {
        "summary": "Restart whatsapp conversation runtime",
        "operationId": "POST_whatsapp_conversations__conversation__runtime_actions_restart",
        "tags": [
          "Whatsapp conversation runtime"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationRuntimeController@restart",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Restart for whatsapp conversation runtime. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/memory": {
      "get": {
        "summary": "All whatsapp conversation memory",
        "operationId": "GET_whatsapp_conversations__conversation__memory",
        "tags": [
          "Whatsapp conversation memory"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationMemoryController@all",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "All for whatsapp conversation memory. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/memory/{key}": {
      "get": {
        "summary": "Get whatsapp conversation memory",
        "operationId": "GET_whatsapp_conversations__conversation__memory__key_",
        "tags": [
          "Whatsapp conversation memory"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationMemoryController@get",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Get for whatsapp conversation memory. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "description": "Key identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/memory/save": {
      "post": {
        "summary": "Save whatsapp conversation memory",
        "operationId": "POST_whatsapp_conversations__conversation__memory_save",
        "tags": [
          "Whatsapp conversation memory"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationMemoryController@save",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Save for whatsapp conversation memory. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Key. Required. Limits: max:255."
                  },
                  "value": {
                    "type": "array",
                    "items": {},
                    "description": "Value. Required. "
                  },
                  "source": {
                    "type": "string",
                    "description": "Source. Required. ",
                    "enum": [
                      "AI",
                      "Human",
                      "System",
                      "Workflow",
                      "API'",
                      ""
                    ]
                  },
                  "confidence": {
                    "type": "number",
                    "nullable": true,
                    "description": "Confidence. Optional. "
                  }
                },
                "required": [
                  "key",
                  "value",
                  "source"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/memory/update": {
      "post": {
        "summary": "Update whatsapp conversation memory",
        "operationId": "POST_whatsapp_conversations__conversation__memory_update",
        "tags": [
          "Whatsapp conversation memory"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationMemoryController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Update for whatsapp conversation memory. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Key. Required. Limits: max:255."
                  },
                  "value": {
                    "type": "array",
                    "items": {},
                    "description": "Value. Required. "
                  },
                  "confidence": {
                    "type": "number",
                    "nullable": true,
                    "description": "Confidence. Optional. "
                  }
                },
                "required": [
                  "key",
                  "value"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/memory/forget": {
      "post": {
        "summary": "Forget whatsapp conversation memory",
        "operationId": "POST_whatsapp_conversations__conversation__memory_forget",
        "tags": [
          "Whatsapp conversation memory"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationMemoryController@forget",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Forget for whatsapp conversation memory. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {
                    "type": "string",
                    "description": "Key. Required. Limits: max:255."
                  }
                },
                "required": [
                  "key"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/whatsapp-conversations/{conversation}/memory/clear": {
      "post": {
        "summary": "Clear whatsapp conversation memory",
        "operationId": "POST_whatsapp_conversations__conversation__memory_clear",
        "tags": [
          "Whatsapp conversation memory"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WhatsappConversationMemoryController@clear",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Clear for whatsapp conversation memory. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/metadata": {
      "get": {
        "summary": "Get workspace metadata",
        "operationId": "GET_workspaces__workspace__metadata",
        "tags": [
          "Workspace metadata"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceMetadataController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Show for workspace metadata. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Update workspace metadata",
        "operationId": "PUT_workspaces__workspace__metadata",
        "tags": [
          "Workspace metadata"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\WorkspaceMetadataController@update",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Update for workspace metadata. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "new_conversation_mode": {
                    "type": "string",
                    "description": "New conversation mode. Required. "
                  },
                  "default_whatsapp_bot_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "Default whatsapp bot id. Optional. "
                  },
                  "default_assigned_user_id": {
                    "type": "string",
                    "format": "uuid",
                    "nullable": true,
                    "description": "Default assigned user id. Optional. "
                  },
                  "workflow_max_retries": {
                    "type": "integer",
                    "description": "Workflow max retries. Required. Limits: min:0, max:255."
                  }
                },
                "required": [
                  "new_conversation_mode",
                  "workflow_max_retries"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/ai/contact-fields": {
      "get": {
        "summary": "Contact fields ai channel",
        "operationId": "GET_workspaces__workspace__ai_contact_fields",
        "tags": [
          "Ai channel"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiChannelController@contactFields",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Contact fields for ai channel. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/contacts/{contact}/ai/memory": {
      "get": {
        "summary": "Contact memory ai channel",
        "operationId": "GET_contacts__contact__ai_memory",
        "tags": [
          "Ai channel"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiChannelController@contactMemory",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Contact memory for ai channel. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "contact",
            "in": "path",
            "required": true,
            "description": "Contact identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Contact memory ai channel",
        "operationId": "PUT_contacts__contact__ai_memory",
        "tags": [
          "Ai channel"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiChannelController@contactMemory",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Contact memory for ai channel. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "contact",
            "in": "path",
            "required": true,
            "description": "Contact identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/workspaces/{workspace}/ai-connection": {
      "get": {
        "summary": "Connection ai channel",
        "operationId": "GET_workspaces__workspace__ai_connection",
        "tags": [
          "Ai channel"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiChannelController@connection",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Connection for ai channel. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "description": "Workspace identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/conversations/{conversation}/ai": {
      "get": {
        "summary": "Get ai channel",
        "operationId": "GET_conversations__conversation__ai",
        "tags": [
          "Ai channel"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiChannelController@show",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Show for ai channel. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      }
    },
    "/conversations/{conversation}/ai/memory": {
      "get": {
        "summary": "Memory ai channel",
        "operationId": "GET_conversations__conversation__ai_memory",
        "tags": [
          "Ai channel"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiChannelController@memory",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Memory for ai channel. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. ",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "expected_revision",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "description": "Expected revision. Required. Limits: min:0."
            },
            "description": "Expected revision. Required. Limits: min:0."
          },
          {
            "name": "facts",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {},
              "description": "Facts. Optional. Limits: max:60."
            },
            "description": "Facts. Optional. Limits: max:60."
          },
          {
            "name": "fields",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {},
              "description": "Fields. Optional. Limits: max:20."
            },
            "description": "Fields. Optional. Limits: max:20."
          },
          {
            "name": "summary",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Summary. Optional. "
            },
            "description": "Summary. Optional. "
          },
          {
            "name": "notes",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Notes. Optional. "
            },
            "description": "Notes. Optional. "
          },
          {
            "name": "tags",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Tags. Optional. "
            },
            "description": "Tags. Optional. "
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "x-authentication": "application-api-key"
      },
      "put": {
        "summary": "Memory ai channel",
        "operationId": "PUT_conversations__conversation__ai_memory",
        "tags": [
          "Ai channel"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiChannelController@memory",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Memory for ai channel. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expected_revision": {
                    "type": "integer",
                    "description": "Expected revision. Required. Limits: min:0."
                  },
                  "facts": {
                    "type": "array",
                    "items": {},
                    "description": "Facts. Optional. Limits: max:60."
                  },
                  "fields": {
                    "type": "array",
                    "items": {},
                    "description": "Fields. Optional. Limits: max:20."
                  },
                  "summary": {
                    "type": "string",
                    "description": "Summary. Optional. "
                  },
                  "notes": {
                    "type": "string",
                    "description": "Notes. Optional. "
                  },
                  "tags": {
                    "type": "string",
                    "description": "Tags. Optional. "
                  }
                },
                "required": [
                  "expected_revision"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/conversations/{conversation}/ai/control": {
      "post": {
        "summary": "Control ai channel",
        "operationId": "POST_conversations__conversation__ai_control",
        "tags": [
          "Ai channel"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiChannelController@control",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Control for ai channel. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "mode": {
                    "type": "string",
                    "description": "Mode. Required. ",
                    "enum": [
                      "auto",
                      "human",
                      "assisted",
                      "external"
                    ]
                  },
                  "bot_id": {
                    "type": "string",
                    "description": "Bot id. Optional. "
                  },
                  "expected_revision": {
                    "type": "integer",
                    "description": "Expected revision. Required. Limits: min:0."
                  }
                },
                "required": [
                  "mode",
                  "expected_revision"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/conversations/{conversation}/ai/context": {
      "put": {
        "summary": "Context ai channel",
        "operationId": "PUT_conversations__conversation__ai_context",
        "tags": [
          "Ai channel"
        ],
        "responses": {
          "200": {
            "description": "Successful response. Shape follows the resource returned by this operation.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired authentication.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, read/write permission, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource does not exist or is unavailable to this caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Invalid request fields; inspect errors by field.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached. Honour Retry-After before another request.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-controller": "App\\Http\\Controllers\\AiChannelController@context",
        "x-auth-middleware": [
          "api",
          "autoappy.session",
          "autoappy.platform",
          "workspace.access",
          "App\\Http\\Middleware\\EnforceWhatsappRecordAccess"
        ],
        "description": "Context for ai channel. Application API key (Bearer) with the matching application permission and workspace access. Resource access is checked by the server. A write changes application data; do not replay an uncertain request.",
        "parameters": [
          {
            "name": "conversation",
            "in": "path",
            "required": true,
            "description": "Conversation identifier. Obtain it from the corresponding list endpoint in this workspace.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": false,
            "description": "Central organisation UUID for the authorised workspace. Required by organisation-scoped operations.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "campaign_id": {
                    "type": "string",
                    "description": "Campaign id. Optional. Limits: max:160."
                  },
                  "journey": {
                    "type": "string",
                    "description": "Journey. Optional. Limits: max:160."
                  },
                  "event": {
                    "type": "string",
                    "description": "Event. Optional. Limits: max:160."
                  },
                  "bot_id": {
                    "type": "string",
                    "nullable": true,
                    "description": "Bot id. Optional. "
                  },
                  "expected_revision": {
                    "type": "integer",
                    "description": "Expected revision. Required. Limits: min:0."
                  }
                },
                "required": [
                  "expected_revision"
                ]
              }
            }
          }
        },
        "x-authentication": "application-api-key"
      }
    },
    "/flow-openings": {
      "post": {
        "tags": [
          "Bot orchestration"
        ],
        "summary": "Start a static bot with a template if the customer has not replied",
        "operationId": "whatsapp_startFlowOpening",
        "description": "After your workflow delay, check actual conversation activity and send at most once per enquiry. Owner/admin and write-enabled API key required. Human-controlled, blocked, busy, already-started conversations are skipped. Template quick-reply labels and order must match the bot Start question. A sent template marks that question as already presented, so the next reply follows its branch. Interrupted provider sends are never replayed; inspect uncertain outcomes manually. Opening validation/reservation failures are recorded as skipped with a safe reason. Example: form event → wait five minutes → call with the original event ID/time. Website click tracking is unnecessary.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Local workspace ID from GET /api/auth/me, distinct from the central organisation UUID.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "workspace_id",
                  "workspace_whatsapp_phone_number_id",
                  "phone_no",
                  "enquiry_id",
                  "enquiry_at",
                  "bot_id",
                  "template_id"
                ],
                "properties": {
                  "workspace_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Local WhatsApp workspace UUID from /api/auth/me."
                  },
                  "workspace_whatsapp_phone_number_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Connected sender phone resource UUID, not its numeric Meta phone ID."
                  },
                  "bot_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Published static bot UUID connected to this workspace. Look up flow-opening-bots."
                  },
                  "template_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "Approved local template UUID for the sender account; quick replies must match the bot starting menu in order."
                  },
                  "phone_no": {
                    "type": "string",
                    "description": "Recipient with country code.",
                    "example": "+15551234567"
                  },
                  "enquiry_id": {
                    "type": "string",
                    "maxLength": 160,
                    "description": "Stable original enquiry/event ID. Reuse for retries; changed inputs with same ID return 409.",
                    "example": "demo-request-123"
                  },
                  "enquiry_at": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Original event timestamp with timezone; within 30 days and not future. Never substitute time after the delay."
                  },
                  "dedupe_seconds": {
                    "type": "integer",
                    "minimum": 60,
                    "maximum": 86400,
                    "default": 600,
                    "description": "Minimum lookback for accepted outgoing messages. Same enquiry is permanently deduplicated."
                  },
                  "components": {
                    "type": "array",
                    "maxItems": 10,
                    "items": {
                      "type": "object"
                    },
                    "description": "Optional Meta header/body parameters. Server generates button payloads; button overrides are rejected.",
                    "example": []
                  },
                  "test_recipient": {
                    "type": "string",
                    "description": "Optional safety guard: every other recipient is skipped without a send.",
                    "example": "+15551234567"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "Version conflict; read current state before updating.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Request validation failed; inspect message and errors.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit reached.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server failure; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "200": {
            "description": "Terminal outcome: sent means provider accepted, not delivered; skipped means no message sent; uncertain requires operator review.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "sent",
                            "skipped",
                            "uncertain",
                            "preparing",
                            "sending",
                            "sync_pending",
                            "cancel_pending",
                            "uncertain_pending"
                          ]
                        },
                        "reason": {
                          "type": "string",
                          "nullable": true
                        },
                        "conversation_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "message_id": {
                          "type": "string",
                          "nullable": true
                        },
                        "provider_id": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": {
                    "status": "skipped",
                    "reason": "customer_already_replied"
                  }
                }
              }
            }
          },
          "202": {
            "description": "Durable coordination pending. Retry with identical enquiry inputs to inspect; never change enquiry ID to force a send.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "sent",
                            "skipped",
                            "uncertain",
                            "preparing",
                            "sending",
                            "sync_pending",
                            "cancel_pending",
                            "uncertain_pending"
                          ]
                        },
                        "reason": {
                          "type": "string",
                          "nullable": true
                        },
                        "conversation_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "message_id": {
                          "type": "string",
                          "nullable": true
                        },
                        "provider_id": {
                          "type": "string",
                          "nullable": true
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": {
                    "status": "skipped",
                    "reason": "customer_already_replied"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/workspaces/{workspace}/flow-opening-bots": {
      "get": {
        "tags": [
          "Bot orchestration"
        ],
        "summary": "List connected static bots for a template opening",
        "operationId": "whatsapp_flowOpeningBots",
        "description": "Owner/admin lookup. Returns active static bots connected to the enabled WhatsApp AI channel, with IDs, display names and published versions. Use the ID as bot_id; use the sender template lookup to choose an approved template with matching starting-menu buttons.",
        "parameters": [
          {
            "name": "X-AutoAppy-Workspace",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Central organisation UUID; never a local CRM/WhatsApp ID."
          },
          {
            "name": "workspace",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Local WhatsApp workspace UUID."
          }
        ],
        "responses": {
          "200": {
            "description": "Connected static bots.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "format": "uuid",
                            "description": "Published bot identifier."
                          },
                          "name": {
                            "type": "string",
                            "description": "Dropdown label."
                          },
                          "version": {
                            "type": "integer",
                            "description": "Published version."
                          },
                          "adapter": {
                            "type": "string",
                            "enum": [
                              "static_flow"
                            ]
                          },
                          "active": {
                            "type": "boolean"
                          }
                        }
                      }
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "11111111-1111-4111-8111-111111111111",
                      "name": "Enquiry menu",
                      "version": 1,
                      "adapter": "static_flow",
                      "active": true
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Invalid, expired or missing application API key.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Application, organisation or resource access denied.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Resource not found or inaccessible.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          },
          "503": {
            "description": "Service unavailable; check write outcome before retrying.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "errors": {
                      "type": "object",
                      "properties": {}
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/customer-context/records/{record}": {
      "get": {
        "summary": "Load connected context from a local record",
        "operationId": "whatsapp_customer_context_show",
        "tags": [
          "Connected customer"
        ],
        "security": [
          {
            "UserBearer": []
          }
        ],
        "parameters": [
          {
            "name": "record",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Explicit existing identifier; must belong to the authorised organisation."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            },
            "description": "Explicit page of at most 20 records or events."
          },
          {
            "name": "record_id",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 128
            },
            "description": "Optional selected CRM opportunity or WhatsApp conversation ID from this customer section. Loads its activities or messages."
          },
          {
            "name": "section",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "profile",
                "crm",
                "whatsapp"
              ]
            },
            "description": "Only this section is fetched. Other apps are not queried."
          }
        ],
        "description": "On-demand actor-authorized read. Requires an explicit connected customer. Data remains in each owner service. No customer replication, sending, connector fallback or automatic retry. Paginated summaries; selected CRM records return activities, selected WhatsApp records return message previews. Responses are private/no-store. Partial source failure is distinct from empty data.",
        "responses": {
          "200": {
            "description": "data envelope: status ready/not_connected/denied/unavailable, customer_id, source, fetched_at, items, has_more. Access checks return only customer_id."
          },
          "401": {
            "description": "Sign in again."
          },
          "403": {
            "description": "Actor, workspace, customer or product access denied."
          },
          "404": {
            "description": "Selected record unavailable."
          },
          "422": {
            "description": "Invalid section, page or identifier."
          },
          "429": {
            "description": "Rate limited; refresh later."
          },
          "503": {
            "description": "Context service unavailable; do not interpret as empty data."
          }
        }
      }
    },
    "/customer-context/organisations/{organisation}/customers/{customer}": {
      "get": {
        "summary": "Read customer records from their owning app",
        "operationId": "whatsapp_customer_context_source",
        "tags": [
          "Connected customer"
        ],
        "security": [
          {
            "UserBearer": []
          }
        ],
        "parameters": [
          {
            "name": "organisation",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Explicit existing identifier; must belong to the authorised organisation."
          },
          {
            "name": "customer",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Explicit existing identifier; must belong to the authorised organisation."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 1
            },
            "description": "Explicit page of at most 20 records or events."
          },
          {
            "name": "record_id",
            "in": "query",
            "schema": {
              "type": "string",
              "maxLength": 128
            },
            "description": "Optional selected CRM opportunity or WhatsApp conversation ID from this customer section. Loads its activities or messages."
          }
        ],
        "description": "On-demand actor-authorized read. Requires an explicit connected customer. Data remains in each owner service. No customer replication, sending, connector fallback or automatic retry. Paginated summaries; selected CRM records return activities, selected WhatsApp records return message previews. Responses are private/no-store. Partial source failure is distinct from empty data.",
        "responses": {
          "200": {
            "description": "data envelope: status ready/not_connected/denied/unavailable, customer_id, source, fetched_at, items, has_more. Access checks return only customer_id."
          },
          "401": {
            "description": "Sign in again."
          },
          "403": {
            "description": "Actor, workspace, customer or product access denied."
          },
          "404": {
            "description": "Selected record unavailable."
          },
          "422": {
            "description": "Invalid section, page or identifier."
          },
          "429": {
            "description": "Rate limited; refresh later."
          },
          "503": {
            "description": "Context service unavailable; do not interpret as empty data."
          }
        }
      }
    }
  },
  "externalDocs": {
    "description": "Standalone API guide",
    "url": "https://whatsapps.autoappy.com/api/guide.md"
  },
  "tags": [
    {
      "name": "Accounts & templates"
    },
    {
      "name": "Ai channel"
    },
    {
      "name": "Bot turn result"
    },
    {
      "name": "Connection"
    },
    {
      "name": "Contacts"
    },
    {
      "name": "Conversations"
    },
    {
      "name": "Messages"
    },
    {
      "name": "Organisation connection"
    },
    {
      "name": "User"
    },
    {
      "name": "User setting"
    },
    {
      "name": "Whatsapp bot"
    },
    {
      "name": "Whatsapp bot stage"
    },
    {
      "name": "Whatsapp contact"
    },
    {
      "name": "Whatsapp contact import"
    },
    {
      "name": "Whatsapp conversation"
    },
    {
      "name": "Whatsapp conversation memory"
    },
    {
      "name": "Whatsapp conversation runtime"
    },
    {
      "name": "Whatsapp dashboard"
    },
    {
      "name": "Whatsapp message"
    },
    {
      "name": "Whatsapp stage transition"
    },
    {
      "name": "Whatsapp tag"
    },
    {
      "name": "Whatsapp template"
    },
    {
      "name": "Whatsapp usage"
    },
    {
      "name": "Workspace"
    },
    {
      "name": "Workspace metadata"
    },
    {
      "name": "Workspace user"
    },
    {
      "name": "Workspace whatsapp account"
    },
    {
      "name": "Workspace whatsapp phone number"
    }
  ]
}
