Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/.vitepress/sidebars/rest-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -506,17 +506,19 @@ export default [
]
},
{
text: 'Pro Settings (11)',
text: 'Pro Settings (13)',
collapsed: true,
items: [
{ text: 'Get License Status <badge type="tip">GET</badge>', link: '/rest-api/operations/pro-settings/get-license-status' },
{ text: 'Get SMS Settings <badge type="tip">GET</badge>', link: '/rest-api/operations/pro-settings/get-sms-settings' },
{ text: 'Get WhatsApp Settings <badge type="tip">GET</badge>', link: '/rest-api/operations/pro-settings/get-whatsapp-settings' },
{ text: 'List Managers <badge type="tip">GET</badge>', link: '/rest-api/operations/pro-settings/get-managers' },
{ text: 'Add Manager <badge type="warning">POST</badge>', link: '/rest-api/operations/pro-settings/add-manager' },
{ text: 'Disable SMS <badge type="warning">POST</badge>', link: '/rest-api/operations/pro-settings/disable-sms' },
{ text: 'Import Funnel <badge type="warning">POST</badge>', link: '/rest-api/operations/pro-settings/import-funnel' },
{ text: 'Save License <badge type="warning">POST</badge>', link: '/rest-api/operations/pro-settings/save-license' },
{ text: 'Save SMS Settings <badge type="warning">POST</badge>', link: '/rest-api/operations/pro-settings/save-sms-settings' },
{ text: 'Save WhatsApp Settings <badge type="warning">POST</badge>', link: '/rest-api/operations/pro-settings/save-whatsapp-settings' },
{ text: 'Update Manager <badge type="info">PUT</badge>', link: '/rest-api/operations/pro-settings/update-manager' },
{ text: 'Deactivate License <badge type="danger">DELETE</badge>', link: '/rest-api/operations/pro-settings/deactivate-license' },
{ text: 'Delete Manager <badge type="danger">DELETE</badge>', link: '/rest-api/operations/pro-settings/delete-manager' },
Expand Down Expand Up @@ -553,6 +555,21 @@ export default [
{ text: 'Delete SMS Messages <badge type="danger">DELETE</badge>', link: '/rest-api/operations/sms/delete-sms-messages' },
]
},
{
text: 'WhatsApp (Pro) (9)',
collapsed: true,
items: [
{ text: 'Get Subscriber WhatsApp Messages <badge type="tip">GET</badge>', link: '/rest-api/operations/whatsapp/get-subscriber-whatsapp-messages' },
{ text: 'Get Subscriber WhatsApp Session <badge type="tip">GET</badge>', link: '/rest-api/operations/whatsapp/get-subscriber-whatsapp-session' },
{ text: 'Get Subscriber WhatsApp Stats <badge type="tip">GET</badge>', link: '/rest-api/operations/whatsapp/get-subscriber-whatsapp-stats' },
{ text: 'List WhatsApp Templates <badge type="tip">GET</badge>', link: '/rest-api/operations/whatsapp/list-whatsapp-templates' },
{ text: 'Create WhatsApp Template <badge type="warning">POST</badge>', link: '/rest-api/operations/whatsapp/create-whatsapp-template' },
{ text: 'Send Subscriber WhatsApp Message <badge type="warning">POST</badge>', link: '/rest-api/operations/whatsapp/send-subscriber-whatsapp-message' },
{ text: 'Sync WhatsApp Templates <badge type="warning">POST</badge>', link: '/rest-api/operations/whatsapp/sync-whatsapp-templates' },
{ text: 'Validate WhatsApp Template <badge type="warning">POST</badge>', link: '/rest-api/operations/whatsapp/validate-whatsapp-template' },
{ text: 'Delete WhatsApp Template <badge type="danger">DELETE</badge>', link: '/rest-api/operations/whatsapp/delete-whatsapp-template' },
]
},
{
text: 'Bounce Handler (Public) (2)',
collapsed: true,
Expand Down
4 changes: 0 additions & 4 deletions src/public/openapi/pro-settings/get-license-status.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,6 @@
"activation_hash": {
"type": "string",
"description": "Hash identifying this site's activation."
},
"is_expired": {
"type": "boolean",
"description": "True when the licence has lapsed."
}
}
},
Expand Down
125 changes: 125 additions & 0 deletions src/public/openapi/pro-settings/get-whatsapp-settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"openapi": "3.0.4",
"info": {
"title": "FluentCRM API",
"description": "Complete REST API documentation for FluentCRM \u2014 a self-hosted email marketing and CRM plugin for WordPress.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://{website}/wp-json/fluent-crm/v2",
"description": "Your WordPress website",
"variables": {
"website": {
"default": "YourWebsite.com",
"description": "Your WordPress website domain (without https://)"
}
}
}
],
"security": [
{
"ApplicationPasswords": []
}
],
"paths": {
"/campaign-pro-settings/whatsapp-settings": {
"get": {
"operationId": "getWhatsAppSettings",
"summary": "GET WhatsApp Settings",
"description": "Retrieve WhatsApp module settings, provider options, and webhook information. **PRO** (requires FluentCampaign Pro).\n\n<!-- fc:access -->\n\n**Required capability:** `fcrm_manage_settings`\n\n_Enforced by `SettingsPolicy::verifyRequest()`, the policy default for this route group._\n\n**Requires:** FluentCampaign Pro. Without it the route does not exist.\n\n<!-- /fc:access -->",
"tags": [
"Pro Settings"
],
"security": [
{
"ApplicationPasswords": []
}
],
"responses": {
"200": {
"description": "WhatsApp settings and provider options.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"settings": {
"type": "object",
"description": "Current WhatsApp settings and provider credentials."
},
"options": {
"type": "object",
"description": "Available WhatsApp provider options and field definitions."
},
"whatsapp_webhook": {
"type": [
"object",
"null"
],
"description": "Webhook registration information when WhatsApp is enabled."
}
}
}
}
}
},
"401": {
"description": "Not authenticated \u2014 missing or invalid credentials.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Authenticated but the user lacks the capability this route requires.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Error": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Human-readable error message"
},
"code": {
"type": "string",
"description": "Error code"
},
"data": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "HTTP status code"
}
}
}
}
}
},
"securitySchemes": {
"ApplicationPasswords": {
"type": "apiKey",
"in": "header",
"name": "Authorization",
"description": "WordPress Application Passwords \u2014 use Basic auth with your WordPress username and an application password in the format: username:application_password"
}
}
}
}
186 changes: 186 additions & 0 deletions src/public/openapi/pro-settings/save-whatsapp-settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
{
"openapi": "3.0.4",
"info": {
"title": "FluentCRM API",
"description": "Complete REST API documentation for FluentCRM \u2014 a self-hosted email marketing and CRM plugin for WordPress.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://{website}/wp-json/fluent-crm/v2",
"description": "Your WordPress website",
"variables": {
"website": {
"default": "YourWebsite.com",
"description": "Your WordPress website domain (without https://)"
}
}
}
],
"security": [
{
"ApplicationPasswords": []
}
],
"paths": {
"/campaign-pro-settings/whatsapp-settings": {
"post": {
"operationId": "saveWhatsAppSettings",
"summary": "POST Save WhatsApp Settings",
"description": "Save WhatsApp module settings, selected provider, and provider credentials. **PRO** (requires FluentCampaign Pro).\n\n<!-- fc:access -->\n\n**Required capability:** `fcrm_manage_settings`\n\n_Enforced by `SettingsPolicy::verifyRequest()`, the policy default for this route group._\n\n**Requires:** FluentCampaign Pro. Without it the route does not exist.\n\n<!-- /fc:access -->",
"tags": [
"Pro Settings"
],
"security": [
{
"ApplicationPasswords": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"settings": {
"type": "object",
"description": "WhatsApp module settings. Provider credentials are nested under the provider slug.",
"properties": {
"enabled": {
"type": "string",
"enum": [
"yes",
"no"
],
"description": "Whether to enable WhatsApp messaging."
},
"whatsapp_provider": {
"type": "string",
"description": "Provider slug, such as twilio_whatsapp or meta_cloud."
}
},
"additionalProperties": true
}
},
"required": [
"settings"
]
},
"example": {
"settings": {
"enabled": "yes",
"whatsapp_provider": "meta_cloud",
"meta_cloud": {
"waba_id": "1234567890",
"phone_number_id": "1234567890",
"access_token": "EAAB...",
"app_secret": "app_secret",
"verify_token": "verify-token"
}
}
}
}
}
},
"responses": {
"200": {
"description": "WhatsApp settings saved successfully.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Success message."
},
"settings": {
"type": "object",
"description": "Saved WhatsApp settings."
},
"options": {
"type": "object",
"description": "Available WhatsApp provider options."
},
"whatsapp_webhook": {
"type": [
"object",
"null"
],
"description": "Webhook registration information when enabled."
}
}
}
}
}
},
"401": {
"description": "Not authenticated \u2014 missing or invalid credentials.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"403": {
"description": "Authenticated but the user lacks the capability this route requires.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
},
"422": {
"description": "Validation failed \u2014 the response message names the offending field.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"Error": {
"type": "object",
"properties": {
"message": {
"type": "string",
"description": "Human-readable error message"
},
"code": {
"type": "string",
"description": "Error code"
},
"data": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "HTTP status code"
}
}
}
}
}
},
"securitySchemes": {
"ApplicationPasswords": {
"type": "apiKey",
"in": "header",
"name": "Authorization",
"description": "WordPress Application Passwords \u2014 use Basic auth with your WordPress username and an application password in the format: username:application_password"
}
}
}
}
17 changes: 17 additions & 0 deletions src/public/openapi/settings/get-abandon-cart-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,23 @@
"fluent_cartOptions": {
"type": "object",
"properties": {}
},
"wooOptions": {
"type": "object",
"description": "WooCommerce status options used by abandoned-cart recovery settings.",
"properties": {
"all_statuses": {
"type": "object",
"description": "Available WooCommerce order statuses keyed by status slug."
},
"paid_statuses": {
"type": "array",
"description": "WooCommerce statuses treated as paid/recovered.",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": true
Expand Down
2 changes: 1 addition & 1 deletion src/public/openapi/sms/delete-sms-messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"delete": {
"operationId": "deleteSmsMessages",
"summary": "DELETE Delete SMS Messages",
"description": "Delete multiple SMS messages by their IDs. **PRO** (requires FluentCampaign Pro SMS module).\n\n<!-- fc:access -->\n\n**Required capability:** `fcrm_read_emails`\n\nRoute exists only while the SMS module is enabled; the policy returns false otherwise.\n\n_Enforced by `SMSPolicy::verifyRequest()`, the policy default for this route group._\n\n**Requires:** FluentCampaign Pro **with the SMS module enabled**. While SMS is switched off the route is not registered at all and returns a 404.\n\n<!-- /fc:access -->",
"description": "Delete multiple SMS messages by their IDs. **PRO** (requires FluentCampaign Pro SMS module).\n\n<!-- fc:access -->\n\n**Required capability:** `fcrm_manage_email_delete`\n\nRoute exists only while the SMS module is enabled; the policy returns false otherwise.\n\n_Enforced by `SMSPolicy::deleteMessages()`._\n\n**Requires:** FluentCampaign Pro **with the SMS module enabled**. While SMS is switched off the route is not registered at all and returns a 404.\n\n<!-- /fc:access -->",
"tags": [
"SMS"
],
Expand Down
Loading