Interface components

interface components {
    headers: {
        RateLimitLimit: number;
        RateLimitRemaining: number;
        RateLimitReset: number;
        RetryAfter: number;
    };
    parameters: {
        BroadcastIdempotencyKey: string;
        IdempotencyKey: string;
        MetaRemoteWriteIdempotencyKey: string;
        WaberyVersion: "2026-06-18";
    };
    pathItems: never;
    requestBodies: never;
    responses: {
        RateLimited: {
            content: {
                "application/json": {
                    error: string;
                    issues?: { [key: string]: unknown };
                    message?: string;
                    request_id?: string;
                    required_scope?: string;
                } & { [key: string]: unknown };
                "application/problem+json": {
                    code?: string;
                    detail?: string;
                    instance?: string;
                    status: number;
                    title: string;
                    type: string;
                } & { [key: string]: unknown };
            };
            headers: {
                "RateLimit-Limit": number;
                "RateLimit-Remaining": number;
                "RateLimit-Reset": number;
                "Retry-After": number;
                [name: string]: unknown;
            };
        };
    };
    schemas: {
        Broadcast: {
            canceled_at?: null
            | string;
            category: "marketing" | "utility";
            channel_id?: string;
            completed_at?: null | string;
            counts: { [key: string]: number };
            created_at?: string;
            failure?: null | { code?: null | string; message?: null | string };
            fallback_language?: string;
            id: string;
            name: string;
            object: "broadcast";
            schedule_timezone?: null | string;
            scheduled_at?: null | string;
            started_at?: null | string;
            status:
                | "completed"
                | "ready"
                | "draft"
                | "preparing"
                | "scheduled"
                | "sending"
                | "canceled"
                | "failed";
            template_name?: string;
            updated_at?: string;
        };
        BroadcastCreateRequest: {
            category: "UTILITY"
            | "MARKETING";
            channelId: string;
            fallbackLanguage: string;
            name: string;
            templateName: string;
            variants: {
                language: string;
                parameterMappings: { [key: string]: unknown }[];
                templateId: string;
            }[];
        };
        BroadcastLifecycleWebhookPayload: {
            category?: "marketing"
            | "utility";
            channel_id?: string;
            counts: { [key: string]: number };
            event:
                | "broadcast.started"
                | "broadcast.completed"
                | "broadcast.canceled"
                | "broadcast.failed";
            failure?: null
            | { code?: null | string; message?: null | string };
            id: string;
            object: "broadcast";
            occurred_at: string;
            status:
                | "completed"
                | "ready"
                | "draft"
                | "preparing"
                | "scheduled"
                | "sending"
                | "canceled"
                | "failed";
            template_name?: string;
        };
        BusinessAgent: {
            channel_id: string;
            created_at: string;
            eligibility?: null
            | { [key: string]: unknown };
            error_message?: null | string;
            id: string;
            meta_agent_id?: null | string;
            object: "business_agent";
            project_id: string;
            settings?: null | { [key: string]: unknown };
            status: "DRAFT" | "PROVISIONING" | "ACTIVE" | "DISABLED" | "ERROR";
            updated_at: string;
        };
        BusinessAgentAllowlistRequest: { consumer_phone_number: string };
        BusinessAgentApplyRequest: {
            channel_id: string;
            enabled?: boolean;
            handoff?: { [key: string]: unknown };
            knowledge?: { [key: string]: unknown };
            language?: string;
            persona?: string;
        } & { [key: string]: unknown };
        BusinessAgentConnector: {
            business_agent_id: string;
            config?: null | { [key: string]: unknown };
            created_at: string;
            id: string;
            meta_connector_id?: null | string;
            name: string;
            object: "business_agent_connector";
            status: string;
            tools?: {
                backing_flow_id?: null | string;
                backing_function_id?: null | string;
                backing_function_version_id: null | string;
                backing_type: "FLOW" | "API_ENDPOINT" | "NOOP" | "HOSTED_FUNCTION";
                connector_id: string;
                created_at: string;
                description?: null | string;
                id: string;
                input_schema?: null | { [key: string]: unknown };
                meta_tool_id?: null | string;
                name: string;
                object: "business_agent_connector_tool";
                updated_at: string;
            }[];
            type: string;
            updated_at: string;
        };
        BusinessAgentConnectorApiKeyRequest: {
            api_key_config: { [key: string]: unknown };
        };
        BusinessAgentConnectorCertificateRequest: {
            ca_certificate?: string;
            client_certificate: string;
            client_key: string;
        };
        BusinessAgentConnectorCreateRequest: {
            business_agent_id: string;
            config?: { [key: string]: unknown };
            name: string;
            status?: string;
            type: string;
        } & { [key: string]: unknown };
        BusinessAgentConnectorOAuthRequest: {
            oauth_config: {
                client_id: string;
                client_secret: string;
                scopes_to_request: string[];
                token_url: string;
            };
        };
        BusinessAgentConnectorTool: {
            backing_flow_id?: null
            | string;
            backing_function_id?: null | string;
            backing_function_version_id: null | string;
            backing_type: "FLOW" | "API_ENDPOINT" | "NOOP" | "HOSTED_FUNCTION";
            connector_id: string;
            created_at: string;
            description?: null | string;
            id: string;
            input_schema?: null | { [key: string]: unknown };
            meta_tool_id?: null | string;
            name: string;
            object: "business_agent_connector_tool";
            updated_at: string;
        };
        BusinessAgentConnectorToolCreateRequest: {
            backing_flow_id?: string;
            backing_function_id?: string;
            backing_type: "FLOW"
            | "API_ENDPOINT"
            | "NOOP"
            | "HOSTED_FUNCTION";
            config?: { [key: string]: unknown };
            description?: string;
            input_schema?: { [key: string]: unknown };
            name: string;
        } & { [key: string]: unknown };
        BusinessAgentConnectorToolRunRequest: {
            arguments: { [key: string]: unknown };
        };
        BusinessAgentConnectorToolUpdateRequest: {
            backing_flow_id?: null
            | string;
            backing_function_id?: null | string;
            backing_type?: "FLOW" | "API_ENDPOINT" | "NOOP" | "HOSTED_FUNCTION";
            config?: { [key: string]: unknown };
            description?: null | string;
            input_schema?: null | { [key: string]: unknown };
            name?: string;
        } & { [key: string]: unknown };
        BusinessAgentConnectorUpdateRequest: {
            config?: { [key: string]: unknown };
            name?: string;
            status?: string;
            type?: string;
        } & { [key: string]: unknown };
        BusinessAgentEligibilityResponse: {
            channel_id: string;
            eligibility: { [key: string]: unknown };
            object: "business_agent_eligibility";
        };
        BusinessAgentEvalResponse: {
            business_agent_id: string;
            object: "business_agent_eval";
            result: { [key: string]: unknown };
        };
        BusinessAgentEventRequest: { [key: string]: unknown };
        BusinessAgentRemoteWriteResolveRequest: {
            action: "adopt" | "resolve";
            approved: true;
            remote_id: string;
        };
        BusinessAgentResourceRequest: { [key: string]: unknown };
        BusinessAgentSettingsRequest: {
            enabled?: boolean;
            handoff?: { [key: string]: unknown };
            knowledge?: { [key: string]: unknown };
            language?: string;
            persona?: string;
        } & { [key: string]: unknown };
        BusinessAgentSettingsResponse: {
            business_agent_id: string;
            object: "business_agent_settings";
            settings: { [key: string]: unknown };
        };
        BusinessAgentSkillRequest: {
            description?: string;
            skill?: string;
            title?: string;
        };
        BusinessAgentSkillsResponse: {
            business_agent_id: string;
            data: unknown[];
            object: "business_agent_skills";
            result?: { [key: string]: unknown };
        } & { [key: string]: unknown };
        BusinessAgentTestRequest: {
            business_agent_id: string;
            conversation_id?: string;
            user_msg: string;
        };
        BusinessAgentTestResponse: {
            business_agent_id: string;
            object: "business_agent_test";
            result: { [key: string]: unknown };
        };
        Channel: {
            channel_id?: string;
            display_name?: null
            | string;
            id?: string;
            is_sandbox?: boolean;
            number_mode?: string;
            object?: "channel";
            phone_number?: null | string;
            platform?:
                | "WHATSAPP"
                | "INSTAGRAM"
                | "MESSENGER"
                | "SMS"
                | "TELEGRAM"
                | "EMAIL";
            publish_readiness?: | null
            | {
                account_review_status?: null
                | string;
                blockers?: (
                    | "CHANNEL_NOT_CONNECTED"
                    | "MISSING_WABA"
                    | "MISSING_CHANNEL_CREDENTIALS"
                    | "META_ACCOUNT_STATUS_UNKNOWN"
                    | "BUSINESS_NOT_VERIFIED"
                    | "ACCOUNT_NOT_APPROVED"
                    | "PHONE_NOT_CONNECTED"
                    | "PHONE_STATUS_UNKNOWN"
                    | "PAYMENT_STATUS_UNKNOWN"
                    | "NO_PAYMENT_METHOD"
                    | "WHATSAPP_SENDER_NOT_READY"
                    | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                )[];
                business_verification_status?: null
                | string;
                can_publish_flows?: boolean;
                can_submit_templates?: boolean;
                mode?: "sandbox" | "dedicated";
                phone_number_status?: null | string;
            };
            routing_mode?: "AGENT"
            | "EXTERNAL";
            routing_warning?: null | string;
            status?: string;
        };
        ConfigApplyResponse: {
            applied?: {
                hosted_agents?: {
                    action_required?: | null
                    | "CREATE_AGENT"
                    | "SELECT_AI_MODEL"
                    | "ADD_PAYMENT_METHOD"
                    | "ADD_FUNDS";
                    ai_enabled: boolean;
                    id: string;
                    key?: string;
                    project_id: string;
                    runtime_mode: "ai_ready"
                    | "automations_only"
                    | "not_operational";
                    status?: string;
                }[];
            };
            config?: {
                $schema?: string;
                automations: {
                    active?: boolean;
                    key: string;
                    name: string;
                    steps: (
                        | { send_reply: { buttons?: (...)
                        | (...); text: string } }
                        | { delay: { minutes: number } }
                        | {
                            wait_reply: {
                                options?: (...) | (...);
                                timeout_hours?: (...) | (...);
                            };
                        }
                        | { pause_replies: { reason?: (...)
                        | (...) } }
                        | {
                            send_flow: {
                                body_text?: (...) | (...);
                                flow: string;
                                flow_cta?: (...) | (...);
                                footer_text?: (...) | (...);
                                header_text?: (...) | (...);
                            };
                        }
                        | {
                            run_function: {
                                function: string;
                                reply_field?: (...)
                                | (...);
                                result_mode?: (...) | (...) | (...) | (...);
                                variable_name?: (...) | (...);
                            };
                        }
                    )[];
                    trigger: {
                        keywords?: string[];
                        match_mode?: "EXACT"
                        | "CONTAINS"
                        | "CONTAINS_WORD";
                        type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
                    };
                }[];
                business_agent?: {
                    channel_id?: string;
                    connectors?: { [key: string]: unknown }[];
                    enabled: boolean;
                    faqs?: {
                        key: string;
                        remote_id?: string;
                        value: { [key: string]: unknown };
                    }[];
                    operation_id: string;
                    settings: {
                        enabled?: boolean;
                        handoff?: { [key: string]: unknown };
                        knowledge?: { [key: string]: unknown };
                        language?: string;
                        persona?: string;
                    } & { [key: string]: unknown };
                    skills?: {
                        key: string;
                        remote_id?: string;
                        value: { [key: string]: unknown };
                    }[];
                    ui_skills?: {
                        key: string;
                        remote_id?: string;
                        value: { [key: string]: unknown };
                    }[];
                    websites?: {
                        key: string;
                        remote_id?: string;
                        value: { [key: string]: unknown };
                    }[];
                };
                flows: {
                    agent_id?: string;
                    data_exchange_url?: null
                    | string;
                    description?: string;
                    draft?: { entryScreenId?: string; screens?: (...)[] } & {
                        [key: string]: unknown;
                    };
                    flow_json?: { screens?: (...)[]; version?: string } & {
                        [key: string]: unknown;
                    };
                    key: string;
                    locale?: string;
                    name: string;
                    project_id?: string;
                    runtime_mode?: "STATIC"
                    | "DATA_EXCHANGE";
                }[];
                hosted_agents?: {
                    allowed_topics: string[];
                    channel_ids: string[];
                    conversation_messages?: {
                        cannot_listen?: string;
                        clarification: string;
                        farewell: string;
                        greeting: string;
                        out_of_scope: string;
                    };
                    fallback: {
                        automation_id?: string;
                        message?: string;
                        policy: "SILENT"
                        | "CLARIFICATION"
                        | "HUMAN_HANDOFF"
                        | "AUTOMATION";
                    };
                    instructions: string;
                    key: string;
                    knowledge: {
                        content?: string;
                        title: string;
                        type: "TEXT"
                        | "FAQ"
                        | "URL";
                        url?: string;
                    }[];
                    language: string;
                    max_input_chars: number;
                    max_output_tokens: number;
                    max_run_cost_micros: number;
                    model: string;
                    monthly_budget_micros: number;
                    name: string;
                    project_id?: string;
                    purpose?: string;
                    status?: "DRAFT"
                    | "DISABLED";
                }[];
                project_id?: string;
                require_opt_in?: boolean;
                version?: string;
            };
            diff: {
                action?: "delete"
                | "create"
                | "update"
                | "unchanged";
                details?: string[];
                key?: string;
                requiresActivation?: boolean;
                risk?: "low" | "medium" | "high";
                type?:
                    | "business_agent"
                    | "business_agent_connector"
                    | "flow"
                    | "project"
                    | "hosted_agent"
                    | "hosted_agent_assignment"
                    | "hosted_agent_knowledge"
                    | "automation"
                    | "webhook"
                    | "business_agent_tool";
            }[];
            issues: {
                message?: string;
                path?: string;
                severity?: "warning"
                | "error";
            }[];
            object: "config_apply";
            valid: boolean;
        };
        ConfigDiffItem: {
            action?: "delete"
            | "create"
            | "update"
            | "unchanged";
            details?: string[];
            key?: string;
            requiresActivation?: boolean;
            risk?: "low" | "medium" | "high";
            type?:
                | "business_agent"
                | "business_agent_connector"
                | "flow"
                | "project"
                | "hosted_agent"
                | "hosted_agent_assignment"
                | "hosted_agent_knowledge"
                | "automation"
                | "webhook"
                | "business_agent_tool";
        };
        ConfigDiffResponse: {
            diff: {
                action?: "delete"
                | "create"
                | "update"
                | "unchanged";
                details?: string[];
                key?: string;
                requiresActivation?: boolean;
                risk?: "low" | "medium" | "high";
                type?:
                    | "business_agent"
                    | "business_agent_connector"
                    | "flow"
                    | "project"
                    | "hosted_agent"
                    | "hosted_agent_assignment"
                    | "hosted_agent_knowledge"
                    | "automation"
                    | "webhook"
                    | "business_agent_tool";
            }[];
            issues: {
                message?: string;
                path?: string;
                severity?: "warning"
                | "error";
            }[];
            object: "config_diff";
            valid: boolean;
        };
        ConfigIssue: {
            message?: string;
            path?: string;
            severity?: "warning"
            | "error";
        };
        ConfigValidationResponse: {
            config?: {
                $schema?: string;
                automations: {
                    active?: boolean;
                    key: string;
                    name: string;
                    steps: (
                        | { send_reply: { buttons?: (...)
                        | (...); text: string } }
                        | { delay: { minutes: number } }
                        | {
                            wait_reply: {
                                options?: (...) | (...);
                                timeout_hours?: (...) | (...);
                            };
                        }
                        | { pause_replies: { reason?: (...)
                        | (...) } }
                        | {
                            send_flow: {
                                body_text?: (...) | (...);
                                flow: string;
                                flow_cta?: (...) | (...);
                                footer_text?: (...) | (...);
                                header_text?: (...) | (...);
                            };
                        }
                        | {
                            run_function: {
                                function: string;
                                reply_field?: (...)
                                | (...);
                                result_mode?: (...) | (...) | (...) | (...);
                                variable_name?: (...) | (...);
                            };
                        }
                    )[];
                    trigger: {
                        keywords?: string[];
                        match_mode?: "EXACT"
                        | "CONTAINS"
                        | "CONTAINS_WORD";
                        type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
                    };
                }[];
                business_agent?: {
                    channel_id?: string;
                    connectors?: { [key: string]: unknown }[];
                    enabled: boolean;
                    faqs?: {
                        key: string;
                        remote_id?: string;
                        value: { [key: string]: unknown };
                    }[];
                    operation_id: string;
                    settings: {
                        enabled?: boolean;
                        handoff?: { [key: string]: unknown };
                        knowledge?: { [key: string]: unknown };
                        language?: string;
                        persona?: string;
                    } & { [key: string]: unknown };
                    skills?: {
                        key: string;
                        remote_id?: string;
                        value: { [key: string]: unknown };
                    }[];
                    ui_skills?: {
                        key: string;
                        remote_id?: string;
                        value: { [key: string]: unknown };
                    }[];
                    websites?: {
                        key: string;
                        remote_id?: string;
                        value: { [key: string]: unknown };
                    }[];
                };
                flows: {
                    agent_id?: string;
                    data_exchange_url?: null
                    | string;
                    description?: string;
                    draft?: { entryScreenId?: string; screens?: (...)[] } & {
                        [key: string]: unknown;
                    };
                    flow_json?: { screens?: (...)[]; version?: string } & {
                        [key: string]: unknown;
                    };
                    key: string;
                    locale?: string;
                    name: string;
                    project_id?: string;
                    runtime_mode?: "STATIC"
                    | "DATA_EXCHANGE";
                }[];
                hosted_agents?: {
                    allowed_topics: string[];
                    channel_ids: string[];
                    conversation_messages?: {
                        cannot_listen?: string;
                        clarification: string;
                        farewell: string;
                        greeting: string;
                        out_of_scope: string;
                    };
                    fallback: {
                        automation_id?: string;
                        message?: string;
                        policy: "SILENT"
                        | "CLARIFICATION"
                        | "HUMAN_HANDOFF"
                        | "AUTOMATION";
                    };
                    instructions: string;
                    key: string;
                    knowledge: {
                        content?: string;
                        title: string;
                        type: "TEXT"
                        | "FAQ"
                        | "URL";
                        url?: string;
                    }[];
                    language: string;
                    max_input_chars: number;
                    max_output_tokens: number;
                    max_run_cost_micros: number;
                    model: string;
                    monthly_budget_micros: number;
                    name: string;
                    project_id?: string;
                    purpose?: string;
                    status?: "DRAFT"
                    | "DISABLED";
                }[];
                project_id?: string;
                require_opt_in?: boolean;
                version?: string;
            };
            issues: {
                message?: string;
                path?: string;
                severity?: "warning"
                | "error";
            }[];
            object: "config_validation";
            valid: boolean;
        };
        Contact: {
            channel?: {
                channel_id?: string;
                display_name?: null
                | string;
                id?: string;
                is_sandbox?: boolean;
                number_mode?: string;
                object?: "channel";
                phone_number?: null | string;
                platform?:
                    | "WHATSAPP"
                    | "INSTAGRAM"
                    | "MESSENGER"
                    | "SMS"
                    | "TELEGRAM"
                    | "EMAIL";
                publish_readiness?: | null
                | {
                    account_review_status?: null
                    | string;
                    blockers?: (
                        | "CHANNEL_NOT_CONNECTED"
                        | "MISSING_WABA"
                        | "MISSING_CHANNEL_CREDENTIALS"
                        | "META_ACCOUNT_STATUS_UNKNOWN"
                        | "BUSINESS_NOT_VERIFIED"
                        | "ACCOUNT_NOT_APPROVED"
                        | "PHONE_NOT_CONNECTED"
                        | "PHONE_STATUS_UNKNOWN"
                        | "PAYMENT_STATUS_UNKNOWN"
                        | "NO_PAYMENT_METHOD"
                        | "WHATSAPP_SENDER_NOT_READY"
                        | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                    )[];
                    business_verification_status?: null
                    | string;
                    can_publish_flows?: boolean;
                    can_submit_templates?: boolean;
                    mode?: "sandbox" | "dedicated";
                    phone_number_status?: null | string;
                };
                routing_mode?: "AGENT"
                | "EXTERNAL";
                routing_warning?: null | string;
                status?: string;
            };
            channel_id?: string;
            contact_id: string;
            id: string;
            object: "contact";
            phone?: null
            | string;
            preferred_language?: null | string;
            project_id?: string;
            reference_id?: null | string;
            status?: string;
        };
        ContactDeleteResponse: {
            deleted: true;
            deleted_data_types?: string[];
            erased: boolean;
            id: string;
            object: "contact";
        };
        ContactImport: {
            created_count?: number;
            error_count?: number;
            errors_available?: boolean;
            filename: string;
            id: string;
            object: "contact_import";
            processed_rows?: number;
            skipped_count?: number;
            status: string;
            total_rows?: number;
            updated_count?: number;
        };
        Conversation: {
            contact_id?: string;
            conversation_id?: string;
            created_at?: string;
            id?: string;
            is_active?: boolean;
            last_channel_id?: null
            | string;
            last_message_at?: null | string;
            name?: null | string;
            object?: "conversation";
            phone?: null | string;
            reference_id?: null | string;
            started_at?: string;
            updated_at?: string;
        };
        Error: {
            error: string;
            issues?: { [key: string]: unknown };
            message?: string;
            request_id?: string;
            required_scope?: string;
        } & { [key: string]: unknown };
        Flow: {
            agent_id?: string;
            config_key?: null | string;
            created_at?: string;
            description?: null | string;
            field_schema?: null | { [key: string]: unknown }[];
            flow_json?: null | { [key: string]: unknown };
            id?: string;
            last_synced_at?: null | string;
            locale?: null | string;
            meta_flow_id?: null | string;
            meta_status?: null | string;
            meta_status_reason?: null | string;
            meta_waba_id?: null | string;
            name?: string;
            object?: "flow";
            published_version?: null | number;
            runtime_mode?: "STATIC" | "DATA_EXCHANGE";
            status?: "DRAFT" | "PUBLISHED" | "DEPRECATED";
            updated_at?: string;
            validation_errors?: null | { [key: string]: unknown }[];
        };
        FlowDeleteResponse: {
            deleted: true;
            id: string;
            meta_deleted?: boolean;
            meta_error?: null
            | string;
            object: "flow";
        };
        FlowDispatch: {
            agent_id?: string;
            channel_id?: string;
            completed_at?: null
            | string;
            contact_id?: null | string;
            conversation_id?: null | string;
            created_at?: string;
            expires_at?: string;
            flow_id?: string;
            flow_token?: string;
            id?: string;
            object?: "flow_dispatch";
            status?: "SENT" | "COMPLETED" | "EXPIRED";
            to?: null | string;
        };
        FlowEvent: {
            created_at: string;
            data?: null
            | { [key: string]: unknown };
            id: string;
            level: "info" | "error" | "warn";
            message?: null | string;
            object: "flow_event";
            submission_id?: null | string;
            type: string;
        };
        FlowPublishResponse: {
            flow_id: string;
            job_id: string;
            meta_status?: null
            | string;
            object: "flow_publish";
            status: "queued";
            version?: number;
        };
        FlowSendResponse: {
            contact_id?: null
            | string;
            conversation_id?: null | string;
            flow_id: string;
            flow_token: string;
            id: string;
            locale?: null | string;
            object: "flow_dispatch";
            status: "queued";
        };
        FlowSubmission: {
            agent_id?: string;
            contact_id?: null
            | string;
            conversation_id?: null | string;
            created_at?: string;
            flow_id?: string;
            flow_token?: string;
            from?: null | string;
            id?: string;
            object?: "flow_submission";
            status?: "RECEIVED" | "VALIDATED" | "REJECTED" | "FORWARDED";
            submission?: { [key: string]: unknown };
        };
        FriendlyIssue: {
            area?: string;
            code?: string;
            message?: string;
            next_steps?: string[];
            severity?: "info"
            | "warning"
            | "blocked";
            title?: string;
        };
        FunctionCreateRequest: {
            egress_allowed_hosts?: string[];
            name: string;
            slug: string;
            trigger_type: "KEYWORD"
            | "WELCOME"
            | "ANY_MESSAGE";
        };
        FunctionDeleteResponse: {
            deleted?: boolean;
            id?: string;
            object?: "hosted_function";
        };
        FunctionDeployRequest: { source: string };
        FunctionDeployResponse: {
            bytes?: number;
            diagnostics?: string[];
            function_id?: string;
            object?: "function_deploy";
            status?: "ok" | "error";
            version_id?: string;
        };
        FunctionInvocation: {
            cpu_ms?: null
            | number;
            error?: null | string;
            event_type?: string;
            id?: string;
            logs?: unknown;
            started_at?: string;
            status?: string;
            sub_requests?: null | number;
        };
        FunctionInvokeRequest: {
            arguments?: { [key: string]: unknown };
            contact_id?: string;
            contact_phone?: string;
        };
        FunctionInvokeResponse: {
            error?: string;
            function_id?: string;
            object?: "function_invoke";
            result?: unknown;
        };
        FunctionTestRequest: {
            contact?: { id: string; name?: string; phone: string };
            text?: string;
        };
        FunctionTestResponse: {
            error?: string;
            function_id?: string;
            object?: "function_test";
            result?: unknown;
        };
        FunctionUpdateRequest: {
            egress_allowed_hosts?: string[];
            expose_as_mcp_tool?: boolean;
            input_schema?: { [key: string]: unknown };
            is_active?: boolean;
            name?: string;
        };
        HostedFunction: {
            active_version_id: null
            | string;
            created_at: string;
            egress_allowed_hosts: string[];
            expose_as_mcp_tool: boolean;
            id: string;
            input_schema?: null | { [key: string]: unknown };
            is_active: boolean;
            name: string;
            object: "hosted_function";
            runtime: "PLAIN" | "WFP";
            script_name: string;
            slug: string;
            source?: null | string;
            trigger_type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
            updated_at: string;
        };
        Identity: {
            api_key: {
                display?: null
                | string;
                id?: string;
                name?: null | string;
                prefix?: null | string;
                scopes?: string[];
            };
            api_version?: string;
            object: "identity";
            organization: { id?: string; name?: null
            | string };
            plan?: null | string;
            project: { id?: string; name?: null | string };
        };
        ListMeta: { has_more?: boolean; object: "list" };
        Message: {
            channel_id?: string;
            contact_id?: string;
            content?: null | string;
            conversation_id?: null | string;
            direction?: "inbound" | "outbound";
            failure?:
                | null
                | {
                    code?: null
                    | string
                    | number;
                    fbtrace_id?: null | string;
                    http_status?: null | number;
                    message?: string;
                    occurred_at?: string;
                    provider?: "meta" | "wabery";
                    subcode?: null | string | number;
                    summary?: string;
                    title?: null | string;
                    type?: null | string;
                };
            id?: string;
            media?: | null
            | {
                access_policy?: string;
                accessible?: boolean;
                error_code?: null
                | string;
                expires_at?: null | string;
                file_name?: null | string;
                file_size?: null | number;
                mime_type?: null | string;
                note?: null | string;
                provider?: null | "whatsapp" | "instagram" | "messenger";
                provider_media_id?: null | string;
                status?: "expired" | "available" | "unavailable";
                type?: null | string;
                url?: null | string;
                whatsapp_media_id?: null | string;
            };
            message_id?: string;
            object?: "message";
            platform_message_id?: null
            | string;
            status?: string;
            timestamp?: string;
            type?: string;
        };
        MessageSendRequest: {
            channel_id: string;
            contacts?: { [key: string]: unknown }[];
            conversation_id?: string;
            group_id?: string;
            idempotency_key?: string;
            interactive?: { [key: string]: unknown };
            location?: {
                address?: string;
                latitude: number;
                longitude: number;
                name?: string;
            };
            media?: { type?: "document" | "image" | "video" | "audio" | undefined; link?: string | undefined; id?: string | undefined; caption?: string | undefined; filename?: string | undefined; } & ({ ...; } | { ...; });
            pin?: | { expiration_days: number; message_id: string; type: "pin" }
            | { message_id: string; type: "unpin" };
            reaction?: { emoji: string; message_id: string };
            reply_to?: string;
            sticker?: { id?: string | undefined; link?: string | undefined; } & ({ id: string; link?: undefined; } | { link: string; id?: undefined; });
            template?: {
                components?: { [key: string]: unknown }[];
                id?: string;
                language?: string;
                name?: string;
            };
            text?: string;
            to?: string;
        };
        MessageSendResponse: {
            contact_id: string;
            conversation_id: string;
            id: string;
            idempotency_key: string;
            object: "message";
            status: "queued";
        };
        MetaDeclarativeResource: {
            key: string;
            remote_id?: string;
            value: { [key: string]: unknown };
        };
        OnboardingHandoff: {
            channel_id?: null
            | string;
            completed_at?: null | string;
            connection_mode?: string;
            created_at?: string;
            expires_at?: string;
            id?: string;
            object?: "onboarding_handoff";
            project_id?: string;
            status?: "pending" | "completed" | "expired" | "revoked";
            type?: "connect_whatsapp";
        };
        Problem: {
            code?: string;
            detail?: string;
            instance?: string;
            status: number;
            title: string;
            type: string;
        } & { [key: string]: unknown };
        Project: {
            automatic_read_receipts?: boolean;
            channel_id?: null | string;
            created_at?: string;
            description?: null | string;
            enrollment_channel?:
                | null
                | {
                    channel_id?: string;
                    display_name?: null
                    | string;
                    id?: string;
                    is_sandbox?: boolean;
                    number_mode?: string;
                    object?: "channel";
                    phone_number?: null | string;
                    platform?:
                        | "WHATSAPP"
                        | "INSTAGRAM"
                        | "MESSENGER"
                        | "SMS"
                        | "TELEGRAM"
                        | "EMAIL";
                    publish_readiness?: | null
                    | {
                        account_review_status?: null
                        | string;
                        blockers?: (
                            | "CHANNEL_NOT_CONNECTED"
                            | "MISSING_WABA"
                            | "MISSING_CHANNEL_CREDENTIALS"
                            | "META_ACCOUNT_STATUS_UNKNOWN"
                            | "BUSINESS_NOT_VERIFIED"
                            | "ACCOUNT_NOT_APPROVED"
                            | "PHONE_NOT_CONNECTED"
                            | "PHONE_STATUS_UNKNOWN"
                            | "PAYMENT_STATUS_UNKNOWN"
                            | "NO_PAYMENT_METHOD"
                            | "WHATSAPP_SENDER_NOT_READY"
                            | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                        )[];
                        business_verification_status?: null
                        | string;
                        can_publish_flows?: boolean;
                        can_submit_templates?: boolean;
                        mode?: "sandbox" | "dedicated";
                        phone_number_status?: null | string;
                    };
                    routing_mode?: "AGENT"
                    | "EXTERNAL";
                    routing_warning?: null | string;
                    status?: string;
                };
            flow_count?: number;
            id?: string;
            join_code?: string;
            name?: string;
            object?: "project";
            participant_count?: number;
            project_id?: string;
            publish_readiness?: | null
            | {
                account_review_status?: null
                | string;
                blockers?: (
                    | "CHANNEL_NOT_CONNECTED"
                    | "MISSING_WABA"
                    | "MISSING_CHANNEL_CREDENTIALS"
                    | "META_ACCOUNT_STATUS_UNKNOWN"
                    | "BUSINESS_NOT_VERIFIED"
                    | "ACCOUNT_NOT_APPROVED"
                    | "PHONE_NOT_CONNECTED"
                    | "PHONE_STATUS_UNKNOWN"
                    | "PAYMENT_STATUS_UNKNOWN"
                    | "NO_PAYMENT_METHOD"
                    | "WHATSAPP_SENDER_NOT_READY"
                    | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                )[];
                business_verification_status?: null
                | string;
                can_publish_flows?: boolean;
                can_submit_templates?: boolean;
                mode?: "sandbox" | "dedicated";
                phone_number_status?: null | string;
            };
            require_opt_in?: boolean;
            routing_mode?: string;
            updated_at?: string;
            webhook_secret?: null
            | string;
            webhook_signing_enabled?: boolean;
            webhook_url?: null | string;
        };
        ProjectReadiness: {
            agent_runtime: {
                action_required?: | null
                | "CREATE_AGENT"
                | "SELECT_AI_MODEL"
                | "ADD_PAYMENT_METHOD"
                | "ADD_FUNDS";
                ai_enabled: boolean;
                available_balance_micros: number;
                has_useful_automations: boolean;
                mode: "ai_ready"
                | "automations_only"
                | "not_operational";
                runtime_model?: null | string;
                selected_model?: null | string;
            };
            capabilities?: {
                [key: string]: {
                    message?: string;
                    status?: | "warning"
                    | "blocked"
                    | "ready"
                    | "testable"
                    | "not_applicable";
                };
            };
            dedicated_channel?: | null
            | {
                channel_id?: string;
                display_name?: null
                | string;
                id?: string;
                is_sandbox?: boolean;
                number_mode?: string;
                object?: "channel";
                phone_number?: null | string;
                platform?:
                    | "WHATSAPP"
                    | "INSTAGRAM"
                    | "MESSENGER"
                    | "SMS"
                    | "TELEGRAM"
                    | "EMAIL";
                publish_readiness?: | null
                | {
                    account_review_status?: null
                    | string;
                    blockers?: (
                        | "CHANNEL_NOT_CONNECTED"
                        | "MISSING_WABA"
                        | "MISSING_CHANNEL_CREDENTIALS"
                        | "META_ACCOUNT_STATUS_UNKNOWN"
                        | "BUSINESS_NOT_VERIFIED"
                        | "ACCOUNT_NOT_APPROVED"
                        | "PHONE_NOT_CONNECTED"
                        | "PHONE_STATUS_UNKNOWN"
                        | "PAYMENT_STATUS_UNKNOWN"
                        | "NO_PAYMENT_METHOD"
                        | "WHATSAPP_SENDER_NOT_READY"
                        | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                    )[];
                    business_verification_status?: null
                    | string;
                    can_publish_flows?: boolean;
                    can_submit_templates?: boolean;
                    mode?: "sandbox" | "dedicated";
                    phone_number_status?: null | string;
                };
                routing_mode?: "AGENT"
                | "EXTERNAL";
                routing_warning?: null | string;
                status?: string;
            };
            effective_channel?: | null
            | {
                channel_id?: string;
                display_name?: null
                | string;
                id?: string;
                is_sandbox?: boolean;
                number_mode?: string;
                object?: "channel";
                phone_number?: null | string;
                platform?:
                    | "WHATSAPP"
                    | "INSTAGRAM"
                    | "MESSENGER"
                    | "SMS"
                    | "TELEGRAM"
                    | "EMAIL";
                publish_readiness?: | null
                | {
                    account_review_status?: null
                    | string;
                    blockers?: (
                        | "CHANNEL_NOT_CONNECTED"
                        | "MISSING_WABA"
                        | "MISSING_CHANNEL_CREDENTIALS"
                        | "META_ACCOUNT_STATUS_UNKNOWN"
                        | "BUSINESS_NOT_VERIFIED"
                        | "ACCOUNT_NOT_APPROVED"
                        | "PHONE_NOT_CONNECTED"
                        | "PHONE_STATUS_UNKNOWN"
                        | "PAYMENT_STATUS_UNKNOWN"
                        | "NO_PAYMENT_METHOD"
                        | "WHATSAPP_SENDER_NOT_READY"
                        | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                    )[];
                    business_verification_status?: null
                    | string;
                    can_publish_flows?: boolean;
                    can_submit_templates?: boolean;
                    mode?: "sandbox" | "dedicated";
                    phone_number_status?: null | string;
                };
                routing_mode?: "AGENT"
                | "EXTERNAL";
                routing_warning?: null | string;
                status?: string;
            };
            issues?: {
                area?: string;
                code?: string;
                message?: string;
                next_steps?: string[];
                severity?: "info"
                | "warning"
                | "blocked";
                title?: string;
            }[];
            next_steps?: string[];
            object: "project_readiness";
            overall_status?: string;
            production_inbound_ready?: boolean;
            project_id: string;
            project_name?: string;
            requirements?: string[];
            sandbox_channel?: | null
            | {
                channel_id?: string;
                display_name?: null
                | string;
                id?: string;
                is_sandbox?: boolean;
                number_mode?: string;
                object?: "channel";
                phone_number?: null | string;
                platform?:
                    | "WHATSAPP"
                    | "INSTAGRAM"
                    | "MESSENGER"
                    | "SMS"
                    | "TELEGRAM"
                    | "EMAIL";
                publish_readiness?: | null
                | {
                    account_review_status?: null
                    | string;
                    blockers?: (
                        | "CHANNEL_NOT_CONNECTED"
                        | "MISSING_WABA"
                        | "MISSING_CHANNEL_CREDENTIALS"
                        | "META_ACCOUNT_STATUS_UNKNOWN"
                        | "BUSINESS_NOT_VERIFIED"
                        | "ACCOUNT_NOT_APPROVED"
                        | "PHONE_NOT_CONNECTED"
                        | "PHONE_STATUS_UNKNOWN"
                        | "PAYMENT_STATUS_UNKNOWN"
                        | "NO_PAYMENT_METHOD"
                        | "WHATSAPP_SENDER_NOT_READY"
                        | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                    )[];
                    business_verification_status?: null
                    | string;
                    can_publish_flows?: boolean;
                    can_submit_templates?: boolean;
                    mode?: "sandbox" | "dedicated";
                    phone_number_status?: null | string;
                };
                routing_mode?: "AGENT"
                | "EXTERNAL";
                routing_warning?: null | string;
                status?: string;
            };
            sandbox_testable?: boolean;
        };
        ProjectWebhookSecret: {
            object: "project_webhook_secret";
            project_id: string;
            webhook_secret: string;
        };
        PublicApiLimits: {
            monthly_quota?: {
                period?: string;
                requests: number;
                scope?: "api_key";
            };
            object?: "public_api_limits";
            rate_limit?: {
                requests: number;
                scope?: "api_key";
                window_seconds: number;
            };
        };
        PublishReadiness: {
            account_review_status?: null
            | string;
            blockers?: (
                | "CHANNEL_NOT_CONNECTED"
                | "MISSING_WABA"
                | "MISSING_CHANNEL_CREDENTIALS"
                | "META_ACCOUNT_STATUS_UNKNOWN"
                | "BUSINESS_NOT_VERIFIED"
                | "ACCOUNT_NOT_APPROVED"
                | "PHONE_NOT_CONNECTED"
                | "PHONE_STATUS_UNKNOWN"
                | "PAYMENT_STATUS_UNKNOWN"
                | "NO_PAYMENT_METHOD"
                | "WHATSAPP_SENDER_NOT_READY"
                | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
            )[];
            business_verification_status?: null
            | string;
            can_publish_flows?: boolean;
            can_submit_templates?: boolean;
            mode?: "sandbox" | "dedicated";
            phone_number_status?: null | string;
        };
        RegistrationIntent: {
            expires_at: string;
            id: string;
            mode?: "test"
            | "live";
            object: "registration_intent";
            prefilled_message?: string;
            status?: "PENDING";
            token: string;
            wa_link: string;
            whatsapp_number?: string;
        };
        TemplateCreateRequest: {
            category: "UTILITY"
            | "MARKETING"
            | "AUTHENTICATION";
            channel_id: string;
            components: { [key: string]: unknown }[];
            language: string;
            name: string;
            parameter_format?: "POSITIONAL" | "NAMED";
        };
        ThreadControlRequest: {
            action: "take"
            | "release"
            | "pass";
            business_agent_id?: string;
            channel_id: string;
            contact_id: string;
            metadata?: string;
            pass_to_meta?: boolean;
            reason?: string;
            to: string;
        };
        ThreadControlState: {
            business_agent_id?: null
            | string;
            channel_id: string;
            contact_id: string;
            created_at: string;
            id: string;
            meta_result?: { messaging_product?: string; request_id?: string } & {
                [key: string]: unknown;
            };
            meta_thread_id?: null
            | string;
            object: "thread_control_state";
            observation?: "local";
            operation_id?: string;
            owner: "META_AGENT" | "WABERY" | "BUSINESS_INBOX" | "UNKNOWN" | "PENDING";
            project_id: string;
            reason?: null | string;
            replayed?: boolean;
            updated_at: string;
        } & { [key: string]: unknown };
        WaberyConfig: {
            $schema?: string;
            automations: {
                active?: boolean;
                key: string;
                name: string;
                steps: (
                    | {
                        send_reply: { buttons?: { id: ...; title: ... }[]; text: string };
                    }
                    | { delay: { minutes: number } }
                    | {
                        wait_reply: {
                            options?: { id: ...; keywords?: ...; label: ...; matchMode?: ... }[];
                            timeout_hours?: number;
                        };
                    }
                    | { pause_replies: { reason?: string } }
                    | {
                        send_flow: {
                            body_text?: string;
                            flow: string;
                            flow_cta?: string;
                            footer_text?: string;
                            header_text?: string;
                        };
                    }
                    | {
                        run_function: {
                            function: string;
                            reply_field?: string;
                            result_mode?: "reply"
                            | "variables"
                            | "side_effect";
                            variable_name?: string;
                        };
                    }
                )[];
                trigger: {
                    keywords?: string[];
                    match_mode?: "EXACT"
                    | "CONTAINS"
                    | "CONTAINS_WORD";
                    type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
                };
            }[];
            business_agent?: {
                channel_id?: string;
                connectors?: { [key: string]: unknown }[];
                enabled: boolean;
                faqs?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                operation_id: string;
                settings: {
                    enabled?: boolean;
                    handoff?: { [key: string]: unknown };
                    knowledge?: { [key: string]: unknown };
                    language?: string;
                    persona?: string;
                } & { [key: string]: unknown };
                skills?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                ui_skills?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                websites?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
            };
            flows: {
                agent_id?: string;
                data_exchange_url?: null
                | string;
                description?: string;
                draft?: {
                    entryScreenId?: string;
                    screens?: { [key: string]: unknown }[];
                } & { [key: string]: unknown };
                flow_json?: { screens?: Record<string, never>[]; version?: string } & {
                    [key: string]: unknown;
                };
                key: string;
                locale?: string;
                name: string;
                project_id?: string;
                runtime_mode?: "STATIC"
                | "DATA_EXCHANGE";
            }[];
            hosted_agents?: {
                allowed_topics: string[];
                channel_ids: string[];
                conversation_messages?: {
                    cannot_listen?: string;
                    clarification: string;
                    farewell: string;
                    greeting: string;
                    out_of_scope: string;
                };
                fallback: {
                    automation_id?: string;
                    message?: string;
                    policy: "SILENT"
                    | "CLARIFICATION"
                    | "HUMAN_HANDOFF"
                    | "AUTOMATION";
                };
                instructions: string;
                key: string;
                knowledge: {
                    content?: string;
                    title: string;
                    type: "TEXT"
                    | "FAQ"
                    | "URL";
                    url?: string;
                }[];
                language: string;
                max_input_chars: number;
                max_output_tokens: number;
                max_run_cost_micros: number;
                model: string;
                monthly_budget_micros: number;
                name: string;
                project_id?: string;
                purpose?: string;
                status?: "DRAFT"
                | "DISABLED";
            }[];
            project_id?: string;
            require_opt_in?: boolean;
            version?: string;
        };
        WhatsAppGroup: {
            channel_id: string;
            created_at?: null
            | string;
            creation_timestamp?: null | number;
            description?: null | string;
            group_id?: string;
            id: string;
            invite_link?: null | string;
            join_approval_mode: null | "auto_approve" | "approval_required";
            object: "whatsapp_group";
            participants: {
                id: string;
                id_type: "user_id" | "wa_id";
                name?: null | string;
                parent_user_id?: null | string;
                phone?: null | string;
                user?: string;
                user_id: null | string;
                username?: null | string;
                wa_id: null | string;
            }[];
            subject: null
            | string;
            suspended: null | boolean;
            total_participant_count: null | number;
        };
        WhatsAppGroupConversation: {
            contact_id?: null;
            conversation_id?: string;
            created_at?: string;
            group_id?: null
            | string;
            group_subject?: null | string;
            id?: string;
            is_active?: boolean;
            last_channel_id?: null | string;
            last_message_at?: null | string;
            name?: null | string;
            object?: "conversation";
            phone?: null | string;
            reference_id?: null | string;
            started_at?: string;
            updated_at?: string;
        };
        WhatsAppGroupCreateProcessingResponse: {
            idempotency_key: string;
            object: "api_operation";
            reconciliation: "provider"
            | "local_persistence";
            status: "processing";
        };
        WhatsAppGroupInviteLink: {
            channel_id: string;
            group_id: string;
            invite_link: string;
            object: "whatsapp_group_invite_link";
        };
        WhatsAppGroupJoinRequest: {
            created_at?: null
            | string;
            creation_timestamp?: null | number;
            group_id?: string;
            id: string;
            join_request_id: string;
            parent_user_id?: string;
            user_id?: string;
            username?: string;
            wa_id?: string;
        };
        WhatsAppGroupJoinRequestMutation: {
            approved_join_requests?: string[];
            failed_join_requests?: Record<string, never>[];
            rejected_join_requests?: string[];
        };
        WhatsAppGroupMessage: {
            channel_id?: string;
            contact_id?: null;
            content?: null
            | string;
            conversation_id?: null | string;
            direction?: "inbound" | "outbound";
            failure?:
                | null
                | {
                    code?: null
                    | string
                    | number;
                    fbtrace_id?: null | string;
                    http_status?: null | number;
                    message?: string;
                    occurred_at?: string;
                    provider?: "meta" | "wabery";
                    subcode?: null | string | number;
                    summary?: string;
                    title?: null | string;
                    type?: null | string;
                };
            group_id?: null
            | string;
            group_subject?: null | string;
            id?: string;
            identity_key_hash?: null | string;
            media?:
                | null
                | {
                    access_policy?: string;
                    accessible?: boolean;
                    error_code?: null
                    | string;
                    expires_at?: null | string;
                    file_name?: null | string;
                    file_size?: null | number;
                    mime_type?: null | string;
                    note?: null | string;
                    provider?: null | "whatsapp" | "instagram" | "messenger";
                    provider_media_id?: null | string;
                    status?: "expired" | "available" | "unavailable";
                    type?: null | string;
                    url?: null | string;
                    whatsapp_media_id?: null | string;
                };
            message_id?: string;
            object?: "message";
            platform_message_id?: null
            | string;
            sender_participant?: null | string;
            status?: string;
            timestamp?: string;
            type?: string;
        };
        WhatsAppGroupMessageProcessingResponse: {
            acceptance_unknown?: boolean;
            idempotency_key: string;
            object: "message_request";
            provider_accepted?: boolean;
            reconciliation: "provider"
            | "local_persistence";
            status: "processing";
        };
        WhatsAppGroupMessageSendResponse: {
            conversation_id: string;
            group_id: string;
            id: string;
            idempotency_key: string;
            object: "message";
            provider_message_id: string;
            status: "sent";
        };
        WhatsAppGroupOperation: {
            channel_id: string;
            group_id: null
            | string;
            idempotent_replay?: boolean;
            object: "whatsapp_group_operation";
            operation: "delete" | "create" | "update";
            request_id: null | string;
            status: "pending";
        };
        WhatsAppGroupParticipant: {
            id: string;
            id_type: "user_id"
            | "wa_id";
            name?: null | string;
            parent_user_id?: null | string;
            phone?: null | string;
            user?: string;
            user_id: null | string;
            username?: null | string;
            wa_id: null | string;
        };
        WhatsAppGroupParticipantMutation: {
            failed_participants?: {
                errors?: Record<string, never>[];
                input?: string;
                user_id?: string;
            }[];
            removed_participants?: string[];
        };
        WhatsAppManagementResponse: { [key: string]: unknown };
        WhatsAppMessageWithContext: {
            channel_id?: string;
            contact_id?: string;
            content?: null | string;
            conversation_id?: null | string;
            direction?: "inbound" | "outbound";
            failure?:
                | null
                | {
                    code?: null
                    | string
                    | number;
                    fbtrace_id?: null | string;
                    http_status?: null | number;
                    message?: string;
                    occurred_at?: string;
                    provider?: "meta" | "wabery";
                    subcode?: null | string | number;
                    summary?: string;
                    title?: null | string;
                    type?: null | string;
                };
            id?: string;
            media?: | null
            | {
                access_policy?: string;
                accessible?: boolean;
                error_code?: null
                | string;
                expires_at?: null | string;
                file_name?: null | string;
                file_size?: null | number;
                mime_type?: null | string;
                note?: null | string;
                provider?: null | "whatsapp" | "instagram" | "messenger";
                provider_media_id?: null | string;
                status?: "expired" | "available" | "unavailable";
                type?: null | string;
                url?: null | string;
                whatsapp_media_id?: null | string;
            };
            message_id?: string;
            object?: "message";
            platform_message_id?: null
            | string;
            status?: string;
            timestamp?: string;
            type?: string;
        } & {
            ctwa_clid?: string;
            identity_key_hash?: string;
            order?: { [key: string]: unknown };
            referral?: { [key: string]: unknown };
            referred_product?: { [key: string]: unknown };
        };
        WhatsAppTemplate: {
            approved_at?: null
            | string;
            category?: string;
            channel_id?: string;
            components?: { [key: string]: unknown };
            created_at?: string;
            id?: string;
            language?: string;
            last_synced_at?: null | string;
            meta_template_id?: null | string;
            name?: string;
            object?: "whatsapp_template";
            rejected_at?: null | string;
            rejection_reason?: null | string;
            status?: string;
            submitted_at?: string;
            updated_at?: string;
        };
        WhatsAppUsername: {
            channel_id: string;
            last_checked_at: string;
            object: "whatsapp_username";
            status: null
            | "approved"
            | "reserved";
            username: null | string;
        };
        WhatsAppUsernameSuggestions: {
            channel_id: string;
            data: string[];
            object: "list";
        };
    };
}

