### Quick Start Agent Commands Source: https://github.com/fyso-dev/docs/blob/main/site/docs/agents/overview.md Example agent commands for selecting a tenant, listing schemas, and querying data. ```javascript fyso_auth({ action: "select_tenant", tenantSlug: "my-workspace" }) fyso_schema({ action: "list" }) fyso_data({ action: "query", entity: "contacts", limit: 5 }) ``` -------------------------------- ### Manual Install from Clone Source: https://github.com/fyso-dev/docs/blob/main/site/docs/getting-started/claude-plugin.md Clone the plugin repository and navigate into the directory to follow manual installation instructions. ```bash git clone https://github.com/fyso-dev/claude-plugin cd claude-plugin # Follow instructions in README.md ``` -------------------------------- ### Start Local Development Server Source: https://github.com/fyso-dev/docs/blob/main/site/README.md Starts a local development server for live previewing changes. The server automatically reloads the browser on most modifications. ```bash yarn start ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/fyso-dev/docs/blob/main/site/README.md Installs all necessary project dependencies using Yarn. ```bash yarn ``` -------------------------------- ### Install Fyso Claude Plugin Source: https://github.com/fyso-dev/docs/blob/main/site/docs/getting-started/mcp-setup.md Use this command to install the `@fyso/claude-plugin` package, which sets up skills, hooks, and the MCP connection. Authentication is handled via OAuth. ```bash bunx @fyso/claude-plugin install ``` -------------------------------- ### List Entities Response Example Source: https://github.com/fyso-dev/docs/blob/main/site/docs/entities/create-entity.md An example response from the `list_entities` tool, showing details of a 'clientes' entity. ```json [ { "name": "clientes", "displayName": "Clientes", "description": "Base de clientes", "fieldCount": 5, "status": "published", "version": 2 } ] ``` -------------------------------- ### List Keys Response Example Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/api-keys.md Example JSON response when listing admin keys, showing key details like name, prefix, scopes, and status. ```json { "success": true, "data": [ { "id": "uuid", "name": "CI Pipeline", "keyPrefix": "fyso_adm_abc123", "scopes": ["tenants:manage"], "isActive": true, "lastUsedAt": "2026-02-22T10:00:00Z", "expiresAt": null, "createdAt": "2026-02-01T00:00:00Z" } ] } ``` -------------------------------- ### Storage Usage Response Example Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/knowledge.md Example JSON response detailing storage breakdown by database, knowledge base, and bucket. Note that bucket storage is currently a stub. ```json { "success": true, "data": { "db": { "bytes": 8388608, "table_count": 12, "estimated_rows": 347 }, "knowledge_base": { "bytes": 512000, "documents": 3 }, "bucket": { "bytes": 0, "file_count": 0 }, "total_bytes": 8388608 } } ``` -------------------------------- ### Invitation Creation Response Source: https://github.com/fyso-dev/docs/blob/main/site/docs/api/rest-api.md Example response upon successfully creating a tenant invitation. ```json { "success": true, "data": { "token": "a1b2c3...", "inviteUrl": "https://app.fyso.dev/invite/a1b2c3..." } } ``` -------------------------------- ### Install n8n-nodes-fyso via npm Source: https://github.com/fyso-dev/docs/blob/main/site/docs/integrations/n8n.md Install the Fyso community node for n8n using npm on a self-hosted instance. Restart n8n after installation. ```bash cd ~/.n8n npm install n8n-nodes-fyso ``` -------------------------------- ### Available Slots Response Example Source: https://github.com/fyso-dev/docs/blob/main/scheduling/availability.md Example JSON response from the `get_available_slots` tool, listing available slots with their date, time, duration, and professional ID. This format shows the calculated available time slots. ```json [ { "date": "2026-05-05", "time": "09:00", "duration": 30, "professional_id": "9d5e3e28-6eb8-49e3-8a34-1a6b7d91f002" }, { "date": "2026-05-05", "time": "09:30", "duration": 30, "professional_id": "9d5e3e28-6eb8-49e3-8a34-1a6b7d91f002" } ] ``` -------------------------------- ### AI Agent Run Response Example Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/ai-agents.md Example of a successful response from running an AI agent. It includes the agent's response, session ID, run ID, path resolution, steps used, and token counts. ```json { "response": "Your next appointment is on March 20 at 10:00 AM with Dr. López.", "session_id": "a1b2c3d4-ldots", "run_id": "e5f6g7h8-ldots", "path": "llm", "steps_used": 3, "tokens": { "input": 450, "output": 120 } } ``` -------------------------------- ### Install Fyso MCP Server via Smithery CLI Source: https://github.com/fyso-dev/docs/blob/main/site/docs/getting-started/mcp-setup.md Install the Fyso MCP server directly from Smithery.ai using this command. This method is suitable for users who prefer using the Smithery CLI. ```bash npx @smithery/cli install @fyso/mcp-server --client claude ``` -------------------------------- ### Invitation Acceptance Response Source: https://github.com/fyso-dev/docs/blob/main/site/docs/api/rest-api.md Example response upon successfully accepting a tenant invitation. ```json { "success": true, "data": { "id": "uuid", "email": "newuser@example.com", "name": "New User", "role": "member" } } ``` -------------------------------- ### Invitation Preview Response Source: https://github.com/fyso-dev/docs/blob/main/site/docs/api/rest-api.md Example response when previewing an invitation's details. ```json { "success": true, "data": { "valid": true, "email": "newuser@example.com", "tenantSlug": "my-company" } } ``` -------------------------------- ### Record Field Access Examples Source: https://github.com/fyso-dev/docs/blob/main/site/static/llms-full.txt Demonstrates correct and incorrect ways to access fields in the flat record structure. ```text record.email -- CORRECT (flat) record.nombre -- CORRECT (flat) record.data.email -- WRONG (old nested format, removed in v1.26.0) ``` -------------------------------- ### Get API Specification Source: https://github.com/fyso-dev/docs/blob/main/site/docs/api/mcp-tools.md Retrieves the OpenAPI specification for the REST API, with options to filter entities and include examples. ```APIDOC ## GET /fyso_meta/api_spec ### Description Retrieves the REST API OpenAPI specification. ### Method GET ### Endpoint /fyso_meta/api_spec ### Parameters #### Query Parameters - **action** (string) - Required - Operation to perform (must be 'api_spec'). - **entities** (string[]) - Optional - Entity names to include in the spec (omit for all). - **includeExamples** (boolean) - Optional - Include curl examples in the spec (default: true). ### Response #### Success Response (200) - **spec** (object) - The OpenAPI specification object. ``` -------------------------------- ### Get Entity Schema using MCP Tool Source: https://github.com/fyso-dev/docs/blob/main/site/docs/entities/create-entity.md Use the `get_entity_schema` tool to retrieve the full definition of an entity. This example fetches the 'published' schema for the 'clientes' entity. ```javascript get_entity_schema({ entityName: "clientes", version: "published" }) ``` -------------------------------- ### Example Response for Site Deployment Source: https://github.com/fyso-dev/docs/blob/main/site/docs/agents/mcp-quickstart.md This JSON confirms a successful site deployment, providing the live URL and the subdomain used. ```json { "success": true, "message": "Site deployed successfully", "data": { "url": "https://my-app-sites.fyso.dev", "subdomain": "my-app" } } ``` -------------------------------- ### Example _fyso_schedules Entry Source: https://github.com/fyso-dev/docs/blob/main/scheduling/availability.md Defines a regular weekly schedule for a professional, including working days, start and end times, and slot duration. This is used to establish recurring availability. ```json { "professional_id": "9d5e3e28-6eb8-49e3-8a34-1a6b7d91f002", "rrule": "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR", "start_time": "09:00", "end_time": "13:00", "slot_duration": 30, "active": true } ``` -------------------------------- ### Typical MCP Workflow Example Source: https://github.com/fyso-dev/docs/blob/main/site/docs/getting-started/mcp-setup.md Illustrates a common sequence of operations when interacting with the Fyso MCP server, including listing tenants, selecting a tenant, listing entities, and querying records. ```text list_tenants() → select_tenant({ tenantSlug: "mi-empresa" }) → list_entities() → query_records({ entityName: "clientes", limit: 10 }) ``` -------------------------------- ### REST API Endpoint for Single Day Availability Source: https://github.com/fyso-dev/docs/blob/main/scheduling/availability.md Example GET request to the REST API for retrieving available slots on a specific date. This is the HTTP equivalent of the MCP tool for a single day. ```text GET /api/scheduling/available-slots?professional_id=&date=2026-05-05 ``` -------------------------------- ### REST API Endpoint for Date Range Availability Source: https://github.com/fyso-dev/docs/blob/main/scheduling/availability.md Example GET request to the REST API for fetching available slots within a date range. This mirrors the MCP tool's functionality for checking availability over multiple days via HTTP. ```text GET /api/scheduling/available-slots?professional_id=&from=2026-05-05&to=2026-05-09 ``` -------------------------------- ### Onboarding Tool Source: https://github.com/fyso-dev/docs/blob/main/site/static/llms-full.txt A single-purpose tool for generating starter sets of entities and fields based on business type. ```APIDOC ## `fyso_welcome` — Onboarding An onboarding conversation tool. Given a `businessType`, it proposes a starter set of entities and fields suited to that business, and returns suggested next steps. Used by the Claude Code plugin on first connect. ### Parameters | Param | Type | Required | Description | |---|---|---|---| | `businessType` | string | Yes | Business category (e.g., `freelancer`, `clinic`, `ecommerce`, `saas`, `nonprofit`, `other`) | This tool does not accept an `action` parameter — it is a single-purpose tool, not a grouped router. ``` -------------------------------- ### Use a Custom API Key Source: https://github.com/fyso-dev/docs/blob/main/site/static/llms-full.txt Demonstrates using a custom API key to access resources. The first example shows a successful read operation, while the second shows a failed create operation due to insufficient permissions. ```bash # This works (viewer has read on contacts): curl -H "Authorization: Bearer fyso_pkey_abc123..." \ https://api.fyso.dev/api/entities/contacts/records ``` ```bash # This fails with 403 (viewer can't create): curl -X POST -H "Authorization: Bearer fyso_pkey_abc123..." \ -H "Content-Type: application/json" \ -d '{"data": {"name": "New Contact"}}' \ https://api.fyso.dev/api/entities/contacts/records ``` -------------------------------- ### Phone Field Example Source: https://github.com/fyso-dev/docs/blob/main/site/static/llms-full.txt Example value for a phone field. ```plaintext "+54 11 1234-5678" ``` -------------------------------- ### fyso_welcome Source: https://github.com/fyso-dev/docs/blob/main/api/mcp-tools.md A standalone utility tool that serves as a first-run onboarding helper, suggesting an initial schema based on business type. ```APIDOC ## Standalone utility tools These tools are advertised separately from the grouped routers: | Tool | Description | Notes | |------|-------------|-------| | `fyso_welcome` | First-run onboarding helper | Suggests an initial schema based on business type | ``` -------------------------------- ### Email Field Example Source: https://github.com/fyso-dev/docs/blob/main/site/static/llms-full.txt Example value for an email field. ```plaintext "juan@example.com" ``` -------------------------------- ### Accept Tenant Invitation (Public) Source: https://github.com/fyso-dev/docs/blob/main/site/docs/api/rest-api.md Accepts a tenant invitation and creates a tenant user account. The invitation token serves as authentication for this process. ```bash curl -X POST -H "Content-Type: application/json" \ -d '{"token": "a1b2c3...", "email": "newuser@example.com", "name": "New User", "password": "securepass123"}' \ "https://api.fyso.dev/auth/invite/accept" ``` -------------------------------- ### Text Field Example Source: https://github.com/fyso-dev/docs/blob/main/site/static/llms-full.txt Example value for a text field. ```plaintext "Juan Perez" ``` -------------------------------- ### Example Response for User Creation Source: https://github.com/fyso-dev/docs/blob/main/site/docs/agents/mcp-quickstart.md This JSON represents the response after successfully creating a user, confirming the user's details and activation status. ```json { "success": true, "user": { "id": "user-uuid", "email": "dev@team.com", "name": "Dev User", "role": "member", "isActive": true } } ``` -------------------------------- ### Setup Scheduling Source: https://github.com/fyso-dev/docs/blob/main/scheduling/availability.md Initializes the scheduling system for a tenant by creating and publishing the necessary `_fyso_*` entities if they do not already exist. This operation is idempotent. ```APIDOC ## Setup Scheduling ### Description Initializes the scheduling system for a tenant by creating and publishing the necessary `_fyso_*` entities if they do not already exist. This operation is idempotent. ### Method POST ### Endpoint `/api/scheduling/setup` ### Parameters None ### Request Body None ### Response #### Success Response (200) Indicates successful setup. #### Response Example None provided. ``` -------------------------------- ### Number Field Example Source: https://github.com/fyso-dev/docs/blob/main/site/static/llms-full.txt Example value for a number field, which can be an integer or decimal. ```plaintext 150.50 ``` -------------------------------- ### Textarea Field Example Source: https://github.com/fyso-dev/docs/blob/main/site/static/llms-full.txt Example value for a textarea field, including line breaks. ```plaintext "Long description\nwith line breaks" ``` -------------------------------- ### Static Site Dynamic Login and Data Fetching Source: https://github.com/fyso-dev/docs/blob/main/site/docs/agents/static-site-auth.md This HTML and JavaScript example demonstrates a complete dynamic login flow for a static site. It includes a login form, JWT retrieval via POST to /api/auth/tenant/login, and subsequent API calls using the obtained token to fetch and display records. ```html My Fyso App

