diff --git a/src/.vitepress/sidebars/rest-api.js b/src/.vitepress/sidebars/rest-api.js index 91c7843..190d74b 100644 --- a/src/.vitepress/sidebars/rest-api.js +++ b/src/.vitepress/sidebars/rest-api.js @@ -146,9 +146,27 @@ export default [ { text: 'Bulk Action POST', link: '/rest-api/operations/templates/bulk-action-templates' }, { text: 'Get Smart Codes GET', link: '/rest-api/operations/templates/get-smart-codes' }, { text: 'Set Global Style POST', link: '/rest-api/operations/templates/set-global-style' }, + { text: 'Fetch Built-in Template POST', link: '/rest-api/operations/templates/get-built-in-template' }, { text: 'Built-in Templates GET', link: '/rest-api/operations/templates/get-built-in-templates' }, ] }, + { + text: 'Email Patterns', + collapsed: true, + items: [ + { text: 'List Email Patterns GET', link: '/rest-api/operations/email-patterns/list-email-patterns' }, + { text: 'List Patterns (WP Format) GET', link: '/rest-api/operations/email-patterns/list-email-patterns-wp-format' }, + { text: 'List Categories GET', link: '/rest-api/operations/email-patterns/list-email-pattern-categories' }, + { text: 'Create Category POST', link: '/rest-api/operations/email-patterns/create-email-pattern-category' }, + { text: 'Delete Category DELETE', link: '/rest-api/operations/email-patterns/delete-email-pattern-category' }, + { text: 'Create Email Pattern POST', link: '/rest-api/operations/email-patterns/create-email-pattern' }, + { text: 'Create Pattern (WP Format) POST', link: '/rest-api/operations/email-patterns/create-email-pattern-wp-format' }, + { text: 'Get Email Pattern GET', link: '/rest-api/operations/email-patterns/get-email-pattern' }, + { text: 'Update Email Pattern PUT', link: '/rest-api/operations/email-patterns/update-email-pattern' }, + { text: 'Delete Email Pattern DELETE', link: '/rest-api/operations/email-patterns/delete-email-pattern' }, + { text: 'Bulk Action POST', link: '/rest-api/operations/email-patterns/bulk-action-email-patterns' }, + ] + }, { text: 'Funnels (Automations)', collapsed: true, @@ -201,6 +219,7 @@ export default [ { text: 'Get Email GET', link: '/rest-api/operations/sequences/get-sequence-email' }, { text: 'Create Email POST', link: '/rest-api/operations/sequences/create-sequence-email' }, { text: 'Update Email PUT', link: '/rest-api/operations/sequences/update-sequence-email' }, + { text: 'Update Email Delay PATCH', link: '/rest-api/operations/sequences/update-sequence-email-delay' }, { text: 'Delete Email DELETE', link: '/rest-api/operations/sequences/delete-sequence-email' }, { text: 'Duplicate Email POST', link: '/rest-api/operations/sequences/duplicate-sequence-email' }, { text: 'Create/Update Email POST', link: '/rest-api/operations/sequences/create-or-update-sequence-email' }, @@ -230,6 +249,14 @@ export default [ { text: 'Update Labels PUT', link: '/rest-api/operations/recurring-campaigns/update-recurring-campaign-labels' }, ] }, + { + text: 'Subscribers Export Pro', + collapsed: true, + items: [ + { text: 'Get Export Page GET', link: '/rest-api/operations/subscribers-export/get-subscribers-export-page' }, + { text: 'Post Export Page POST', link: '/rest-api/operations/subscribers-export/post-subscribers-export-page' }, + ] + }, { text: 'Dynamic Segments Pro', collapsed: true, @@ -284,6 +311,11 @@ export default [ { text: 'Email Sent Stats GET', link: '/rest-api/operations/reports/get-email-sent-stats' }, { text: 'Email Open Stats GET', link: '/rest-api/operations/reports/get-email-open-stats' }, { text: 'Email Click Stats GET', link: '/rest-api/operations/reports/get-email-click-stats' }, + { text: 'Email Unsubscribe Stats GET', link: '/rest-api/operations/reports/get-email-unsub-stats' }, + { text: 'Contacts by Status GET', link: '/rest-api/operations/reports/get-contacts-by-status' }, + { text: 'Contacts by Tags GET', link: '/rest-api/operations/reports/get-contacts-by-tags' }, + { text: 'Contacts by Lists GET', link: '/rest-api/operations/reports/get-contacts-by-lists' }, + { text: 'Contacts by Country GET', link: '/rest-api/operations/reports/get-contacts-by-country' }, { text: 'Email Performance GET', link: '/rest-api/operations/reports/get-email-performance' }, { text: 'Report Options GET', link: '/rest-api/operations/reports/get-report-options' }, { text: 'Ajax Options GET', link: '/rest-api/operations/reports/get-ajax-options' }, @@ -291,10 +323,26 @@ export default [ { text: 'Cascade Selections GET', link: '/rest-api/operations/reports/get-cascade-selections' }, { text: 'Get Emails GET', link: '/rest-api/operations/reports/get-report-emails' }, { text: 'Delete Emails DELETE', link: '/rest-api/operations/reports/delete-report-emails' }, + { text: 'Top Campaigns GET Pro', link: '/rest-api/operations/reports/get-top-campaigns' }, + { text: 'Recent Tags GET', link: '/rest-api/operations/reports/get-recent-tags' }, + { text: 'Campaigns List GET', link: '/rest-api/operations/reports/get-campaigns-list' }, + { text: 'Campaign Options GET', link: '/rest-api/operations/reports/get-campaign-options' }, + { text: 'Automation Reports GET', link: '/rest-api/operations/reports/get-automation-reports' }, + { text: 'Automation Step Report GET', link: '/rest-api/operations/reports/get-automation-step-report' }, { text: 'Advanced Providers GET', link: '/rest-api/operations/reports/get-advanced-report-providers' }, { text: 'Ping GET', link: '/rest-api/operations/reports/ping-report' }, ] }, + { + text: 'AI', + collapsed: true, + items: [ + { text: 'Get AI Settings GET', link: '/rest-api/operations/ai/get-ai-settings' }, + { text: 'Save AI Settings POST', link: '/rest-api/operations/ai/save-ai-settings' }, + { text: 'Test AI Connection POST', link: '/rest-api/operations/ai/test-ai-connection' }, + { text: 'Generate AI Content POST', link: '/rest-api/operations/ai/generate-ai-content' }, + ] + }, { text: 'Settings', collapsed: true, @@ -430,6 +478,7 @@ export default [ { text: 'Delete Campaign DELETE', link: '/rest-api/operations/sms/delete-sms-campaign' }, { text: 'Schedule POST', link: '/rest-api/operations/sms/schedule-sms-campaign' }, { text: 'Unschedule POST', link: '/rest-api/operations/sms/unschedule-sms-campaign' }, + { text: 'Un-schedule (Legacy) POST', link: '/rest-api/operations/sms/un-schedule-sms-campaign' }, { text: 'Pause POST', link: '/rest-api/operations/sms/pause-sms-campaign' }, { text: 'Resume POST', link: '/rest-api/operations/sms/resume-sms-campaign' }, { text: 'Duplicate POST', link: '/rest-api/operations/sms/duplicate-sms-campaign' }, @@ -477,8 +526,8 @@ export default [ { text: 'List Docs GET', link: '/rest-api/operations/docs/list-docs' }, { text: 'Get Doc GET', link: '/rest-api/operations/docs/get-doc' }, { text: 'Get Addons GET', link: '/rest-api/operations/docs/get-doc-addons' }, - { text: 'Bounce Handler POST', link: '/rest-api/operations/public-bounce/handle-bounce-with-handle' }, - { text: 'Bounce Handler (Alt) POST', link: '/rest-api/operations/public-bounce/handle-bounce' }, + { text: 'Bounce Handler ANY', link: '/rest-api/operations/public-bounce/handle-bounce-with-handle' }, + { text: 'Bounce Handler (Alt) ANY', link: '/rest-api/operations/public-bounce/handle-bounce' }, ] }, ] diff --git a/src/public/openapi/ai/generate-ai-content.json b/src/public/openapi/ai/generate-ai-content.json new file mode 100644 index 0000000..b99deee --- /dev/null +++ b/src/public/openapi/ai/generate-ai-content.json @@ -0,0 +1,172 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/ai/generate": { + "post": { + "operationId": "generateAiContent", + "summary": "POST Generate AI Content", + "description": "Generate or transform email copy using the saved AI settings. Supported actions are `rewrite`, `shorten`, `expand`, `fix_grammar`, and `custom`.", + "tags": [ + "AI" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "action": { + "type": "string", + "enum": [ + "rewrite", + "shorten", + "expand", + "fix_grammar", + "custom" + ], + "description": "Transformation action to perform." + }, + "content": { + "type": "string", + "description": "Selected email content to transform. Required for all actions except a custom prompt-only request." + }, + "tone": { + "type": "string", + "description": "Optional tone hint appended to the generated system prompt." + }, + "custom_prompt": { + "type": "string", + "description": "Custom instruction text. Used when `action=custom`." + } + }, + "required": [ + "action" + ] + }, + "example": { + "action": "rewrite", + "content": "Hello there, I hope this email finds you well. We wanted to let you know about our new offer.", + "tone": "friendly", + "custom_prompt": "" + } + } + } + }, + "responses": { + "200": { + "description": "AI content generated successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "content": { + "type": "string", + "description": "Generated text returned by the configured AI provider after sanitization." + } + }, + "required": [ + "content" + ] + }, + "example": { + "content": "Hi {{contact.first_name}},\n\nWe’ve got a new offer you might like. Here’s a quick look at what’s new." + } + } + } + }, + "422": { + "description": "Validation, configuration, or provider API error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "examples": { + "invalidAction": { + "value": { + "message": "Invalid action specified.", + "data": { + "status": 422 + } + } + }, + "notEnabled": { + "value": { + "message": "AI Writing is not enabled. Please configure it in Settings.", + "data": { + "status": 422 + } + } + } + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/ai/get-ai-settings.json b/src/public/openapi/ai/get-ai-settings.json new file mode 100644 index 0000000..a08d889 --- /dev/null +++ b/src/public/openapi/ai/get-ai-settings.json @@ -0,0 +1,144 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/ai/settings": { + "get": { + "operationId": "getAiSettings", + "summary": "GET AI Settings", + "description": "Retrieve the saved AI writing settings. If an API key is stored, the response returns a masked value that exposes only the last 4 characters.", + "tags": [ + "AI" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "responses": { + "200": { + "description": "AI settings retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "settings": { + "type": "object", + "properties": { + "is_enabled": { + "type": "string", + "enum": [ + "yes", + "no" + ], + "description": "Whether AI writing is enabled." + }, + "provider": { + "type": "string", + "description": "Configured AI provider slug.", + "enum": [ + "", + "openai", + "claude", + "gemini" + ] + }, + "api_key": { + "type": "string", + "description": "Masked API key value, or an empty string if none is saved." + }, + "model": { + "type": "string", + "description": "Configured model identifier." + }, + "custom_prompt": { + "type": "string", + "description": "Additional system instructions appended to the built-in AI writing prompt." + } + }, + "required": [ + "is_enabled", + "provider", + "api_key", + "model", + "custom_prompt" + ] + } + }, + "required": [ + "settings" + ] + }, + "example": { + "settings": { + "is_enabled": "yes", + "provider": "openai", + "api_key": "****9x7K", + "model": "gpt-4o-mini", + "custom_prompt": "Keep the tone friendly and direct." + } + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/ai/save-ai-settings.json b/src/public/openapi/ai/save-ai-settings.json new file mode 100644 index 0000000..49157a0 --- /dev/null +++ b/src/public/openapi/ai/save-ai-settings.json @@ -0,0 +1,195 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/ai/settings": { + "post": { + "operationId": "saveAiSettings", + "summary": "POST Save AI Settings", + "description": "Save AI writing settings. The API key is encrypted before storage. If you send a masked key value starting with `****`, the existing stored key is preserved. Sending an empty `api_key` clears the saved key.", + "tags": [ + "AI" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "settings": { + "type": "object", + "properties": { + "is_enabled": { + "type": "string", + "enum": [ + "yes", + "no" + ], + "description": "Enable or disable AI writing. Any value other than `yes` is stored as `no`." + }, + "provider": { + "type": "string", + "enum": [ + "", + "openai", + "claude", + "gemini" + ], + "description": "AI provider slug." + }, + "model": { + "type": "string", + "description": "Model identifier for the selected provider." + }, + "api_key": { + "type": "string", + "description": "Raw API key to save, a masked key starting with `****` to keep the existing key, or an empty string to clear it." + }, + "custom_prompt": { + "type": "string", + "description": "Additional system instructions appended to the built-in writing prompt." + } + }, + "required": [ + "is_enabled", + "provider", + "model", + "api_key", + "custom_prompt" + ] + } + }, + "required": [ + "settings" + ] + }, + "example": { + "settings": { + "is_enabled": "yes", + "provider": "openai", + "model": "gpt-4o-mini", + "api_key": "sk-live-example", + "custom_prompt": "Keep the tone friendly and direct." + } + } + } + } + }, + "responses": { + "200": { + "description": "AI settings saved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ] + }, + "example": { + "message": "AI Writing settings saved successfully." + } + } + } + }, + "422": { + "description": "Validation error. Returned when the provider is invalid or the selected model is not allowed for the chosen provider.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "examples": { + "invalidProvider": { + "value": { + "message": "Invalid AI provider selected.", + "code": "rest_forbidden", + "data": { + "status": 422 + } + } + }, + "invalidModel": { + "value": { + "message": "Invalid model selected for this provider.", + "code": "rest_forbidden", + "data": { + "status": 422 + } + } + } + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/ai/test-ai-connection.json b/src/public/openapi/ai/test-ai-connection.json new file mode 100644 index 0000000..8f61e4f --- /dev/null +++ b/src/public/openapi/ai/test-ai-connection.json @@ -0,0 +1,175 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/ai/test": { + "post": { + "operationId": "testAiConnection", + "summary": "POST Test AI Connection", + "description": "Validate the configured AI provider, model, and API key by making a short test request to the provider API. If a masked API key beginning with `****` is provided, the saved key is reused.", + "tags": [ + "AI" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "settings": { + "type": "object", + "properties": { + "provider": { + "type": "string", + "enum": [ + "openai", + "claude", + "gemini" + ], + "description": "AI provider slug." + }, + "model": { + "type": "string", + "description": "Model identifier valid for the selected provider." + }, + "api_key": { + "type": "string", + "description": "Raw API key to test, or a masked value starting with `****` to reuse the stored key." + } + }, + "required": [ + "provider", + "model" + ] + } + }, + "required": [ + "settings" + ] + }, + "example": { + "settings": { + "provider": "openai", + "model": "gpt-4o-mini", + "api_key": "sk-live-example" + } + } + } + } + }, + "responses": { + "200": { + "description": "Connection test succeeded.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ] + }, + "example": { + "message": "Connection successful! Your API key is valid." + } + } + } + }, + "422": { + "description": "Validation or provider API error.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "examples": { + "missingProviderOrModel": { + "value": { + "message": "Please select a provider and model first.", + "data": { + "status": 422 + } + } + }, + "missingApiKey": { + "value": { + "message": "Please enter an API key.", + "data": { + "status": 422 + } + } + } + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/email-patterns/bulk-action-email-patterns.json b/src/public/openapi/email-patterns/bulk-action-email-patterns.json new file mode 100644 index 0000000..9d67292 --- /dev/null +++ b/src/public/openapi/email-patterns/bulk-action-email-patterns.json @@ -0,0 +1,178 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/email-patterns/do-bulk-action": { + "post": { + "operationId": "bulkActionEmailPatterns", + "summary": "POST Bulk Action Email Patterns", + "description": "Perform a bulk action on email patterns. Currently the only supported action is `delete_patterns`.", + "tags": [ + "Email Patterns" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "action_name" + ], + "properties": { + "action_name": { + "type": "string", + "enum": [ + "delete_patterns" + ], + "description": "The bulk action to perform." + }, + "pattern_ids": { + "type": "array", + "description": "Array of email pattern IDs to delete when `select_all` is not truthy.", + "items": { + "type": "integer" + } + }, + "select_all": { + "type": "boolean", + "description": "If true, deletes all patterns matching the optional `search` filter instead of only the provided `pattern_ids`." + }, + "search": { + "type": "string", + "description": "Optional search term used only with `select_all=true`." + } + } + }, + "examples": { + "deleteSelected": { + "summary": "Delete selected patterns", + "value": { + "action_name": "delete_patterns", + "pattern_ids": [ + 12, + 14, + 18 + ] + } + }, + "deleteAllMatching": { + "summary": "Delete all matching patterns", + "value": { + "action_name": "delete_patterns", + "select_all": true, + "search": "welcome" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Bulk action completed successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "example": { + "message": "3 pattern(s) deleted successfully" + } + } + } + }, + "400": { + "description": "Invalid action or no patterns selected.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "examples": { + "invalidAction": { + "summary": "Invalid action", + "value": { + "message": "Invalid action" + } + }, + "noSelection": { + "summary": "No patterns selected", + "value": { + "message": "No patterns selected" + } + } + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/email-patterns/create-email-pattern-category.json b/src/public/openapi/email-patterns/create-email-pattern-category.json new file mode 100644 index 0000000..f9bd937 --- /dev/null +++ b/src/public/openapi/email-patterns/create-email-pattern-category.json @@ -0,0 +1,155 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/email-patterns/categories": { + "post": { + "operationId": "createEmailPatternCategory", + "summary": "POST Create Email Pattern Category", + "description": "Create an email pattern category. If a category with the same slug already exists, the existing category is returned instead of creating a duplicate.", + "tags": [ + "Email Patterns" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string", + "description": "Category name." + } + } + }, + "example": { + "name": "Onboarding" + } + } + } + }, + "responses": { + "200": { + "description": "Category created successfully or existing matching category returned.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EmailPatternCategory" + }, + "example": { + "id": 3, + "count": 0, + "name": "Onboarding", + "slug": "onboarding", + "parent": 0 + } + } + } + }, + "400": { + "description": "Category name is missing.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "example": { + "message": "Category name is required" + } + } + } + } + } + } + } + }, + "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" + } + } + } + } + }, + "EmailPatternCategory": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Category ID." + }, + "count": { + "type": "integer", + "description": "Pattern count placeholder. Currently always `0` in this response." + }, + "name": { + "type": "string", + "description": "Category display name." + }, + "slug": { + "type": "string", + "description": "Sanitized category slug." + }, + "parent": { + "type": "integer", + "description": "Parent category ID. Currently always `0`." + } + } + } + }, + "securitySchemes": { + "ApplicationPasswords": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/email-patterns/create-email-pattern-wp-format.json b/src/public/openapi/email-patterns/create-email-pattern-wp-format.json new file mode 100644 index 0000000..a31be44 --- /dev/null +++ b/src/public/openapi/email-patterns/create-email-pattern-wp-format.json @@ -0,0 +1,277 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/email-patterns/wp-format": { + "post": { + "operationId": "createEmailPatternWpFormat", + "summary": "POST Create Email Pattern (WP Format)", + "description": "Create a reusable email pattern using the WordPress `wp_block`-style payload used by the FluentCRM editor middleware. If no title is provided, FluentCRM creates the pattern as `Untitled Pattern`. If both title and content are empty, the request is rejected.", + "tags": [ + "Email Patterns" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "raw": { + "type": "string" + } + } + } + ], + "description": "Pattern title. Supports plain string or editor-style `{ raw }` object." + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "raw": { + "type": "string" + } + } + } + ], + "description": "Pattern content. Supports plain string or editor-style `{ raw }` object." + }, + "meta": { + "type": "object", + "description": "WordPress editor metadata.", + "properties": { + "wp_pattern_sync_status": { + "type": "string", + "description": "Pattern sync status saved with the pattern." + } + } + }, + "wp_pattern_category": { + "type": "array", + "description": "WordPress-style category IDs that are resolved back to a category name.", + "items": { + "type": "integer" + } + } + } + }, + "example": { + "title": { + "raw": "Welcome Pattern" + }, + "content": { + "raw": "

Welcome to our newsletter.

" + }, + "meta": { + "wp_pattern_sync_status": "unsynced" + }, + "wp_pattern_category": [ + 3 + ] + } + } + } + }, + "responses": { + "200": { + "description": "Email pattern created successfully in WordPress block format.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/WpBlockEmailPattern" + }, + "example": { + "id": 13, + "date": "2026-04-28 16:20:00", + "date_gmt": "2026-04-28 16:20:00", + "modified": "2026-04-28 16:20:00", + "modified_gmt": "2026-04-28 16:20:00", + "slug": "fluentcrm/welcome-pattern-13", + "status": "publish", + "type": "wp_block", + "link": "", + "title": { + "raw": "Welcome Pattern" + }, + "content": { + "raw": "

Welcome to our newsletter.

", + "protected": false + }, + "meta": {}, + "wp_pattern_sync_status": "unsynced", + "wp_pattern_category": [ + 3 + ] + } + } + } + }, + "400": { + "description": "Both title and content were empty.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "example": { + "message": "Title or content is required" + } + } + } + } + } + } + } + }, + "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" + } + } + } + } + }, + "WpBlockEmailPattern": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Pattern ID." + }, + "date": { + "type": "string", + "description": "Creation timestamp." + }, + "date_gmt": { + "type": "string", + "description": "Creation timestamp in GMT." + }, + "modified": { + "type": "string", + "description": "Last modification timestamp." + }, + "modified_gmt": { + "type": "string", + "description": "Last modification timestamp in GMT." + }, + "slug": { + "type": "string", + "description": "Pattern slug." + }, + "status": { + "type": "string", + "description": "Always `publish` for this response shape." + }, + "type": { + "type": "string", + "description": "Always `wp_block`." + }, + "link": { + "type": "string", + "description": "Pattern link. Currently empty." + }, + "title": { + "type": "object", + "properties": { + "raw": { + "type": "string", + "description": "Raw pattern title." + } + } + }, + "content": { + "type": "object", + "properties": { + "raw": { + "type": "string", + "description": "Raw block content." + }, + "protected": { + "type": "boolean", + "description": "Whether the content is protected." + } + } + }, + "meta": { + "type": "object", + "description": "WordPress block metadata object." + }, + "wp_pattern_sync_status": { + "type": "string", + "description": "Pattern sync status." + }, + "wp_pattern_category": { + "type": "array", + "description": "Resolved WordPress-style category IDs.", + "items": { + "type": "integer" + } + } + } + } + }, + "securitySchemes": { + "ApplicationPasswords": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/email-patterns/create-email-pattern.json b/src/public/openapi/email-patterns/create-email-pattern.json new file mode 100644 index 0000000..de54432 --- /dev/null +++ b/src/public/openapi/email-patterns/create-email-pattern.json @@ -0,0 +1,231 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/email-patterns": { + "post": { + "operationId": "createEmailPattern", + "summary": "POST Create Email Pattern", + "description": "Create a reusable email pattern in FluentCRM. The title and content fields are required. The pattern is stored under the current user and receives an auto-generated `fluentcrm/...` slug.", + "tags": [ + "Email Patterns" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "title", + "content" + ], + "properties": { + "title": { + "type": "string", + "description": "Pattern title." + }, + "content": { + "type": "string", + "description": "Pattern HTML or block markup content." + }, + "category": { + "type": "string", + "description": "Optional category name." + }, + "description": { + "type": "string", + "description": "Optional pattern description." + }, + "sync_status": { + "type": "string", + "description": "Optional sync status value.", + "default": "unsynced" + } + } + }, + "example": { + "title": "Welcome Pattern", + "content": "

Welcome to our newsletter.

", + "category": "Onboarding", + "description": "Reusable onboarding email block.", + "sync_status": "unsynced" + } + } + } + }, + "responses": { + "200": { + "description": "Email pattern created successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "pattern": { + "$ref": "#/components/schemas/EmailPattern" + } + } + }, + "example": { + "message": "Pattern saved successfully", + "pattern": { + "id": 13, + "slug": "fluentcrm/welcome-pattern-13", + "title": "Welcome Pattern", + "content": "

Welcome to our newsletter.

", + "category": "Onboarding", + "description": "Reusable onboarding email block.", + "sync_status": "unsynced", + "created_at": "2026-04-28 15:20:00", + "updated_at": "2026-04-28 15:20:00" + } + } + } + } + }, + "422": { + "description": "Validation error. Returned when required fields are missing or invalid.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "errors": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + }, + "example": { + "message": "Unprocessable Entity!", + "errors": { + "title": [ + "The title field is required." + ], + "content": [ + "The content field is required." + ] + } + } + } + } + } + } + } + } + }, + "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" + } + } + } + } + }, + "EmailPattern": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Pattern ID." + }, + "slug": { + "type": "string", + "description": "Generated pattern slug." + }, + "title": { + "type": "string", + "description": "Pattern title." + }, + "content": { + "type": "string", + "description": "Pattern content HTML or block markup." + }, + "category": { + "type": "string", + "description": "Assigned category name." + }, + "description": { + "type": "string", + "description": "Pattern description." + }, + "sync_status": { + "type": "string", + "description": "Pattern sync status.", + "default": "unsynced" + }, + "created_at": { + "type": "string", + "description": "Pattern creation timestamp." + }, + "updated_at": { + "type": "string", + "description": "Pattern update timestamp." + } + } + } + }, + "securitySchemes": { + "ApplicationPasswords": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/email-patterns/delete-email-pattern-category.json b/src/public/openapi/email-patterns/delete-email-pattern-category.json new file mode 100644 index 0000000..d0900a0 --- /dev/null +++ b/src/public/openapi/email-patterns/delete-email-pattern-category.json @@ -0,0 +1,120 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/email-patterns/categories/{id}": { + "delete": { + "operationId": "deleteEmailPatternCategory", + "summary": "DELETE Delete Email Pattern Category", + "description": "Delete an email pattern category by its ID.", + "tags": [ + "Email Patterns" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The email pattern category ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Category deleted successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "example": { + "message": "Category deleted successfully" + } + } + } + }, + "404": { + "description": "Category not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "example": { + "message": "No query results for model" + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/email-patterns/delete-email-pattern.json b/src/public/openapi/email-patterns/delete-email-pattern.json new file mode 100644 index 0000000..f440a58 --- /dev/null +++ b/src/public/openapi/email-patterns/delete-email-pattern.json @@ -0,0 +1,120 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/email-patterns/{id}": { + "delete": { + "operationId": "deleteEmailPattern", + "summary": "DELETE Delete Email Pattern", + "description": "Delete a reusable email pattern by its ID.", + "tags": [ + "Email Patterns" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The email pattern ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Email pattern deleted successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + }, + "example": { + "message": "Pattern deleted successfully" + } + } + } + }, + "404": { + "description": "Email pattern not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "example": { + "message": "No query results for model" + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/email-patterns/get-email-pattern.json b/src/public/openapi/email-patterns/get-email-pattern.json new file mode 100644 index 0000000..a2ef54e --- /dev/null +++ b/src/public/openapi/email-patterns/get-email-pattern.json @@ -0,0 +1,172 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/email-patterns/{id}": { + "get": { + "operationId": "getEmailPattern", + "summary": "GET Get Email Pattern", + "description": "Retrieve a single reusable email pattern by its ID.", + "tags": [ + "Email Patterns" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The email pattern ID.", + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Email pattern retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "pattern": { + "$ref": "#/components/schemas/EmailPattern" + } + } + }, + "example": { + "pattern": { + "id": 12, + "slug": "fluentcrm/welcome-pattern-12", + "title": "Welcome Pattern", + "content": "

Welcome to our newsletter.

", + "category": "Onboarding", + "description": "Reusable onboarding email block.", + "sync_status": "unsynced", + "created_at": "2026-04-20 09:15:00", + "updated_at": "2026-04-21 11:30:00" + } + } + } + } + }, + "404": { + "description": "Email pattern not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "example": { + "message": "No query results for model" + } + } + } + } + } + } + } + }, + "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" + } + } + } + } + }, + "EmailPattern": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Pattern ID." + }, + "slug": { + "type": "string", + "description": "Generated pattern slug." + }, + "title": { + "type": "string", + "description": "Pattern title." + }, + "content": { + "type": "string", + "description": "Pattern content HTML or block markup." + }, + "category": { + "type": "string", + "description": "Assigned category name." + }, + "description": { + "type": "string", + "description": "Pattern description." + }, + "sync_status": { + "type": "string", + "description": "Pattern sync status.", + "default": "unsynced" + }, + "created_at": { + "type": "string", + "description": "Pattern creation timestamp." + }, + "updated_at": { + "type": "string", + "description": "Pattern update timestamp." + } + } + } + }, + "securitySchemes": { + "ApplicationPasswords": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/email-patterns/list-email-pattern-categories.json b/src/public/openapi/email-patterns/list-email-pattern-categories.json new file mode 100644 index 0000000..6c4b93d --- /dev/null +++ b/src/public/openapi/email-patterns/list-email-pattern-categories.json @@ -0,0 +1,105 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/email-patterns/categories": { + "get": { + "operationId": "listEmailPatternCategories", + "summary": "GET List Email Pattern Categories", + "description": "Retrieve the unique category names currently used by saved email patterns. The list is sorted alphabetically.", + "tags": [ + "Email Patterns" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "List of unique email pattern category names.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "categories": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Alphabetically sorted category names." + } + } + }, + "example": { + "categories": [ + "Announcements", + "Onboarding", + "Promotions" + ] + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/email-patterns/list-email-patterns-wp-format.json b/src/public/openapi/email-patterns/list-email-patterns-wp-format.json new file mode 100644 index 0000000..cbe86c3 --- /dev/null +++ b/src/public/openapi/email-patterns/list-email-patterns-wp-format.json @@ -0,0 +1,195 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/email-patterns/wp-format": { + "get": { + "operationId": "listEmailPatternsWpFormat", + "summary": "GET List Email Patterns (WP Format)", + "description": "Retrieve email patterns formatted like WordPress `wp_block` REST responses for the FluentCRM editor middleware.", + "tags": [ + "Email Patterns" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [], + "responses": { + "200": { + "description": "Email patterns in WordPress block REST format.", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/WpBlockEmailPattern" + } + }, + "example": [ + { + "id": 12, + "date": "2026-04-20 09:15:00", + "date_gmt": "2026-04-20 09:15:00", + "modified": "2026-04-21 11:30:00", + "modified_gmt": "2026-04-21 11:30:00", + "slug": "fluentcrm/welcome-pattern-12", + "status": "publish", + "type": "wp_block", + "link": "", + "title": { + "raw": "Welcome Pattern" + }, + "content": { + "raw": "

Welcome to our newsletter.

", + "protected": false + }, + "meta": {}, + "wp_pattern_sync_status": "unsynced", + "wp_pattern_category": [ + 3 + ] + } + ] + } + } + } + } + } + } + }, + "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" + } + } + } + } + }, + "WpBlockEmailPattern": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Pattern ID." + }, + "date": { + "type": "string", + "description": "Creation timestamp." + }, + "date_gmt": { + "type": "string", + "description": "Creation timestamp in GMT." + }, + "modified": { + "type": "string", + "description": "Last modification timestamp." + }, + "modified_gmt": { + "type": "string", + "description": "Last modification timestamp in GMT." + }, + "slug": { + "type": "string", + "description": "Pattern slug." + }, + "status": { + "type": "string", + "description": "Always `publish` for this response shape." + }, + "type": { + "type": "string", + "description": "Always `wp_block`." + }, + "link": { + "type": "string", + "description": "Pattern link. Currently empty." + }, + "title": { + "type": "object", + "properties": { + "raw": { + "type": "string", + "description": "Raw pattern title." + } + } + }, + "content": { + "type": "object", + "properties": { + "raw": { + "type": "string", + "description": "Raw block content." + }, + "protected": { + "type": "boolean", + "description": "Whether the content is protected." + } + } + }, + "meta": { + "type": "object", + "description": "WordPress block metadata object." + }, + "wp_pattern_sync_status": { + "type": "string", + "description": "Pattern sync status." + }, + "wp_pattern_category": { + "type": "array", + "description": "Resolved WordPress-style category IDs.", + "items": { + "type": "integer" + } + } + } + } + }, + "securitySchemes": { + "ApplicationPasswords": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/email-patterns/list-email-patterns.json b/src/public/openapi/email-patterns/list-email-patterns.json new file mode 100644 index 0000000..3ff7a03 --- /dev/null +++ b/src/public/openapi/email-patterns/list-email-patterns.json @@ -0,0 +1,196 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/email-patterns": { + "get": { + "operationId": "listEmailPatterns", + "summary": "GET List Email Patterns", + "description": "Retrieve paginated reusable email patterns stored in FluentCRM. Supports simple text search against the underlying pattern value payload and returns normalized pattern objects.", + "tags": [ + "Email Patterns" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Search term applied against the stored pattern value payload.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "in": "query", + "description": "Number of patterns per page.", + "required": false, + "schema": { + "type": "integer", + "default": 15 + } + }, + { + "name": "page", + "in": "query", + "description": "Page number for pagination.", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "responses": { + "200": { + "description": "Paginated list of email patterns.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "patterns": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/EmailPattern" + } + }, + "total": { + "type": "integer", + "description": "Total number of patterns matching the query." + } + } + } + } + }, + "example": { + "patterns": { + "data": [ + { + "id": 12, + "slug": "fluentcrm/welcome-pattern-12", + "title": "Welcome Pattern", + "content": "

Welcome to our newsletter.

", + "category": "Onboarding", + "description": "Reusable onboarding email block.", + "sync_status": "unsynced", + "created_at": "2026-04-20 09:15:00", + "updated_at": "2026-04-21 11:30:00" + } + ], + "total": 1 + } + } + } + } + } + } + } + } + }, + "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" + } + } + } + } + }, + "EmailPattern": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Pattern ID." + }, + "slug": { + "type": "string", + "description": "Generated pattern slug." + }, + "title": { + "type": "string", + "description": "Pattern title." + }, + "content": { + "type": "string", + "description": "Pattern content HTML or block markup." + }, + "category": { + "type": "string", + "description": "Assigned category name." + }, + "description": { + "type": "string", + "description": "Pattern description." + }, + "sync_status": { + "type": "string", + "description": "Pattern sync status.", + "default": "unsynced" + }, + "created_at": { + "type": "string", + "description": "Pattern creation timestamp." + }, + "updated_at": { + "type": "string", + "description": "Pattern update timestamp." + } + } + } + }, + "securitySchemes": { + "ApplicationPasswords": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/email-patterns/update-email-pattern.json b/src/public/openapi/email-patterns/update-email-pattern.json new file mode 100644 index 0000000..7fd909b --- /dev/null +++ b/src/public/openapi/email-patterns/update-email-pattern.json @@ -0,0 +1,256 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/email-patterns/{id}": { + "put": { + "operationId": "updateEmailPattern", + "summary": "PUT Update Email Pattern", + "description": "Update an existing reusable email pattern. Supports both the standard pattern fields and the WordPress editor-style fields used by the block editor middleware.", + "tags": [ + "Email Patterns" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "required": true, + "description": "The email pattern ID.", + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "title": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "raw": { + "type": "string" + } + } + } + ], + "description": "Updated pattern title. Supports plain string or editor-style `{ raw }` object." + }, + "content": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "raw": { + "type": "string" + } + } + } + ], + "description": "Updated pattern content. Supports plain string or editor-style `{ raw }` object." + }, + "category": { + "type": "string", + "description": "Category name." + }, + "wp_pattern_category": { + "type": "array", + "description": "WordPress-style category IDs. When present, overrides the plain `category` field.", + "items": { + "type": "integer" + } + }, + "description": { + "type": "string", + "description": "Pattern description." + }, + "sync_status": { + "type": "string", + "description": "Pattern sync status." + }, + "meta": { + "type": "object", + "description": "WordPress editor metadata.", + "properties": { + "wp_pattern_sync_status": { + "type": "string", + "description": "Sync status override from the block editor middleware." + } + } + } + } + }, + "example": { + "title": "Updated Welcome Pattern", + "content": "

Updated welcome message.

", + "category": "Onboarding", + "description": "Updated reusable onboarding block.", + "sync_status": "unsynced" + } + } + } + }, + "responses": { + "200": { + "description": "Email pattern updated successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "pattern": { + "$ref": "#/components/schemas/EmailPattern" + } + } + }, + "example": { + "message": "Pattern updated successfully", + "pattern": { + "id": 12, + "slug": "fluentcrm/updated-welcome-pattern-12", + "title": "Updated Welcome Pattern", + "content": "

Updated welcome message.

", + "category": "Onboarding", + "description": "Updated reusable onboarding block.", + "sync_status": "unsynced", + "created_at": "2026-04-20 09:15:00", + "updated_at": "2026-04-28 16:05:00" + } + } + } + } + }, + "404": { + "description": "Email pattern not found.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "example": { + "message": "No query results for model" + } + } + } + } + } + } + } + }, + "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" + } + } + } + } + }, + "EmailPattern": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Pattern ID." + }, + "slug": { + "type": "string", + "description": "Generated pattern slug." + }, + "title": { + "type": "string", + "description": "Pattern title." + }, + "content": { + "type": "string", + "description": "Pattern content HTML or block markup." + }, + "category": { + "type": "string", + "description": "Assigned category name." + }, + "description": { + "type": "string", + "description": "Pattern description." + }, + "sync_status": { + "type": "string", + "description": "Pattern sync status.", + "default": "unsynced" + }, + "created_at": { + "type": "string", + "description": "Pattern creation timestamp." + }, + "updated_at": { + "type": "string", + "description": "Pattern update timestamp." + } + } + } + }, + "securitySchemes": { + "ApplicationPasswords": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/public-bounce/handle-bounce-with-handle.json b/src/public/openapi/public-bounce/handle-bounce-with-handle.json index 4735dca..d19cbc3 100644 --- a/src/public/openapi/public-bounce/handle-bounce-with-handle.json +++ b/src/public/openapi/public-bounce/handle-bounce-with-handle.json @@ -26,8 +26,8 @@ "/public/bounce_handler/{service_name}/handle/{security_code}": { "post": { "operationId": "handleBounceWithHandle", - "summary": "POST Handle Bounce (with /handle/ path)", - "description": "Webhook endpoint for email service providers to report bounces, complaints, and unsubscribes. This is the variant with `/handle/` in the path. Accepts any HTTP method. Validates the security code and processes the bounce event for supported services. Custom services can be handled via the `fluent_crm_handle_bounce_{service_name}` filter.", + "summary": "Handle Bounce (with /handle/ path)", + "description": "Webhook endpoint for email service providers to report bounces, complaints, and unsubscribes. This is the variant with `/handle/` in the path. The FluentCRM router registers this route as `ANY`; it is represented as `POST` here because OpenAPI requires a concrete operation method. Validates the security code and processes the bounce event for built-in services. Custom services can be handled via the `fluent_crm_handle_bounce_{service_name}` filter.", "tags": [ "Public" ], @@ -36,22 +36,10 @@ { "name": "service_name", "in": "path", - "description": "Email service provider name.", + "description": "Email service provider name. Built-in handlers include `mailgun`, `pepipost`, `postmark`, `sendgrid`, `sparkpost`, `elasticemail`, `postalserver`, `smtp2go`, `brevo`, and `tosend`. Custom provider slugs are also allowed and can be handled with the `fluent_crm_handle_bounce_{service_name}` filter.", "required": true, "schema": { - "type": "string", - "enum": [ - "mailgun", - "pepipost", - "postmark", - "sendgrid", - "sparkpost", - "elasticemail", - "postalserver", - "smtp2go", - "brevo", - "tosend" - ] + "type": "string" } }, { @@ -79,42 +67,35 @@ }, "responses": { "200": { - "description": "Bounce processed successfully.", + "description": "Bounce request processed. The controller returns a success payload for valid requests, and also returns an error-shaped JSON body when the security code is invalid.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BounceResponse" - }, - "example": { - "success": 1, - "message": "recorded", - "service": "mailgun", - "result": "bounced", - "time": 1709312400 - } - } - } - }, - "401": { - "description": "Invalid security code.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "boolean", - "description": "Always false on authentication failure." + "oneOf": [ + { + "$ref": "#/components/schemas/BounceResponse" }, - "message": { - "type": "string", - "description": "Error message." + { + "$ref": "#/components/schemas/BounceErrorResponse" } - } + ] }, - "example": { - "status": false, - "message": "Invalid Data or Security Code" + "examples": { + "success": { + "value": { + "success": 1, + "message": "recorded", + "service": "mailgun", + "result": "bounced", + "time": 1709312400 + } + }, + "invalidSecurityCode": { + "value": { + "status": false, + "message": "Invalid Data or Security Code" + } + } } } } @@ -175,6 +156,23 @@ "description": "Unix timestamp when the bounce was processed." } } + }, + "BounceErrorResponse": { + "type": "object", + "properties": { + "status": { + "type": "boolean", + "description": "False when the security code is invalid." + }, + "message": { + "type": "string", + "description": "Error message returned by the bounce controller." + } + }, + "required": [ + "status", + "message" + ] } }, "securitySchemes": { @@ -186,4 +184,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/public/openapi/public-bounce/handle-bounce.json b/src/public/openapi/public-bounce/handle-bounce.json index 56e9892..e862cc1 100644 --- a/src/public/openapi/public-bounce/handle-bounce.json +++ b/src/public/openapi/public-bounce/handle-bounce.json @@ -26,8 +26,8 @@ "/public/bounce_handler/{service_name}/{security_code}": { "post": { "operationId": "handleBounce", - "summary": "POST Handle Bounce", - "description": "Webhook endpoint for email service providers to report bounces, complaints, and unsubscribes. This is the shorter path variant without `/handle/`. Accepts any HTTP method. Validates the security code and processes the bounce event for supported services. Custom services can be handled via the `fluent_crm_handle_bounce_{service_name}` filter.", + "summary": "Handle Bounce", + "description": "Webhook endpoint for email service providers to report bounces, complaints, and unsubscribes. This is the shorter path variant without `/handle/`. The FluentCRM router registers this route as `ANY`; it is represented as `POST` here because OpenAPI requires a concrete operation method. Validates the security code and processes the bounce event for built-in services. Custom services can be handled via the `fluent_crm_handle_bounce_{service_name}` filter.", "tags": [ "Public" ], @@ -36,22 +36,10 @@ { "name": "service_name", "in": "path", - "description": "Email service provider name.", + "description": "Email service provider name. Built-in handlers include `mailgun`, `pepipost`, `postmark`, `sendgrid`, `sparkpost`, `elasticemail`, `postalserver`, `smtp2go`, `brevo`, and `tosend`. Custom provider slugs are also allowed and can be handled with the `fluent_crm_handle_bounce_{service_name}` filter.", "required": true, "schema": { - "type": "string", - "enum": [ - "mailgun", - "pepipost", - "postmark", - "sendgrid", - "sparkpost", - "elasticemail", - "postalserver", - "smtp2go", - "brevo", - "tosend" - ] + "type": "string" } }, { @@ -79,42 +67,35 @@ }, "responses": { "200": { - "description": "Bounce processed successfully.", + "description": "Bounce request processed. The controller returns a success payload for valid requests, and also returns an error-shaped JSON body when the security code is invalid.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/BounceResponse" - }, - "example": { - "success": 1, - "message": "recorded", - "service": "sendgrid", - "result": "bounced", - "time": 1709312400 - } - } - } - }, - "401": { - "description": "Invalid security code.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "status": { - "type": "boolean", - "description": "Always false on authentication failure." + "oneOf": [ + { + "$ref": "#/components/schemas/BounceResponse" }, - "message": { - "type": "string", - "description": "Error message." + { + "$ref": "#/components/schemas/BounceErrorResponse" } - } + ] }, - "example": { - "status": false, - "message": "Invalid Data or Security Code" + "examples": { + "success": { + "value": { + "success": 1, + "message": "recorded", + "service": "sendgrid", + "result": "bounced", + "time": 1709312400 + } + }, + "invalidSecurityCode": { + "value": { + "status": false, + "message": "Invalid Data or Security Code" + } + } } } } @@ -175,6 +156,23 @@ "description": "Unix timestamp when the bounce was processed." } } + }, + "BounceErrorResponse": { + "type": "object", + "properties": { + "status": { + "type": "boolean", + "description": "False when the security code is invalid." + }, + "message": { + "type": "string", + "description": "Error message returned by the bounce controller." + } + }, + "required": [ + "status", + "message" + ] } }, "securitySchemes": { @@ -186,4 +184,4 @@ } } } -} \ No newline at end of file +} diff --git a/src/public/openapi/reports/get-automation-reports.json b/src/public/openapi/reports/get-automation-reports.json new file mode 100644 index 0000000..a5da5bf --- /dev/null +++ b/src/public/openapi/reports/get-automation-reports.json @@ -0,0 +1,359 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/reports/automations": { + "get": { + "operationId": "getAutomationReports", + "summary": "GET Automation Reports", + "description": "Retrieve paginated published automation funnels with aggregate subscriber counts, execution progress totals, recent subscriber entries, and a top-triggered automations summary.", + "tags": [ + "Reports" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "per_page", + "in": "query", + "description": "Number of automation records to return per page.", + "required": false, + "schema": { + "type": "integer", + "default": 15 + } + }, + { + "name": "page", + "in": "query", + "description": "Page number for pagination.", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "responses": { + "200": { + "description": "Automation reports retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "automations": { + "type": "object", + "description": "Paginated published automation funnels.", + "properties": { + "current_page": { + "type": "integer" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "published" + ] + }, + "trigger_name": { + "type": [ + "string", + "null" + ] + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "total_subscribers": { + "type": "integer" + }, + "completed_count": { + "type": "integer" + }, + "in_progress_count": { + "type": "integer" + }, + "last_run_at": { + "type": [ + "string", + "null" + ], + "format": "date-time" + }, + "recent_subscribers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "avatar": { + "type": [ + "string", + "null" + ] + }, + "entered_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "id", + "name", + "email", + "entered_at" + ] + } + } + }, + "required": [ + "id", + "title", + "status", + "total_subscribers", + "completed_count", + "in_progress_count", + "recent_subscribers" + ] + } + }, + "from": { + "type": [ + "integer", + "null" + ] + }, + "last_page": { + "type": "integer" + }, + "next_page_url": { + "type": [ + "string", + "null" + ] + }, + "path": { + "type": "string" + }, + "per_page": { + "type": "integer" + }, + "prev_page_url": { + "type": [ + "string", + "null" + ] + }, + "to": { + "type": [ + "integer", + "null" + ] + }, + "total": { + "type": "integer" + } + }, + "required": [ + "current_page", + "data", + "last_page", + "per_page", + "total" + ] + }, + "overview": { + "type": "object", + "description": "Aggregate automation report totals.", + "properties": { + "total": { + "type": "integer" + }, + "subscribers": { + "type": "integer" + }, + "completed": { + "type": "integer" + }, + "in_progress": { + "type": "integer" + } + }, + "required": [ + "total", + "subscribers", + "completed", + "in_progress" + ] + }, + "top_automations": { + "type": "array", + "description": "Top 5 published automations ranked by trigger count.", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "trigger_name": { + "type": [ + "string", + "null" + ] + }, + "trigger_count": { + "type": "integer" + } + }, + "required": [ + "id", + "title", + "trigger_count" + ] + } + } + }, + "required": [ + "automations", + "overview", + "top_automations" + ] + }, + "example": { + "automations": { + "current_page": 1, + "data": [ + { + "id": 7, + "title": "Welcome Funnel", + "status": "published", + "trigger_name": "List Applied", + "created_at": "2026-03-01 09:00:00", + "total_subscribers": 420, + "completed_count": 280, + "in_progress_count": 95, + "last_run_at": "2026-04-28 08:20:00", + "recent_subscribers": [ + { + "id": 12, + "name": "Jane Doe", + "email": "jane@example.com", + "avatar": null, + "entered_at": "2026-04-28 08:20:00" + } + ] + } + ], + "from": 1, + "last_page": 1, + "next_page_url": null, + "path": "https://yourdomain.com/wp-json/fluent-crm/v2/reports/automations", + "per_page": 15, + "prev_page_url": null, + "to": 1, + "total": 1 + }, + "overview": { + "total": 8, + "subscribers": 1640, + "completed": 950, + "in_progress": 311 + }, + "top_automations": [ + { + "id": 7, + "title": "Welcome Funnel", + "trigger_name": "List Applied", + "trigger_count": 420 + } + ] + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/reports/get-automation-step-report.json b/src/public/openapi/reports/get-automation-step-report.json new file mode 100644 index 0000000..e53361b --- /dev/null +++ b/src/public/openapi/reports/get-automation-step-report.json @@ -0,0 +1,251 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/reports/automations/{id}/steps": { + "get": { + "operationId": "getAutomationStepReport", + "summary": "GET Automation Step Report", + "description": "Retrieve a published automation funnel and its step-by-step performance metrics, including counts, drop-offs, and revenue data for email steps.", + "tags": [ + "Reports" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Automation funnel ID.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Automation step report retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "funnel": { + "type": "object", + "description": "Automation funnel record.", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "status": { + "type": "string" + }, + "trigger_name": { + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "title" + ] + }, + "stats": { + "type": "object", + "description": "Step-by-step performance metrics for the funnel.", + "properties": { + "metrics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "count": { + "type": "integer" + }, + "sequence_id": { + "type": "integer" + }, + "type": { + "type": "string" + }, + "percent": { + "type": "integer" + }, + "percent_text": { + "type": "integer" + }, + "previous_step_count": { + "type": "integer" + }, + "drop_count": { + "type": "integer" + }, + "drop_percent": { + "type": "integer" + }, + "revenues": { + "type": "array", + "items": { + "type": "string" + } + }, + "link_clicks": { + "type": "integer" + }, + "email_opens": { + "type": "integer" + } + }, + "required": [ + "label", + "count", + "sequence_id", + "type", + "percent", + "percent_text", + "previous_step_count", + "drop_count", + "drop_percent" + ] + } + }, + "total_revenue": { + "type": "number" + }, + "total_revenue_formatted": { + "type": "string" + }, + "revenue_currency": { + "type": "string" + } + }, + "required": [ + "metrics", + "total_revenue", + "total_revenue_formatted", + "revenue_currency" + ] + } + }, + "required": [ + "funnel", + "stats" + ] + }, + "example": { + "funnel": { + "id": 7, + "title": "Welcome Funnel", + "status": "published", + "trigger_name": "List Applied" + }, + "stats": { + "metrics": [ + { + "label": "Entrance", + "count": 420, + "sequence_id": 0, + "type": "root", + "percent": 100, + "percent_text": 100, + "previous_step_count": 420, + "drop_count": 0, + "drop_percent": 0 + }, + { + "label": "Send Welcome Email", + "count": 390, + "sequence_id": 22, + "type": "email", + "percent": 93, + "percent_text": 93, + "previous_step_count": 420, + "drop_count": 30, + "drop_percent": 7, + "revenues": [ + "USD 240.00" + ], + "link_clicks": 118, + "email_opens": 260 + } + ], + "total_revenue": 240, + "total_revenue_formatted": "240.00", + "revenue_currency": "USD" + } + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/reports/get-campaign-options.json b/src/public/openapi/reports/get-campaign-options.json new file mode 100644 index 0000000..3c34b18 --- /dev/null +++ b/src/public/openapi/reports/get-campaign-options.json @@ -0,0 +1,147 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/reports/campaign-options": { + "get": { + "operationId": "getCampaignOptions", + "summary": "GET Campaign Options", + "description": "Retrieve archived campaign options for selectors and filters. Supports optional title search and result limiting.", + "tags": [ + "Reports" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Search archived campaigns by title.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "per_page", + "in": "query", + "description": "Maximum number of campaign options to return.", + "required": false, + "schema": { + "type": "integer", + "default": 50 + } + } + ], + "responses": { + "200": { + "description": "Campaign options retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "options": { + "type": "array", + "description": "Archived campaign option list.", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Campaign ID." + }, + "title": { + "type": "string", + "description": "Campaign title." + } + }, + "required": [ + "id", + "title" + ] + } + } + }, + "required": [ + "options" + ] + }, + "example": { + "options": [ + { + "id": 14, + "title": "Spring Promotion" + }, + { + "id": 11, + "title": "Welcome Series Wrap-up" + } + ] + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/reports/get-campaigns-list.json b/src/public/openapi/reports/get-campaigns-list.json new file mode 100644 index 0000000..660e067 --- /dev/null +++ b/src/public/openapi/reports/get-campaigns-list.json @@ -0,0 +1,268 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/reports/campaigns-list": { + "get": { + "operationId": "getCampaignsList", + "summary": "GET Campaigns List", + "description": "Retrieve a paginated list of archived campaigns ordered by last update time. Each campaign in the response includes a computed `stats` object.", + "tags": [ + "Reports" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "per_page", + "in": "query", + "description": "Number of archived campaigns to return per page.", + "required": false, + "schema": { + "type": "integer", + "default": 15 + } + }, + { + "name": "page", + "in": "query", + "description": "Page number for pagination.", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "responses": { + "200": { + "description": "Archived campaigns retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "campaigns": { + "type": "object", + "description": "Paginated archived campaign results.", + "properties": { + "current_page": { + "type": "integer" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "status": { + "type": "string", + "enum": [ + "archived" + ] + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "stats": { + "type": "object", + "description": "Computed email performance summary for the campaign.", + "properties": { + "total": { + "type": "integer" + }, + "sent": { + "type": "integer" + }, + "clicks": { + "type": "integer" + }, + "views": { + "type": "integer" + }, + "unsubscribers": { + "type": "integer" + }, + "revenue": { + "type": "object", + "properties": { + "label": { + "type": "string" + }, + "total": { + "type": "string" + }, + "currency": { + "type": "string" + } + } + } + }, + "required": [ + "total", + "sent", + "clicks", + "views", + "unsubscribers" + ] + } + }, + "required": [ + "id", + "title", + "status", + "updated_at", + "stats" + ] + } + }, + "from": { + "type": [ + "integer", + "null" + ] + }, + "last_page": { + "type": "integer" + }, + "next_page_url": { + "type": [ + "string", + "null" + ] + }, + "path": { + "type": "string" + }, + "per_page": { + "type": "integer" + }, + "prev_page_url": { + "type": [ + "string", + "null" + ] + }, + "to": { + "type": [ + "integer", + "null" + ] + }, + "total": { + "type": "integer" + } + }, + "required": [ + "current_page", + "data", + "last_page", + "per_page", + "total" + ] + } + }, + "required": [ + "campaigns" + ] + }, + "example": { + "campaigns": { + "current_page": 1, + "data": [ + { + "id": 14, + "title": "Spring Promotion", + "status": "archived", + "updated_at": "2026-04-18 14:12:00", + "stats": { + "total": 1200, + "sent": 1187, + "clicks": 214, + "views": 603, + "unsubscribers": 9 + } + } + ], + "from": 1, + "last_page": 2, + "next_page_url": "https://yourdomain.com/wp-json/fluent-crm/v2/reports/campaigns-list?page=2", + "path": "https://yourdomain.com/wp-json/fluent-crm/v2/reports/campaigns-list", + "per_page": 15, + "prev_page_url": null, + "to": 15, + "total": 19 + } + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/reports/get-contacts-by-country.json b/src/public/openapi/reports/get-contacts-by-country.json new file mode 100644 index 0000000..92a063e --- /dev/null +++ b/src/public/openapi/reports/get-contacts-by-country.json @@ -0,0 +1,130 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/reports/contacts-by-country": { + "get": { + "operationId": "getContactsByCountry", + "summary": "GET Contacts by Country", + "description": "Retrieve contact totals grouped by normalized uppercase country code.", + "tags": [ + "Reports" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "responses": { + "200": { + "description": "Contact counts by country retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "countries": { + "type": "array", + "description": "Contact totals grouped by country code.", + "items": { + "type": "object", + "properties": { + "country_code": { + "type": "string", + "description": "Uppercase ISO-like country code stored on the contact." + }, + "contact_count": { + "type": "integer", + "description": "Number of contacts in that country." + } + }, + "required": [ + "country_code", + "contact_count" + ] + } + } + }, + "required": [ + "countries" + ] + }, + "example": { + "countries": [ + { + "country_code": "US", + "contact_count": 320 + }, + { + "country_code": "BD", + "contact_count": 87 + }, + { + "country_code": "GB", + "contact_count": 42 + } + ] + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/reports/get-contacts-by-lists.json b/src/public/openapi/reports/get-contacts-by-lists.json new file mode 100644 index 0000000..6c621b1 --- /dev/null +++ b/src/public/openapi/reports/get-contacts-by-lists.json @@ -0,0 +1,217 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/reports/contacts-by-lists": { + "get": { + "operationId": "getContactsByLists", + "summary": "GET Contacts by Lists", + "description": "Retrieve a paginated list of mailing lists with the number of contacts assigned to each list, sorted by contact count descending.", + "tags": [ + "Reports" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "per_page", + "in": "query", + "description": "Number of list rows to return per page.", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "page", + "in": "query", + "description": "Page number for pagination.", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "responses": { + "200": { + "description": "List contact counts retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "lists": { + "type": "object", + "description": "Paginated list results.", + "properties": { + "current_page": { + "type": "integer" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "List ID." + }, + "title": { + "type": "string", + "description": "List title." + }, + "contact_count": { + "type": "integer", + "description": "Number of contacts assigned to the list." + } + }, + "required": [ + "id", + "title", + "contact_count" + ] + } + }, + "from": { + "type": [ + "integer", + "null" + ] + }, + "last_page": { + "type": "integer" + }, + "next_page_url": { + "type": [ + "string", + "null" + ] + }, + "path": { + "type": "string" + }, + "per_page": { + "type": "integer" + }, + "prev_page_url": { + "type": [ + "string", + "null" + ] + }, + "to": { + "type": [ + "integer", + "null" + ] + }, + "total": { + "type": "integer" + } + }, + "required": [ + "current_page", + "data", + "last_page", + "per_page", + "total" + ] + } + }, + "required": [ + "lists" + ] + }, + "example": { + "lists": { + "current_page": 1, + "data": [ + { + "id": 2, + "title": "Customers", + "contact_count": 312 + }, + { + "id": 5, + "title": "Product Updates", + "contact_count": 146 + } + ], + "from": 1, + "last_page": 2, + "next_page_url": "https://yourdomain.com/wp-json/fluent-crm/v2/reports/contacts-by-lists?page=2", + "path": "https://yourdomain.com/wp-json/fluent-crm/v2/reports/contacts-by-lists", + "per_page": 20, + "prev_page_url": null, + "to": 20, + "total": 27 + } + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/reports/get-contacts-by-status.json b/src/public/openapi/reports/get-contacts-by-status.json new file mode 100644 index 0000000..6ddfd92 --- /dev/null +++ b/src/public/openapi/reports/get-contacts-by-status.json @@ -0,0 +1,136 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/reports/contacts-by-status": { + "get": { + "operationId": "getContactsByStatus", + "summary": "GET Contacts by Status", + "description": "Retrieve total contact counts grouped by subscriber status.", + "tags": [ + "Reports" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "responses": { + "200": { + "description": "Contact counts by status retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "stats": { + "type": "array", + "description": "Subscriber totals grouped by status.", + "items": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "Subscriber status slug." + }, + "count": { + "type": "integer", + "description": "Number of contacts in that status." + } + }, + "required": [ + "status", + "count" + ] + } + }, + "total": { + "type": "integer", + "description": "Total number of contacts across all statuses." + } + }, + "required": [ + "stats", + "total" + ] + }, + "example": { + "stats": [ + { + "status": "subscribed", + "count": 1200 + }, + { + "status": "pending", + "count": 35 + }, + { + "status": "unsubscribed", + "count": 18 + } + ], + "total": 1253 + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/reports/get-contacts-by-tags.json b/src/public/openapi/reports/get-contacts-by-tags.json new file mode 100644 index 0000000..0ea324f --- /dev/null +++ b/src/public/openapi/reports/get-contacts-by-tags.json @@ -0,0 +1,217 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/reports/contacts-by-tags": { + "get": { + "operationId": "getContactsByTags", + "summary": "GET Contacts by Tags", + "description": "Retrieve a paginated list of tags with the number of contacts assigned to each tag, sorted by contact count descending.", + "tags": [ + "Reports" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "per_page", + "in": "query", + "description": "Number of tag rows to return per page.", + "required": false, + "schema": { + "type": "integer", + "default": 20 + } + }, + { + "name": "page", + "in": "query", + "description": "Page number for pagination.", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + } + ], + "responses": { + "200": { + "description": "Tag contact counts retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "object", + "description": "Paginated tag results.", + "properties": { + "current_page": { + "type": "integer" + }, + "data": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Tag ID." + }, + "title": { + "type": "string", + "description": "Tag title." + }, + "contact_count": { + "type": "integer", + "description": "Number of contacts assigned to the tag." + } + }, + "required": [ + "id", + "title", + "contact_count" + ] + } + }, + "from": { + "type": [ + "integer", + "null" + ] + }, + "last_page": { + "type": "integer" + }, + "next_page_url": { + "type": [ + "string", + "null" + ] + }, + "path": { + "type": "string" + }, + "per_page": { + "type": "integer" + }, + "prev_page_url": { + "type": [ + "string", + "null" + ] + }, + "to": { + "type": [ + "integer", + "null" + ] + }, + "total": { + "type": "integer" + } + }, + "required": [ + "current_page", + "data", + "last_page", + "per_page", + "total" + ] + } + }, + "required": [ + "tags" + ] + }, + "example": { + "tags": { + "current_page": 1, + "data": [ + { + "id": 3, + "title": "VIP", + "contact_count": 245 + }, + { + "id": 7, + "title": "Newsletter", + "contact_count": 188 + } + ], + "from": 1, + "last_page": 3, + "next_page_url": "https://yourdomain.com/wp-json/fluent-crm/v2/reports/contacts-by-tags?page=2", + "path": "https://yourdomain.com/wp-json/fluent-crm/v2/reports/contacts-by-tags", + "per_page": 20, + "prev_page_url": null, + "to": 20, + "total": 42 + } + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/reports/get-email-unsub-stats.json b/src/public/openapi/reports/get-email-unsub-stats.json new file mode 100644 index 0000000..43ed5a5 --- /dev/null +++ b/src/public/openapi/reports/get-email-unsub-stats.json @@ -0,0 +1,123 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/reports/email-unsubs": { + "get": { + "operationId": "getEmailUnsubStats", + "summary": "GET Email Unsubscribe Stats", + "description": "Retrieve email unsubscribe statistics over a date range. Returns a date-keyed object where each key is a date (or month label) and the value is the count of unsubscribes recorded on that date. The frequency is automatically determined by the length of the date range.", + "tags": [ + "Reports" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "date_range", + "in": "query", + "description": "Date range as a two-element array `[from, to]` in `YYYY-MM-DD` format. Defaults to the last 30 days if omitted.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string", + "format": "date" + }, + "minItems": 2, + "maxItems": 2 + }, + "style": "form", + "explode": true + } + ], + "responses": { + "200": { + "description": "Email unsubscribe stats retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "stats": { + "type": "object", + "description": "Date-keyed object. Keys are `YYYY-MM-DD` (daily/weekly) or `Mon YYYY` (monthly). Values are unsubscribe counts.", + "additionalProperties": { + "type": "integer" + } + } + } + }, + "example": { + "stats": { + "2026-04-01": 3, + "2026-04-02": 1, + "2026-04-03": 4 + } + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/reports/get-recent-tags.json b/src/public/openapi/reports/get-recent-tags.json new file mode 100644 index 0000000..705fe8d --- /dev/null +++ b/src/public/openapi/reports/get-recent-tags.json @@ -0,0 +1,153 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/reports/recent-tags": { + "get": { + "operationId": "getRecentTags", + "summary": "GET Recent Tags", + "description": "Retrieve the most recently created tags along with how many contacts are assigned to each tag.", + "tags": [ + "Reports" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "per_page", + "in": "query", + "description": "Maximum number of recent tags to return.", + "required": false, + "schema": { + "type": "integer", + "default": 5 + } + } + ], + "responses": { + "200": { + "description": "Recent tags retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "description": "Most recently created tags.", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer", + "description": "Tag ID." + }, + "title": { + "type": "string", + "description": "Tag title." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "Tag creation timestamp." + }, + "contact_count": { + "type": "integer", + "description": "Number of contacts assigned to the tag." + } + }, + "required": [ + "id", + "title", + "created_at", + "contact_count" + ] + } + } + }, + "required": [ + "tags" + ] + }, + "example": { + "tags": [ + { + "id": 21, + "title": "New Leads", + "created_at": "2026-04-20 11:32:00", + "contact_count": 43 + }, + { + "id": 20, + "title": "Webinar April", + "created_at": "2026-04-18 09:10:00", + "contact_count": 112 + } + ] + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/reports/get-top-campaigns.json b/src/public/openapi/reports/get-top-campaigns.json new file mode 100644 index 0000000..9f79081 --- /dev/null +++ b/src/public/openapi/reports/get-top-campaigns.json @@ -0,0 +1,184 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/reports/top-campaigns": { + "get": { + "operationId": "getTopCampaigns", + "summary": "GET Top Campaigns", + "description": "Retrieve the top archived campaigns ranked by `open_rate`, `click_rate`, or `total_sent`. Requires FluentCampaign Pro.", + "tags": [ + "Reports" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "sort_by", + "in": "query", + "description": "Ranking metric. Any unsupported value falls back to `open_rate`.", + "required": false, + "schema": { + "type": "string", + "default": "open_rate", + "enum": [ + "open_rate", + "click_rate", + "total_sent" + ] + } + }, + { + "name": "per_page", + "in": "query", + "description": "Maximum number of top campaigns to return.", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + } + ], + "responses": { + "200": { + "description": "Top campaign report retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "campaigns": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "updated_at": { + "type": "string", + "format": "date-time" + }, + "total_sent": { + "type": "integer", + "description": "Total number of sent emails counted for the campaign." + }, + "open_rate": { + "type": "number", + "description": "Open rate percentage." + }, + "click_rate": { + "type": "number", + "description": "Click rate percentage." + } + }, + "required": [ + "id", + "title", + "updated_at", + "total_sent", + "open_rate", + "click_rate" + ] + } + }, + "available": { + "type": "boolean", + "description": "Always `true` when the Pro report is available." + } + }, + "required": [ + "campaigns", + "available" + ] + }, + "example": { + "campaigns": [ + { + "id": 14, + "title": "Spring Promotion", + "updated_at": "2026-04-18 14:12:00", + "total_sent": 1187, + "open_rate": 54.43, + "click_rate": 18.03 + }, + { + "id": 11, + "title": "Welcome Series Wrap-up", + "updated_at": "2026-04-09 11:05:00", + "total_sent": 930, + "open_rate": 48.17, + "click_rate": 15.91 + } + ], + "available": true + } + } + } + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/sequences/update-sequence-email-delay.json b/src/public/openapi/sequences/update-sequence-email-delay.json new file mode 100644 index 0000000..517c421 --- /dev/null +++ b/src/public/openapi/sequences/update-sequence-email-delay.json @@ -0,0 +1,206 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/sequences/{id}/email/{email_id}/delay": { + "patch": { + "operationId": "updateSequenceEmailDelay", + "summary": "PATCH Update Sequence Email Delay", + "description": "Update the wait time for a sequence email. The route accepts top-level `delay` and `delay_unit` values and stores them in `email.settings.timings`. Requires FluentCampaign Pro.", + "tags": [ + "Sequences" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "Parent sequence ID.", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "email_id", + "in": "path", + "description": "Sequence email ID.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "delay": { + "type": "string", + "description": "Delay amount to store in `settings.timings.delay`. The controller sanitizes this as text and defaults to `0` when omitted." + }, + "delay_unit": { + "type": "string", + "description": "Delay unit to store in `settings.timings.delay_unit`. Allowed values in code are `minutes`, `hours`, `days`, `weeks`, and `Months`. Any other value falls back to `days`.", + "enum": [ + "minutes", + "hours", + "days", + "weeks", + "Months" + ] + } + } + }, + "example": { + "delay": "3", + "delay_unit": "days" + } + } + } + }, + "responses": { + "200": { + "description": "Sequence email delay updated successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "email": { + "$ref": "#/components/schemas/SequenceEmail" + } + }, + "required": [ + "message", + "email" + ] + }, + "example": { + "message": "Wait time has been updated", + "email": { + "id": 12, + "parent_id": 4, + "email_subject": "Day 3 Follow-up", + "settings": { + "timings": { + "delay": "3", + "delay_unit": "days" + } + } + } + } + } + } + } + } + } + } + }, + "components": { + "schemas": { + "SequenceEmail": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "parent_id": { + "type": "integer" + }, + "title": { + "type": "string" + }, + "email_subject": { + "type": "string" + }, + "email_pre_header": { + "type": "string" + }, + "email_body": { + "type": "string" + }, + "design_template": { + "type": "string" + }, + "template_id": { + "type": "integer" + }, + "settings": { + "type": "object", + "additionalProperties": true + }, + "created_at": { + "type": "string", + "format": "date-time" + }, + "updated_at": { + "type": "string", + "format": "date-time" + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/sms/un-schedule-sms-campaign.json b/src/public/openapi/sms/un-schedule-sms-campaign.json new file mode 100644 index 0000000..36e3148 --- /dev/null +++ b/src/public/openapi/sms/un-schedule-sms-campaign.json @@ -0,0 +1,116 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/sms/campaigns/{id}/un-schedule": { + "post": { + "operationId": "unScheduleSmsCampaignLegacy", + "summary": "POST Un-schedule SMS Campaign", + "description": "Legacy alias for unscheduling a previously scheduled SMS campaign. This route calls the same controller action as `POST /sms/campaigns/{id}/unschedule`, reverting the campaign to `draft` status and deleting generated SMS messages. **PRO** (requires FluentCampaign Pro SMS module).", + "tags": [ + "SMS" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "SMS campaign ID.", + "required": true, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Campaign unscheduled successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + }, + "required": [ + "message" + ] + }, + "example": { + "message": "SMS Campaign has been successfully un-scheduled" + } + } + } + }, + "404": { + "description": "Campaign not found." + }, + "422": { + "description": "Campaign is not in a valid state for unscheduling." + } + } + } + } + }, + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/subscribers-export/get-subscribers-export-page.json b/src/public/openapi/subscribers-export/get-subscribers-export-page.json new file mode 100644 index 0000000..8ab1274 --- /dev/null +++ b/src/public/openapi/subscribers-export/get-subscribers-export-page.json @@ -0,0 +1,362 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/subscribers-export": { + "get": { + "operationId": "getSubscribersExportPage", + "summary": "GET Subscribers Export Page", + "description": "Retrieve one page of export-ready subscriber rows. This legacy `GET` route is kept for backward compatibility, but `POST /subscribers-export` is preferred because filter payloads can exceed URL limits. Requires FluentCampaign Pro.", + "tags": [ + "Subscribers Export" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "parameters": [ + { + "name": "columns[]", + "in": "query", + "description": "Columns to export. Must be a non-empty array.", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "custom_fields[]", + "in": "query", + "description": "Custom field keys to include in the export.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "commerce_columns[]", + "in": "query", + "description": "Commerce-related export columns.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "company_ids[]", + "in": "query", + "description": "Company IDs to filter by.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "page", + "in": "query", + "description": "Export page number. Each page contains up to 500 rows.", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "filter_type", + "in": "query", + "description": "Filter mode. Use `simple` for tags/lists/statuses filters or `advanced` for raw filter groups.", + "required": false, + "schema": { + "type": "string", + "default": "simple", + "enum": [ + "simple", + "advanced" + ] + } + }, + { + "name": "search", + "in": "query", + "description": "Search term for subscriber lookup.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "sort_by", + "in": "query", + "description": "Sort column.", + "required": false, + "schema": { + "type": "string", + "default": "id" + } + }, + { + "name": "sort_type", + "in": "query", + "description": "Sort direction.", + "required": false, + "schema": { + "type": "string", + "default": "DESC", + "enum": [ + "ASC", + "DESC" + ] + } + }, + { + "name": "has_commerce", + "in": "query", + "description": "Whether to restrict the export to contacts with commerce data.", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "contact_ids[]", + "in": "query", + "description": "Specific contact IDs to export.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "advanced_filters", + "in": "query", + "description": "Raw advanced filter groups when `filter_type=advanced`.", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "tags[]", + "in": "query", + "description": "Tag filters for simple mode.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "statuses[]", + "in": "query", + "description": "Subscriber statuses for simple mode.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "lists[]", + "in": "query", + "description": "List filters for simple mode.", + "required": false, + "schema": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + { + "name": "limit", + "in": "query", + "description": "Optional user-facing export limit, capped at 100000 rows.", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "description": "Optional starting offset.", + "required": false, + "schema": { + "type": "integer" + } + } + ], + "responses": { + "200": { + "description": "Export page retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "page": { + "type": "integer" + }, + "total": { + "type": "integer", + "description": "Total exportable contacts. Returned on page 1." + }, + "headers": { + "type": "array", + "description": "Export column labels. Returned on page 1.", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": [ + "string", + "number", + "boolean", + "null" + ] + } + } + }, + "has_more": { + "type": "boolean" + } + }, + "required": [ + "page", + "rows", + "has_more" + ] + }, + "example": { + "page": 1, + "total": 1225, + "headers": [ + "ID", + "Email", + "First Name", + "Tags" + ], + "rows": [ + [ + 42, + "jane@example.com", + "Jane", + "VIP, Customers" + ], + [ + 43, + "john@example.com", + "John", + "Newsletter" + ] + ], + "has_more": true + } + } + } + }, + "400": { + "description": "Invalid export request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "No contacts matched the export query.", + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/subscribers-export/post-subscribers-export-page.json b/src/public/openapi/subscribers-export/post-subscribers-export-page.json new file mode 100644 index 0000000..645cb49 --- /dev/null +++ b/src/public/openapi/subscribers-export/post-subscribers-export-page.json @@ -0,0 +1,290 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/subscribers-export": { + "post": { + "operationId": "postSubscribersExportPage", + "summary": "POST Subscribers Export Page", + "description": "Retrieve one page of export-ready subscriber rows using a request body. This is the preferred export endpoint because filter payloads can exceed URL limits. Requires FluentCampaign Pro.", + "tags": [ + "Subscribers Export" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "columns": { + "type": "array", + "description": "Columns to export. Must be a non-empty array.", + "items": { + "type": "string" + } + }, + "custom_fields": { + "type": "array", + "description": "Custom field keys to include in the export.", + "items": { + "type": "string" + } + }, + "commerce_columns": { + "type": "array", + "description": "Commerce-related export columns.", + "items": { + "type": "string" + } + }, + "company_ids": { + "type": "array", + "description": "Company IDs to filter by.", + "items": { + "type": "integer" + } + }, + "page": { + "type": "integer", + "default": 1 + }, + "filter_type": { + "type": "string", + "default": "simple", + "enum": [ + "simple", + "advanced" + ] + }, + "search": { + "type": "string" + }, + "sort_by": { + "type": "string", + "default": "id" + }, + "sort_type": { + "type": "string", + "default": "DESC", + "enum": [ + "ASC", + "DESC" + ] + }, + "has_commerce": { + "type": "boolean" + }, + "contact_ids": { + "type": "array", + "items": { + "type": "integer" + } + }, + "advanced_filters": { + "type": "string", + "description": "Raw advanced filter groups when `filter_type=advanced`." + }, + "tags": { + "type": "array", + "items": { + "type": "integer" + } + }, + "statuses": { + "type": "array", + "items": { + "type": "string" + } + }, + "lists": { + "type": "array", + "items": { + "type": "integer" + } + }, + "limit": { + "type": "integer", + "description": "Optional user-facing export limit, capped at 100000 rows." + }, + "offset": { + "type": "integer", + "description": "Optional starting offset." + } + }, + "required": [ + "columns" + ] + }, + "example": { + "columns": [ + "id", + "email", + "first_name", + "tags" + ], + "page": 1, + "filter_type": "simple", + "statuses": [ + "subscribed" + ], + "lists": [ + 3 + ] + } + } + } + }, + "responses": { + "200": { + "description": "Export page retrieved successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "page": { + "type": "integer" + }, + "total": { + "type": "integer", + "description": "Total exportable contacts. Returned on page 1." + }, + "headers": { + "type": "array", + "description": "Export column labels. Returned on page 1.", + "items": { + "type": "string" + } + }, + "rows": { + "type": "array", + "items": { + "type": "array", + "items": { + "type": [ + "string", + "number", + "boolean", + "null" + ] + } + } + }, + "has_more": { + "type": "boolean" + } + }, + "required": [ + "page", + "rows", + "has_more" + ] + }, + "example": { + "page": 1, + "total": 1225, + "headers": [ + "ID", + "Email", + "First Name", + "Tags" + ], + "rows": [ + [ + 42, + "jane@example.com", + "Jane", + "VIP, Customers" + ] + ], + "has_more": true + } + } + } + }, + "400": { + "description": "Invalid export request.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "404": { + "description": "No contacts matched the export query.", + "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 — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/public/openapi/templates/get-built-in-template.json b/src/public/openapi/templates/get-built-in-template.json new file mode 100644 index 0000000..bf6a0a8 --- /dev/null +++ b/src/public/openapi/templates/get-built-in-template.json @@ -0,0 +1,250 @@ +{ + "openapi": "3.0.4", + "info": { + "title": "FluentCRM API", + "description": "Complete REST API documentation for FluentCRM — 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": { + "/templates/built-in-template": { + "post": { + "operationId": "getBuiltInTemplate", + "summary": "POST Fetch Built-In Template", + "description": "Download a single built-in template from an allowed remote FluentCRM template URL and return it in FluentCRM's local template payload shape without saving it as a WordPress template.", + "tags": [ + "Templates" + ], + "security": [ + { + "ApplicationPasswords": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "file" + ], + "properties": { + "file": { + "type": "string", + "format": "uri", + "description": "HTTPS URL of the remote built-in template JSON file. Only trusted FluentCRM template hosts are accepted." + } + } + }, + "example": { + "file": "https://fluentcrm.com/wp-content/templates/welcome.json" + } + } + } + }, + "responses": { + "200": { + "description": "Built-in template downloaded and normalized successfully.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + }, + "template": { + "$ref": "#/components/schemas/BuiltInTemplatePayload" + } + } + }, + "example": { + "message": "Template has been inserted", + "template": { + "post_title": "Welcome Series - Day 1", + "post_content": "

Welcome

Hello ##subscriber.first_name##

", + "post_excerpt": "Welcome your subscribers with a polished first-touch email.", + "email_subject": "Welcome to ##crm.business_name##", + "edit_type": "visual", + "design_template": "simple", + "settings": { + "template_config": { + "content_padding": 20 + }, + "footer_settings": { + "custom_footer": "no", + "footer_content": "", + "disable_footer": "no" + } + }, + "_visual_builder_design": { + "version": 1, + "blocks": [] + } + } + } + } + } + }, + "400": { + "description": "Template URL is invalid, the download failed, or the remote file is not a valid FluentCRM template.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + }, + "examples": { + "invalidUrl": { + "summary": "Invalid template source URL", + "value": { + "message": "Invalid template source URL" + } + }, + "downloadFailed": { + "summary": "Remote download failed", + "value": { + "message": "Unable to download the selected template. Please try again." + } + }, + "invalidTemplate": { + "summary": "Invalid FluentCRM template file", + "value": { + "message": "The selected file is not a valid FluentCRM template." + } + }, + "emptyContent": { + "summary": "Template has no content", + "value": { + "message": "The selected template does not have any email content." + } + } + } + } + } + } + } + } + } + }, + "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" + } + } + } + } + }, + "BuiltInTemplatePayload": { + "type": "object", + "description": "Remote built-in template normalized to the local FluentCRM template payload shape.", + "properties": { + "post_title": { + "type": "string", + "description": "Template title." + }, + "post_content": { + "type": "string", + "description": "Template email HTML content." + }, + "post_excerpt": { + "type": "string", + "description": "Template preview text or excerpt." + }, + "email_subject": { + "type": "string", + "description": "Template email subject line." + }, + "edit_type": { + "type": "string", + "description": "Editor type for the template.", + "enum": [ + "html", + "visual" + ] + }, + "design_template": { + "type": "string", + "description": "Design template identifier." + }, + "settings": { + "type": "object", + "properties": { + "template_config": { + "type": "object", + "description": "Template configuration settings.", + "additionalProperties": true + }, + "footer_settings": { + "type": "object", + "properties": { + "custom_footer": { + "type": "string", + "enum": [ + "yes", + "no" + ] + }, + "footer_content": { + "type": "string" + }, + "disable_footer": { + "type": "string", + "enum": [ + "yes", + "no" + ] + } + } + } + } + }, + "_visual_builder_design": { + "description": "Visual builder block design payload, when present.", + "nullable": true + } + } + } + }, + "securitySchemes": { + "ApplicationPasswords": { + "type": "apiKey", + "in": "header", + "name": "Authorization", + "description": "WordPress Application Passwords — use Basic auth with your WordPress username and an application password in the format: username:application_password" + } + } + } +} diff --git a/src/rest-api/index.md b/src/rest-api/index.md index 2a028e0..fd4f189 100644 --- a/src/rest-api/index.md +++ b/src/rest-api/index.md @@ -1,6 +1,6 @@ # FluentCRM REST API -Complete REST API documentation for FluentCRM — covering **319 endpoints** across 28 modules, including FluentCampaign Pro. +Complete REST API documentation for FluentCRM — covering **350 endpoints** across 31 modules, including FluentCampaign Pro. ## Base URL @@ -51,8 +51,9 @@ Use test/staging sites only. API requests make permanent changes to your data. | Module | Endpoints | Description | |--------|-----------|-------------| | [Campaigns](/rest-api/operations/campaigns/list-campaigns) | 32 | Create, schedule, send, and analyze email campaigns | -| [Templates](/rest-api/operations/templates/list-templates) | 11 | Email templates, smart codes, global styles | -| [Sequences](/rest-api/operations/sequences/list-sequences) | 18 | Automated email sequences (Pro) | +| [Templates](/rest-api/operations/templates/list-templates) | 12 | Email templates, smart codes, global styles | +| [Email Patterns](/rest-api/operations/email-patterns/list-email-patterns) | 11 | Reusable email patterns and editor blocks | +| [Sequences](/rest-api/operations/sequences/list-sequences) | 19 | Automated email sequences (Pro) | | [Recurring Campaigns](/rest-api/operations/recurring-campaigns/list-recurring-campaigns) | 14 | Recurring/automated campaigns (Pro) | ### Automation & Analytics @@ -60,7 +61,7 @@ Use test/staging sites only. API requests make permanent changes to your data. | Module | Endpoints | Description | |--------|-----------|-------------| | [Funnels](/rest-api/operations/funnels/list-funnels) | 31 | Marketing automation funnels with triggers, actions, benchmarks | -| [Reports](/rest-api/operations/reports/get-dashboard-stats) | 14 | Dashboard stats, email performance, contact growth | +| [Reports](/rest-api/operations/reports/get-dashboard-stats) | 25 | Dashboard stats, email performance, contact growth | | [Webhooks](/rest-api/operations/webhooks/list-webhooks) | 5 | Incoming webhook endpoints for data collection | | [Dynamic Segments](/rest-api/operations/dynamic-segments/list-dynamic-segments) | 9 | Smart contact segments with dynamic conditions (Pro) | @@ -69,6 +70,7 @@ Use test/staging sites only. API requests make permanent changes to your data. | Module | Endpoints | Description | |--------|-----------|-------------| | [Settings](/rest-api/operations/settings/get-settings) | 38 | Global settings, double opt-in, integrations, compliance | +| [AI](/rest-api/operations/ai/get-ai-settings) | 4 | AI writing settings and generation endpoints | | [Import](/rest-api/operations/import/upload-csv-import) | 6 | CSV upload, WP users import, third-party drivers | | [Users](/rest-api/operations/users/list-users) | 2 | WordPress user listing and roles | | [Forms](/rest-api/operations/forms/list-forms) | 5 | Fluent Forms integration | @@ -83,7 +85,8 @@ Use test/staging sites only. API requests make permanent changes to your data. | [Campaigns Pro](/rest-api/operations/campaigns-pro/resend-failed-emails) | 7 | Resend emails, tag actions, dynamic content (Pro) | | [Pro Settings](/rest-api/operations/pro-settings/get-license-status) | 11 | License, managers, SMS settings (Pro) | | [Commerce Reports](/rest-api/operations/commerce-reports/get-commerce-reports) | 2 | WooCommerce/EDD revenue reports (Pro) | -| [SMS](/rest-api/operations/sms/list-sms-campaigns) | 24 | SMS campaigns, messages, subscriber SMS (Pro) | +| [SMS](/rest-api/operations/sms/list-sms-campaigns) | 25 | SMS campaigns, messages, subscriber SMS (Pro) | +| [Subscribers Export](/rest-api/operations/subscribers-export/post-subscribers-export-page) | 2 | Paginated export pages for subscriber CSV/data exports (Pro) | ### Other diff --git a/src/rest-api/operations/ai/generate-ai-content.md b/src/rest-api/operations/ai/generate-ai-content.md new file mode 100644 index 0000000..e01aaa5 --- /dev/null +++ b/src/rest-api/operations/ai/generate-ai-content.md @@ -0,0 +1,7 @@ +--- +title: Generate AI Content +description: "Generate or transform email copy using the configured AI writing provider." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/ai/get-ai-settings.md b/src/rest-api/operations/ai/get-ai-settings.md new file mode 100644 index 0000000..70a346f --- /dev/null +++ b/src/rest-api/operations/ai/get-ai-settings.md @@ -0,0 +1,7 @@ +--- +title: Get AI Settings +description: "Retrieve the saved AI writing configuration, including masked API key details." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/ai/save-ai-settings.md b/src/rest-api/operations/ai/save-ai-settings.md new file mode 100644 index 0000000..ae3ed73 --- /dev/null +++ b/src/rest-api/operations/ai/save-ai-settings.md @@ -0,0 +1,7 @@ +--- +title: Save AI Settings +description: "Save the AI writing configuration, including provider, model, and encrypted API key handling." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/ai/test-ai-connection.md b/src/rest-api/operations/ai/test-ai-connection.md new file mode 100644 index 0000000..0c81485 --- /dev/null +++ b/src/rest-api/operations/ai/test-ai-connection.md @@ -0,0 +1,7 @@ +--- +title: Test AI Connection +description: "Validate the configured AI provider, model, and API key with a live provider API request." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/email-patterns/bulk-action-email-patterns.md b/src/rest-api/operations/email-patterns/bulk-action-email-patterns.md new file mode 100644 index 0000000..b52a70b --- /dev/null +++ b/src/rest-api/operations/email-patterns/bulk-action-email-patterns.md @@ -0,0 +1,7 @@ +--- +title: Bulk Action Email Patterns +description: "Perform supported bulk actions on email patterns." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/email-patterns/create-email-pattern-category.md b/src/rest-api/operations/email-patterns/create-email-pattern-category.md new file mode 100644 index 0000000..0607b70 --- /dev/null +++ b/src/rest-api/operations/email-patterns/create-email-pattern-category.md @@ -0,0 +1,7 @@ +--- +title: Create Email Pattern Category +description: "Create an email pattern category or return an existing matching one." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/email-patterns/create-email-pattern-wp-format.md b/src/rest-api/operations/email-patterns/create-email-pattern-wp-format.md new file mode 100644 index 0000000..8f1fc7b --- /dev/null +++ b/src/rest-api/operations/email-patterns/create-email-pattern-wp-format.md @@ -0,0 +1,7 @@ +--- +title: Create Email Pattern (WP Format) +description: "Create an email pattern using WordPress block REST payload format." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/email-patterns/create-email-pattern.md b/src/rest-api/operations/email-patterns/create-email-pattern.md new file mode 100644 index 0000000..3e43865 --- /dev/null +++ b/src/rest-api/operations/email-patterns/create-email-pattern.md @@ -0,0 +1,7 @@ +--- +title: Create Email Pattern +description: "Create a reusable email pattern in FluentCRM." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/email-patterns/delete-email-pattern-category.md b/src/rest-api/operations/email-patterns/delete-email-pattern-category.md new file mode 100644 index 0000000..de76f88 --- /dev/null +++ b/src/rest-api/operations/email-patterns/delete-email-pattern-category.md @@ -0,0 +1,7 @@ +--- +title: Delete Email Pattern Category +description: "Delete an email pattern category by ID." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/email-patterns/delete-email-pattern.md b/src/rest-api/operations/email-patterns/delete-email-pattern.md new file mode 100644 index 0000000..2de2f04 --- /dev/null +++ b/src/rest-api/operations/email-patterns/delete-email-pattern.md @@ -0,0 +1,7 @@ +--- +title: Delete Email Pattern +description: "Delete a reusable email pattern by ID." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/email-patterns/get-email-pattern.md b/src/rest-api/operations/email-patterns/get-email-pattern.md new file mode 100644 index 0000000..ca43e4f --- /dev/null +++ b/src/rest-api/operations/email-patterns/get-email-pattern.md @@ -0,0 +1,7 @@ +--- +title: Get Email Pattern +description: "Retrieve a single reusable email pattern by ID." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/email-patterns/list-email-pattern-categories.md b/src/rest-api/operations/email-patterns/list-email-pattern-categories.md new file mode 100644 index 0000000..89c7763 --- /dev/null +++ b/src/rest-api/operations/email-patterns/list-email-pattern-categories.md @@ -0,0 +1,7 @@ +--- +title: List Email Pattern Categories +description: "Retrieve the unique category names used by saved email patterns." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/email-patterns/list-email-patterns-wp-format.md b/src/rest-api/operations/email-patterns/list-email-patterns-wp-format.md new file mode 100644 index 0000000..e5386d5 --- /dev/null +++ b/src/rest-api/operations/email-patterns/list-email-patterns-wp-format.md @@ -0,0 +1,7 @@ +--- +title: List Email Patterns (WP Format) +description: "Retrieve email patterns in WordPress block REST format." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/email-patterns/list-email-patterns.md b/src/rest-api/operations/email-patterns/list-email-patterns.md new file mode 100644 index 0000000..4679eec --- /dev/null +++ b/src/rest-api/operations/email-patterns/list-email-patterns.md @@ -0,0 +1,7 @@ +--- +title: List Email Patterns +description: "Retrieve paginated reusable email patterns from FluentCRM." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/email-patterns/update-email-pattern.md b/src/rest-api/operations/email-patterns/update-email-pattern.md new file mode 100644 index 0000000..f1e2bdc --- /dev/null +++ b/src/rest-api/operations/email-patterns/update-email-pattern.md @@ -0,0 +1,7 @@ +--- +title: Update Email Pattern +description: "Update an existing reusable email pattern." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/public-bounce/handle-bounce-with-handle.md b/src/rest-api/operations/public-bounce/handle-bounce-with-handle.md index f3409bd..85cc72c 100644 --- a/src/rest-api/operations/public-bounce/handle-bounce-with-handle.md +++ b/src/rest-api/operations/public-bounce/handle-bounce-with-handle.md @@ -1,6 +1,6 @@ --- title: Handle Bounce (with /handle/ path) -description: "Webhook endpoint for email service providers to report bounces via the /handle/ path variant." +description: "Public bounce webhook endpoint for the /handle/ path variant. FluentCRM registers this route as ANY, while the OpenAPI view uses POST for compatibility." outline: false aside: false --- diff --git a/src/rest-api/operations/public-bounce/handle-bounce.md b/src/rest-api/operations/public-bounce/handle-bounce.md index 26a8c14..4da9320 100644 --- a/src/rest-api/operations/public-bounce/handle-bounce.md +++ b/src/rest-api/operations/public-bounce/handle-bounce.md @@ -1,6 +1,6 @@ --- title: Handle Bounce -description: "Webhook endpoint for email service providers to report bounces." +description: "Public bounce webhook endpoint. FluentCRM registers this route as ANY, while the OpenAPI view uses POST for compatibility." outline: false aside: false --- diff --git a/src/rest-api/operations/reports/get-automation-reports.md b/src/rest-api/operations/reports/get-automation-reports.md new file mode 100644 index 0000000..c03d1c8 --- /dev/null +++ b/src/rest-api/operations/reports/get-automation-reports.md @@ -0,0 +1,7 @@ +--- +title: Get Automation Reports +description: "Retrieve published automation funnels with overview totals and top-triggered automation summaries." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/reports/get-automation-step-report.md b/src/rest-api/operations/reports/get-automation-step-report.md new file mode 100644 index 0000000..c763768 --- /dev/null +++ b/src/rest-api/operations/reports/get-automation-step-report.md @@ -0,0 +1,7 @@ +--- +title: Get Automation Step Report +description: "Retrieve a single automation funnel with step-level metrics, drop-off counts, and revenue data." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/reports/get-campaign-options.md b/src/rest-api/operations/reports/get-campaign-options.md new file mode 100644 index 0000000..1706071 --- /dev/null +++ b/src/rest-api/operations/reports/get-campaign-options.md @@ -0,0 +1,7 @@ +--- +title: Get Campaign Options +description: "Retrieve archived campaign options for selectors and report filters." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/reports/get-campaigns-list.md b/src/rest-api/operations/reports/get-campaigns-list.md new file mode 100644 index 0000000..04f5ff0 --- /dev/null +++ b/src/rest-api/operations/reports/get-campaigns-list.md @@ -0,0 +1,7 @@ +--- +title: Get Campaigns List +description: "Retrieve archived campaigns with computed performance stats." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/reports/get-contacts-by-country.md b/src/rest-api/operations/reports/get-contacts-by-country.md new file mode 100644 index 0000000..330fee4 --- /dev/null +++ b/src/rest-api/operations/reports/get-contacts-by-country.md @@ -0,0 +1,7 @@ +--- +title: Get Contacts by Country +description: "Retrieve contact totals grouped by country code." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/reports/get-contacts-by-lists.md b/src/rest-api/operations/reports/get-contacts-by-lists.md new file mode 100644 index 0000000..47da76a --- /dev/null +++ b/src/rest-api/operations/reports/get-contacts-by-lists.md @@ -0,0 +1,7 @@ +--- +title: Get Contacts by Lists +description: "Retrieve a paginated list report showing how many contacts are assigned to each mailing list." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/reports/get-contacts-by-status.md b/src/rest-api/operations/reports/get-contacts-by-status.md new file mode 100644 index 0000000..9fef22b --- /dev/null +++ b/src/rest-api/operations/reports/get-contacts-by-status.md @@ -0,0 +1,7 @@ +--- +title: Get Contacts by Status +description: "Retrieve the total contact counts grouped by subscriber status." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/reports/get-contacts-by-tags.md b/src/rest-api/operations/reports/get-contacts-by-tags.md new file mode 100644 index 0000000..0fb716a --- /dev/null +++ b/src/rest-api/operations/reports/get-contacts-by-tags.md @@ -0,0 +1,7 @@ +--- +title: Get Contacts by Tags +description: "Retrieve a paginated tag report showing how many contacts are assigned to each tag." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/reports/get-email-unsub-stats.md b/src/rest-api/operations/reports/get-email-unsub-stats.md new file mode 100644 index 0000000..76ce8f9 --- /dev/null +++ b/src/rest-api/operations/reports/get-email-unsub-stats.md @@ -0,0 +1,7 @@ +--- +title: Get Email Unsubscribe Stats +description: "Retrieve email unsubscribe statistics over a date range with automatic daily, weekly, or monthly grouping." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/reports/get-recent-tags.md b/src/rest-api/operations/reports/get-recent-tags.md new file mode 100644 index 0000000..7afe043 --- /dev/null +++ b/src/rest-api/operations/reports/get-recent-tags.md @@ -0,0 +1,7 @@ +--- +title: Get Recent Tags +description: "Retrieve the most recently created tags with contact counts." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/reports/get-top-campaigns.md b/src/rest-api/operations/reports/get-top-campaigns.md new file mode 100644 index 0000000..bf4821a --- /dev/null +++ b/src/rest-api/operations/reports/get-top-campaigns.md @@ -0,0 +1,7 @@ +--- +title: Get Top Campaigns +description: "Retrieve the top archived campaigns ranked by open rate, click rate, or total sent. Requires FluentCampaign Pro." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/sequences/update-sequence-email-delay.md b/src/rest-api/operations/sequences/update-sequence-email-delay.md new file mode 100644 index 0000000..ce3915a --- /dev/null +++ b/src/rest-api/operations/sequences/update-sequence-email-delay.md @@ -0,0 +1,7 @@ +--- +title: Update Sequence Email Delay +description: "Update the wait time for a sequence email." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/sms/un-schedule-sms-campaign.md b/src/rest-api/operations/sms/un-schedule-sms-campaign.md new file mode 100644 index 0000000..a494406 --- /dev/null +++ b/src/rest-api/operations/sms/un-schedule-sms-campaign.md @@ -0,0 +1,7 @@ +--- +title: Un-schedule SMS Campaign +description: "Legacy alias route for unscheduling a previously scheduled SMS campaign." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/subscribers-export/get-subscribers-export-page.md b/src/rest-api/operations/subscribers-export/get-subscribers-export-page.md new file mode 100644 index 0000000..c6a4590 --- /dev/null +++ b/src/rest-api/operations/subscribers-export/get-subscribers-export-page.md @@ -0,0 +1,7 @@ +--- +title: Get Subscribers Export Page +description: "Retrieve one export page of subscriber rows. This legacy GET route is kept for backward compatibility." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/subscribers-export/post-subscribers-export-page.md b/src/rest-api/operations/subscribers-export/post-subscribers-export-page.md new file mode 100644 index 0000000..2a60828 --- /dev/null +++ b/src/rest-api/operations/subscribers-export/post-subscribers-export-page.md @@ -0,0 +1,7 @@ +--- +title: Post Subscribers Export Page +description: "Retrieve one export page of subscriber rows using the preferred POST request body format." +outline: false +aside: false +--- + diff --git a/src/rest-api/operations/templates/get-built-in-template.md b/src/rest-api/operations/templates/get-built-in-template.md new file mode 100644 index 0000000..d51a175 --- /dev/null +++ b/src/rest-api/operations/templates/get-built-in-template.md @@ -0,0 +1,7 @@ +--- +title: Fetch Built-In Template +description: "Download a single built-in FluentCRM email template from a trusted remote URL." +outline: false +aside: false +--- +