Properties

headers: {
    RateLimitLimit: number;
    RateLimitRemaining: number;
    RateLimitReset: number;
    RetryAfter: number;
}

Type declaration

  • RateLimitLimit: number

    Maximum requests allowed in the active rate-limit window.

  • RateLimitRemaining: number

    Requests remaining in the active rate-limit window.

  • RateLimitReset: number

    Unix timestamp when the active rate-limit window resets.

  • RetryAfter: number

    Seconds to wait before retrying a rate-limited request.

parameters: {
    BroadcastIdempotencyKey: string;
    IdempotencyKey: string;
    MetaRemoteWriteIdempotencyKey: string;
    WaberyVersion: "2026-06-18";
}

Type declaration

  • BroadcastIdempotencyKey: string

    A caller-stable retry-safety key. Reusing it with the same request replays the result; different content returns 409.

  • IdempotencyKey: string

    Retry-safety key. Required for WhatsApp group sends and mutating broadcast endpoints; optional for individual POST /messages sends. Reuse the same key for every retry of one logical operation.

  • MetaRemoteWriteIdempotencyKey: string

    Required caller-owned operation ID. Reuse it for inspection after an uncertain Meta result; a different request with the same key returns 409 and is never sent to Meta.

  • WaberyVersion: "2026-06-18"

    Pin a dated API version. Overrides the organization's pinned version. Defaults to the latest supported version.

pathItems: never
requestBodies: never
responses: {
    RateLimited: {
        content: {
            "application/json": {
                error: string;
                issues?: { [key: string]: unknown };
                message?: string;
                request_id?: string;
                required_scope?: string;
            } & { [key: string]: unknown };
            "application/problem+json": {
                code?: string;
                detail?: string;
                instance?: string;
                status: number;
                title: string;
                type: string;
            } & { [key: string]: unknown };
        };
        headers: {
            "RateLimit-Limit": number;
            "RateLimit-Remaining": number;
            "RateLimit-Reset": number;
            "Retry-After": number;
            [name: string]: unknown;
        };
    };
}

Type declaration

  • RateLimited: {
        content: {
            "application/json": {
                error: string;
                issues?: { [key: string]: unknown };
                message?: string;
                request_id?: string;
                required_scope?: string;
            } & { [key: string]: unknown };
            "application/problem+json": {
                code?: string;
                detail?: string;
                instance?: string;
                status: number;
                title: string;
                type: string;
            } & { [key: string]: unknown };
        };
        headers: {
            "RateLimit-Limit": number;
            "RateLimit-Remaining": number;
            "RateLimit-Reset": number;
            "Retry-After": number;
            [name: string]: unknown;
        };
    }

    The API-key rate limit or monthly quota was exceeded.