Login

``` -------------------------------- ### setup_scheduling Source: https://github.com/fyso-dev/docs/blob/main/api/mcp-tools.md A standalone utility tool used to initialize scheduling system entities. It should be run once on a new tenant before using `get_slots` or `create_booking`. ```APIDOC ## Standalone utility tools These tools are advertised separately from the grouped routers: | Tool | Description | Notes | |------|-------------|-------| | `setup_scheduling` | Initialise scheduling system entities | Run once on a new tenant before `get_slots` or `create_booking` | ``` -------------------------------- ### Send Email Step Configuration Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/flows.md Example configuration for a 'send_email' step, demonstrating interpolation for recipient, subject, and body. ```json { "type": "send_email", "config": { "to": "{{customer_email}}", "subject": "Order {{order_number}} confirmed", "body": "Hi {{customer_name}}, your order is confirmed." } } ``` -------------------------------- ### Row-Level Filtering Examples Source: https://github.com/fyso-dev/docs/blob/main/site/docs/agents/users-and-rbac.md Examples of filter conditions for row-level access control, including comparisons and logical operators. ```plaintext status == 'open' and priority > 3 (department == 'sales' or department == 'support') and region == $currentTenant owner_id == $currentUser ``` -------------------------------- ### Example Grouped Tool Usage Source: https://github.com/fyso-dev/docs/blob/main/api/mcp-tools.md Demonstrates how to call grouped tools like fyso_data and fyso_auth with different actions and parameters. ```javascript fyso_data({ action: "create", entity: "tasks", data: { title: "Fix bug" } }) fyso_data({ action: "query", entity: "tasks", filters: "status = open" }) fyso_auth({ action: "list_tenants" }) ``` -------------------------------- ### Write-Only Ingestion Bot Permissions Example Source: https://github.com/fyso-dev/docs/blob/main/site/docs/agents/bot-identity.md Example JSON defining permissions for a bot that can only create 'events' entities. ```json { "entities": { "events": ["create"] } } ``` -------------------------------- ### Read-Only Bot Permissions Example Source: https://github.com/fyso-dev/docs/blob/main/site/docs/agents/bot-identity.md Example JSON defining permissions for a bot that can only read 'contacts' and 'deals' entities. ```json { "entities": { "contacts": ["read"], "deals": ["read"] } } ``` -------------------------------- ### Create Instance Tenant (REST API) Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/organizations.md Use this cURL command to create a new instance tenant. Ensure you provide the correct organization ID and source tenant ID, and that the source tenant is standalone and belongs to the same organization. ```bash curl -X POST https://api.fyso.dev/api/tenants \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "name": "Customer A Workspace", "orgId": "", "mode": "instance", "sourceTenantId": "" }' ``` -------------------------------- ### Has Many Resolved Value Example Source: https://github.com/fyso-dev/docs/blob/main/site/docs/entities/field-types.md Example of the resolved value for a 'has_many' field when 'resolve=true' is used, showing an array of related records. ```json [ { "id": "uuid-1", "data": { "producto": "Widget A", "cantidad": 3 } }, { "id": "uuid-2", "data": { "producto": "Widget B", "cantidad": 1 } } ] ``` -------------------------------- ### Example: Upload and Display Profile Avatar Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/files.md Demonstrates uploading a profile avatar via the REST API and then displaying it using its public URL. The response of the upload includes the file key. ```bash # Upload an avatar curl -X POST https://api.fyso.dev/api/files/contacts/rec_123/avatar \ -H "Authorization: Bearer " \ -F "file=@photo.jpg" # Response includes the file key # { "success": true, "data": { "key": "my-app/contacts/rec_123/avatar/a1b2c3.jpg", ... } } # Display the avatar (public URL, no auth needed) curl https://api.fyso.dev/api/files/my-app/contacts/rec_123/avatar/a1b2c3.jpg ``` -------------------------------- ### Get Entity Schema with fyso_schema Source: https://github.com/fyso-dev/docs/blob/main/api/mcp-tools.md Use the 'get' action with 'fyso_schema' to retrieve the schema for a specific entity. Requires the 'entityName' parameter. ```javascript fyso_schema({ action: "get", entityName: "tasks" }) ``` -------------------------------- ### Filtering Examples Source: https://github.com/fyso-dev/docs/blob/main/site/static/llms-full.txt Examples of how to filter entities using various criteria, including simple equality, compound AND filters, and text search with 'contains'. ```APIDOC ## Filtering Examples ### Simple equality filter ```bash curl -H "Authorization: Bearer JWT_TOKEN" \ -H "X-Tenant-ID: my-company" \ "https://api.fyso.dev/api/entities/clientes/records?filters=status%20%3D%20activo" ``` ### Compound AND filter ```bash curl -H "Authorization: Bearer JWT_TOKEN" \ -H "X-Tenant-ID: my-company" \ "https://api.fyso.dev/api/entities/tickets/records?filters=status%20%3D%20open%20AND%20priority%20%3D%20high" ``` ### Contains filter (text search) ```bash curl -H "Authorization: Bearer JWT_TOKEN" \ -H "X-Tenant-ID: my-company" \ "https://api.fyso.dev/api/entities/clientes/records?filters=nombre%20contains%20juan" ``` ### Combine contains with AND ```bash curl -H "Authorization: Bearer JWT_TOKEN" \ -H "X-Tenant-ID: my-company" \ "https://api.fyso.dev/api/entities/clientes/records?filters=nombre%20contains%20juan%20AND%20estado%20%3D%20activo" ``` ### Resolve relations (depth 1) ```bash curl -H "Authorization: Bearer JWT_TOKEN" \ -H "X-Tenant-ID: my-company" \ "https://api.fyso.dev/api/entities/pedidos/records?resolve_depth=1" ``` ``` -------------------------------- ### Error: Scheduling no inicializado Source: https://github.com/fyso-dev/docs/blob/main/scheduling/bookings.md Este error ocurre si las entidades de scheduling no han sido inicializadas. Ejecuta `setup_scheduling` o usa la API para inicializarlas. ```json { "success": false, "error": "Scheduling entities not found. Run setup_scheduling (MCP) or POST /scheduling/setup to initialise _fyso_schedules, _fyso_schedule_exceptions, and _fyso_bookings." } ``` -------------------------------- ### Accept Invitation and Create User Source: https://github.com/fyso-dev/docs/blob/main/site/static/llms-full.txt Accept a tenant invitation and create a new tenant user account. This public endpoint uses the invitation token for authentication. Requires a JSON payload with invitation details. ```HTTP POST /auth/invite/accept ``` ```shell curl -X POST -H "Content-Type: application/json" \ -d '{"token": "a1b2c3...", "email": "newuser@example.com", "name": "New User", "password": "securepass123"}' \ "https://api.fyso.dev/auth/invite/accept" ``` ```json { "success": true, "data": { "id": "uuid", "email": "newuser@example.com", "name": "New User", "role": "member" } } ``` -------------------------------- ### List Records Response Example Source: https://github.com/fyso-dev/docs/blob/main/site/docs/api/rest-api.md Example JSON response structure for listing records, including items, pagination details, and total count. ```json { "success": true, "data": { "items": [ { "id": "uuid", "entityId": "uuid", "nombre": "Juan Perez", "email": "juan@example.com", "createdAt": "2026-02-03T12:51:15.352Z", "updatedAt": "2026-02-03T12:51:15.352Z" } ], "total": 42, "page": 1, "limit": 20, "totalPages": 3 } } ``` -------------------------------- ### Preview a Tenant Invitation (Public) Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/users.md Fetches invitation details for a given token, allowing the frontend to render a preview before user registration. No authentication is required. ```bash curl https://api.fyso.dev/auth/invite/ ``` -------------------------------- ### Get Billing Usage API Endpoint Source: https://github.com/fyso-dev/docs/blob/main/site/static/llms-full.txt Retrieve current usage statistics and plan limits for your tenant using this GET request. Authentication is required. ```http GET /api/billing/usage **Headers:** ``` Authorization: Bearer ``` ``` -------------------------------- ### Accept Platform Invitation and Register Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/platform-invitations.md Accept an invitation and register a new user account. This endpoint requires the invitation token and user credentials (name and password). The user is automatically logged in upon successful registration. ```bash POST /api/platform/invitations/:token/accept Content-Type: application/json { "name": "New User", "password": "securepassword" } ``` -------------------------------- ### Audit Log Response Example Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/api-keys.md Example JSON response for an admin key's audit log, detailing actions like creation and usage with timestamps. ```json { "success": true, "data": [ { "action": "created", "actorId": "admin-uuid", "createdAt": "2026-02-01T00:00:00Z" }, { "action": "used", "endpoint": "POST /api/admin/platform/keys", "ip": "203.0.113.5", "createdAt": "2026-02-22T10:00:00Z" } ] } ``` -------------------------------- ### Execute Search Products Tool via REST API Source: https://github.com/fyso-dev/docs/blob/main/site/docs/agents/channel-tools.md Example of how to execute a 'search-products' tool using a cURL command. Requires authentication and specifies the tool and payload in the request. ```bash curl -X POST https://api.fyso.dev/api/channels/product-catalog/tools/search-products/execute \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"query": "wireless"}' ``` -------------------------------- ### Create Instance Tenant Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/organizations.md Creates a new instance tenant. This requires specific conditions to be met, such as the source tenant belonging to the same organization and only org owners being able to perform this action. ```APIDOC ## POST /api/tenants ### Description Creates a new instance tenant. This requires specific conditions to be met, such as the source tenant belonging to the same organization and only org owners being able to perform this action. ### Method POST ### Endpoint https://api.fyso.dev/api/tenants ### Parameters #### Request Body - **name** (string) - Required - The name of the new tenant. - **orgId** (string) - Required - The ID of the organization to which the tenant will belong. - **mode** (string) - Required - Must be set to "instance". - **sourceTenantId** (string) - Required - The ID of the standalone source tenant. ### Request Example { "name": "Customer A Workspace", "orgId": "", "mode": "instance", "sourceTenantId": "" } ### Response #### Success Response (200) - **tenant** (object) - Details of the created tenant. #### Response Example { "success": true, "tenant": { "id": "", "name": "Customer A Workspace", "orgId": "", "mode": "instance", "sourceTenantId": "" } } ### Error Handling - **403 INSTANCE_PROTECTED**: Returned when attempting to modify schema on instance tenants, or when a non-org owner attempts to modify schema on instance tenants. ``` -------------------------------- ### Example RRULE for Specific Mondays Source: https://github.com/fyso-dev/docs/blob/main/scheduling/availability.md An example of an RRULE string that targets only Mondays within a weekly frequency. This is used to define specific recurring availability on Mondays. ```json { "professional_id": "9d5e3e28-6eb8-49e3-8a34-1a6b7d91f002", "rrule": "FREQ=WEEKLY;BYDAY=MO", "start_time": "09:00", "end_time": "13:00", "slot_duration": 30, "active": true } ``` -------------------------------- ### Create API Definition Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/api-management.md Define a new API with a name, slug, roles, and a detailed permission matrix. Ensure the slug is unique. ```bash POST /api/apis Authorization: Bearer Content-Type: application/json { "name": "Public CRM API", "slug": "public-crm", "roles": ["viewer", "editor"], "permissions": { "contacts": { "viewer": ["read"], "editor": ["read", "create", "update"] }, "deals": { "viewer": ["read"], "editor": ["read", "create", "update", "delete"] } } } ``` -------------------------------- ### Get Delivery History (REST API) Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/webhooks.md Retrieve the delivery history for a specific webhook subscription using a GET request. You can limit the number of results returned. ```bash GET /api/webhooks/subscriptions//deliveries?limit=20 ``` -------------------------------- ### Create Order Tool with Dynamic Defaults Source: https://github.com/fyso-dev/docs/blob/main/site/docs/agents/channel-tools.md Example of a 'create order' tool configuration that uses dynamic defaults for order ID and creation timestamp. The caller only needs to provide customer name and total. ```json { "operation": "create", "entity": "orders", "fieldMapping": { "customer_name": "customer_name", "total": "total" }, "defaults": { "order_id": "{{uuid}}", "created_at": "{{timestamp}}", "status": "pending" } } ``` -------------------------------- ### Create Agent from Template Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/ai-agents.md Instantiate an agent using a pre-built template for common use cases like 'soporte' (support). Templates provide a starting point with pre-configured rules. ```mcp fyso_agents({ action: "from_template", templateId: "soporte", name: "Mi Soporte" }) ``` -------------------------------- ### Consent Audit Log Response Example Source: https://github.com/fyso-dev/docs/blob/main/site/docs/agents/rgpd-compliance.md An example of a consent audit log entry, showing the event type, user reference, actor, metadata, and creation timestamp. ```json { "success": true, "data": [ { "id": "uuid", "event": "consent_given", "externalRef": "user-123", "actorId": null, "metadata": { "consent": true }, "createdAt": "2026-03-14T10:05:00.000Z" } ] } ``` -------------------------------- ### Example Storage Usage API Response Source: https://github.com/fyso-dev/docs/blob/main/site/docs/billing/storage-usage.md This is an example of a successful response from the storage usage API, showing specific byte counts and item numbers for different storage categories. ```json { "success": true, "data": { "db": { "bytes": 2097152, "table_count": 5, "estimated_rows": 120 }, "knowledge_base": { "bytes": 204800, "documents": 1 }, "bucket": { "bytes": 0, "file_count": 0 }, "total_bytes": 2301952 } } ``` -------------------------------- ### Execute a Tool Source: https://github.com/fyso-dev/docs/blob/main/site/docs/agents/channel-tools.md Consumers call tools through the channel execution endpoint using a POST request. This example shows how to execute the 'search-products' tool. ```APIDOC ## POST /api/channels/{slug}/tools/{tool_slug}/execute ### Description Executes a specific tool within a given channel. ### Method POST ### Endpoint `https://api.fyso.dev/api/channels/{slug}/tools/{tool_slug}/execute` ### Parameters #### Path Parameters - **slug** (string) - Required - The unique identifier for the channel. - **tool_slug** (string) - Required - The unique identifier for the tool within the channel. #### Request Body - **query** (string) - Required - The query parameter for the tool (example: 'wireless'). ### Request Example ```bash curl -X POST https://api.fyso.dev/api/channels/product-catalog/tools/search-products/execute \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{"query": "wireless"}' ``` ### Response #### Success Response (200) - **success** (boolean) - Indicates if the operation was successful. - **data** (object) - The data returned by the tool execution. - **records** (array) - List of records returned by the tool (for search operations). - **id** (string) - Unique identifier for the record. - **name** (string) - Name of the record. - **price** (number) - Price of the record. - **category** (string) - Category of the record. - **total** (number) - Total number of records found. - **id** (string) - Unique identifier for the newly created record (for create operations). - **meta** (object) - Metadata about the execution. - **executionTimeMs** (number) - The time taken for execution in milliseconds. #### Response Example (Search) ```json { "success": true, "data": { "records": [ { "id": "rec-uuid", "name": "Wireless Mouse", "price": 2999, "category": "peripherals" } ], "total": 1 }, "meta": { "executionTimeMs": 42 } } ``` #### Response Example (Create) ```json { "success": true, "data": { "id": "new-record-uuid", "data": { "order_id": "generated-uuid", "customer_name": "Acme Corp", "status": "pending" } }, "meta": { "executionTimeMs": 38 } } ``` ``` -------------------------------- ### Agent Test Panel API Call Example Source: https://github.com/fyso-dev/docs/blob/main/site/docs/agents/test-panel.md This example shows how to send a message to an agent for testing via the API. It includes a persistent session ID to maintain conversation context. ```javascript POST /tenants/:slug/agents/:agentSlug/run ``` -------------------------------- ### Create Admin Key Response Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/api-keys.md Example JSON response upon successful creation of an admin key. The full key is displayed only once at this time. ```json { "success": true, "data": { "id": "uuid", "key": "fyso_adm_abc123...", "keyPrefix": "fyso_adm_abc123", "name": "CI Pipeline", "scopes": ["tenants:manage"], "expiresAt": "2027-01-01T00:00:00Z", "createdAt": "2026-02-22T12:00:00Z" } } ``` -------------------------------- ### Get Available Slots API Endpoint Source: https://github.com/fyso-dev/docs/blob/main/site/static/llms-full.txt Use this GET request to retrieve available time slots for a specific professional on a given date. Ensure you include the correct authorization header. ```http GET /api/scheduling/available-slots?profesional_id=uuid&fecha=2026-02-20 Headers: Authorization: Bearer TOKEN ``` -------------------------------- ### Using a Platform Key with curl Source: https://github.com/fyso-dev/docs/blob/main/site/docs/admin/api-management.md Demonstrates how to include a platform key in the Authorization header for API requests. ```bash curl -H "Authorization: Bearer fyso_pkey_abc123..." \ https://api.fyso.dev/api/entities/contacts/records ``` -------------------------------- ### Create a User Source: https://github.com/fyso-dev/docs/blob/main/site/docs/agents/building-a-site.md Creates a new user within a specified tenant. Requires tenant slug, email, password, name, and an initial role. ```javascript create_user({ tenantSlug: "support-app", email: "agent1@support.com", password: "securepass123", name: "Agent One", role: "member" }) ``` -------------------------------- ### List Tenant Invitations Source: https://github.com/fyso-dev/docs/blob/main/site/docs/api/rest-api.md Retrieves a list of all invitations for the current tenant. Requires tenant user authentication and tenant context. ```bash curl -H "Authorization: Bearer JWT_TOKEN" \ -H "X-Tenant-Slug: my-company" \ "https://api.fyso.dev/api/invitations" ``` -------------------------------- ### Get Single Record via View Source: https://github.com/fyso-dev/docs/blob/main/site/docs/entities/views.md Fetch a single record from a view using its ID via a GET request to `/api/views/{viewSlug}/records/{id}`. Returns `404` if the record does not match the view's filter. ```http GET /api/views/{viewSlug}/records/{id} ``` -------------------------------- ### Tool Creation Response Source: https://github.com/fyso-dev/docs/blob/main/site/docs/agents/channel-tools.md An example of a successful response after creating a tool. It confirms the tool's creation and provides its details, including its ID, name, and version. ```json { "success": true, "data": { "id": "uuid", "channel_id": "uuid", "name": "search-products", "slug": "search-products", "description": "Search products by name", "input_schema": { "..." : "..." }, "version": 1, "is_active": true } } ```