schemas: {
    Broadcast: {
        canceled_at?: null | string;
        category: "marketing" | "utility";
        channel_id?: string;
        completed_at?: null | string;
        counts: { [key: string]: number };
        created_at?: string;
        failure?: null | { code?: null | string; message?: null | string };
        fallback_language?: string;
        id: string;
        name: string;
        object: "broadcast";
        schedule_timezone?: null | string;
        scheduled_at?: null | string;
        started_at?: null | string;
        status:
            | "completed"
            | "ready"
            | "draft"
            | "preparing"
            | "scheduled"
            | "sending"
            | "canceled"
            | "failed";
        template_name?: string;
        updated_at?: string;
    };
    BroadcastCreateRequest: {
        category: "UTILITY"
        | "MARKETING";
        channelId: string;
        fallbackLanguage: string;
        name: string;
        templateName: string;
        variants: {
            language: string;
            parameterMappings: { [key: string]: unknown }[];
            templateId: string;
        }[];
    };
    BroadcastLifecycleWebhookPayload: {
        category?: "marketing"
        | "utility";
        channel_id?: string;
        counts: { [key: string]: number };
        event:
            | "broadcast.started"
            | "broadcast.completed"
            | "broadcast.canceled"
            | "broadcast.failed";
        failure?: null
        | { code?: null | string; message?: null | string };
        id: string;
        object: "broadcast";
        occurred_at: string;
        status:
            | "completed"
            | "ready"
            | "draft"
            | "preparing"
            | "scheduled"
            | "sending"
            | "canceled"
            | "failed";
        template_name?: string;
    };
    BusinessAgent: {
        channel_id: string;
        created_at: string;
        eligibility?: null
        | { [key: string]: unknown };
        error_message?: null | string;
        id: string;
        meta_agent_id?: null | string;
        object: "business_agent";
        project_id: string;
        settings?: null | { [key: string]: unknown };
        status: "DRAFT" | "PROVISIONING" | "ACTIVE" | "DISABLED" | "ERROR";
        updated_at: string;
    };
    BusinessAgentAllowlistRequest: { consumer_phone_number: string };
    BusinessAgentApplyRequest: {
        channel_id: string;
        enabled?: boolean;
        handoff?: { [key: string]: unknown };
        knowledge?: { [key: string]: unknown };
        language?: string;
        persona?: string;
    } & { [key: string]: unknown };
    BusinessAgentConnector: {
        business_agent_id: string;
        config?: null | { [key: string]: unknown };
        created_at: string;
        id: string;
        meta_connector_id?: null | string;
        name: string;
        object: "business_agent_connector";
        status: string;
        tools?: {
            backing_flow_id?: null | string;
            backing_function_id?: null | string;
            backing_function_version_id: null | string;
            backing_type: "FLOW" | "API_ENDPOINT" | "NOOP" | "HOSTED_FUNCTION";
            connector_id: string;
            created_at: string;
            description?: null | string;
            id: string;
            input_schema?: null | { [key: string]: unknown };
            meta_tool_id?: null | string;
            name: string;
            object: "business_agent_connector_tool";
            updated_at: string;
        }[];
        type: string;
        updated_at: string;
    };
    BusinessAgentConnectorApiKeyRequest: {
        api_key_config: { [key: string]: unknown };
    };
    BusinessAgentConnectorCertificateRequest: {
        ca_certificate?: string;
        client_certificate: string;
        client_key: string;
    };
    BusinessAgentConnectorCreateRequest: {
        business_agent_id: string;
        config?: { [key: string]: unknown };
        name: string;
        status?: string;
        type: string;
    } & { [key: string]: unknown };
    BusinessAgentConnectorOAuthRequest: {
        oauth_config: {
            client_id: string;
            client_secret: string;
            scopes_to_request: string[];
            token_url: string;
        };
    };
    BusinessAgentConnectorTool: {
        backing_flow_id?: null
        | string;
        backing_function_id?: null | string;
        backing_function_version_id: null | string;
        backing_type: "FLOW" | "API_ENDPOINT" | "NOOP" | "HOSTED_FUNCTION";
        connector_id: string;
        created_at: string;
        description?: null | string;
        id: string;
        input_schema?: null | { [key: string]: unknown };
        meta_tool_id?: null | string;
        name: string;
        object: "business_agent_connector_tool";
        updated_at: string;
    };
    BusinessAgentConnectorToolCreateRequest: {
        backing_flow_id?: string;
        backing_function_id?: string;
        backing_type: "FLOW"
        | "API_ENDPOINT"
        | "NOOP"
        | "HOSTED_FUNCTION";
        config?: { [key: string]: unknown };
        description?: string;
        input_schema?: { [key: string]: unknown };
        name: string;
    } & { [key: string]: unknown };
    BusinessAgentConnectorToolRunRequest: {
        arguments: { [key: string]: unknown };
    };
    BusinessAgentConnectorToolUpdateRequest: {
        backing_flow_id?: null
        | string;
        backing_function_id?: null | string;
        backing_type?: "FLOW" | "API_ENDPOINT" | "NOOP" | "HOSTED_FUNCTION";
        config?: { [key: string]: unknown };
        description?: null | string;
        input_schema?: null | { [key: string]: unknown };
        name?: string;
    } & { [key: string]: unknown };
    BusinessAgentConnectorUpdateRequest: {
        config?: { [key: string]: unknown };
        name?: string;
        status?: string;
        type?: string;
    } & { [key: string]: unknown };
    BusinessAgentEligibilityResponse: {
        channel_id: string;
        eligibility: { [key: string]: unknown };
        object: "business_agent_eligibility";
    };
    BusinessAgentEvalResponse: {
        business_agent_id: string;
        object: "business_agent_eval";
        result: { [key: string]: unknown };
    };
    BusinessAgentEventRequest: { [key: string]: unknown };
    BusinessAgentRemoteWriteResolveRequest: {
        action: "adopt" | "resolve";
        approved: true;
        remote_id: string;
    };
    BusinessAgentResourceRequest: { [key: string]: unknown };
    BusinessAgentSettingsRequest: {
        enabled?: boolean;
        handoff?: { [key: string]: unknown };
        knowledge?: { [key: string]: unknown };
        language?: string;
        persona?: string;
    } & { [key: string]: unknown };
    BusinessAgentSettingsResponse: {
        business_agent_id: string;
        object: "business_agent_settings";
        settings: { [key: string]: unknown };
    };
    BusinessAgentSkillRequest: {
        description?: string;
        skill?: string;
        title?: string;
    };
    BusinessAgentSkillsResponse: {
        business_agent_id: string;
        data: unknown[];
        object: "business_agent_skills";
        result?: { [key: string]: unknown };
    } & { [key: string]: unknown };
    BusinessAgentTestRequest: {
        business_agent_id: string;
        conversation_id?: string;
        user_msg: string;
    };
    BusinessAgentTestResponse: {
        business_agent_id: string;
        object: "business_agent_test";
        result: { [key: string]: unknown };
    };
    Channel: {
        channel_id?: string;
        display_name?: null
        | string;
        id?: string;
        is_sandbox?: boolean;
        number_mode?: string;
        object?: "channel";
        phone_number?: null | string;
        platform?:
            | "WHATSAPP"
            | "INSTAGRAM"
            | "MESSENGER"
            | "SMS"
            | "TELEGRAM"
            | "EMAIL";
        publish_readiness?: | null
        | {
            account_review_status?: null
            | string;
            blockers?: (
                | "CHANNEL_NOT_CONNECTED"
                | "MISSING_WABA"
                | "MISSING_CHANNEL_CREDENTIALS"
                | "META_ACCOUNT_STATUS_UNKNOWN"
                | "BUSINESS_NOT_VERIFIED"
                | "ACCOUNT_NOT_APPROVED"
                | "PHONE_NOT_CONNECTED"
                | "PHONE_STATUS_UNKNOWN"
                | "PAYMENT_STATUS_UNKNOWN"
                | "NO_PAYMENT_METHOD"
                | "WHATSAPP_SENDER_NOT_READY"
                | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
            )[];
            business_verification_status?: null
            | string;
            can_publish_flows?: boolean;
            can_submit_templates?: boolean;
            mode?: "sandbox" | "dedicated";
            phone_number_status?: null | string;
        };
        routing_mode?: "AGENT"
        | "EXTERNAL";
        routing_warning?: null | string;
        status?: string;
    };
    ConfigApplyResponse: {
        applied?: {
            hosted_agents?: {
                action_required?: | null
                | "CREATE_AGENT"
                | "SELECT_AI_MODEL"
                | "ADD_PAYMENT_METHOD"
                | "ADD_FUNDS";
                ai_enabled: boolean;
                id: string;
                key?: string;
                project_id: string;
                runtime_mode: "ai_ready"
                | "automations_only"
                | "not_operational";
                status?: string;
            }[];
        };
        config?: {
            $schema?: string;
            automations: {
                active?: boolean;
                key: string;
                name: string;
                steps: (
                    | { send_reply: { buttons?: (...)
                    | (...); text: string } }
                    | { delay: { minutes: number } }
                    | {
                        wait_reply: {
                            options?: (...) | (...);
                            timeout_hours?: (...) | (...);
                        };
                    }
                    | { pause_replies: { reason?: (...)
                    | (...) } }
                    | {
                        send_flow: {
                            body_text?: (...) | (...);
                            flow: string;
                            flow_cta?: (...) | (...);
                            footer_text?: (...) | (...);
                            header_text?: (...) | (...);
                        };
                    }
                    | {
                        run_function: {
                            function: string;
                            reply_field?: (...)
                            | (...);
                            result_mode?: (...) | (...) | (...) | (...);
                            variable_name?: (...) | (...);
                        };
                    }
                )[];
                trigger: {
                    keywords?: string[];
                    match_mode?: "EXACT"
                    | "CONTAINS"
                    | "CONTAINS_WORD";
                    type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
                };
            }[];
            business_agent?: {
                channel_id?: string;
                connectors?: { [key: string]: unknown }[];
                enabled: boolean;
                faqs?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                operation_id: string;
                settings: {
                    enabled?: boolean;
                    handoff?: { [key: string]: unknown };
                    knowledge?: { [key: string]: unknown };
                    language?: string;
                    persona?: string;
                } & { [key: string]: unknown };
                skills?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                ui_skills?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                websites?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
            };
            flows: {
                agent_id?: string;
                data_exchange_url?: null
                | string;
                description?: string;
                draft?: { entryScreenId?: string; screens?: (...)[] } & {
                    [key: string]: unknown;
                };
                flow_json?: { screens?: (...)[]; version?: string } & {
                    [key: string]: unknown;
                };
                key: string;
                locale?: string;
                name: string;
                project_id?: string;
                runtime_mode?: "STATIC"
                | "DATA_EXCHANGE";
            }[];
            hosted_agents?: {
                allowed_topics: string[];
                channel_ids: string[];
                conversation_messages?: {
                    cannot_listen?: string;
                    clarification: string;
                    farewell: string;
                    greeting: string;
                    out_of_scope: string;
                };
                fallback: {
                    automation_id?: string;
                    message?: string;
                    policy: "SILENT"
                    | "CLARIFICATION"
                    | "HUMAN_HANDOFF"
                    | "AUTOMATION";
                };
                instructions: string;
                key: string;
                knowledge: {
                    content?: string;
                    title: string;
                    type: "TEXT"
                    | "FAQ"
                    | "URL";
                    url?: string;
                }[];
                language: string;
                max_input_chars: number;
                max_output_tokens: number;
                max_run_cost_micros: number;
                model: string;
                monthly_budget_micros: number;
                name: string;
                project_id?: string;
                purpose?: string;
                status?: "DRAFT"
                | "DISABLED";
            }[];
            project_id?: string;
            require_opt_in?: boolean;
            version?: string;
        };
        diff: {
            action?: "delete"
            | "create"
            | "update"
            | "unchanged";
            details?: string[];
            key?: string;
            requiresActivation?: boolean;
            risk?: "low" | "medium" | "high";
            type?:
                | "business_agent"
                | "business_agent_connector"
                | "flow"
                | "project"
                | "hosted_agent"
                | "hosted_agent_assignment"
                | "hosted_agent_knowledge"
                | "automation"
                | "webhook"
                | "business_agent_tool";
        }[];
        issues: {
            message?: string;
            path?: string;
            severity?: "warning"
            | "error";
        }[];
        object: "config_apply";
        valid: boolean;
    };
    ConfigDiffItem: {
        action?: "delete"
        | "create"
        | "update"
        | "unchanged";
        details?: string[];
        key?: string;
        requiresActivation?: boolean;
        risk?: "low" | "medium" | "high";
        type?:
            | "business_agent"
            | "business_agent_connector"
            | "flow"
            | "project"
            | "hosted_agent"
            | "hosted_agent_assignment"
            | "hosted_agent_knowledge"
            | "automation"
            | "webhook"
            | "business_agent_tool";
    };
    ConfigDiffResponse: {
        diff: {
            action?: "delete"
            | "create"
            | "update"
            | "unchanged";
            details?: string[];
            key?: string;
            requiresActivation?: boolean;
            risk?: "low" | "medium" | "high";
            type?:
                | "business_agent"
                | "business_agent_connector"
                | "flow"
                | "project"
                | "hosted_agent"
                | "hosted_agent_assignment"
                | "hosted_agent_knowledge"
                | "automation"
                | "webhook"
                | "business_agent_tool";
        }[];
        issues: {
            message?: string;
            path?: string;
            severity?: "warning"
            | "error";
        }[];
        object: "config_diff";
        valid: boolean;
    };
    ConfigIssue: {
        message?: string;
        path?: string;
        severity?: "warning"
        | "error";
    };
    ConfigValidationResponse: {
        config?: {
            $schema?: string;
            automations: {
                active?: boolean;
                key: string;
                name: string;
                steps: (
                    | { send_reply: { buttons?: (...)
                    | (...); text: string } }
                    | { delay: { minutes: number } }
                    | {
                        wait_reply: {
                            options?: (...) | (...);
                            timeout_hours?: (...) | (...);
                        };
                    }
                    | { pause_replies: { reason?: (...)
                    | (...) } }
                    | {
                        send_flow: {
                            body_text?: (...) | (...);
                            flow: string;
                            flow_cta?: (...) | (...);
                            footer_text?: (...) | (...);
                            header_text?: (...) | (...);
                        };
                    }
                    | {
                        run_function: {
                            function: string;
                            reply_field?: (...)
                            | (...);
                            result_mode?: (...) | (...) | (...) | (...);
                            variable_name?: (...) | (...);
                        };
                    }
                )[];
                trigger: {
                    keywords?: string[];
                    match_mode?: "EXACT"
                    | "CONTAINS"
                    | "CONTAINS_WORD";
                    type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
                };
            }[];
            business_agent?: {
                channel_id?: string;
                connectors?: { [key: string]: unknown }[];
                enabled: boolean;
                faqs?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                operation_id: string;
                settings: {
                    enabled?: boolean;
                    handoff?: { [key: string]: unknown };
                    knowledge?: { [key: string]: unknown };
                    language?: string;
                    persona?: string;
                } & { [key: string]: unknown };
                skills?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                ui_skills?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                websites?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
            };
            flows: {
                agent_id?: string;
                data_exchange_url?: null
                | string;
                description?: string;
                draft?: { entryScreenId?: string; screens?: (...)[] } & {
                    [key: string]: unknown;
                };
                flow_json?: { screens?: (...)[]; version?: string } & {
                    [key: string]: unknown;
                };
                key: string;
                locale?: string;
                name: string;
                project_id?: string;
                runtime_mode?: "STATIC"
                | "DATA_EXCHANGE";
            }[];
            hosted_agents?: {
                allowed_topics: string[];
                channel_ids: string[];
                conversation_messages?: {
                    cannot_listen?: string;
                    clarification: string;
                    farewell: string;
                    greeting: string;
                    out_of_scope: string;
                };
                fallback: {
                    automation_id?: string;
                    message?: string;
                    policy: "SILENT"
                    | "CLARIFICATION"
                    | "HUMAN_HANDOFF"
                    | "AUTOMATION";
                };
                instructions: string;
                key: string;
                knowledge: {
                    content?: string;
                    title: string;
                    type: "TEXT"
                    | "FAQ"
                    | "URL";
                    url?: string;
                }[];
                language: string;
                max_input_chars: number;
                max_output_tokens: number;
                max_run_cost_micros: number;
                model: string;
                monthly_budget_micros: number;
                name: string;
                project_id?: string;
                purpose?: string;
                status?: "DRAFT"
                | "DISABLED";
            }[];
            project_id?: string;
            require_opt_in?: boolean;
            version?: string;
        };
        issues: {
            message?: string;
            path?: string;
            severity?: "warning"
            | "error";
        }[];
        object: "config_validation";
        valid: boolean;
    };
    Contact: {
        channel?: {
            channel_id?: string;
            display_name?: null
            | string;
            id?: string;
            is_sandbox?: boolean;
            number_mode?: string;
            object?: "channel";
            phone_number?: null | string;
            platform?:
                | "WHATSAPP"
                | "INSTAGRAM"
                | "MESSENGER"
                | "SMS"
                | "TELEGRAM"
                | "EMAIL";
            publish_readiness?: | null
            | {
                account_review_status?: null
                | string;
                blockers?: (
                    | "CHANNEL_NOT_CONNECTED"
                    | "MISSING_WABA"
                    | "MISSING_CHANNEL_CREDENTIALS"
                    | "META_ACCOUNT_STATUS_UNKNOWN"
                    | "BUSINESS_NOT_VERIFIED"
                    | "ACCOUNT_NOT_APPROVED"
                    | "PHONE_NOT_CONNECTED"
                    | "PHONE_STATUS_UNKNOWN"
                    | "PAYMENT_STATUS_UNKNOWN"
                    | "NO_PAYMENT_METHOD"
                    | "WHATSAPP_SENDER_NOT_READY"
                    | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                )[];
                business_verification_status?: null
                | string;
                can_publish_flows?: boolean;
                can_submit_templates?: boolean;
                mode?: "sandbox" | "dedicated";
                phone_number_status?: null | string;
            };
            routing_mode?: "AGENT"
            | "EXTERNAL";
            routing_warning?: null | string;
            status?: string;
        };
        channel_id?: string;
        contact_id: string;
        id: string;
        object: "contact";
        phone?: null
        | string;
        preferred_language?: null | string;
        project_id?: string;
        reference_id?: null | string;
        status?: string;
    };
    ContactDeleteResponse: {
        deleted: true;
        deleted_data_types?: string[];
        erased: boolean;
        id: string;
        object: "contact";
    };
    ContactImport: {
        created_count?: number;
        error_count?: number;
        errors_available?: boolean;
        filename: string;
        id: string;
        object: "contact_import";
        processed_rows?: number;
        skipped_count?: number;
        status: string;
        total_rows?: number;
        updated_count?: number;
    };
    Conversation: {
        contact_id?: string;
        conversation_id?: string;
        created_at?: string;
        id?: string;
        is_active?: boolean;
        last_channel_id?: null
        | string;
        last_message_at?: null | string;
        name?: null | string;
        object?: "conversation";
        phone?: null | string;
        reference_id?: null | string;
        started_at?: string;
        updated_at?: string;
    };
    Error: {
        error: string;
        issues?: { [key: string]: unknown };
        message?: string;
        request_id?: string;
        required_scope?: string;
    } & { [key: string]: unknown };
    Flow: {
        agent_id?: string;
        config_key?: null | string;
        created_at?: string;
        description?: null | string;
        field_schema?: null | { [key: string]: unknown }[];
        flow_json?: null | { [key: string]: unknown };
        id?: string;
        last_synced_at?: null | string;
        locale?: null | string;
        meta_flow_id?: null | string;
        meta_status?: null | string;
        meta_status_reason?: null | string;
        meta_waba_id?: null | string;
        name?: string;
        object?: "flow";
        published_version?: null | number;
        runtime_mode?: "STATIC" | "DATA_EXCHANGE";
        status?: "DRAFT" | "PUBLISHED" | "DEPRECATED";
        updated_at?: string;
        validation_errors?: null | { [key: string]: unknown }[];
    };
    FlowDeleteResponse: {
        deleted: true;
        id: string;
        meta_deleted?: boolean;
        meta_error?: null
        | string;
        object: "flow";
    };
    FlowDispatch: {
        agent_id?: string;
        channel_id?: string;
        completed_at?: null
        | string;
        contact_id?: null | string;
        conversation_id?: null | string;
        created_at?: string;
        expires_at?: string;
        flow_id?: string;
        flow_token?: string;
        id?: string;
        object?: "flow_dispatch";
        status?: "SENT" | "COMPLETED" | "EXPIRED";
        to?: null | string;
    };
    FlowEvent: {
        created_at: string;
        data?: null
        | { [key: string]: unknown };
        id: string;
        level: "info" | "error" | "warn";
        message?: null | string;
        object: "flow_event";
        submission_id?: null | string;
        type: string;
    };
    FlowPublishResponse: {
        flow_id: string;
        job_id: string;
        meta_status?: null
        | string;
        object: "flow_publish";
        status: "queued";
        version?: number;
    };
    FlowSendResponse: {
        contact_id?: null
        | string;
        conversation_id?: null | string;
        flow_id: string;
        flow_token: string;
        id: string;
        locale?: null | string;
        object: "flow_dispatch";
        status: "queued";
    };
    FlowSubmission: {
        agent_id?: string;
        contact_id?: null
        | string;
        conversation_id?: null | string;
        created_at?: string;
        flow_id?: string;
        flow_token?: string;
        from?: null | string;
        id?: string;
        object?: "flow_submission";
        status?: "RECEIVED" | "VALIDATED" | "REJECTED" | "FORWARDED";
        submission?: { [key: string]: unknown };
    };
    FriendlyIssue: {
        area?: string;
        code?: string;
        message?: string;
        next_steps?: string[];
        severity?: "info"
        | "warning"
        | "blocked";
        title?: string;
    };
    FunctionCreateRequest: {
        egress_allowed_hosts?: string[];
        name: string;
        slug: string;
        trigger_type: "KEYWORD"
        | "WELCOME"
        | "ANY_MESSAGE";
    };
    FunctionDeleteResponse: {
        deleted?: boolean;
        id?: string;
        object?: "hosted_function";
    };
    FunctionDeployRequest: { source: string };
    FunctionDeployResponse: {
        bytes?: number;
        diagnostics?: string[];
        function_id?: string;
        object?: "function_deploy";
        status?: "ok" | "error";
        version_id?: string;
    };
    FunctionInvocation: {
        cpu_ms?: null
        | number;
        error?: null | string;
        event_type?: string;
        id?: string;
        logs?: unknown;
        started_at?: string;
        status?: string;
        sub_requests?: null | number;
    };
    FunctionInvokeRequest: {
        arguments?: { [key: string]: unknown };
        contact_id?: string;
        contact_phone?: string;
    };
    FunctionInvokeResponse: {
        error?: string;
        function_id?: string;
        object?: "function_invoke";
        result?: unknown;
    };
    FunctionTestRequest: {
        contact?: { id: string; name?: string; phone: string };
        text?: string;
    };
    FunctionTestResponse: {
        error?: string;
        function_id?: string;
        object?: "function_test";
        result?: unknown;
    };
    FunctionUpdateRequest: {
        egress_allowed_hosts?: string[];
        expose_as_mcp_tool?: boolean;
        input_schema?: { [key: string]: unknown };
        is_active?: boolean;
        name?: string;
    };
    HostedFunction: {
        active_version_id: null
        | string;
        created_at: string;
        egress_allowed_hosts: string[];
        expose_as_mcp_tool: boolean;
        id: string;
        input_schema?: null | { [key: string]: unknown };
        is_active: boolean;
        name: string;
        object: "hosted_function";
        runtime: "PLAIN" | "WFP";
        script_name: string;
        slug: string;
        source?: null | string;
        trigger_type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
        updated_at: string;
    };
    Identity: {
        api_key: {
            display?: null
            | string;
            id?: string;
            name?: null | string;
            prefix?: null | string;
            scopes?: string[];
        };
        api_version?: string;
        object: "identity";
        organization: { id?: string; name?: null
        | string };
        plan?: null | string;
        project: { id?: string; name?: null | string };
    };
    ListMeta: { has_more?: boolean; object: "list" };
    Message: {
        channel_id?: string;
        contact_id?: string;
        content?: null | string;
        conversation_id?: null | string;
        direction?: "inbound" | "outbound";
        failure?:
            | null
            | {
                code?: null
                | string
                | number;
                fbtrace_id?: null | string;
                http_status?: null | number;
                message?: string;
                occurred_at?: string;
                provider?: "meta" | "wabery";
                subcode?: null | string | number;
                summary?: string;
                title?: null | string;
                type?: null | string;
            };
        id?: string;
        media?: | null
        | {
            access_policy?: string;
            accessible?: boolean;
            error_code?: null
            | string;
            expires_at?: null | string;
            file_name?: null | string;
            file_size?: null | number;
            mime_type?: null | string;
            note?: null | string;
            provider?: null | "whatsapp" | "instagram" | "messenger";
            provider_media_id?: null | string;
            status?: "expired" | "available" | "unavailable";
            type?: null | string;
            url?: null | string;
            whatsapp_media_id?: null | string;
        };
        message_id?: string;
        object?: "message";
        platform_message_id?: null
        | string;
        status?: string;
        timestamp?: string;
        type?: string;
    };
    MessageSendRequest: {
        channel_id: string;
        contacts?: { [key: string]: unknown }[];
        conversation_id?: string;
        group_id?: string;
        idempotency_key?: string;
        interactive?: { [key: string]: unknown };
        location?: {
            address?: string;
            latitude: number;
            longitude: number;
            name?: string;
        };
        media?: { type?: "document" | "image" | "video" | "audio" | undefined; link?: string | undefined; id?: string | undefined; caption?: string | undefined; filename?: string | undefined; } & ({ ...; } | { ...; });
        pin?: | { expiration_days: number; message_id: string; type: "pin" }
        | { message_id: string; type: "unpin" };
        reaction?: { emoji: string; message_id: string };
        reply_to?: string;
        sticker?: { id?: string | undefined; link?: string | undefined; } & ({ id: string; link?: undefined; } | { link: string; id?: undefined; });
        template?: {
            components?: { [key: string]: unknown }[];
            id?: string;
            language?: string;
            name?: string;
        };
        text?: string;
        to?: string;
    };
    MessageSendResponse: {
        contact_id: string;
        conversation_id: string;
        id: string;
        idempotency_key: string;
        object: "message";
        status: "queued";
    };
    MetaDeclarativeResource: {
        key: string;
        remote_id?: string;
        value: { [key: string]: unknown };
    };
    OnboardingHandoff: {
        channel_id?: null
        | string;
        completed_at?: null | string;
        connection_mode?: string;
        created_at?: string;
        expires_at?: string;
        id?: string;
        object?: "onboarding_handoff";
        project_id?: string;
        status?: "pending" | "completed" | "expired" | "revoked";
        type?: "connect_whatsapp";
    };
    Problem: {
        code?: string;
        detail?: string;
        instance?: string;
        status: number;
        title: string;
        type: string;
    } & { [key: string]: unknown };
    Project: {
        automatic_read_receipts?: boolean;
        channel_id?: null | string;
        created_at?: string;
        description?: null | string;
        enrollment_channel?:
            | null
            | {
                channel_id?: string;
                display_name?: null
                | string;
                id?: string;
                is_sandbox?: boolean;
                number_mode?: string;
                object?: "channel";
                phone_number?: null | string;
                platform?:
                    | "WHATSAPP"
                    | "INSTAGRAM"
                    | "MESSENGER"
                    | "SMS"
                    | "TELEGRAM"
                    | "EMAIL";
                publish_readiness?: | null
                | {
                    account_review_status?: null
                    | string;
                    blockers?: (
                        | "CHANNEL_NOT_CONNECTED"
                        | "MISSING_WABA"
                        | "MISSING_CHANNEL_CREDENTIALS"
                        | "META_ACCOUNT_STATUS_UNKNOWN"
                        | "BUSINESS_NOT_VERIFIED"
                        | "ACCOUNT_NOT_APPROVED"
                        | "PHONE_NOT_CONNECTED"
                        | "PHONE_STATUS_UNKNOWN"
                        | "PAYMENT_STATUS_UNKNOWN"
                        | "NO_PAYMENT_METHOD"
                        | "WHATSAPP_SENDER_NOT_READY"
                        | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                    )[];
                    business_verification_status?: null
                    | string;
                    can_publish_flows?: boolean;
                    can_submit_templates?: boolean;
                    mode?: "sandbox" | "dedicated";
                    phone_number_status?: null | string;
                };
                routing_mode?: "AGENT"
                | "EXTERNAL";
                routing_warning?: null | string;
                status?: string;
            };
        flow_count?: number;
        id?: string;
        join_code?: string;
        name?: string;
        object?: "project";
        participant_count?: number;
        project_id?: string;
        publish_readiness?: | null
        | {
            account_review_status?: null
            | string;
            blockers?: (
                | "CHANNEL_NOT_CONNECTED"
                | "MISSING_WABA"
                | "MISSING_CHANNEL_CREDENTIALS"
                | "META_ACCOUNT_STATUS_UNKNOWN"
                | "BUSINESS_NOT_VERIFIED"
                | "ACCOUNT_NOT_APPROVED"
                | "PHONE_NOT_CONNECTED"
                | "PHONE_STATUS_UNKNOWN"
                | "PAYMENT_STATUS_UNKNOWN"
                | "NO_PAYMENT_METHOD"
                | "WHATSAPP_SENDER_NOT_READY"
                | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
            )[];
            business_verification_status?: null
            | string;
            can_publish_flows?: boolean;
            can_submit_templates?: boolean;
            mode?: "sandbox" | "dedicated";
            phone_number_status?: null | string;
        };
        require_opt_in?: boolean;
        routing_mode?: string;
        updated_at?: string;
        webhook_secret?: null
        | string;
        webhook_signing_enabled?: boolean;
        webhook_url?: null | string;
    };
    ProjectReadiness: {
        agent_runtime: {
            action_required?: | null
            | "CREATE_AGENT"
            | "SELECT_AI_MODEL"
            | "ADD_PAYMENT_METHOD"
            | "ADD_FUNDS";
            ai_enabled: boolean;
            available_balance_micros: number;
            has_useful_automations: boolean;
            mode: "ai_ready"
            | "automations_only"
            | "not_operational";
            runtime_model?: null | string;
            selected_model?: null | string;
        };
        capabilities?: {
            [key: string]: {
                message?: string;
                status?: "warning"
                | "blocked"
                | "ready"
                | "testable"
                | "not_applicable";
            };
        };
        dedicated_channel?: | null
        | {
            channel_id?: string;
            display_name?: null
            | string;
            id?: string;
            is_sandbox?: boolean;
            number_mode?: string;
            object?: "channel";
            phone_number?: null | string;
            platform?:
                | "WHATSAPP"
                | "INSTAGRAM"
                | "MESSENGER"
                | "SMS"
                | "TELEGRAM"
                | "EMAIL";
            publish_readiness?: | null
            | {
                account_review_status?: null
                | string;
                blockers?: (
                    | "CHANNEL_NOT_CONNECTED"
                    | "MISSING_WABA"
                    | "MISSING_CHANNEL_CREDENTIALS"
                    | "META_ACCOUNT_STATUS_UNKNOWN"
                    | "BUSINESS_NOT_VERIFIED"
                    | "ACCOUNT_NOT_APPROVED"
                    | "PHONE_NOT_CONNECTED"
                    | "PHONE_STATUS_UNKNOWN"
                    | "PAYMENT_STATUS_UNKNOWN"
                    | "NO_PAYMENT_METHOD"
                    | "WHATSAPP_SENDER_NOT_READY"
                    | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                )[];
                business_verification_status?: null
                | string;
                can_publish_flows?: boolean;
                can_submit_templates?: boolean;
                mode?: "sandbox" | "dedicated";
                phone_number_status?: null | string;
            };
            routing_mode?: "AGENT"
            | "EXTERNAL";
            routing_warning?: null | string;
            status?: string;
        };
        effective_channel?: | null
        | {
            channel_id?: string;
            display_name?: null
            | string;
            id?: string;
            is_sandbox?: boolean;
            number_mode?: string;
            object?: "channel";
            phone_number?: null | string;
            platform?:
                | "WHATSAPP"
                | "INSTAGRAM"
                | "MESSENGER"
                | "SMS"
                | "TELEGRAM"
                | "EMAIL";
            publish_readiness?: | null
            | {
                account_review_status?: null
                | string;
                blockers?: (
                    | "CHANNEL_NOT_CONNECTED"
                    | "MISSING_WABA"
                    | "MISSING_CHANNEL_CREDENTIALS"
                    | "META_ACCOUNT_STATUS_UNKNOWN"
                    | "BUSINESS_NOT_VERIFIED"
                    | "ACCOUNT_NOT_APPROVED"
                    | "PHONE_NOT_CONNECTED"
                    | "PHONE_STATUS_UNKNOWN"
                    | "PAYMENT_STATUS_UNKNOWN"
                    | "NO_PAYMENT_METHOD"
                    | "WHATSAPP_SENDER_NOT_READY"
                    | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                )[];
                business_verification_status?: null
                | string;
                can_publish_flows?: boolean;
                can_submit_templates?: boolean;
                mode?: "sandbox" | "dedicated";
                phone_number_status?: null | string;
            };
            routing_mode?: "AGENT"
            | "EXTERNAL";
            routing_warning?: null | string;
            status?: string;
        };
        issues?: {
            area?: string;
            code?: string;
            message?: string;
            next_steps?: string[];
            severity?: "info"
            | "warning"
            | "blocked";
            title?: string;
        }[];
        next_steps?: string[];
        object: "project_readiness";
        overall_status?: string;
        production_inbound_ready?: boolean;
        project_id: string;
        project_name?: string;
        requirements?: string[];
        sandbox_channel?: | null
        | {
            channel_id?: string;
            display_name?: null
            | string;
            id?: string;
            is_sandbox?: boolean;
            number_mode?: string;
            object?: "channel";
            phone_number?: null | string;
            platform?:
                | "WHATSAPP"
                | "INSTAGRAM"
                | "MESSENGER"
                | "SMS"
                | "TELEGRAM"
                | "EMAIL";
            publish_readiness?: | null
            | {
                account_review_status?: null
                | string;
                blockers?: (
                    | "CHANNEL_NOT_CONNECTED"
                    | "MISSING_WABA"
                    | "MISSING_CHANNEL_CREDENTIALS"
                    | "META_ACCOUNT_STATUS_UNKNOWN"
                    | "BUSINESS_NOT_VERIFIED"
                    | "ACCOUNT_NOT_APPROVED"
                    | "PHONE_NOT_CONNECTED"
                    | "PHONE_STATUS_UNKNOWN"
                    | "PAYMENT_STATUS_UNKNOWN"
                    | "NO_PAYMENT_METHOD"
                    | "WHATSAPP_SENDER_NOT_READY"
                    | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                )[];
                business_verification_status?: null
                | string;
                can_publish_flows?: boolean;
                can_submit_templates?: boolean;
                mode?: "sandbox" | "dedicated";
                phone_number_status?: null | string;
            };
            routing_mode?: "AGENT"
            | "EXTERNAL";
            routing_warning?: null | string;
            status?: string;
        };
        sandbox_testable?: boolean;
    };
    ProjectWebhookSecret: {
        object: "project_webhook_secret";
        project_id: string;
        webhook_secret: string;
    };
    PublicApiLimits: {
        monthly_quota?: {
            period?: string;
            requests: number;
            scope?: "api_key";
        };
        object?: "public_api_limits";
        rate_limit?: {
            requests: number;
            scope?: "api_key";
            window_seconds: number;
        };
    };
    PublishReadiness: {
        account_review_status?: null
        | string;
        blockers?: (
            | "CHANNEL_NOT_CONNECTED"
            | "MISSING_WABA"
            | "MISSING_CHANNEL_CREDENTIALS"
            | "META_ACCOUNT_STATUS_UNKNOWN"
            | "BUSINESS_NOT_VERIFIED"
            | "ACCOUNT_NOT_APPROVED"
            | "PHONE_NOT_CONNECTED"
            | "PHONE_STATUS_UNKNOWN"
            | "PAYMENT_STATUS_UNKNOWN"
            | "NO_PAYMENT_METHOD"
            | "WHATSAPP_SENDER_NOT_READY"
            | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
        )[];
        business_verification_status?: null
        | string;
        can_publish_flows?: boolean;
        can_submit_templates?: boolean;
        mode?: "sandbox" | "dedicated";
        phone_number_status?: null | string;
    };
    RegistrationIntent: {
        expires_at: string;
        id: string;
        mode?: "test"
        | "live";
        object: "registration_intent";
        prefilled_message?: string;
        status?: "PENDING";
        token: string;
        wa_link: string;
        whatsapp_number?: string;
    };
    TemplateCreateRequest: {
        category: "UTILITY"
        | "MARKETING"
        | "AUTHENTICATION";
        channel_id: string;
        components: { [key: string]: unknown }[];
        language: string;
        name: string;
        parameter_format?: "POSITIONAL" | "NAMED";
    };
    ThreadControlRequest: {
        action: "take"
        | "release"
        | "pass";
        business_agent_id?: string;
        channel_id: string;
        contact_id: string;
        metadata?: string;
        pass_to_meta?: boolean;
        reason?: string;
        to: string;
    };
    ThreadControlState: {
        business_agent_id?: null
        | string;
        channel_id: string;
        contact_id: string;
        created_at: string;
        id: string;
        meta_result?: { messaging_product?: string; request_id?: string } & {
            [key: string]: unknown;
        };
        meta_thread_id?: null
        | string;
        object: "thread_control_state";
        observation?: "local";
        operation_id?: string;
        owner: "META_AGENT" | "WABERY" | "BUSINESS_INBOX" | "UNKNOWN" | "PENDING";
        project_id: string;
        reason?: null | string;
        replayed?: boolean;
        updated_at: string;
    } & { [key: string]: unknown };
    WaberyConfig: {
        $schema?: string;
        automations: {
            active?: boolean;
            key: string;
            name: string;
            steps: (
                | {
                    send_reply: { buttons?: { id: ...; title: ... }[]; text: string };
                }
                | { delay: { minutes: number } }
                | {
                    wait_reply: {
                        options?: { id: ...; keywords?: ...; label: ...; matchMode?: ... }[];
                        timeout_hours?: number;
                    };
                }
                | { pause_replies: { reason?: string } }
                | {
                    send_flow: {
                        body_text?: string;
                        flow: string;
                        flow_cta?: string;
                        footer_text?: string;
                        header_text?: string;
                    };
                }
                | {
                    run_function: {
                        function: string;
                        reply_field?: string;
                        result_mode?: "reply"
                        | "variables"
                        | "side_effect";
                        variable_name?: string;
                    };
                }
            )[];
            trigger: {
                keywords?: string[];
                match_mode?: "EXACT"
                | "CONTAINS"
                | "CONTAINS_WORD";
                type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
            };
        }[];
        business_agent?: {
            channel_id?: string;
            connectors?: { [key: string]: unknown }[];
            enabled: boolean;
            faqs?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
            operation_id: string;
            settings: {
                enabled?: boolean;
                handoff?: { [key: string]: unknown };
                knowledge?: { [key: string]: unknown };
                language?: string;
                persona?: string;
            } & { [key: string]: unknown };
            skills?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
            ui_skills?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
            websites?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
        };
        flows: {
            agent_id?: string;
            data_exchange_url?: null
            | string;
            description?: string;
            draft?: {
                entryScreenId?: string;
                screens?: { [key: string]: unknown }[];
            } & { [key: string]: unknown };
            flow_json?: { screens?: Record<string, never>[]; version?: string } & {
                [key: string]: unknown;
            };
            key: string;
            locale?: string;
            name: string;
            project_id?: string;
            runtime_mode?: "STATIC"
            | "DATA_EXCHANGE";
        }[];
        hosted_agents?: {
            allowed_topics: string[];
            channel_ids: string[];
            conversation_messages?: {
                cannot_listen?: string;
                clarification: string;
                farewell: string;
                greeting: string;
                out_of_scope: string;
            };
            fallback: {
                automation_id?: string;
                message?: string;
                policy: "SILENT"
                | "CLARIFICATION"
                | "HUMAN_HANDOFF"
                | "AUTOMATION";
            };
            instructions: string;
            key: string;
            knowledge: {
                content?: string;
                title: string;
                type: "TEXT"
                | "FAQ"
                | "URL";
                url?: string;
            }[];
            language: string;
            max_input_chars: number;
            max_output_tokens: number;
            max_run_cost_micros: number;
            model: string;
            monthly_budget_micros: number;
            name: string;
            project_id?: string;
            purpose?: string;
            status?: "DRAFT"
            | "DISABLED";
        }[];
        project_id?: string;
        require_opt_in?: boolean;
        version?: string;
    };
    WhatsAppGroup: {
        channel_id: string;
        created_at?: null
        | string;
        creation_timestamp?: null | number;
        description?: null | string;
        group_id?: string;
        id: string;
        invite_link?: null | string;
        join_approval_mode: null | "auto_approve" | "approval_required";
        object: "whatsapp_group";
        participants: {
            id: string;
            id_type: "user_id" | "wa_id";
            name?: null | string;
            parent_user_id?: null | string;
            phone?: null | string;
            user?: string;
            user_id: null | string;
            username?: null | string;
            wa_id: null | string;
        }[];
        subject: null
        | string;
        suspended: null | boolean;
        total_participant_count: null | number;
    };
    WhatsAppGroupConversation: {
        contact_id?: null;
        conversation_id?: string;
        created_at?: string;
        group_id?: null
        | string;
        group_subject?: null | string;
        id?: string;
        is_active?: boolean;
        last_channel_id?: null | string;
        last_message_at?: null | string;
        name?: null | string;
        object?: "conversation";
        phone?: null | string;
        reference_id?: null | string;
        started_at?: string;
        updated_at?: string;
    };
    WhatsAppGroupCreateProcessingResponse: {
        idempotency_key: string;
        object: "api_operation";
        reconciliation: "provider"
        | "local_persistence";
        status: "processing";
    };
    WhatsAppGroupInviteLink: {
        channel_id: string;
        group_id: string;
        invite_link: string;
        object: "whatsapp_group_invite_link";
    };
    WhatsAppGroupJoinRequest: {
        created_at?: null
        | string;
        creation_timestamp?: null | number;
        group_id?: string;
        id: string;
        join_request_id: string;
        parent_user_id?: string;
        user_id?: string;
        username?: string;
        wa_id?: string;
    };
    WhatsAppGroupJoinRequestMutation: {
        approved_join_requests?: string[];
        failed_join_requests?: Record<string, never>[];
        rejected_join_requests?: string[];
    };
    WhatsAppGroupMessage: {
        channel_id?: string;
        contact_id?: null;
        content?: null
        | string;
        conversation_id?: null | string;
        direction?: "inbound" | "outbound";
        failure?:
            | null
            | {
                code?: null
                | string
                | number;
                fbtrace_id?: null | string;
                http_status?: null | number;
                message?: string;
                occurred_at?: string;
                provider?: "meta" | "wabery";
                subcode?: null | string | number;
                summary?: string;
                title?: null | string;
                type?: null | string;
            };
        group_id?: null
        | string;
        group_subject?: null | string;
        id?: string;
        identity_key_hash?: null | string;
        media?:
            | null
            | {
                access_policy?: string;
                accessible?: boolean;
                error_code?: null
                | string;
                expires_at?: null | string;
                file_name?: null | string;
                file_size?: null | number;
                mime_type?: null | string;
                note?: null | string;
                provider?: null | "whatsapp" | "instagram" | "messenger";
                provider_media_id?: null | string;
                status?: "expired" | "available" | "unavailable";
                type?: null | string;
                url?: null | string;
                whatsapp_media_id?: null | string;
            };
        message_id?: string;
        object?: "message";
        platform_message_id?: null
        | string;
        sender_participant?: null | string;
        status?: string;
        timestamp?: string;
        type?: string;
    };
    WhatsAppGroupMessageProcessingResponse: {
        acceptance_unknown?: boolean;
        idempotency_key: string;
        object: "message_request";
        provider_accepted?: boolean;
        reconciliation: "provider"
        | "local_persistence";
        status: "processing";
    };
    WhatsAppGroupMessageSendResponse: {
        conversation_id: string;
        group_id: string;
        id: string;
        idempotency_key: string;
        object: "message";
        provider_message_id: string;
        status: "sent";
    };
    WhatsAppGroupOperation: {
        channel_id: string;
        group_id: null
        | string;
        idempotent_replay?: boolean;
        object: "whatsapp_group_operation";
        operation: "delete" | "create" | "update";
        request_id: null | string;
        status: "pending";
    };
    WhatsAppGroupParticipant: {
        id: string;
        id_type: "user_id"
        | "wa_id";
        name?: null | string;
        parent_user_id?: null | string;
        phone?: null | string;
        user?: string;
        user_id: null | string;
        username?: null | string;
        wa_id: null | string;
    };
    WhatsAppGroupParticipantMutation: {
        failed_participants?: {
            errors?: Record<string, never>[];
            input?: string;
            user_id?: string;
        }[];
        removed_participants?: string[];
    };
    WhatsAppManagementResponse: { [key: string]: unknown };
    WhatsAppMessageWithContext: {
        channel_id?: string;
        contact_id?: string;
        content?: null | string;
        conversation_id?: null | string;
        direction?: "inbound" | "outbound";
        failure?:
            | null
            | {
                code?: null
                | string
                | number;
                fbtrace_id?: null | string;
                http_status?: null | number;
                message?: string;
                occurred_at?: string;
                provider?: "meta" | "wabery";
                subcode?: null | string | number;
                summary?: string;
                title?: null | string;
                type?: null | string;
            };
        id?: string;
        media?: | null
        | {
            access_policy?: string;
            accessible?: boolean;
            error_code?: null
            | string;
            expires_at?: null | string;
            file_name?: null | string;
            file_size?: null | number;
            mime_type?: null | string;
            note?: null | string;
            provider?: null | "whatsapp" | "instagram" | "messenger";
            provider_media_id?: null | string;
            status?: "expired" | "available" | "unavailable";
            type?: null | string;
            url?: null | string;
            whatsapp_media_id?: null | string;
        };
        message_id?: string;
        object?: "message";
        platform_message_id?: null
        | string;
        status?: string;
        timestamp?: string;
        type?: string;
    } & {
        ctwa_clid?: string;
        identity_key_hash?: string;
        order?: { [key: string]: unknown };
        referral?: { [key: string]: unknown };
        referred_product?: { [key: string]: unknown };
    };
    WhatsAppTemplate: {
        approved_at?: null
        | string;
        category?: string;
        channel_id?: string;
        components?: { [key: string]: unknown };
        created_at?: string;
        id?: string;
        language?: string;
        last_synced_at?: null | string;
        meta_template_id?: null | string;
        name?: string;
        object?: "whatsapp_template";
        rejected_at?: null | string;
        rejection_reason?: null | string;
        status?: string;
        submitted_at?: string;
        updated_at?: string;
    };
    WhatsAppUsername: {
        channel_id: string;
        last_checked_at: string;
        object: "whatsapp_username";
        status: null
        | "approved"
        | "reserved";
        username: null | string;
    };
    WhatsAppUsernameSuggestions: {
        channel_id: string;
        data: string[];
        object: "list";
    };
}

Type declaration

  • Broadcast: {
        canceled_at?: null | string;
        category: "marketing" | "utility";
        channel_id?: string;
        completed_at?: null | string;
        counts: { [key: string]: number };
        created_at?: string;
        failure?: null | { code?: null | string; message?: null | string };
        fallback_language?: string;
        id: string;
        name: string;
        object: "broadcast";
        schedule_timezone?: null | string;
        scheduled_at?: null | string;
        started_at?: null | string;
        status:
            | "completed"
            | "ready"
            | "draft"
            | "preparing"
            | "scheduled"
            | "sending"
            | "canceled"
            | "failed";
        template_name?: string;
        updated_at?: string;
    }
    • Optionalcanceled_at?: null | string

      Format: date-time

    • category: "marketing" | "utility"
    • Optionalchannel_id?: string
    • Optionalcompleted_at?: null | string

      Format: date-time

    • counts: { [key: string]: number }

      Recipient counts: total, pending, accepted, delivered, read, failed, skipped, and canceled.

    • Optionalcreated_at?: string

      Format: date-time

    • Optionalfailure?: null | { code?: null | string; message?: null | string }

      Why the broadcast failed. code template_not_approved means Meta paused, disabled, or recategorized a template while the broadcast was sending, so Wabery stopped the remaining sends.

    • Optionalfallback_language?: string
    • id: string
    • name: string
    • object: "broadcast"
    • Optionalschedule_timezone?: null | string
    • Optionalscheduled_at?: null | string

      Format: date-time

    • Optionalstarted_at?: null | string

      Format: date-time

    • status:
          | "completed"
          | "ready"
          | "draft"
          | "preparing"
          | "scheduled"
          | "sending"
          | "canceled"
          | "failed"
    • Optionaltemplate_name?: string
    • Optionalupdated_at?: string

      Format: date-time

  • BroadcastCreateRequest: {
        category: "UTILITY" | "MARKETING";
        channelId: string;
        fallbackLanguage: string;
        name: string;
        templateName: string;
        variants: {
            language: string;
            parameterMappings: { [key: string]: unknown }[];
            templateId: string;
        }[];
    }
  • BroadcastLifecycleWebhookPayload: {
        category?: "marketing" | "utility";
        channel_id?: string;
        counts: { [key: string]: number };
        event:
            | "broadcast.started"
            | "broadcast.completed"
            | "broadcast.canceled"
            | "broadcast.failed";
        failure?: null
        | { code?: null | string; message?: null | string };
        id: string;
        object: "broadcast";
        occurred_at: string;
        status:
            | "completed"
            | "ready"
            | "draft"
            | "preparing"
            | "scheduled"
            | "sending"
            | "canceled"
            | "failed";
        template_name?: string;
    }
    • Optionalcategory?: "marketing" | "utility"
    • Optionalchannel_id?: string
    • counts: { [key: string]: number }

      Recipient counts: total, pending, accepted, delivered, read, failed, skipped, and canceled.

    • event:
          | "broadcast.started"
          | "broadcast.completed"
          | "broadcast.canceled"
          | "broadcast.failed"
    • Optionalfailure?: null | { code?: null | string; message?: null | string }

      Set when the broadcast failed. code template_not_approved means Meta paused, disabled, or recategorized a template while the broadcast was sending.

    • id: string
    • object: "broadcast"
    • occurred_at: string

      Format: date-time

    • status:
          | "completed"
          | "ready"
          | "draft"
          | "preparing"
          | "scheduled"
          | "sending"
          | "canceled"
          | "failed"
    • Optionaltemplate_name?: string
  • BusinessAgent: {
        channel_id: string;
        created_at: string;
        eligibility?: null | { [key: string]: unknown };
        error_message?: null | string;
        id: string;
        meta_agent_id?: null | string;
        object: "business_agent";
        project_id: string;
        settings?: null | { [key: string]: unknown };
        status: "DRAFT" | "PROVISIONING" | "ACTIVE" | "DISABLED" | "ERROR";
        updated_at: string;
    }
    • channel_id: string
    • created_at: string

      Format: date-time

    • Optionaleligibility?: null | { [key: string]: unknown }
    • Optionalerror_message?: null | string
    • id: string
    • Optionalmeta_agent_id?: null | string
    • object: "business_agent"
    • project_id: string
    • Optionalsettings?: null | { [key: string]: unknown }
    • status: "DRAFT" | "PROVISIONING" | "ACTIVE" | "DISABLED" | "ERROR"
    • updated_at: string

      Format: date-time

  • BusinessAgentAllowlistRequest: { consumer_phone_number: string }
  • BusinessAgentApplyRequest: {
        channel_id: string;
        enabled?: boolean;
        handoff?: { [key: string]: unknown };
        knowledge?: { [key: string]: unknown };
        language?: string;
        persona?: string;
    } & { [key: string]: unknown }
  • BusinessAgentConnector: {
        business_agent_id: string;
        config?: null | { [key: string]: unknown };
        created_at: string;
        id: string;
        meta_connector_id?: null | string;
        name: string;
        object: "business_agent_connector";
        status: string;
        tools?: {
            backing_flow_id?: null | string;
            backing_function_id?: null | string;
            backing_function_version_id: null | string;
            backing_type: "FLOW" | "API_ENDPOINT" | "NOOP" | "HOSTED_FUNCTION";
            connector_id: string;
            created_at: string;
            description?: null | string;
            id: string;
            input_schema?: null | { [key: string]: unknown };
            meta_tool_id?: null | string;
            name: string;
            object: "business_agent_connector_tool";
            updated_at: string;
        }[];
        type: string;
        updated_at: string;
    }

    Local connector binding plus optional remote observation. Provider auth_config, OAuth secrets, API-key values, certificates, and secret headers are always redacted.

    • business_agent_id: string
    • Optionalconfig?: null | { [key: string]: unknown }
    • created_at: string

      Format: date-time

    • id: string
    • Optionalmeta_connector_id?: null | string
    • name: string
    • object: "business_agent_connector"
    • status: string
    • Optionaltools?: {
          backing_flow_id?: null | string;
          backing_function_id?: null | string;
          backing_function_version_id: null | string;
          backing_type: "FLOW" | "API_ENDPOINT" | "NOOP" | "HOSTED_FUNCTION";
          connector_id: string;
          created_at: string;
          description?: null | string;
          id: string;
          input_schema?: null | { [key: string]: unknown };
          meta_tool_id?: null | string;
          name: string;
          object: "business_agent_connector_tool";
          updated_at: string;
      }[]
    • type: string
    • updated_at: string

      Format: date-time

  • BusinessAgentConnectorApiKeyRequest: { api_key_config: { [key: string]: unknown } }
  • BusinessAgentConnectorCertificateRequest: { ca_certificate?: string; client_certificate: string; client_key: string }
  • BusinessAgentConnectorCreateRequest: {
        business_agent_id: string;
        config?: { [key: string]: unknown };
        name: string;
        status?: string;
        type: string;
    } & { [key: string]: unknown }
  • BusinessAgentConnectorOAuthRequest: {
        oauth_config: {
            client_id: string;
            client_secret: string;
            scopes_to_request: string[];
            token_url: string;
        };
    }
    • oauth_config: {
          client_id: string;
          client_secret: string;
          scopes_to_request: string[];
          token_url: string;
      }
      • client_id: string
      • client_secret: string
      • scopes_to_request: string[]
      • token_url: string

        Format: uri

  • BusinessAgentConnectorTool: {
        backing_flow_id?: null | string;
        backing_function_id?: null | string;
        backing_function_version_id: null | string;
        backing_type: "FLOW" | "API_ENDPOINT" | "NOOP" | "HOSTED_FUNCTION";
        connector_id: string;
        created_at: string;
        description?: null | string;
        id: string;
        input_schema?: null | { [key: string]: unknown };
        meta_tool_id?: null | string;
        name: string;
        object: "business_agent_connector_tool";
        updated_at: string;
    }
    • Optionalbacking_flow_id?: null | string
    • Optionalbacking_function_id?: null | string
    • backing_function_version_id: null | string
    • backing_type: "FLOW" | "API_ENDPOINT" | "NOOP" | "HOSTED_FUNCTION"
    • connector_id: string
    • created_at: string

      Format: date-time

    • Optionaldescription?: null | string
    • id: string
    • Optionalinput_schema?: null | { [key: string]: unknown }
    • Optionalmeta_tool_id?: null | string
    • name: string
    • object: "business_agent_connector_tool"
    • updated_at: string

      Format: date-time

  • BusinessAgentConnectorToolCreateRequest: {
        backing_flow_id?: string;
        backing_function_id?: string;
        backing_type: "FLOW" | "API_ENDPOINT" | "NOOP" | "HOSTED_FUNCTION";
        config?: { [key: string]: unknown };
        description?: string;
        input_schema?: { [key: string]: unknown };
        name: string;
    } & { [key: string]: unknown }
  • BusinessAgentConnectorToolRunRequest: { arguments: { [key: string]: unknown } }
  • BusinessAgentConnectorToolUpdateRequest: {
        backing_flow_id?: null | string;
        backing_function_id?: null | string;
        backing_type?: "FLOW" | "API_ENDPOINT" | "NOOP" | "HOSTED_FUNCTION";
        config?: { [key: string]: unknown };
        description?: null | string;
        input_schema?: null | { [key: string]: unknown };
        name?: string;
    } & { [key: string]: unknown }
  • BusinessAgentConnectorUpdateRequest: {
        config?: { [key: string]: unknown };
        name?: string;
        status?: string;
        type?: string;
    } & { [key: string]: unknown }
  • BusinessAgentEligibilityResponse: {
        channel_id: string;
        eligibility: { [key: string]: unknown };
        object: "business_agent_eligibility";
    }
    • channel_id: string
    • eligibility: { [key: string]: unknown }
    • object: "business_agent_eligibility"
  • BusinessAgentEvalResponse: {
        business_agent_id: string;
        object: "business_agent_eval";
        result: { [key: string]: unknown };
    }
    • business_agent_id: string
    • object: "business_agent_eval"
    • result: { [key: string]: unknown }
  • BusinessAgentEventRequest: { [key: string]: unknown }

    Canonical Meta agent-event payload.

  • BusinessAgentRemoteWriteResolveRequest: { action: "adopt" | "resolve"; approved: true; remote_id: string }
    • action: "adopt" | "resolve"
    • approved: true
    • remote_id: string
  • BusinessAgentResourceRequest: { [key: string]: unknown }

    Resource-specific canonical Meta payload. Unknown provider credential containers are never returned.

  • BusinessAgentSettingsRequest: {
        enabled?: boolean;
        handoff?: { [key: string]: unknown };
        knowledge?: { [key: string]: unknown };
        language?: string;
        persona?: string;
    } & { [key: string]: unknown }
  • BusinessAgentSettingsResponse: {
        business_agent_id: string;
        object: "business_agent_settings";
        settings: { [key: string]: unknown };
    }
    • business_agent_id: string
    • object: "business_agent_settings"
    • settings: { [key: string]: unknown }
  • BusinessAgentSkillRequest: { description?: string; skill?: string; title?: string }
  • BusinessAgentSkillsResponse: {
        business_agent_id: string;
        data: unknown[];
        object: "business_agent_skills";
        result?: { [key: string]: unknown };
    } & { [key: string]: unknown }
  • BusinessAgentTestRequest: { business_agent_id: string; conversation_id?: string; user_msg: string }
  • BusinessAgentTestResponse: {
        business_agent_id: string;
        object: "business_agent_test";
        result: { [key: string]: unknown };
    }
    • business_agent_id: string
    • object: "business_agent_test"
    • result: { [key: string]: unknown }
  • Channel: {
        channel_id?: string;
        display_name?: null | string;
        id?: string;
        is_sandbox?: boolean;
        number_mode?: string;
        object?: "channel";
        phone_number?: null | string;
        platform?:
            | "WHATSAPP"
            | "INSTAGRAM"
            | "MESSENGER"
            | "SMS"
            | "TELEGRAM"
            | "EMAIL";
        publish_readiness?: | null
        | {
            account_review_status?: null
            | string;
            blockers?: (
                | "CHANNEL_NOT_CONNECTED"
                | "MISSING_WABA"
                | "MISSING_CHANNEL_CREDENTIALS"
                | "META_ACCOUNT_STATUS_UNKNOWN"
                | "BUSINESS_NOT_VERIFIED"
                | "ACCOUNT_NOT_APPROVED"
                | "PHONE_NOT_CONNECTED"
                | "PHONE_STATUS_UNKNOWN"
                | "PAYMENT_STATUS_UNKNOWN"
                | "NO_PAYMENT_METHOD"
                | "WHATSAPP_SENDER_NOT_READY"
                | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
            )[];
            business_verification_status?: null
            | string;
            can_publish_flows?: boolean;
            can_submit_templates?: boolean;
            mode?: "sandbox" | "dedicated";
            phone_number_status?: null | string;
        };
        routing_mode?: "AGENT"
        | "EXTERNAL";
        routing_warning?: null | string;
        status?: string;
    }
    • Optionalchannel_id?: string
    • Optionaldisplay_name?: null | string
    • Optionalid?: string
    • Optionalis_sandbox?: boolean
    • Optionalnumber_mode?: string
    • Optionalobject?: "channel"
    • Optionalphone_number?: null | string
    • Optionalplatform?: "WHATSAPP" | "INSTAGRAM" | "MESSENGER" | "SMS" | "TELEGRAM" | "EMAIL"

      Messaging platform. WhatsApp is the default production channel. Instagram Direct and Facebook Messenger are beta channels available to connect directly from Channels; they do not support WhatsApp Flows, WhatsApp templates, or proactive template-style sends.

    • Optionalpublish_readiness?:
          | null
          | {
              account_review_status?: null
              | string;
              blockers?: (
                  | "CHANNEL_NOT_CONNECTED"
                  | "MISSING_WABA"
                  | "MISSING_CHANNEL_CREDENTIALS"
                  | "META_ACCOUNT_STATUS_UNKNOWN"
                  | "BUSINESS_NOT_VERIFIED"
                  | "ACCOUNT_NOT_APPROVED"
                  | "PHONE_NOT_CONNECTED"
                  | "PHONE_STATUS_UNKNOWN"
                  | "PAYMENT_STATUS_UNKNOWN"
                  | "NO_PAYMENT_METHOD"
                  | "WHATSAPP_SENDER_NOT_READY"
                  | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
              )[];
              business_verification_status?: null
              | string;
              can_publish_flows?: boolean;
              can_submit_templates?: boolean;
              mode?: "sandbox" | "dedicated";
              phone_number_status?: null | string;
          }

      WhatsApp Flow/template publishing readiness for this channel. Non-WhatsApp channels return null.

    • Optionalrouting_mode?: "AGENT" | "EXTERNAL"

      How inbound to this channel is handled. AGENT runs the Wabery-hosted agent, including its automations and functions; EXTERNAL forwards to the project webhook. The channel value is authoritative for dedicated numbers and overrides the project's routing_mode.

    • Optionalrouting_warning?: null | string

      Non-null when this channel's routing bypasses the project's configured webhook (for example, an AGENT channel under an EXTERNAL project). Null when routing looks coherent.

    • Optionalstatus?: string
  • ConfigApplyResponse: {
        applied?: {
            hosted_agents?: {
                action_required?:
                    | null
                    | "CREATE_AGENT"
                    | "SELECT_AI_MODEL"
                    | "ADD_PAYMENT_METHOD"
                    | "ADD_FUNDS";
                ai_enabled: boolean;
                id: string;
                key?: string;
                project_id: string;
                runtime_mode: "ai_ready"
                | "automations_only"
                | "not_operational";
                status?: string;
            }[];
        };
        config?: {
            $schema?: string;
            automations: {
                active?: boolean;
                key: string;
                name: string;
                steps: (
                    | { send_reply: { buttons?: (...)
                    | (...); text: string } }
                    | { delay: { minutes: number } }
                    | {
                        wait_reply: {
                            options?: (...) | (...);
                            timeout_hours?: (...) | (...);
                        };
                    }
                    | { pause_replies: { reason?: (...)
                    | (...) } }
                    | {
                        send_flow: {
                            body_text?: (...) | (...);
                            flow: string;
                            flow_cta?: (...) | (...);
                            footer_text?: (...) | (...);
                            header_text?: (...) | (...);
                        };
                    }
                    | {
                        run_function: {
                            function: string;
                            reply_field?: (...)
                            | (...);
                            result_mode?: (...) | (...) | (...) | (...);
                            variable_name?: (...) | (...);
                        };
                    }
                )[];
                trigger: {
                    keywords?: string[];
                    match_mode?: "EXACT"
                    | "CONTAINS"
                    | "CONTAINS_WORD";
                    type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
                };
            }[];
            business_agent?: {
                channel_id?: string;
                connectors?: { [key: string]: unknown }[];
                enabled: boolean;
                faqs?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                operation_id: string;
                settings: {
                    enabled?: boolean;
                    handoff?: { [key: string]: unknown };
                    knowledge?: { [key: string]: unknown };
                    language?: string;
                    persona?: string;
                } & { [key: string]: unknown };
                skills?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                ui_skills?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                websites?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
            };
            flows: {
                agent_id?: string;
                data_exchange_url?: null
                | string;
                description?: string;
                draft?: { entryScreenId?: string; screens?: (...)[] } & {
                    [key: string]: unknown;
                };
                flow_json?: { screens?: (...)[]; version?: string } & {
                    [key: string]: unknown;
                };
                key: string;
                locale?: string;
                name: string;
                project_id?: string;
                runtime_mode?: "STATIC"
                | "DATA_EXCHANGE";
            }[];
            hosted_agents?: {
                allowed_topics: string[];
                channel_ids: string[];
                conversation_messages?: {
                    cannot_listen?: string;
                    clarification: string;
                    farewell: string;
                    greeting: string;
                    out_of_scope: string;
                };
                fallback: {
                    automation_id?: string;
                    message?: string;
                    policy: "SILENT"
                    | "CLARIFICATION"
                    | "HUMAN_HANDOFF"
                    | "AUTOMATION";
                };
                instructions: string;
                key: string;
                knowledge: {
                    content?: string;
                    title: string;
                    type: "TEXT"
                    | "FAQ"
                    | "URL";
                    url?: string;
                }[];
                language: string;
                max_input_chars: number;
                max_output_tokens: number;
                max_run_cost_micros: number;
                model: string;
                monthly_budget_micros: number;
                name: string;
                project_id?: string;
                purpose?: string;
                status?: "DRAFT"
                | "DISABLED";
            }[];
            project_id?: string;
            require_opt_in?: boolean;
            version?: string;
        };
        diff: {
            action?: "delete"
            | "create"
            | "update"
            | "unchanged";
            details?: string[];
            key?: string;
            requiresActivation?: boolean;
            risk?: "low" | "medium" | "high";
            type?:
                | "business_agent"
                | "business_agent_connector"
                | "flow"
                | "project"
                | "hosted_agent"
                | "hosted_agent_assignment"
                | "hosted_agent_knowledge"
                | "automation"
                | "webhook"
                | "business_agent_tool";
        }[];
        issues: { message?: string; path?: string; severity?: "warning"
        | "error" }[];
        object: "config_apply";
        valid: boolean;
    }
    • Optionalapplied?: {
          hosted_agents?: {
              action_required?:
                  | null
                  | "CREATE_AGENT"
                  | "SELECT_AI_MODEL"
                  | "ADD_PAYMENT_METHOD"
                  | "ADD_FUNDS";
              ai_enabled: boolean;
              id: string;
              key?: string;
              project_id: string;
              runtime_mode: "ai_ready"
              | "automations_only"
              | "not_operational";
              status?: string;
          }[];
      }
    • Optionalconfig?: {
          $schema?: string;
          automations: {
              active?: boolean;
              key: string;
              name: string;
              steps: (
                  | { send_reply: { buttons?: (...)
                  | (...); text: string } }
                  | { delay: { minutes: number } }
                  | {
                      wait_reply: {
                          options?: (...) | (...);
                          timeout_hours?: (...) | (...);
                      };
                  }
                  | { pause_replies: { reason?: (...)
                  | (...) } }
                  | {
                      send_flow: {
                          body_text?: (...) | (...);
                          flow: string;
                          flow_cta?: (...) | (...);
                          footer_text?: (...) | (...);
                          header_text?: (...) | (...);
                      };
                  }
                  | {
                      run_function: {
                          function: string;
                          reply_field?: (...)
                          | (...);
                          result_mode?: (...) | (...) | (...) | (...);
                          variable_name?: (...) | (...);
                      };
                  }
              )[];
              trigger: {
                  keywords?: string[];
                  match_mode?: "EXACT"
                  | "CONTAINS"
                  | "CONTAINS_WORD";
                  type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
              };
          }[];
          business_agent?: {
              channel_id?: string;
              connectors?: { [key: string]: unknown }[];
              enabled: boolean;
              faqs?: {
                  key: string;
                  remote_id?: string;
                  value: { [key: string]: unknown };
              }[];
              operation_id: string;
              settings: {
                  enabled?: boolean;
                  handoff?: { [key: string]: unknown };
                  knowledge?: { [key: string]: unknown };
                  language?: string;
                  persona?: string;
              } & { [key: string]: unknown };
              skills?: {
                  key: string;
                  remote_id?: string;
                  value: { [key: string]: unknown };
              }[];
              ui_skills?: {
                  key: string;
                  remote_id?: string;
                  value: { [key: string]: unknown };
              }[];
              websites?: {
                  key: string;
                  remote_id?: string;
                  value: { [key: string]: unknown };
              }[];
          };
          flows: {
              agent_id?: string;
              data_exchange_url?: null
              | string;
              description?: string;
              draft?: { entryScreenId?: string; screens?: (...)[] } & {
                  [key: string]: unknown;
              };
              flow_json?: { screens?: (...)[]; version?: string } & {
                  [key: string]: unknown;
              };
              key: string;
              locale?: string;
              name: string;
              project_id?: string;
              runtime_mode?: "STATIC"
              | "DATA_EXCHANGE";
          }[];
          hosted_agents?: {
              allowed_topics: string[];
              channel_ids: string[];
              conversation_messages?: {
                  cannot_listen?: string;
                  clarification: string;
                  farewell: string;
                  greeting: string;
                  out_of_scope: string;
              };
              fallback: {
                  automation_id?: string;
                  message?: string;
                  policy: "SILENT"
                  | "CLARIFICATION"
                  | "HUMAN_HANDOFF"
                  | "AUTOMATION";
              };
              instructions: string;
              key: string;
              knowledge: {
                  content?: string;
                  title: string;
                  type: "TEXT"
                  | "FAQ"
                  | "URL";
                  url?: string;
              }[];
              language: string;
              max_input_chars: number;
              max_output_tokens: number;
              max_run_cost_micros: number;
              model: string;
              monthly_budget_micros: number;
              name: string;
              project_id?: string;
              purpose?: string;
              status?: "DRAFT"
              | "DISABLED";
          }[];
          project_id?: string;
          require_opt_in?: boolean;
          version?: string;
      }
      • Optional$schema?: string
      • automations: {
            active?: boolean;
            key: string;
            name: string;
            steps: (
                | { send_reply: { buttons?: (...)
                | (...); text: string } }
                | { delay: { minutes: number } }
                | {
                    wait_reply: { options?: (...) | (...); timeout_hours?: (...) | (...) };
                }
                | { pause_replies: { reason?: (...)
                | (...) } }
                | {
                    send_flow: {
                        body_text?: (...) | (...);
                        flow: string;
                        flow_cta?: (...) | (...);
                        footer_text?: (...) | (...);
                        header_text?: (...) | (...);
                    };
                }
                | {
                    run_function: {
                        function: string;
                        reply_field?: (...)
                        | (...);
                        result_mode?: (...) | (...) | (...) | (...);
                        variable_name?: (...) | (...);
                    };
                }
            )[];
            trigger: {
                keywords?: string[];
                match_mode?: "EXACT"
                | "CONTAINS"
                | "CONTAINS_WORD";
                type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
            };
        }[]
      • Optionalbusiness_agent?: {
            channel_id?: string;
            connectors?: { [key: string]: unknown }[];
            enabled: boolean;
            faqs?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
            operation_id: string;
            settings: {
                enabled?: boolean;
                handoff?: { [key: string]: unknown };
                knowledge?: { [key: string]: unknown };
                language?: string;
                persona?: string;
            } & { [key: string]: unknown };
            skills?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
            ui_skills?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
            websites?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
        }

        Default-off Meta desired state. Apply requires operation_id and cannot activate rollout or select EVERYONE.

        • Optionalchannel_id?: string
        • Optionalconnectors?: { [key: string]: unknown }[]
        • enabled: boolean
          false
          
        • Optionalfaqs?: { key: string; remote_id?: string; value: { [key: string]: unknown } }[]
        • operation_id: string
        • settings: {
              enabled?: boolean;
              handoff?: { [key: string]: unknown };
              knowledge?: { [key: string]: unknown };
              language?: string;
              persona?: string;
          } & { [key: string]: unknown }
        • Optionalskills?: { key: string; remote_id?: string; value: { [key: string]: unknown } }[]
        • Optionalui_skills?: { key: string; remote_id?: string; value: { [key: string]: unknown } }[]
        • Optionalwebsites?: { key: string; remote_id?: string; value: { [key: string]: unknown } }[]
      • flows: {
            agent_id?: string;
            data_exchange_url?: null | string;
            description?: string;
            draft?: { entryScreenId?: string; screens?: (...)[] } & {
                [key: string]: unknown;
            };
            flow_json?: { screens?: (...)[]; version?: string } & {
                [key: string]: unknown;
            };
            key: string;
            locale?: string;
            name: string;
            project_id?: string;
            runtime_mode?: "STATIC"
            | "DATA_EXCHANGE";
        }[]
      • Optionalhosted_agents?: {
            allowed_topics: string[];
            channel_ids: string[];
            conversation_messages?: {
                cannot_listen?: string;
                clarification: string;
                farewell: string;
                greeting: string;
                out_of_scope: string;
            };
            fallback: {
                automation_id?: string;
                message?: string;
                policy: "SILENT"
                | "CLARIFICATION"
                | "HUMAN_HANDOFF"
                | "AUTOMATION";
            };
            instructions: string;
            key: string;
            knowledge: {
                content?: string;
                title: string;
                type: "TEXT"
                | "FAQ"
                | "URL";
                url?: string;
            }[];
            language: string;
            max_input_chars: number;
            max_output_tokens: number;
            max_run_cost_micros: number;
            model: string;
            monthly_budget_micros: number;
            name: string;
            project_id?: string;
            purpose?: string;
            status?: "DRAFT"
            | "DISABLED";
        }[]

        Wabery-hosted AI agents. Declarative apply creates or updates the Draft only. Live is read-only until Review & publish in Wabery.

      • Optionalproject_id?: string
      • Optionalrequire_opt_in?: boolean

        Applied to project_id. False on a dedicated production number lets inbound senders be replied to and messaged without the invite/opt-in step.

      • Optionalversion?: string
    • diff: {
          action?: "delete" | "create" | "update" | "unchanged";
          details?: string[];
          key?: string;
          requiresActivation?: boolean;
          risk?: "low" | "medium" | "high";
          type?:
              | "business_agent"
              | "business_agent_connector"
              | "flow"
              | "project"
              | "hosted_agent"
              | "hosted_agent_assignment"
              | "hosted_agent_knowledge"
              | "automation"
              | "webhook"
              | "business_agent_tool";
      }[]
    • issues: { message?: string; path?: string; severity?: "warning" | "error" }[]
    • object: "config_apply"
    • valid: boolean
  • ConfigDiffItem: {
        action?: "delete" | "create" | "update" | "unchanged";
        details?: string[];
        key?: string;
        requiresActivation?: boolean;
        risk?: "low" | "medium" | "high";
        type?:
            | "business_agent"
            | "business_agent_connector"
            | "flow"
            | "project"
            | "hosted_agent"
            | "hosted_agent_assignment"
            | "hosted_agent_knowledge"
            | "automation"
            | "webhook"
            | "business_agent_tool";
    }
  • ConfigDiffResponse: {
        diff: {
            action?: "delete" | "create" | "update" | "unchanged";
            details?: string[];
            key?: string;
            requiresActivation?: boolean;
            risk?: "low" | "medium" | "high";
            type?:
                | "business_agent"
                | "business_agent_connector"
                | "flow"
                | "project"
                | "hosted_agent"
                | "hosted_agent_assignment"
                | "hosted_agent_knowledge"
                | "automation"
                | "webhook"
                | "business_agent_tool";
        }[];
        issues: { message?: string; path?: string; severity?: "warning"
        | "error" }[];
        object: "config_diff";
        valid: boolean;
    }
    • diff: {
          action?: "delete" | "create" | "update" | "unchanged";
          details?: string[];
          key?: string;
          requiresActivation?: boolean;
          risk?: "low" | "medium" | "high";
          type?:
              | "business_agent"
              | "business_agent_connector"
              | "flow"
              | "project"
              | "hosted_agent"
              | "hosted_agent_assignment"
              | "hosted_agent_knowledge"
              | "automation"
              | "webhook"
              | "business_agent_tool";
      }[]
    • issues: { message?: string; path?: string; severity?: "warning" | "error" }[]
    • object: "config_diff"
    • valid: boolean
  • ConfigIssue: { message?: string; path?: string; severity?: "warning" | "error" }
  • ConfigValidationResponse: {
        config?: {
            $schema?: string;
            automations: {
                active?: boolean;
                key: string;
                name: string;
                steps: (
                    | { send_reply: { buttons?: (...)
                    | (...); text: string } }
                    | { delay: { minutes: number } }
                    | {
                        wait_reply: {
                            options?: (...) | (...);
                            timeout_hours?: (...) | (...);
                        };
                    }
                    | { pause_replies: { reason?: (...)
                    | (...) } }
                    | {
                        send_flow: {
                            body_text?: (...) | (...);
                            flow: string;
                            flow_cta?: (...) | (...);
                            footer_text?: (...) | (...);
                            header_text?: (...) | (...);
                        };
                    }
                    | {
                        run_function: {
                            function: string;
                            reply_field?: (...)
                            | (...);
                            result_mode?: (...) | (...) | (...) | (...);
                            variable_name?: (...) | (...);
                        };
                    }
                )[];
                trigger: {
                    keywords?: string[];
                    match_mode?: "EXACT"
                    | "CONTAINS"
                    | "CONTAINS_WORD";
                    type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
                };
            }[];
            business_agent?: {
                channel_id?: string;
                connectors?: { [key: string]: unknown }[];
                enabled: boolean;
                faqs?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                operation_id: string;
                settings: {
                    enabled?: boolean;
                    handoff?: { [key: string]: unknown };
                    knowledge?: { [key: string]: unknown };
                    language?: string;
                    persona?: string;
                } & { [key: string]: unknown };
                skills?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                ui_skills?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
                websites?: {
                    key: string;
                    remote_id?: string;
                    value: { [key: string]: unknown };
                }[];
            };
            flows: {
                agent_id?: string;
                data_exchange_url?: null
                | string;
                description?: string;
                draft?: { entryScreenId?: string; screens?: (...)[] } & {
                    [key: string]: unknown;
                };
                flow_json?: { screens?: (...)[]; version?: string } & {
                    [key: string]: unknown;
                };
                key: string;
                locale?: string;
                name: string;
                project_id?: string;
                runtime_mode?: "STATIC"
                | "DATA_EXCHANGE";
            }[];
            hosted_agents?: {
                allowed_topics: string[];
                channel_ids: string[];
                conversation_messages?: {
                    cannot_listen?: string;
                    clarification: string;
                    farewell: string;
                    greeting: string;
                    out_of_scope: string;
                };
                fallback: {
                    automation_id?: string;
                    message?: string;
                    policy: "SILENT"
                    | "CLARIFICATION"
                    | "HUMAN_HANDOFF"
                    | "AUTOMATION";
                };
                instructions: string;
                key: string;
                knowledge: {
                    content?: string;
                    title: string;
                    type: "TEXT"
                    | "FAQ"
                    | "URL";
                    url?: string;
                }[];
                language: string;
                max_input_chars: number;
                max_output_tokens: number;
                max_run_cost_micros: number;
                model: string;
                monthly_budget_micros: number;
                name: string;
                project_id?: string;
                purpose?: string;
                status?: "DRAFT"
                | "DISABLED";
            }[];
            project_id?: string;
            require_opt_in?: boolean;
            version?: string;
        };
        issues: { message?: string; path?: string; severity?: "warning"
        | "error" }[];
        object: "config_validation";
        valid: boolean;
    }
    • Optionalconfig?: {
          $schema?: string;
          automations: {
              active?: boolean;
              key: string;
              name: string;
              steps: (
                  | { send_reply: { buttons?: (...)
                  | (...); text: string } }
                  | { delay: { minutes: number } }
                  | {
                      wait_reply: {
                          options?: (...) | (...);
                          timeout_hours?: (...) | (...);
                      };
                  }
                  | { pause_replies: { reason?: (...)
                  | (...) } }
                  | {
                      send_flow: {
                          body_text?: (...) | (...);
                          flow: string;
                          flow_cta?: (...) | (...);
                          footer_text?: (...) | (...);
                          header_text?: (...) | (...);
                      };
                  }
                  | {
                      run_function: {
                          function: string;
                          reply_field?: (...)
                          | (...);
                          result_mode?: (...) | (...) | (...) | (...);
                          variable_name?: (...) | (...);
                      };
                  }
              )[];
              trigger: {
                  keywords?: string[];
                  match_mode?: "EXACT"
                  | "CONTAINS"
                  | "CONTAINS_WORD";
                  type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
              };
          }[];
          business_agent?: {
              channel_id?: string;
              connectors?: { [key: string]: unknown }[];
              enabled: boolean;
              faqs?: {
                  key: string;
                  remote_id?: string;
                  value: { [key: string]: unknown };
              }[];
              operation_id: string;
              settings: {
                  enabled?: boolean;
                  handoff?: { [key: string]: unknown };
                  knowledge?: { [key: string]: unknown };
                  language?: string;
                  persona?: string;
              } & { [key: string]: unknown };
              skills?: {
                  key: string;
                  remote_id?: string;
                  value: { [key: string]: unknown };
              }[];
              ui_skills?: {
                  key: string;
                  remote_id?: string;
                  value: { [key: string]: unknown };
              }[];
              websites?: {
                  key: string;
                  remote_id?: string;
                  value: { [key: string]: unknown };
              }[];
          };
          flows: {
              agent_id?: string;
              data_exchange_url?: null
              | string;
              description?: string;
              draft?: { entryScreenId?: string; screens?: (...)[] } & {
                  [key: string]: unknown;
              };
              flow_json?: { screens?: (...)[]; version?: string } & {
                  [key: string]: unknown;
              };
              key: string;
              locale?: string;
              name: string;
              project_id?: string;
              runtime_mode?: "STATIC"
              | "DATA_EXCHANGE";
          }[];
          hosted_agents?: {
              allowed_topics: string[];
              channel_ids: string[];
              conversation_messages?: {
                  cannot_listen?: string;
                  clarification: string;
                  farewell: string;
                  greeting: string;
                  out_of_scope: string;
              };
              fallback: {
                  automation_id?: string;
                  message?: string;
                  policy: "SILENT"
                  | "CLARIFICATION"
                  | "HUMAN_HANDOFF"
                  | "AUTOMATION";
              };
              instructions: string;
              key: string;
              knowledge: {
                  content?: string;
                  title: string;
                  type: "TEXT"
                  | "FAQ"
                  | "URL";
                  url?: string;
              }[];
              language: string;
              max_input_chars: number;
              max_output_tokens: number;
              max_run_cost_micros: number;
              model: string;
              monthly_budget_micros: number;
              name: string;
              project_id?: string;
              purpose?: string;
              status?: "DRAFT"
              | "DISABLED";
          }[];
          project_id?: string;
          require_opt_in?: boolean;
          version?: string;
      }
      • Optional$schema?: string
      • automations: {
            active?: boolean;
            key: string;
            name: string;
            steps: (
                | { send_reply: { buttons?: (...)
                | (...); text: string } }
                | { delay: { minutes: number } }
                | {
                    wait_reply: { options?: (...) | (...); timeout_hours?: (...) | (...) };
                }
                | { pause_replies: { reason?: (...)
                | (...) } }
                | {
                    send_flow: {
                        body_text?: (...) | (...);
                        flow: string;
                        flow_cta?: (...) | (...);
                        footer_text?: (...) | (...);
                        header_text?: (...) | (...);
                    };
                }
                | {
                    run_function: {
                        function: string;
                        reply_field?: (...)
                        | (...);
                        result_mode?: (...) | (...) | (...) | (...);
                        variable_name?: (...) | (...);
                    };
                }
            )[];
            trigger: {
                keywords?: string[];
                match_mode?: "EXACT"
                | "CONTAINS"
                | "CONTAINS_WORD";
                type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
            };
        }[]
      • Optionalbusiness_agent?: {
            channel_id?: string;
            connectors?: { [key: string]: unknown }[];
            enabled: boolean;
            faqs?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
            operation_id: string;
            settings: {
                enabled?: boolean;
                handoff?: { [key: string]: unknown };
                knowledge?: { [key: string]: unknown };
                language?: string;
                persona?: string;
            } & { [key: string]: unknown };
            skills?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
            ui_skills?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
            websites?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
        }

        Default-off Meta desired state. Apply requires operation_id and cannot activate rollout or select EVERYONE.

        • Optionalchannel_id?: string
        • Optionalconnectors?: { [key: string]: unknown }[]
        • enabled: boolean
          false
          
        • Optionalfaqs?: { key: string; remote_id?: string; value: { [key: string]: unknown } }[]
        • operation_id: string
        • settings: {
              enabled?: boolean;
              handoff?: { [key: string]: unknown };
              knowledge?: { [key: string]: unknown };
              language?: string;
              persona?: string;
          } & { [key: string]: unknown }
        • Optionalskills?: { key: string; remote_id?: string; value: { [key: string]: unknown } }[]
        • Optionalui_skills?: { key: string; remote_id?: string; value: { [key: string]: unknown } }[]
        • Optionalwebsites?: { key: string; remote_id?: string; value: { [key: string]: unknown } }[]
      • flows: {
            agent_id?: string;
            data_exchange_url?: null | string;
            description?: string;
            draft?: { entryScreenId?: string; screens?: (...)[] } & {
                [key: string]: unknown;
            };
            flow_json?: { screens?: (...)[]; version?: string } & {
                [key: string]: unknown;
            };
            key: string;
            locale?: string;
            name: string;
            project_id?: string;
            runtime_mode?: "STATIC"
            | "DATA_EXCHANGE";
        }[]
      • Optionalhosted_agents?: {
            allowed_topics: string[];
            channel_ids: string[];
            conversation_messages?: {
                cannot_listen?: string;
                clarification: string;
                farewell: string;
                greeting: string;
                out_of_scope: string;
            };
            fallback: {
                automation_id?: string;
                message?: string;
                policy: "SILENT"
                | "CLARIFICATION"
                | "HUMAN_HANDOFF"
                | "AUTOMATION";
            };
            instructions: string;
            key: string;
            knowledge: {
                content?: string;
                title: string;
                type: "TEXT"
                | "FAQ"
                | "URL";
                url?: string;
            }[];
            language: string;
            max_input_chars: number;
            max_output_tokens: number;
            max_run_cost_micros: number;
            model: string;
            monthly_budget_micros: number;
            name: string;
            project_id?: string;
            purpose?: string;
            status?: "DRAFT"
            | "DISABLED";
        }[]

        Wabery-hosted AI agents. Declarative apply creates or updates the Draft only. Live is read-only until Review & publish in Wabery.

      • Optionalproject_id?: string
      • Optionalrequire_opt_in?: boolean

        Applied to project_id. False on a dedicated production number lets inbound senders be replied to and messaged without the invite/opt-in step.

      • Optionalversion?: string
    • issues: { message?: string; path?: string; severity?: "warning" | "error" }[]
    • object: "config_validation"
    • valid: boolean
  • Contact: {
        channel?: {
            channel_id?: string;
            display_name?: null | string;
            id?: string;
            is_sandbox?: boolean;
            number_mode?: string;
            object?: "channel";
            phone_number?: null | string;
            platform?:
                | "WHATSAPP"
                | "INSTAGRAM"
                | "MESSENGER"
                | "SMS"
                | "TELEGRAM"
                | "EMAIL";
            publish_readiness?: | null
            | {
                account_review_status?: null
                | string;
                blockers?: (
                    | "CHANNEL_NOT_CONNECTED"
                    | "MISSING_WABA"
                    | "MISSING_CHANNEL_CREDENTIALS"
                    | "META_ACCOUNT_STATUS_UNKNOWN"
                    | "BUSINESS_NOT_VERIFIED"
                    | "ACCOUNT_NOT_APPROVED"
                    | "PHONE_NOT_CONNECTED"
                    | "PHONE_STATUS_UNKNOWN"
                    | "PAYMENT_STATUS_UNKNOWN"
                    | "NO_PAYMENT_METHOD"
                    | "WHATSAPP_SENDER_NOT_READY"
                    | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                )[];
                business_verification_status?: null
                | string;
                can_publish_flows?: boolean;
                can_submit_templates?: boolean;
                mode?: "sandbox" | "dedicated";
                phone_number_status?: null | string;
            };
            routing_mode?: "AGENT"
            | "EXTERNAL";
            routing_warning?: null | string;
            status?: string;
        };
        channel_id?: string;
        contact_id: string;
        id: string;
        object: "contact";
        phone?: null
        | string;
        preferred_language?: null | string;
        project_id?: string;
        reference_id?: null | string;
        status?: string;
    }
    • Optionalchannel?: {
          channel_id?: string;
          display_name?: null | string;
          id?: string;
          is_sandbox?: boolean;
          number_mode?: string;
          object?: "channel";
          phone_number?: null | string;
          platform?:
              | "WHATSAPP"
              | "INSTAGRAM"
              | "MESSENGER"
              | "SMS"
              | "TELEGRAM"
              | "EMAIL";
          publish_readiness?: | null
          | {
              account_review_status?: null
              | string;
              blockers?: (
                  | "CHANNEL_NOT_CONNECTED"
                  | "MISSING_WABA"
                  | "MISSING_CHANNEL_CREDENTIALS"
                  | "META_ACCOUNT_STATUS_UNKNOWN"
                  | "BUSINESS_NOT_VERIFIED"
                  | "ACCOUNT_NOT_APPROVED"
                  | "PHONE_NOT_CONNECTED"
                  | "PHONE_STATUS_UNKNOWN"
                  | "PAYMENT_STATUS_UNKNOWN"
                  | "NO_PAYMENT_METHOD"
                  | "WHATSAPP_SENDER_NOT_READY"
                  | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
              )[];
              business_verification_status?: null
              | string;
              can_publish_flows?: boolean;
              can_submit_templates?: boolean;
              mode?: "sandbox" | "dedicated";
              phone_number_status?: null | string;
          };
          routing_mode?: "AGENT"
          | "EXTERNAL";
          routing_warning?: null | string;
          status?: string;
      }
      • Optionalchannel_id?: string
      • Optionaldisplay_name?: null | string
      • Optionalid?: string
      • Optionalis_sandbox?: boolean
      • Optionalnumber_mode?: string
      • Optionalobject?: "channel"
      • Optionalphone_number?: null | string
      • Optionalplatform?: "WHATSAPP" | "INSTAGRAM" | "MESSENGER" | "SMS" | "TELEGRAM" | "EMAIL"

        Messaging platform. WhatsApp is the default production channel. Instagram Direct and Facebook Messenger are beta channels available to connect directly from Channels; they do not support WhatsApp Flows, WhatsApp templates, or proactive template-style sends.

      • Optionalpublish_readiness?:
            | null
            | {
                account_review_status?: null
                | string;
                blockers?: (
                    | "CHANNEL_NOT_CONNECTED"
                    | "MISSING_WABA"
                    | "MISSING_CHANNEL_CREDENTIALS"
                    | "META_ACCOUNT_STATUS_UNKNOWN"
                    | "BUSINESS_NOT_VERIFIED"
                    | "ACCOUNT_NOT_APPROVED"
                    | "PHONE_NOT_CONNECTED"
                    | "PHONE_STATUS_UNKNOWN"
                    | "PAYMENT_STATUS_UNKNOWN"
                    | "NO_PAYMENT_METHOD"
                    | "WHATSAPP_SENDER_NOT_READY"
                    | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                )[];
                business_verification_status?: null
                | string;
                can_publish_flows?: boolean;
                can_submit_templates?: boolean;
                mode?: "sandbox" | "dedicated";
                phone_number_status?: null | string;
            }

        WhatsApp Flow/template publishing readiness for this channel. Non-WhatsApp channels return null.

      • Optionalrouting_mode?: "AGENT" | "EXTERNAL"

        How inbound to this channel is handled. AGENT runs the Wabery-hosted agent, including its automations and functions; EXTERNAL forwards to the project webhook. The channel value is authoritative for dedicated numbers and overrides the project's routing_mode.

      • Optionalrouting_warning?: null | string

        Non-null when this channel's routing bypasses the project's configured webhook (for example, an AGENT channel under an EXTERNAL project). Null when routing looks coherent.

      • Optionalstatus?: string
    • Optionalchannel_id?: string
    • contact_id: string

      Stable external alias of id, kept for backward compatibility. Always present on responses.

    • id: string

      Canonical contact id. Always present on responses — use this. Equal to contact_id; both are stable for a given number within your organization.

    • object: "contact"
    • Optionalphone?: null | string
    • Optionalpreferred_language?: null | string

      BCP-47 language tag used to resolve locale-specific flows when sending by config_key.

    • Optionalproject_id?: string
    • Optionalreference_id?: null | string
    • Optionalstatus?: string
  • ContactDeleteResponse: {
        deleted: true;
        deleted_data_types?: string[];
        erased: boolean;
        id: string;
        object: "contact";
    }
    • deleted: true
    • Optionaldeleted_data_types?: string[]
    • erased: boolean
    • id: string
    • object: "contact"
  • ContactImport: {
        created_count?: number;
        error_count?: number;
        errors_available?: boolean;
        filename: string;
        id: string;
        object: "contact_import";
        processed_rows?: number;
        skipped_count?: number;
        status: string;
        total_rows?: number;
        updated_count?: number;
    }
    • Optionalcreated_count?: number
    • Optionalerror_count?: number
    • Optionalerrors_available?: boolean
    • filename: string
    • id: string
    • object: "contact_import"
    • Optionalprocessed_rows?: number
    • Optionalskipped_count?: number
    • status: string
    • Optionaltotal_rows?: number
    • Optionalupdated_count?: number
  • Conversation: {
        contact_id?: string;
        conversation_id?: string;
        created_at?: string;
        id?: string;
        is_active?: boolean;
        last_channel_id?: null | string;
        last_message_at?: null | string;
        name?: null | string;
        object?: "conversation";
        phone?: null | string;
        reference_id?: null | string;
        started_at?: string;
        updated_at?: string;
    }
    • Optionalcontact_id?: string
    • Optionalconversation_id?: string
    • Optionalcreated_at?: string

      Format: date-time

    • Optionalid?: string
    • Optionalis_active?: boolean
    • Optionallast_channel_id?: null | string
    • Optionallast_message_at?: null | string

      Format: date-time

    • Optionalname?: null | string
    • Optionalobject?: "conversation"
    • Optionalphone?: null | string
    • Optionalreference_id?: null | string
    • Optionalstarted_at?: string

      Format: date-time

    • Optionalupdated_at?: string

      Format: date-time

  • Error: {
        error: string;
        issues?: { [key: string]: unknown };
        message?: string;
        request_id?: string;
        required_scope?: string;
    } & { [key: string]: unknown }

    Typed Wabery REST error. The error field is a stable machine-readable code; message is safe human-readable context.

  • Flow: {
        agent_id?: string;
        config_key?: null | string;
        created_at?: string;
        description?: null | string;
        field_schema?: null | { [key: string]: unknown }[];
        flow_json?: null | { [key: string]: unknown };
        id?: string;
        last_synced_at?: null | string;
        locale?: null | string;
        meta_flow_id?: null | string;
        meta_status?: null | string;
        meta_status_reason?: null | string;
        meta_waba_id?: null | string;
        name?: string;
        object?: "flow";
        published_version?: null | number;
        runtime_mode?: "STATIC" | "DATA_EXCHANGE";
        status?: "DRAFT" | "PUBLISHED" | "DEPRECATED";
        updated_at?: string;
        validation_errors?: null | { [key: string]: unknown }[];
    }
    • Optionalagent_id?: string
    • Optionalconfig_key?: null | string

      Stable external key from wabery.config.json, when managed declaratively.

    • Optionalcreated_at?: string

      Format: date-time

    • Optionaldescription?: null | string
    • Optionalfield_schema?: null | { [key: string]: unknown }[]

      Declared submission field schema: [{ name, type, required, screen }]. What flow.completed payloads are validated against.

    • Optionalflow_json?: null | { [key: string]: unknown }

      The compiled Meta WhatsApp Flow JSON (published version if available, else the current draft): screens, routing_model, and data-source bindings. Only present on GET /flows/{id} when requested with ?include=flow_json. Use it to align a data-exchange endpoint to the compiler's conventions.

    • Optionalid?: string
    • Optionallast_synced_at?: null | string

      Format: date-time

    • Optionallocale?: null | string

      BCP-47 locale of this variant within its config_key group; null is the group default. Send by config_key to resolve the right variant per contact.

    • Optionalmeta_flow_id?: null | string
    • Optionalmeta_status?: null | string

      Meta's authoritative approval/health status: DRAFT, PUBLISHED, DEPRECATED, BLOCKED, or THROTTLED. Wabery may also report PUBLISHING or PUBLISH_FAILED while an async publish job is running or failed. A flow is only sendable when PUBLISHED.

    • Optionalmeta_status_reason?: null | string

      Human-readable reason for the current meta_status, populated on a failed publish (Meta's error_user_title/error_user_msg). Pair with validation_errors for the actionable detail.

    • Optionalmeta_waba_id?: null | string

      WhatsApp Business Account id that owns meta_flow_id. Flow sends require this to match the channel's WABA.

    • Optionalname?: string
    • Optionalobject?: "flow"
    • Optionalpublished_version?: null | number

      Version number of the currently published flow_json, or null if the flow has never been published.

    • Optionalruntime_mode?: "STATIC" | "DATA_EXCHANGE"
    • Optionalstatus?: "DRAFT" | "PUBLISHED" | "DEPRECATED"
    • Optionalupdated_at?: string

      Format: date-time

    • Optionalvalidation_errors?: null | { [key: string]: unknown }[]

      Meta's validation_errors from the last publish/refresh, with line/field pointers when present. For publish eligibility failures, contains structured details such as Wabery code, Meta code/subcode, fbtrace_id, and next_steps. Empty/null when the flow is valid.

  • FlowDeleteResponse: {
        deleted: true;
        id: string;
        meta_deleted?: boolean;
        meta_error?: null | string;
        object: "flow";
    }
    • deleted: true
    • id: string
    • Optionalmeta_deleted?: boolean

      Whether the Meta-side asset was deleted (draft) or deprecated (published). False if the flow had no Meta asset or the Meta call failed.

    • Optionalmeta_error?: null | string

      Meta's error if the Meta-side delete/deprecate failed; the local record is removed regardless.

    • object: "flow"
  • FlowDispatch: {
        agent_id?: string;
        channel_id?: string;
        completed_at?: null | string;
        contact_id?: null | string;
        conversation_id?: null | string;
        created_at?: string;
        expires_at?: string;
        flow_id?: string;
        flow_token?: string;
        id?: string;
        object?: "flow_dispatch";
        status?: "SENT" | "COMPLETED" | "EXPIRED";
        to?: null | string;
    }
    • Optionalagent_id?: string
    • Optionalchannel_id?: string
    • Optionalcompleted_at?: null | string

      Format: date-time

    • Optionalcontact_id?: null | string
    • Optionalconversation_id?: null | string
    • Optionalcreated_at?: string

      Format: date-time

    • Optionalexpires_at?: string

      Format: date-time

    • Optionalflow_id?: string
    • Optionalflow_token?: string
    • Optionalid?: string
    • Optionalobject?: "flow_dispatch"
    • Optionalstatus?: "SENT" | "COMPLETED" | "EXPIRED"
    • Optionalto?: null | string
  • FlowEvent: {
        created_at: string;
        data?: null | { [key: string]: unknown };
        id: string;
        level: "info" | "error" | "warn";
        message?: null | string;
        object: "flow_event";
        submission_id?: null | string;
        type: string;
    }
    • created_at: string

      Format: date-time

    • Optionaldata?: null | { [key: string]: unknown }

      Raw structured detail: Meta error_subcode/user_title/validation_errors/fbtrace_id on a publish, a submission's validation_errors, or for endpoint.failed the failure code (timeout | unreachable | blocked_url | redirect | response_too_large | http_error | invalid_json | invalid_response), HTTP status, action, screen, and flow_token.

    • id: string
    • level: "info" | "error" | "warn"
    • Optionalmessage?: null | string
    • object: "flow_event"
    • Optionalsubmission_id?: null | string
    • type: string

      publish.queued | publish.succeeded | publish.failed | publish.blocked | submission.validated | submission.rejected | flow.reconciled | endpoint.failed

  • FlowPublishResponse: {
        flow_id: string;
        job_id: string;
        meta_status?: null | string;
        object: "flow_publish";
        status: "queued";
        version?: number;
    }
    • flow_id: string
    • job_id: string
    • Optionalmeta_status?: null | string
    • object: "flow_publish"
    • status: "queued"
    • Optionalversion?: number
  • FlowSendResponse: {
        contact_id?: null | string;
        conversation_id?: null | string;
        flow_id: string;
        flow_token: string;
        id: string;
        locale?: null | string;
        object: "flow_dispatch";
        status: "queued";
    }
    • Optionalcontact_id?: null | string
    • Optionalconversation_id?: null | string
    • flow_id: string
    • flow_token: string
    • id: string
    • Optionallocale?: null | string

      For sends by config_key, the resolved variant locale (null = group default).

    • object: "flow_dispatch"
    • status: "queued"
  • FlowSubmission: {
        agent_id?: string;
        contact_id?: null | string;
        conversation_id?: null | string;
        created_at?: string;
        flow_id?: string;
        flow_token?: string;
        from?: null | string;
        id?: string;
        object?: "flow_submission";
        status?: "RECEIVED" | "VALIDATED" | "REJECTED" | "FORWARDED";
        submission?: { [key: string]: unknown };
    }
    • Optionalagent_id?: string
    • Optionalcontact_id?: null | string
    • Optionalconversation_id?: null | string
    • Optionalcreated_at?: string

      Format: date-time

    • Optionalflow_id?: string
    • Optionalflow_token?: string
    • Optionalfrom?: null | string
    • Optionalid?: string
    • Optionalobject?: "flow_submission"
    • Optionalstatus?: "RECEIVED" | "VALIDATED" | "REJECTED" | "FORWARDED"
    • Optionalsubmission?: { [key: string]: unknown }
  • FriendlyIssue: {
        area?: string;
        code?: string;
        message?: string;
        next_steps?: string[];
        severity?: "info" | "warning" | "blocked";
        title?: string;
    }
  • FunctionCreateRequest: {
        egress_allowed_hosts?: string[];
        name: string;
        slug: string;
        trigger_type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
    }
  • FunctionDeleteResponse: { deleted?: boolean; id?: string; object?: "hosted_function" }
    • Optionaldeleted?: boolean
    • Optionalid?: string
    • Optionalobject?: "hosted_function"
  • FunctionDeployRequest: { source: string }
  • FunctionDeployResponse: {
        bytes?: number;
        diagnostics?: string[];
        function_id?: string;
        object?: "function_deploy";
        status?: "ok" | "error";
        version_id?: string;
    }
    • Optionalbytes?: number
    • Optionaldiagnostics?: string[]
    • Optionalfunction_id?: string
    • Optionalobject?: "function_deploy"
    • Optionalstatus?: "ok" | "error"
    • Optionalversion_id?: string
  • FunctionInvocation: {
        cpu_ms?: null | number;
        error?: null | string;
        event_type?: string;
        id?: string;
        logs?: unknown;
        started_at?: string;
        status?: string;
        sub_requests?: null | number;
    }
    • Optionalcpu_ms?: null | number
    • Optionalerror?: null | string
    • Optionalevent_type?: string
    • Optionalid?: string
    • Optionallogs?: unknown
    • Optionalstarted_at?: string

      Format: date-time

    • Optionalstatus?: string
    • Optionalsub_requests?: null | number
  • FunctionInvokeRequest: {
        arguments?: { [key: string]: unknown };
        contact_id?: string;
        contact_phone?: string;
    }
  • FunctionInvokeResponse: {
        error?: string;
        function_id?: string;
        object?: "function_invoke";
        result?: unknown;
    }
    • Optionalerror?: string
    • Optionalfunction_id?: string
    • Optionalobject?: "function_invoke"
    • Optionalresult?: unknown
  • FunctionTestRequest: { contact?: { id: string; name?: string; phone: string }; text?: string }
  • FunctionTestResponse: {
        error?: string;
        function_id?: string;
        object?: "function_test";
        result?: unknown;
    }
    • Optionalerror?: string
    • Optionalfunction_id?: string
    • Optionalobject?: "function_test"
    • Optionalresult?: unknown
  • FunctionUpdateRequest: {
        egress_allowed_hosts?: string[];
        expose_as_mcp_tool?: boolean;
        input_schema?: { [key: string]: unknown };
        is_active?: boolean;
        name?: string;
    }
  • HostedFunction: {
        active_version_id: null | string;
        created_at: string;
        egress_allowed_hosts: string[];
        expose_as_mcp_tool: boolean;
        id: string;
        input_schema?: null | { [key: string]: unknown };
        is_active: boolean;
        name: string;
        object: "hosted_function";
        runtime: "PLAIN" | "WFP";
        script_name: string;
        slug: string;
        source?: null | string;
        trigger_type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
        updated_at: string;
    }

    Hosted executable. New functions and deployments remain inactive until is_active is explicitly set. Network egress is denied unless an exact hostname is allowlisted.

    • active_version_id: null | string
    • created_at: string

      Format: date-time

    • egress_allowed_hosts: string[]

      Exact public hostnames this function may contact over HTTPS. Empty denies all network egress.

    • expose_as_mcp_tool: boolean
    • id: string
    • Optionalinput_schema?: null | { [key: string]: unknown }

      JSON Schema for external MCP/tool invocation arguments.

    • is_active: boolean
    • name: string
    • object: "hosted_function"
    • runtime: "PLAIN" | "WFP"
    • script_name: string
    • slug: string
    • Optionalsource?: null | string

      Current deployed source. Only returned by GET /functions/{id}.

    • trigger_type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE"
    • updated_at: string

      Format: date-time

  • Identity: {
        api_key: {
            display?: null | string;
            id?: string;
            name?: null | string;
            prefix?: null | string;
            scopes?: string[];
        };
        api_version?: string;
        object: "identity";
        organization: { id?: string; name?: null
        | string };
        plan?: null | string;
        project: { id?: string; name?: null | string };
    }
    • api_key: {
          display?: null | string;
          id?: string;
          name?: null | string;
          prefix?: null | string;
          scopes?: string[];
      }
    • Optionalapi_version?: string
    • object: "identity"
    • organization: { id?: string; name?: null | string }
    • Optionalplan?: null | string
    • project: { id?: string; name?: null | string }

      The project this key is scoped to.

  • ListMeta: { has_more?: boolean; object: "list" }
    • Optionalhas_more?: boolean
    • object: "list"
  • Message: {
        channel_id?: string;
        contact_id?: string;
        content?: null | string;
        conversation_id?: null | string;
        direction?: "inbound" | "outbound";
        failure?:
            | null
            | {
                code?: null
                | string
                | number;
                fbtrace_id?: null | string;
                http_status?: null | number;
                message?: string;
                occurred_at?: string;
                provider?: "meta" | "wabery";
                subcode?: null | string | number;
                summary?: string;
                title?: null | string;
                type?: null | string;
            };
        id?: string;
        media?: | null
        | {
            access_policy?: string;
            accessible?: boolean;
            error_code?: null
            | string;
            expires_at?: null | string;
            file_name?: null | string;
            file_size?: null | number;
            mime_type?: null | string;
            note?: null | string;
            provider?: null | "whatsapp" | "instagram" | "messenger";
            provider_media_id?: null | string;
            status?: "expired" | "available" | "unavailable";
            type?: null | string;
            url?: null | string;
            whatsapp_media_id?: null | string;
        };
        message_id?: string;
        object?: "message";
        platform_message_id?: null
        | string;
        status?: string;
        timestamp?: string;
        type?: string;
    }
    • Optionalchannel_id?: string
    • Optionalcontact_id?: string
    • Optionalcontent?: null | string
    • Optionalconversation_id?: null | string
    • Optionaldirection?: "inbound" | "outbound"
    • Optionalfailure?:
          | null
          | {
              code?: null
              | string
              | number;
              fbtrace_id?: null | string;
              http_status?: null | number;
              message?: string;
              occurred_at?: string;
              provider?: "meta" | "wabery";
              subcode?: null | string | number;
              summary?: string;
              title?: null | string;
              type?: null | string;
          }

      Why the send failed. provider meta carries Meta's error code. Code 131070 means another app controls this WhatsApp conversation thread, or the thread is waiting for the customer's next message; message explains this, and Wabery records the thread owner as UNKNOWN. provider wabery means Wabery stopped the send before Meta, for example code authentication_template_requires_phone_number when an authentication template targets a business-scoped user ID (BSUID).

    • Optionalid?: string
    • Optionalmedia?:
          | null
          | {
              access_policy?: string;
              accessible?: boolean;
              error_code?: null
              | string;
              expires_at?: null | string;
              file_name?: null | string;
              file_size?: null | number;
              mime_type?: null | string;
              note?: null | string;
              provider?: null | "whatsapp" | "instagram" | "messenger";
              provider_media_id?: null | string;
              status?: "expired" | "available" | "unavailable";
              type?: null | string;
              url?: null | string;
              whatsapp_media_id?: null | string;
          }

      Inbound WhatsApp, Instagram, and Messenger media is available through short-lived Wabery signed URLs when cached. Store assets promptly; expires_at is the asset retention deadline.

    • Optionalmessage_id?: string
    • Optionalobject?: "message"
    • Optionalplatform_message_id?: null | string
    • Optionalstatus?: string
    • Optionaltimestamp?: string

      Format: date-time

    • Optionaltype?: string
  • MessageSendRequest: {
        channel_id: string;
        contacts?: { [key: string]: unknown }[];
        conversation_id?: string;
        group_id?: string;
        idempotency_key?: string;
        interactive?: { [key: string]: unknown };
        location?: {
            address?: string;
            latitude: number;
            longitude: number;
            name?: string;
        };
        media?: { type?: "document" | "image" | "video" | "audio" | undefined; link?: string | undefined; id?: string | undefined; caption?: string | undefined; filename?: string | undefined; } & ({ ...; } | { ...; });
        pin?: | { expiration_days: number; message_id: string; type: "pin" }
        | { message_id: string; type: "unpin" };
        reaction?: { emoji: string; message_id: string };
        reply_to?: string;
        sticker?: { id?: string | undefined; link?: string | undefined; } & ({ id: string; link?: undefined; } | { link: string; id?: undefined; });
        template?: {
            components?: { [key: string]: unknown }[];
            id?: string;
            language?: string;
            name?: string;
        };
        text?: string;
        to?: string;
    }
    • channel_id: string
    • Optionalcontacts?: { [key: string]: unknown }[]

      Contact cards, in Meta's contacts shape. Each entry requires name.formatted_name plus at least one other name part (first_name, last_name, middle_name, suffix or prefix); a card without one is rejected rather than forwarded. Optional birthday (YYYY-MM-DD), phones (set wa_id to make a number tappable as a WhatsApp contact), emails, urls, addresses and org. Provide exactly one content field.

    • Optionalconversation_id?: string

      Existing conversation id. Provide exactly one of conversation_id or to. Free-form replies require a customer message on the same channel within the last 24 hours. Outside that window, WhatsApp requires an approved template; Instagram/Messenger proactive sends are not exposed.

    • Optionalgroup_id?: string

      Opaque WhatsApp group ID. Mutually exclusive with conversation_id and to; never pass a phone number here. Group sends support only text, media attachments including sticker, text and media templates, and pin or unpin. A group template may contain only a text or media header, a body, and a footer; authentication templates and templates with buttons or other components return 422 whatsapp_group_template_type_unsupported.

    • Optionalidempotency_key?: string

      Body-level idempotency key. Required for group_id sends and optional for individual sends. The Idempotency-Key header is also supported.

    • Optionalinteractive?: { [key: string]: unknown }

      WhatsApp interactive payload — reply button, list, cta_url, location_request_message, request_contact_info, individual-only commerce product, product_list, and catalog_message, Calling API call_permission_request and voice_call, or regional Payments API order_details and order_status. Calling actions use call_permission_request or voice_call; payment actions use review_and_pay or review_order. Shapes are flattened for catalog commerce. India payment messages preserve Meta's action object; Singapore order_details preserves Meta's nested order_details object. Commerce and all interactive types are rejected for group_id targets. Provide exactly one content field.

    • Optionallocation?: { address?: string; latitude: number; longitude: number; name?: string }

      Send a WhatsApp location pin. Provide exactly one content field.

    • Optionalmedia?: { type?: "document" | "image" | "video" | "audio" | undefined; link?: string | undefined; id?: string | undefined; caption?: string | undefined; filename?: string | undefined; } & ({ ...; } | { ...; })

      Outbound media. Provide exactly one of id or link. Audio does not accept caption or filename. WhatsApp accepts image, document, video, and audio by public HTTPS link or WhatsApp media id, with WhatsApp provider limits. Instagram beta accepts image, audio, and video by public HTTPS link only. Messenger beta accepts image, document, audio, and video by public HTTPS link only. Instagram/Messenger links must be directly fetchable by Meta without custom headers; id, caption, and filename return 422 on those channels. Instagram documents return 422 and should be sent as ordinary text links.

    • Optionalpin?:
          | { expiration_days: number; message_id: string; type: "pin" }
          | { message_id: string; type: "unpin" }

      Pin or unpin a group message. Requires a group_id target. REST uses pin.expiration_days; Wabery forwards the same field to Meta's pin.expiration_days wire property.

    • Optionalreaction?: { emoji: string; message_id: string }

      React to an existing WhatsApp message. Provide exactly one content field.

      • emoji: string

        Emoji reaction. Use an empty string to remove a previous reaction.

      • message_id: string

        WhatsApp message id to react to.

    • Optionalreply_to?: string

      WhatsApp message id (wamid) to quote, rendering this message as a reply in a contextual bubble. Works with any content type, and is a modifier rather than a content field — it does not count toward the exactly-one-of rule. Read it from an inbound messages[].replied_to.message_id or from a delivery's WhatsApp id.

    • Optionalsticker?: { id?: string | undefined; link?: string | undefined; } & ({ id: string; link?: undefined; } | { link: string; id?: undefined; })

      Send a WhatsApp sticker by public HTTPS link or Meta media id. Provide exactly one of id or link.

    • Optionaltemplate?: {
          components?: { [key: string]: unknown }[];
          id?: string;
          language?: string;
          name?: string;
      }

      Approved WhatsApp template. Provide either id, or name plus language. Template sends are never blocked because another app controls the conversation thread. Authentication templates can't be sent to a business-scoped user ID (BSUID): a recipient without a phone number returns 422 authentication_template_requires_phone_number before anything is queued.

      • Optionalcomponents?: { [key: string]: unknown }[]

        Template components. Named text variables require {type: "text", parameter_name: "name", text: "value"}. A button component may set sub_type: "flow" with index and a { type: "action", action: { flow_token, flow_action_data } } parameter to open a flow from a flow-type template — used for proactive (outside-24h) flow sends. A copy-code button takes { type: "coupon_code", coupon_code }, where coupon_code is at most 20 characters.

      • Optionalid?: string
      • Optionallanguage?: string
      • Optionalname?: string
    • Optionaltext?: string
    • Optionalto?: string

      Recipient phone in E.164 format. Requires a dedicated channel and an active opt-in record.

  • MessageSendResponse: {
        contact_id: string;
        conversation_id: string;
        id: string;
        idempotency_key: string;
        object: "message";
        status: "queued";
    }
    • contact_id: string
    • conversation_id: string
    • id: string
    • idempotency_key: string
    • object: "message"
    • status: "queued"
  • MetaDeclarativeResource: { key: string; remote_id?: string; value: { [key: string]: unknown } }
    • key: string
    • Optionalremote_id?: string

      Exact previously verified Meta resource ID for updates.

    • value: { [key: string]: unknown }
  • OnboardingHandoff: {
        channel_id?: null | string;
        completed_at?: null | string;
        connection_mode?: string;
        created_at?: string;
        expires_at?: string;
        id?: string;
        object?: "onboarding_handoff";
        project_id?: string;
        status?: "pending" | "completed" | "expired" | "revoked";
        type?: "connect_whatsapp";
    }
    • Optionalchannel_id?: null | string
    • Optionalcompleted_at?: null | string

      Format: date-time

    • Optionalconnection_mode?: string
    • Optionalcreated_at?: string

      Format: date-time

    • Optionalexpires_at?: string

      Format: date-time

    • Optionalid?: string
    • Optionalobject?: "onboarding_handoff"
    • Optionalproject_id?: string
    • Optionalstatus?: "pending" | "completed" | "expired" | "revoked"
    • Optionaltype?: "connect_whatsapp"
  • Problem: {
        code?: string;
        detail?: string;
        instance?: string;
        status: number;
        title: string;
        type: string;
    } & { [key: string]: unknown }

    RFC 9457 problem+json error. type and title are stable; detail is safe to log.

  • Project: {
        automatic_read_receipts?: boolean;
        channel_id?: null | string;
        created_at?: string;
        description?: null | string;
        enrollment_channel?:
            | null
            | {
                channel_id?: string;
                display_name?: null
                | string;
                id?: string;
                is_sandbox?: boolean;
                number_mode?: string;
                object?: "channel";
                phone_number?: null | string;
                platform?:
                    | "WHATSAPP"
                    | "INSTAGRAM"
                    | "MESSENGER"
                    | "SMS"
                    | "TELEGRAM"
                    | "EMAIL";
                publish_readiness?: | null
                | {
                    account_review_status?: null
                    | string;
                    blockers?: (
                        | "CHANNEL_NOT_CONNECTED"
                        | "MISSING_WABA"
                        | "MISSING_CHANNEL_CREDENTIALS"
                        | "META_ACCOUNT_STATUS_UNKNOWN"
                        | "BUSINESS_NOT_VERIFIED"
                        | "ACCOUNT_NOT_APPROVED"
                        | "PHONE_NOT_CONNECTED"
                        | "PHONE_STATUS_UNKNOWN"
                        | "PAYMENT_STATUS_UNKNOWN"
                        | "NO_PAYMENT_METHOD"
                        | "WHATSAPP_SENDER_NOT_READY"
                        | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                    )[];
                    business_verification_status?: null
                    | string;
                    can_publish_flows?: boolean;
                    can_submit_templates?: boolean;
                    mode?: "sandbox" | "dedicated";
                    phone_number_status?: null | string;
                };
                routing_mode?: "AGENT"
                | "EXTERNAL";
                routing_warning?: null | string;
                status?: string;
            };
        flow_count?: number;
        id?: string;
        join_code?: string;
        name?: string;
        object?: "project";
        participant_count?: number;
        project_id?: string;
        publish_readiness?: | null
        | {
            account_review_status?: null
            | string;
            blockers?: (
                | "CHANNEL_NOT_CONNECTED"
                | "MISSING_WABA"
                | "MISSING_CHANNEL_CREDENTIALS"
                | "META_ACCOUNT_STATUS_UNKNOWN"
                | "BUSINESS_NOT_VERIFIED"
                | "ACCOUNT_NOT_APPROVED"
                | "PHONE_NOT_CONNECTED"
                | "PHONE_STATUS_UNKNOWN"
                | "PAYMENT_STATUS_UNKNOWN"
                | "NO_PAYMENT_METHOD"
                | "WHATSAPP_SENDER_NOT_READY"
                | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
            )[];
            business_verification_status?: null
            | string;
            can_publish_flows?: boolean;
            can_submit_templates?: boolean;
            mode?: "sandbox" | "dedicated";
            phone_number_status?: null | string;
        };
        require_opt_in?: boolean;
        routing_mode?: string;
        updated_at?: string;
        webhook_secret?: null
        | string;
        webhook_signing_enabled?: boolean;
        webhook_url?: null | string;
    }
    • Optionalautomatic_read_receipts?: boolean

      Send automatic read receipts across all project channels. Defaults off for external routing and on for hosted agents. Disabling also suppresses WhatsApp typing indicators that send a read receipt.

    • Optionalchannel_id?: null | string
    • Optionalcreated_at?: string

      Format: date-time

    • Optionaldescription?: null | string
    • Optionalenrollment_channel?:
          | null
          | {
              channel_id?: string;
              display_name?: null
              | string;
              id?: string;
              is_sandbox?: boolean;
              number_mode?: string;
              object?: "channel";
              phone_number?: null | string;
              platform?:
                  | "WHATSAPP"
                  | "INSTAGRAM"
                  | "MESSENGER"
                  | "SMS"
                  | "TELEGRAM"
                  | "EMAIL";
              publish_readiness?: | null
              | {
                  account_review_status?: null
                  | string;
                  blockers?: (
                      | "CHANNEL_NOT_CONNECTED"
                      | "MISSING_WABA"
                      | "MISSING_CHANNEL_CREDENTIALS"
                      | "META_ACCOUNT_STATUS_UNKNOWN"
                      | "BUSINESS_NOT_VERIFIED"
                      | "ACCOUNT_NOT_APPROVED"
                      | "PHONE_NOT_CONNECTED"
                      | "PHONE_STATUS_UNKNOWN"
                      | "PAYMENT_STATUS_UNKNOWN"
                      | "NO_PAYMENT_METHOD"
                      | "WHATSAPP_SENDER_NOT_READY"
                      | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                  )[];
                  business_verification_status?: null
                  | string;
                  can_publish_flows?: boolean;
                  can_submit_templates?: boolean;
                  mode?: "sandbox" | "dedicated";
                  phone_number_status?: null | string;
              };
              routing_mode?: "AGENT"
              | "EXTERNAL";
              routing_warning?: null | string;
              status?: string;
          }
    • Optionalflow_count?: number
    • Optionalid?: string
    • Optionaljoin_code?: string
    • Optionalname?: string
    • Optionalobject?: "project"
    • Optionalparticipant_count?: number
    • Optionalproject_id?: string
    • Optionalpublish_readiness?:
          | null
          | {
              account_review_status?: null
              | string;
              blockers?: (
                  | "CHANNEL_NOT_CONNECTED"
                  | "MISSING_WABA"
                  | "MISSING_CHANNEL_CREDENTIALS"
                  | "META_ACCOUNT_STATUS_UNKNOWN"
                  | "BUSINESS_NOT_VERIFIED"
                  | "ACCOUNT_NOT_APPROVED"
                  | "PHONE_NOT_CONNECTED"
                  | "PHONE_STATUS_UNKNOWN"
                  | "PAYMENT_STATUS_UNKNOWN"
                  | "NO_PAYMENT_METHOD"
                  | "WHATSAPP_SENDER_NOT_READY"
                  | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
              )[];
              business_verification_status?: null
              | string;
              can_publish_flows?: boolean;
              can_submit_templates?: boolean;
              mode?: "sandbox" | "dedicated";
              phone_number_status?: null | string;
          }

      Publishing readiness for the project's effective WhatsApp channel: dedicated channel when connected, otherwise the shared sandbox.

    • Optionalrequire_opt_in?: boolean

      When true (default), business-initiated sends (targeting to or contact_id) require an active opt-in/enrollment record; otherwise they return 409 contact_opt_in_required. Set false on a dedicated production number so inbound senders can be replied to and messaged without the invite/enrollment step. Conversation replies (by conversation_id) are always governed by the WhatsApp 24h window, never this flag.

    • Optionalrouting_mode?: string
    • Optionalupdated_at?: string

      Format: date-time

    • Optionalwebhook_secret?: null | string

      Signing secret for inbound webhooks and outbound data-exchange. Returned only on single GET /projects/{id}, create, update, and rotate — never in the list.

    • Optionalwebhook_signing_enabled?: boolean

      True when a signing secret is set for this project.

    • Optionalwebhook_url?: null | string
  • ProjectReadiness: {
        agent_runtime: {
            action_required?:
                | null
                | "CREATE_AGENT"
                | "SELECT_AI_MODEL"
                | "ADD_PAYMENT_METHOD"
                | "ADD_FUNDS";
            ai_enabled: boolean;
            available_balance_micros: number;
            has_useful_automations: boolean;
            mode: "ai_ready"
            | "automations_only"
            | "not_operational";
            runtime_model?: null | string;
            selected_model?: null | string;
        };
        capabilities?: {
            [key: string]: {
                message?: string;
                status?: "warning"
                | "blocked"
                | "ready"
                | "testable"
                | "not_applicable";
            };
        };
        dedicated_channel?: | null
        | {
            channel_id?: string;
            display_name?: null
            | string;
            id?: string;
            is_sandbox?: boolean;
            number_mode?: string;
            object?: "channel";
            phone_number?: null | string;
            platform?:
                | "WHATSAPP"
                | "INSTAGRAM"
                | "MESSENGER"
                | "SMS"
                | "TELEGRAM"
                | "EMAIL";
            publish_readiness?: | null
            | {
                account_review_status?: null
                | string;
                blockers?: (
                    | "CHANNEL_NOT_CONNECTED"
                    | "MISSING_WABA"
                    | "MISSING_CHANNEL_CREDENTIALS"
                    | "META_ACCOUNT_STATUS_UNKNOWN"
                    | "BUSINESS_NOT_VERIFIED"
                    | "ACCOUNT_NOT_APPROVED"
                    | "PHONE_NOT_CONNECTED"
                    | "PHONE_STATUS_UNKNOWN"
                    | "PAYMENT_STATUS_UNKNOWN"
                    | "NO_PAYMENT_METHOD"
                    | "WHATSAPP_SENDER_NOT_READY"
                    | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                )[];
                business_verification_status?: null
                | string;
                can_publish_flows?: boolean;
                can_submit_templates?: boolean;
                mode?: "sandbox" | "dedicated";
                phone_number_status?: null | string;
            };
            routing_mode?: "AGENT"
            | "EXTERNAL";
            routing_warning?: null | string;
            status?: string;
        };
        effective_channel?: | null
        | {
            channel_id?: string;
            display_name?: null
            | string;
            id?: string;
            is_sandbox?: boolean;
            number_mode?: string;
            object?: "channel";
            phone_number?: null | string;
            platform?:
                | "WHATSAPP"
                | "INSTAGRAM"
                | "MESSENGER"
                | "SMS"
                | "TELEGRAM"
                | "EMAIL";
            publish_readiness?: | null
            | {
                account_review_status?: null
                | string;
                blockers?: (
                    | "CHANNEL_NOT_CONNECTED"
                    | "MISSING_WABA"
                    | "MISSING_CHANNEL_CREDENTIALS"
                    | "META_ACCOUNT_STATUS_UNKNOWN"
                    | "BUSINESS_NOT_VERIFIED"
                    | "ACCOUNT_NOT_APPROVED"
                    | "PHONE_NOT_CONNECTED"
                    | "PHONE_STATUS_UNKNOWN"
                    | "PAYMENT_STATUS_UNKNOWN"
                    | "NO_PAYMENT_METHOD"
                    | "WHATSAPP_SENDER_NOT_READY"
                    | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                )[];
                business_verification_status?: null
                | string;
                can_publish_flows?: boolean;
                can_submit_templates?: boolean;
                mode?: "sandbox" | "dedicated";
                phone_number_status?: null | string;
            };
            routing_mode?: "AGENT"
            | "EXTERNAL";
            routing_warning?: null | string;
            status?: string;
        };
        issues?: {
            area?: string;
            code?: string;
            message?: string;
            next_steps?: string[];
            severity?: "info"
            | "warning"
            | "blocked";
            title?: string;
        }[];
        next_steps?: string[];
        object: "project_readiness";
        overall_status?: string;
        production_inbound_ready?: boolean;
        project_id: string;
        project_name?: string;
        requirements?: string[];
        sandbox_channel?: | null
        | {
            channel_id?: string;
            display_name?: null
            | string;
            id?: string;
            is_sandbox?: boolean;
            number_mode?: string;
            object?: "channel";
            phone_number?: null | string;
            platform?:
                | "WHATSAPP"
                | "INSTAGRAM"
                | "MESSENGER"
                | "SMS"
                | "TELEGRAM"
                | "EMAIL";
            publish_readiness?: | null
            | {
                account_review_status?: null
                | string;
                blockers?: (
                    | "CHANNEL_NOT_CONNECTED"
                    | "MISSING_WABA"
                    | "MISSING_CHANNEL_CREDENTIALS"
                    | "META_ACCOUNT_STATUS_UNKNOWN"
                    | "BUSINESS_NOT_VERIFIED"
                    | "ACCOUNT_NOT_APPROVED"
                    | "PHONE_NOT_CONNECTED"
                    | "PHONE_STATUS_UNKNOWN"
                    | "PAYMENT_STATUS_UNKNOWN"
                    | "NO_PAYMENT_METHOD"
                    | "WHATSAPP_SENDER_NOT_READY"
                    | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                )[];
                business_verification_status?: null
                | string;
                can_publish_flows?: boolean;
                can_submit_templates?: boolean;
                mode?: "sandbox" | "dedicated";
                phone_number_status?: null | string;
            };
            routing_mode?: "AGENT"
            | "EXTERNAL";
            routing_warning?: null | string;
            status?: string;
        };
        sandbox_testable?: boolean;
    }
    • agent_runtime: {
          action_required?:
              | null
              | "CREATE_AGENT"
              | "SELECT_AI_MODEL"
              | "ADD_PAYMENT_METHOD"
              | "ADD_FUNDS";
          ai_enabled: boolean;
          available_balance_micros: number;
          has_useful_automations: boolean;
          mode: "ai_ready"
          | "automations_only"
          | "not_operational";
          runtime_model?: null | string;
          selected_model?: null | string;
      }
    • Optionalcapabilities?: {
          [key: string]: {
              message?: string;
              status?: "warning" | "blocked" | "ready" | "testable" | "not_applicable";
          };
      }
    • Optionaldedicated_channel?:
          | null
          | {
              channel_id?: string;
              display_name?: null
              | string;
              id?: string;
              is_sandbox?: boolean;
              number_mode?: string;
              object?: "channel";
              phone_number?: null | string;
              platform?:
                  | "WHATSAPP"
                  | "INSTAGRAM"
                  | "MESSENGER"
                  | "SMS"
                  | "TELEGRAM"
                  | "EMAIL";
              publish_readiness?: | null
              | {
                  account_review_status?: null
                  | string;
                  blockers?: (
                      | "CHANNEL_NOT_CONNECTED"
                      | "MISSING_WABA"
                      | "MISSING_CHANNEL_CREDENTIALS"
                      | "META_ACCOUNT_STATUS_UNKNOWN"
                      | "BUSINESS_NOT_VERIFIED"
                      | "ACCOUNT_NOT_APPROVED"
                      | "PHONE_NOT_CONNECTED"
                      | "PHONE_STATUS_UNKNOWN"
                      | "PAYMENT_STATUS_UNKNOWN"
                      | "NO_PAYMENT_METHOD"
                      | "WHATSAPP_SENDER_NOT_READY"
                      | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                  )[];
                  business_verification_status?: null
                  | string;
                  can_publish_flows?: boolean;
                  can_submit_templates?: boolean;
                  mode?: "sandbox" | "dedicated";
                  phone_number_status?: null | string;
              };
              routing_mode?: "AGENT"
              | "EXTERNAL";
              routing_warning?: null | string;
              status?: string;
          }
    • Optionaleffective_channel?:
          | null
          | {
              channel_id?: string;
              display_name?: null
              | string;
              id?: string;
              is_sandbox?: boolean;
              number_mode?: string;
              object?: "channel";
              phone_number?: null | string;
              platform?:
                  | "WHATSAPP"
                  | "INSTAGRAM"
                  | "MESSENGER"
                  | "SMS"
                  | "TELEGRAM"
                  | "EMAIL";
              publish_readiness?: | null
              | {
                  account_review_status?: null
                  | string;
                  blockers?: (
                      | "CHANNEL_NOT_CONNECTED"
                      | "MISSING_WABA"
                      | "MISSING_CHANNEL_CREDENTIALS"
                      | "META_ACCOUNT_STATUS_UNKNOWN"
                      | "BUSINESS_NOT_VERIFIED"
                      | "ACCOUNT_NOT_APPROVED"
                      | "PHONE_NOT_CONNECTED"
                      | "PHONE_STATUS_UNKNOWN"
                      | "PAYMENT_STATUS_UNKNOWN"
                      | "NO_PAYMENT_METHOD"
                      | "WHATSAPP_SENDER_NOT_READY"
                      | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                  )[];
                  business_verification_status?: null
                  | string;
                  can_publish_flows?: boolean;
                  can_submit_templates?: boolean;
                  mode?: "sandbox" | "dedicated";
                  phone_number_status?: null | string;
              };
              routing_mode?: "AGENT"
              | "EXTERNAL";
              routing_warning?: null | string;
              status?: string;
          }
    • Optionalissues?: {
          area?: string;
          code?: string;
          message?: string;
          next_steps?: string[];
          severity?: "info" | "warning" | "blocked";
          title?: string;
      }[]
    • Optionalnext_steps?: string[]
    • object: "project_readiness"
    • Optionaloverall_status?: string

      High-level summary such as ready, sandbox_ready, testable_with_blockers, ready_with_warnings, or blocked.

    • Optionalproduction_inbound_ready?: boolean
    • project_id: string
    • Optionalproject_name?: string
    • Optionalrequirements?: string[]
    • Optionalsandbox_channel?:
          | null
          | {
              channel_id?: string;
              display_name?: null
              | string;
              id?: string;
              is_sandbox?: boolean;
              number_mode?: string;
              object?: "channel";
              phone_number?: null | string;
              platform?:
                  | "WHATSAPP"
                  | "INSTAGRAM"
                  | "MESSENGER"
                  | "SMS"
                  | "TELEGRAM"
                  | "EMAIL";
              publish_readiness?: | null
              | {
                  account_review_status?: null
                  | string;
                  blockers?: (
                      | "CHANNEL_NOT_CONNECTED"
                      | "MISSING_WABA"
                      | "MISSING_CHANNEL_CREDENTIALS"
                      | "META_ACCOUNT_STATUS_UNKNOWN"
                      | "BUSINESS_NOT_VERIFIED"
                      | "ACCOUNT_NOT_APPROVED"
                      | "PHONE_NOT_CONNECTED"
                      | "PHONE_STATUS_UNKNOWN"
                      | "PAYMENT_STATUS_UNKNOWN"
                      | "NO_PAYMENT_METHOD"
                      | "WHATSAPP_SENDER_NOT_READY"
                      | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
                  )[];
                  business_verification_status?: null
                  | string;
                  can_publish_flows?: boolean;
                  can_submit_templates?: boolean;
                  mode?: "sandbox" | "dedicated";
                  phone_number_status?: null | string;
              };
              routing_mode?: "AGENT"
              | "EXTERNAL";
              routing_warning?: null | string;
              status?: string;
          }
    • Optionalsandbox_testable?: boolean
  • ProjectWebhookSecret: { object: "project_webhook_secret"; project_id: string; webhook_secret: string }
    • object: "project_webhook_secret"
    • project_id: string
    • webhook_secret: string
  • PublicApiLimits: {
        monthly_quota?: { period?: string; requests: number; scope?: "api_key" };
        object?: "public_api_limits";
        rate_limit?: {
            requests: number;
            scope?: "api_key";
            window_seconds: number;
        };
    }
    • Optionalmonthly_quota?: { period?: string; requests: number; scope?: "api_key" }
      • Optionalperiod?: string
        2026-06
        
      • requests: number
        100000
        
      • Optionalscope?: "api_key"
    • Optionalobject?: "public_api_limits"
    • Optionalrate_limit?: { requests: number; scope?: "api_key"; window_seconds: number }
      • requests: number
        600
        
      • Optionalscope?: "api_key"
      • window_seconds: number
        60
        
  • PublishReadiness: {
        account_review_status?: null | string;
        blockers?: (
            | "CHANNEL_NOT_CONNECTED"
            | "MISSING_WABA"
            | "MISSING_CHANNEL_CREDENTIALS"
            | "META_ACCOUNT_STATUS_UNKNOWN"
            | "BUSINESS_NOT_VERIFIED"
            | "ACCOUNT_NOT_APPROVED"
            | "PHONE_NOT_CONNECTED"
            | "PHONE_STATUS_UNKNOWN"
            | "PAYMENT_STATUS_UNKNOWN"
            | "NO_PAYMENT_METHOD"
            | "WHATSAPP_SENDER_NOT_READY"
            | "SANDBOX_TEMPLATES_NOT_SUPPORTED"
        )[];
        business_verification_status?: null
        | string;
        can_publish_flows?: boolean;
        can_submit_templates?: boolean;
        mode?: "sandbox" | "dedicated";
        phone_number_status?: null | string;
    }
  • RegistrationIntent: {
        expires_at: string;
        id: string;
        mode?: "test" | "live";
        object: "registration_intent";
        prefilled_message?: string;
        status?: "PENDING";
        token: string;
        wa_link: string;
        whatsapp_number?: string;
    }
    • expires_at: string

      Format: date-time

    • id: string
    • Optionalmode?: "test" | "live"

      live once the project has its own connected WhatsApp number; test (shared sandbox, capped) until then.

    • object: "registration_intent"
    • Optionalprefilled_message?: string
    • Optionalstatus?: "PENDING"
    • token: string

      Opaque wjr- token.

    • wa_link: string

      wa.me deep link the customer taps to connect.

    • Optionalwhatsapp_number?: string
  • TemplateCreateRequest: {
        category: "UTILITY" | "MARKETING" | "AUTHENTICATION";
        channel_id: string;
        components: { [key: string]: unknown }[];
        language: string;
        name: string;
        parameter_format?: "POSITIONAL" | "NAMED";
    }
    • category: "UTILITY" | "MARKETING" | "AUTHENTICATION"
    • channel_id: string
    • components: { [key: string]: unknown }[]

      Template components. Text header examples use header_text: ["sample"]; media headers use header_handle: ["upload_handle"]. Named examples use header_text_named_params or body_text_named_params arrays of {param_name, example}. A BUTTONS component may include type: "FLOW" with flow_id/flow_name, flow_action, and navigate_screen, or type: "REQUEST_CONTACT_INFO" with required fixed text Share Contact Info. Meta renders the contact button label in the recipient language.

    • language: string
    • name: string
    • Optionalparameter_format?: "POSITIONAL" | "NAMED"

      Use NAMED for {{name}} variables and named example parameters. Defaults to POSITIONAL.

  • ThreadControlRequest: {
        action: "take" | "release" | "pass";
        business_agent_id?: string;
        channel_id: string;
        contact_id: string;
        metadata?: string;
        pass_to_meta?: boolean;
        reason?: string;
        to: string;
    }
    • action: "take" | "release" | "pass"

      take makes Wabery the owner. release hands the thread to Meta Business Agent. pass hands it to your account's designated escalation partner, or to Meta Business Agent when pass_to_meta is true. To read the stored owner, call GET on this path.

    • Optionalbusiness_agent_id?: string

      Business Agent on this channel. Defaults to the project's Business Agent for the channel.

    • channel_id: string

      WhatsApp channel in this project.

    • contact_id: string

      Contact in this project whose thread changes owner.

    • Optionalmetadata?: string

      Sent to Meta as the thread-control metadata.

    • Optionalpass_to_meta?: boolean

      pass only. When true, Wabery sends control_pass.target_role ai_agent, so Meta Business Agent becomes the owner. When omitted or false, Meta passes the thread to the designated escalation partner without naming it, and Wabery records the owner as UNKNOWN.

    • Optionalreason?: string

      Stored with the state. Defaults to the action name.

    • to: string

      The customer's WhatsApp phone number or wa_id, sent to Meta as to.

  • ThreadControlState: {
        business_agent_id?: null | string;
        channel_id: string;
        contact_id: string;
        created_at: string;
        id: string;
        meta_result?: { messaging_product?: string; request_id?: string } & {
            [key: string]: unknown;
        };
        meta_thread_id?: null
        | string;
        object: "thread_control_state";
        observation?: "local";
        operation_id?: string;
        owner: "META_AGENT" | "WABERY" | "BUSINESS_INBOX" | "UNKNOWN" | "PENDING";
        project_id: string;
        reason?: null | string;
        replayed?: boolean;
        updated_at: string;
    } & { [key: string]: unknown }
  • WaberyConfig: {
        $schema?: string;
        automations: {
            active?: boolean;
            key: string;
            name: string;
            steps: (
                | {
                    send_reply: { buttons?: { id: ...; title: ... }[]; text: string };
                }
                | { delay: { minutes: number } }
                | {
                    wait_reply: {
                        options?: { id: ...; keywords?: ...; label: ...; matchMode?: ... }[];
                        timeout_hours?: number;
                    };
                }
                | { pause_replies: { reason?: string } }
                | {
                    send_flow: {
                        body_text?: string;
                        flow: string;
                        flow_cta?: string;
                        footer_text?: string;
                        header_text?: string;
                    };
                }
                | {
                    run_function: {
                        function: string;
                        reply_field?: string;
                        result_mode?: "reply"
                        | "variables"
                        | "side_effect";
                        variable_name?: string;
                    };
                }
            )[];
            trigger: {
                keywords?: string[];
                match_mode?: "EXACT"
                | "CONTAINS"
                | "CONTAINS_WORD";
                type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
            };
        }[];
        business_agent?: {
            channel_id?: string;
            connectors?: { [key: string]: unknown }[];
            enabled: boolean;
            faqs?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
            operation_id: string;
            settings: {
                enabled?: boolean;
                handoff?: { [key: string]: unknown };
                knowledge?: { [key: string]: unknown };
                language?: string;
                persona?: string;
            } & { [key: string]: unknown };
            skills?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
            ui_skills?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
            websites?: {
                key: string;
                remote_id?: string;
                value: { [key: string]: unknown };
            }[];
        };
        flows: {
            agent_id?: string;
            data_exchange_url?: null
            | string;
            description?: string;
            draft?: { entryScreenId?: string; screens?: { [key: string]: unknown }[] } & {
                [key: string]: unknown;
            };
            flow_json?: { screens?: Record<string, never>[]; version?: string } & {
                [key: string]: unknown;
            };
            key: string;
            locale?: string;
            name: string;
            project_id?: string;
            runtime_mode?: "STATIC"
            | "DATA_EXCHANGE";
        }[];
        hosted_agents?: {
            allowed_topics: string[];
            channel_ids: string[];
            conversation_messages?: {
                cannot_listen?: string;
                clarification: string;
                farewell: string;
                greeting: string;
                out_of_scope: string;
            };
            fallback: {
                automation_id?: string;
                message?: string;
                policy: "SILENT"
                | "CLARIFICATION"
                | "HUMAN_HANDOFF"
                | "AUTOMATION";
            };
            instructions: string;
            key: string;
            knowledge: {
                content?: string;
                title: string;
                type: "TEXT"
                | "FAQ"
                | "URL";
                url?: string;
            }[];
            language: string;
            max_input_chars: number;
            max_output_tokens: number;
            max_run_cost_micros: number;
            model: string;
            monthly_budget_micros: number;
            name: string;
            project_id?: string;
            purpose?: string;
            status?: "DRAFT"
            | "DISABLED";
        }[];
        project_id?: string;
        require_opt_in?: boolean;
        version?: string;
    }
    • Optional$schema?: string
    • automations: {
          active?: boolean;
          key: string;
          name: string;
          steps: (
              | { send_reply: { buttons?: { id: ...; title: ... }[]; text: string } }
              | { delay: { minutes: number } }
              | {
                  wait_reply: {
                      options?: { id: ...; keywords?: ...; label: ...; matchMode?: ... }[];
                      timeout_hours?: number;
                  };
              }
              | { pause_replies: { reason?: string } }
              | {
                  send_flow: {
                      body_text?: string;
                      flow: string;
                      flow_cta?: string;
                      footer_text?: string;
                      header_text?: string;
                  };
              }
              | {
                  run_function: {
                      function: string;
                      reply_field?: string;
                      result_mode?: "reply"
                      | "variables"
                      | "side_effect";
                      variable_name?: string;
                  };
              }
          )[];
          trigger: {
              keywords?: string[];
              match_mode?: "EXACT"
              | "CONTAINS"
              | "CONTAINS_WORD";
              type: "KEYWORD" | "WELCOME" | "ANY_MESSAGE";
          };
      }[]
    • Optionalbusiness_agent?: {
          channel_id?: string;
          connectors?: { [key: string]: unknown }[];
          enabled: boolean;
          faqs?: {
              key: string;
              remote_id?: string;
              value: { [key: string]: unknown };
          }[];
          operation_id: string;
          settings: {
              enabled?: boolean;
              handoff?: { [key: string]: unknown };
              knowledge?: { [key: string]: unknown };
              language?: string;
              persona?: string;
          } & { [key: string]: unknown };
          skills?: {
              key: string;
              remote_id?: string;
              value: { [key: string]: unknown };
          }[];
          ui_skills?: {
              key: string;
              remote_id?: string;
              value: { [key: string]: unknown };
          }[];
          websites?: {
              key: string;
              remote_id?: string;
              value: { [key: string]: unknown };
          }[];
      }

      Default-off Meta desired state. Apply requires operation_id and cannot activate rollout or select EVERYONE.

      • Optionalchannel_id?: string
      • Optionalconnectors?: { [key: string]: unknown }[]
      • enabled: boolean
        false
        
      • Optionalfaqs?: { key: string; remote_id?: string; value: { [key: string]: unknown } }[]
      • operation_id: string
      • settings: {
            enabled?: boolean;
            handoff?: { [key: string]: unknown };
            knowledge?: { [key: string]: unknown };
            language?: string;
            persona?: string;
        } & { [key: string]: unknown }
      • Optionalskills?: { key: string; remote_id?: string; value: { [key: string]: unknown } }[]
      • Optionalui_skills?: { key: string; remote_id?: string; value: { [key: string]: unknown } }[]
      • Optionalwebsites?: { key: string; remote_id?: string; value: { [key: string]: unknown } }[]
    • flows: {
          agent_id?: string;
          data_exchange_url?: null | string;
          description?: string;
          draft?: { entryScreenId?: string; screens?: { [key: string]: unknown }[] } & {
              [key: string]: unknown;
          };
          flow_json?: { screens?: Record<string, never>[]; version?: string } & {
              [key: string]: unknown;
          };
          key: string;
          locale?: string;
          name: string;
          project_id?: string;
          runtime_mode?: "STATIC"
          | "DATA_EXCHANGE";
      }[]
    • Optionalhosted_agents?: {
          allowed_topics: string[];
          channel_ids: string[];
          conversation_messages?: {
              cannot_listen?: string;
              clarification: string;
              farewell: string;
              greeting: string;
              out_of_scope: string;
          };
          fallback: {
              automation_id?: string;
              message?: string;
              policy: "SILENT"
              | "CLARIFICATION"
              | "HUMAN_HANDOFF"
              | "AUTOMATION";
          };
          instructions: string;
          key: string;
          knowledge: {
              content?: string;
              title: string;
              type: "TEXT"
              | "FAQ"
              | "URL";
              url?: string;
          }[];
          language: string;
          max_input_chars: number;
          max_output_tokens: number;
          max_run_cost_micros: number;
          model: string;
          monthly_budget_micros: number;
          name: string;
          project_id?: string;
          purpose?: string;
          status?: "DRAFT"
          | "DISABLED";
      }[]

      Wabery-hosted AI agents. Declarative apply creates or updates the Draft only. Live is read-only until Review & publish in Wabery.

    • Optionalproject_id?: string
    • Optionalrequire_opt_in?: boolean

      Applied to project_id. False on a dedicated production number lets inbound senders be replied to and messaged without the invite/opt-in step.

    • Optionalversion?: string
  • WhatsAppGroup: {
        channel_id: string;
        created_at?: null | string;
        creation_timestamp?: null | number;
        description?: null | string;
        group_id?: string;
        id: string;
        invite_link?: null | string;
        join_approval_mode: null | "auto_approve" | "approval_required";
        object: "whatsapp_group";
        participants: {
            id: string;
            id_type: "user_id" | "wa_id";
            name?: null | string;
            parent_user_id?: null | string;
            phone?: null | string;
            user?: string;
            user_id: null | string;
            username?: null | string;
            wa_id: null | string;
        }[];
        subject: null
        | string;
        suspended: null | boolean;
        total_participant_count: null | number;
    }
    • channel_id: string
    • Optionalcreated_at?: null | string

      Format: date-time

      Official Meta creation timestamp normalized to ISO-8601. creation_timestamp is retained when Meta returns Unix seconds.

    • Optionalcreation_timestamp?: null | number
    • Optionaldescription?: null | string
    • Optionalgroup_id?: string
    • id: string

      Opaque Meta group ID.

    • Optionalinvite_link?: null | string

      Format: uri

    • join_approval_mode: null | "auto_approve" | "approval_required"
    • object: "whatsapp_group"
    • participants: {
          id: string;
          id_type: "user_id" | "wa_id";
          name?: null | string;
          parent_user_id?: null | string;
          phone?: null | string;
          user?: string;
          user_id: null | string;
          username?: null | string;
          wa_id: null | string;
      }[]
    • subject: null | string
    • suspended: null | boolean
    • total_participant_count: null | number
  • WhatsAppGroupConversation: {
        contact_id?: null;
        conversation_id?: string;
        created_at?: string;
        group_id?: null | string;
        group_subject?: null | string;
        id?: string;
        is_active?: boolean;
        last_channel_id?: null | string;
        last_message_at?: null | string;
        name?: null | string;
        object?: "conversation";
        phone?: null | string;
        reference_id?: null | string;
        started_at?: string;
        updated_at?: string;
    }
    • Optionalcontact_id?: null
    • Optionalconversation_id?: string
    • Optionalcreated_at?: string

      Format: date-time

    • Optionalgroup_id?: null | string
    • Optionalgroup_subject?: null | string
    • Optionalid?: string
    • Optionalis_active?: boolean
    • Optionallast_channel_id?: null | string
    • Optionallast_message_at?: null | string

      Format: date-time

    • Optionalname?: null | string
    • Optionalobject?: "conversation"
    • Optionalphone?: null | string
    • Optionalreference_id?: null | string
    • Optionalstarted_at?: string

      Format: date-time

    • Optionalupdated_at?: string

      Format: date-time

  • WhatsAppGroupCreateProcessingResponse: {
        idempotency_key: string;
        object: "api_operation";
        reconciliation: "provider" | "local_persistence";
        status: "processing";
    }
    • idempotency_key: string
    • object: "api_operation"
    • reconciliation: "provider" | "local_persistence"

      Whether Wabery is waiting on Meta's result or completing local persistence.

    • status: "processing"
  • WhatsAppGroupInviteLink: {
        channel_id: string;
        group_id: string;
        invite_link: string;
        object: "whatsapp_group_invite_link";
    }
    • channel_id: string
    • group_id: string
    • invite_link: string

      Format: uri

    • object: "whatsapp_group_invite_link"
  • WhatsAppGroupJoinRequest: {
        created_at?: null | string;
        creation_timestamp?: null | number;
        group_id?: string;
        id: string;
        join_request_id: string;
        parent_user_id?: string;
        user_id?: string;
        username?: string;
        wa_id?: string;
    }
    • Optionalcreated_at?: null | string

      Format: date-time

      ISO-8601 representation of creation_timestamp.

    • Optionalcreation_timestamp?: null | number

      Official Meta creation timestamp in Unix seconds.

    • Optionalgroup_id?: string
    • id: string

      Stable Wabery ID, normalized from Meta's join_request_id.

    • join_request_id: string

      Official Meta join-request ID; opaque.

    • Optionalparent_user_id?: string

      Parent BSUID. Only included when your business portfolio is enrolled in parent BSUIDs.

    • Optionaluser_id?: string

      Business-scoped user ID (BSUID).

    • Optionalusername?: string

      WhatsApp username, when the user has adopted one.

    • Optionalwa_id?: string

      Official Meta WhatsApp user ID. Omitted when the user has adopted a username and their phone number is unavailable.

  • WhatsAppGroupJoinRequestMutation: {
        approved_join_requests?: string[];
        failed_join_requests?: Record<string, never>[];
        rejected_join_requests?: string[];
    }
  • WhatsAppGroupMessage: {
        channel_id?: string;
        contact_id?: null;
        content?: null | string;
        conversation_id?: null | string;
        direction?: "inbound" | "outbound";
        failure?:
            | null
            | {
                code?: null
                | string
                | number;
                fbtrace_id?: null | string;
                http_status?: null | number;
                message?: string;
                occurred_at?: string;
                provider?: "meta" | "wabery";
                subcode?: null | string | number;
                summary?: string;
                title?: null | string;
                type?: null | string;
            };
        group_id?: null
        | string;
        group_subject?: null | string;
        id?: string;
        identity_key_hash?: null | string;
        media?:
            | null
            | {
                access_policy?: string;
                accessible?: boolean;
                error_code?: null
                | string;
                expires_at?: null | string;
                file_name?: null | string;
                file_size?: null | number;
                mime_type?: null | string;
                note?: null | string;
                provider?: null | "whatsapp" | "instagram" | "messenger";
                provider_media_id?: null | string;
                status?: "expired" | "available" | "unavailable";
                type?: null | string;
                url?: null | string;
                whatsapp_media_id?: null | string;
            };
        message_id?: string;
        object?: "message";
        platform_message_id?: null
        | string;
        sender_participant?: null | string;
        status?: string;
        timestamp?: string;
        type?: string;
    }
    • Optionalchannel_id?: string
    • Optionalcontact_id?: null
    • Optionalcontent?: null | string
    • Optionalconversation_id?: null | string
    • Optionaldirection?: "inbound" | "outbound"
    • Optionalfailure?:
          | null
          | {
              code?: null
              | string
              | number;
              fbtrace_id?: null | string;
              http_status?: null | number;
              message?: string;
              occurred_at?: string;
              provider?: "meta" | "wabery";
              subcode?: null | string | number;
              summary?: string;
              title?: null | string;
              type?: null | string;
          }
    • Optionalgroup_id?: null | string
    • Optionalgroup_subject?: null | string
    • Optionalid?: string
    • Optionalidentity_key_hash?: null | string
    • Optionalmedia?:
          | null
          | {
              access_policy?: string;
              accessible?: boolean;
              error_code?: null
              | string;
              expires_at?: null | string;
              file_name?: null | string;
              file_size?: null | number;
              mime_type?: null | string;
              note?: null | string;
              provider?: null | "whatsapp" | "instagram" | "messenger";
              provider_media_id?: null | string;
              status?: "expired" | "available" | "unavailable";
              type?: null | string;
              url?: null | string;
              whatsapp_media_id?: null | string;
          }

      Inbound WhatsApp, Instagram, and Messenger media is available through short-lived Wabery signed URLs when cached. Store assets promptly; expires_at is the asset retention deadline.

    • Optionalmessage_id?: string
    • Optionalobject?: "message"
    • Optionalplatform_message_id?: null | string
    • Optionalsender_participant?: null | string
    • Optionalstatus?: string
    • Optionaltimestamp?: string

      Format: date-time

    • Optionaltype?: string
  • WhatsAppGroupMessageProcessingResponse: {
        acceptance_unknown?: boolean;
        idempotency_key: string;
        object: "message_request";
        provider_accepted?: boolean;
        reconciliation: "provider" | "local_persistence";
        status: "processing";
    }

    Returned when Meta acceptance or local persistence is still being reconciled. Repeat the same request with the same idempotency key; never create a new key for this send.

    • Optionalacceptance_unknown?: boolean
    • idempotency_key: string
    • object: "message_request"
    • Optionalprovider_accepted?: boolean
    • reconciliation: "provider" | "local_persistence"
    • status: "processing"
  • WhatsAppGroupMessageSendResponse: {
        conversation_id: string;
        group_id: string;
        id: string;
        idempotency_key: string;
        object: "message";
        provider_message_id: string;
        status: "sent";
    }
    • conversation_id: string
    • group_id: string
    • id: string
    • idempotency_key: string
    • object: "message"
    • provider_message_id: string
    • status: "sent"
  • WhatsAppGroupOperation: {
        channel_id: string;
        group_id: null | string;
        idempotent_replay?: boolean;
        object: "whatsapp_group_operation";
        operation: "delete" | "create" | "update";
        request_id: null | string;
        status: "pending";
    }
    • channel_id: string
    • group_id: null | string
    • Optionalidempotent_replay?: boolean

      True when the response was replayed from the idempotency ledger.

    • object: "whatsapp_group_operation"
    • operation: "delete" | "create" | "update"
    • request_id: null | string
    • status: "pending"
  • WhatsAppGroupParticipant: {
        id: string;
        id_type: "user_id" | "wa_id";
        name?: null | string;
        parent_user_id?: null | string;
        phone?: null | string;
        user?: string;
        user_id: null | string;
        username?: null | string;
        wa_id: null | string;
    }
    • id: string

      Stable participant identifier: the business-scoped user ID (BSUID) when Meta sends one, otherwise the WhatsApp ID. Pass it to the remove-participants endpoint.

    • id_type: "user_id" | "wa_id"

      user_id when id is a BSUID, wa_id when it is a WhatsApp ID.

    • Optionalname?: null | string
    • Optionalparent_user_id?: null | string

      Parent BSUID. Only set when your business portfolio is enrolled in parent BSUIDs.

    • Optionalphone?: null | string
    • Optionaluser?: string
    • user_id: null | string

      Business-scoped user ID (BSUID), for example US.13491208655302741918.

    • Optionalusername?: null | string

      WhatsApp username, when the user has adopted one.

    • wa_id: null | string

      WhatsApp ID (phone number). Null when the user has adopted a username and their phone number is unavailable.

  • WhatsAppGroupParticipantMutation: {
        failed_participants?: {
            errors?: Record<string, never>[];
            input?: string;
            user_id?: string;
        }[];
        removed_participants?: string[];
    }
  • WhatsAppManagementResponse: { [key: string]: unknown }

    Channel-scoped response returned by Meta. Wabery preserves documented Meta fields while keeping the access token private.

  • WhatsAppMessageWithContext: {
        channel_id?: string;
        contact_id?: string;
        content?: null | string;
        conversation_id?: null | string;
        direction?: "inbound" | "outbound";
        failure?:
            | null
            | {
                code?: null
                | string
                | number;
                fbtrace_id?: null | string;
                http_status?: null | number;
                message?: string;
                occurred_at?: string;
                provider?: "meta" | "wabery";
                subcode?: null | string | number;
                summary?: string;
                title?: null | string;
                type?: null | string;
            };
        id?: string;
        media?: | null
        | {
            access_policy?: string;
            accessible?: boolean;
            error_code?: null
            | string;
            expires_at?: null | string;
            file_name?: null | string;
            file_size?: null | number;
            mime_type?: null | string;
            note?: null | string;
            provider?: null | "whatsapp" | "instagram" | "messenger";
            provider_media_id?: null | string;
            status?: "expired" | "available" | "unavailable";
            type?: null | string;
            url?: null | string;
            whatsapp_media_id?: null | string;
        };
        message_id?: string;
        object?: "message";
        platform_message_id?: null
        | string;
        status?: string;
        timestamp?: string;
        type?: string;
    } & {
        ctwa_clid?: string;
        identity_key_hash?: string;
        order?: { [key: string]: unknown };
        referral?: { [key: string]: unknown };
        referred_product?: { [key: string]: unknown };
    }
  • WhatsAppTemplate: {
        approved_at?: null | string;
        category?: string;
        channel_id?: string;
        components?: { [key: string]: unknown };
        created_at?: string;
        id?: string;
        language?: string;
        last_synced_at?: null | string;
        meta_template_id?: null | string;
        name?: string;
        object?: "whatsapp_template";
        rejected_at?: null | string;
        rejection_reason?: null | string;
        status?: string;
        submitted_at?: string;
        updated_at?: string;
    }
    • Optionalapproved_at?: null | string

      Format: date-time

    • Optionalcategory?: string
    • Optionalchannel_id?: string
    • Optionalcomponents?: { [key: string]: unknown }
    • Optionalcreated_at?: string

      Format: date-time

    • Optionalid?: string
    • Optionallanguage?: string
    • Optionallast_synced_at?: null | string

      Format: date-time

    • Optionalmeta_template_id?: null | string
    • Optionalname?: string
    • Optionalobject?: "whatsapp_template"
    • Optionalrejected_at?: null | string

      Format: date-time

    • Optionalrejection_reason?: null | string
    • Optionalstatus?: string
    • Optionalsubmitted_at?: string

      Format: date-time

    • Optionalupdated_at?: string

      Format: date-time

  • WhatsAppUsername: {
        channel_id: string;
        last_checked_at: string;
        object: "whatsapp_username";
        status: null | "approved" | "reserved";
        username: null | string;
    }
    • channel_id: string
    • last_checked_at: string

      Format: date-time

    • object: "whatsapp_username"
    • status: null | "approved" | "reserved"
    • username: null | string
  • WhatsAppUsernameSuggestions: { channel_id: string; data: string[]; object: "list" }
    • channel_id: string
    • data: string[]
    • object: "list"