### Set Up Laravel Development Environment (CLI) Source: https://context7.com/monicahq/docs-gitbook/llms.txt This guide outlines the steps for setting up a local Laravel development environment for MonicaHQ. It covers installing Composer and Yarn dependencies, configuring environment variables, setting up the database (SQLite example), initializing Monica, generating dummy data, and optionally setting up search with Meilisearch. Finally, it covers building and running assets. ```bash # Install dependencies composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader yarn install --frozen-lockfile # Configure environment cp .env.example .env php artisan key:generate --no-interaction # Setup database (SQLite example) touch monica.db # Edit .env and set: DB_DATABASE=/path/to/monica.db # Initialize Monica php artisan monica:setup --force -vvv # Generate dummy data (optional) php artisan monica:dummy --force -vvv # Setup search (optional - requires Meilisearch) # Install and run Meilisearch, then: php artisan queue:listen --queue=high,low,default # Build assets and run yarn build yarn dev ``` -------------------------------- ### Run Official Docker Image with SQLite Source: https://context7.com/monicahq/docs-gitbook/llms.txt This command runs the official MonicaHQ Docker image using SQLite as the database and exposes the application on port 8080. It's a simple way to get started with MonicaHQ. ```bash docker run -p 8080:80 ghcr.io/monicahq/monica-next:main # Access at http://localhost:8080 ``` -------------------------------- ### Create Custom Post Template - API Example Source: https://context7.com/monicahq/docs-gitbook/llms.txt This API allows the creation of custom templates for journal entries. Templates can define named sections, providing structure for recurring types of entries. ```bash # Create a custom post template POST /api/account/post-templates Authorization: Bearer {token} Content-Type: application/json { "name": "Daily Gratitude", "sections": [ { "label": "What am I grateful for today?", "position": 1 }, { "label": "Three positive things that happened", "position": 2 }, { "label": "How did I help someone today?", "position": 3 } ] } ``` -------------------------------- ### Invite User to Account - API Example Source: https://context7.com/monicahq/docs-gitbook/llms.txt An administrator can invite new users to an account using this API endpoint. The request includes the invitee's email and their desired permission level (administrator or regular user). ```bash # Invite a new user to the account POST /api/account/users/invite Authorization: Bearer {admin_token} Content-Type: application/json { "email": "jane.smith@example.com", "permission": "regular_user" } # Response { "status": "invitation_sent", "email": "jane.smith@example.com", "invitation_expires": "2026-01-19T12:00:00Z" } ``` -------------------------------- ### JSON Translation File Example Source: https://github.com/monicahq/docs-gitbook/blob/main/developers/translation.md An example of a JSON translation file used for storing string key-value pairs for internationalization. This format allows for easy management and parsing of translations for different languages. ```json { "This is a string to translate": "C'est une chaîne de caractères à traduire" } ``` -------------------------------- ### Set Telegram Webhook via API Source: https://github.com/monicahq/docs-gitbook/blob/main/developers/setup-telegram.md This is the final URL to be pasted into a browser to register your webhook with Telegram. It includes your bot token and the constructed webhook URL, confirming the setup with a JSON response. ```bash https://api.telegram.org/bot[TELEGRAM_BOT_TOKEN]/setWebhook?url=[https://[PUBLIC URL].'/telegram/webhook/'.[TELEGRAM_BOT_WEBHOOK_URL]] ``` -------------------------------- ### Create New Account - API Example Source: https://context7.com/monicahq/docs-gitbook/llms.txt This snippet demonstrates the conceptual API call to create a new user account in Monica. It requires a full name, email, and password, returning account details and initial vault/contact IDs upon success. ```bash POST /register Content-Type: application/json { "full_name": "John Doe", "email": "john.doe@example.com", "password": "SecurePassword123!" } # Response { "status": "success", "account_id": "acc_12345", "message": "Account created. Please verify your email.", "first_vault": "vault_67890", "first_contact": "contact_11111" } ``` -------------------------------- ### Add User to Vault - API Example Source: https://context7.com/monicahq/docs-gitbook/llms.txt Allows adding an existing user to a specific vault with a defined role (manager, contributor, or viewer). This manages access permissions for shared data within a vault. ```bash # Add a user to an existing vault POST /api/vaults/{vault_id}/users Authorization: Bearer {token} Content-Type: application/json { "user_id": "user_67890", "role": "contributor" # Options: manager, contributor, viewer } # Response { "status": "user_added", "vault_id": "vault_98765", "user_id": "user_67890", "role": "contributor" } ``` -------------------------------- ### Build and Run MonicaHQ Docker Image Locally Source: https://github.com/monicahq/docs-gitbook/blob/main/developers/docker.md These commands allow you to build the MonicaHQ Docker image locally and then run it. 'yarn docker:build' compiles the image, and 'yarn docker:run' starts a container from it. This is an alternative to using pre-built images. ```sh yarn docker:build yarn docker:run ``` -------------------------------- ### Create New Journal - API Example Source: https://context7.com/monicahq/docs-gitbook/llms.txt This API endpoint creates a new journal within a specified vault. Journals are used for documenting life events and can be organized with descriptive names and details. ```bash # Create a new journal in a vault POST /api/vaults/{vault_id}/journals Authorization: Bearer {token} Content-Type: application/json { "name": "Travel Diary 2026", "description": "Documentation of my trips around the world" } # Response { "journal_id": "journal_45678", "name": "Travel Diary 2026", "vault_id": "vault_98765", "created_at": "2026-01-12T11:00:00Z" } ``` -------------------------------- ### Create New Vault - API Example Source: https://context7.com/monicahq/docs-gitbook/llms.txt This API call creates a new private data container (vault) within a user's account. It requires a name and description for the vault and returns its unique ID and creation details. ```bash # Create a new vault POST /api/vaults Authorization: Bearer {token} Content-Type: application/json { "name": "Personal Contacts", "description": "My personal relationships and family" } # Response { "vault_id": "vault_98765", "name": "Personal Contacts", "created_at": "2026-01-12T10:30:00Z", "users": [ { "user_id": "user_12345", "role": "manager" } ] } ``` -------------------------------- ### Configure Docker Mailer Source: https://github.com/monicahq/docs-gitbook/blob/main/developers/docker.md This command runs the MonicaHQ Docker image with the 'log' mailer configured. This is useful for testing or development when a full mail server setup is not required. The application will be accessible at http://localhost:8080. ```sh docker run -p 8080:80 -e MAIL_MAILER=log ghcr.io/monicahq/monica-next:main ``` -------------------------------- ### Delete User from Account - API Example Source: https://context7.com/monicahq/docs-gitbook/llms.txt This API endpoint allows administrators to delete users from an account. It specifies the user ID to be removed and provides feedback on the number of vaults deleted or disassociated. ```bash # Delete a user from the account DELETE /api/account/users/{user_id} Authorization: Bearer {admin_token} # Response includes vault cleanup information { "status": "user_deleted", "vaults_deleted": 2, "vaults_removed_from": 3, "message": "User deleted. Vaults where user was sole manager have been deleted." } ``` -------------------------------- ### POST /api/user/notification-channels/{channel_id}/test Source: https://context7.com/monicahq/docs-gitbook/llms.txt Send a test notification to a configured channel to verify its setup and connectivity. ```APIDOC ## POST /api/user/notification-channels/{channel_id}/test ### Description Sends a test notification through a specified notification channel to confirm that the channel is correctly configured and operational. ### Method POST ### Endpoint `/api/user/notification-channels/{channel_id}/test` ### Parameters #### Path Parameters - **channel_id** (string) - Required - The ID of the notification channel to test. #### Query Parameters None #### Request Body None ### Request Example (No request body needed) ### Response #### Success Response (200) - **status** (string) - The status of the test notification attempt (e.g., "test_sent"). - **channel_id** (string) - The ID of the channel the test was sent to. - **delivered** (boolean) - Indicates whether the test notification was successfully delivered. - **sent_at** (string) - The timestamp when the test notification was sent. #### Response Example ```json { "status": "test_sent", "channel_id": "nc_55555", "delivered": true, "sent_at": "2026-01-12T15:30:00Z" } ``` ``` -------------------------------- ### Configure Telegram .env Variables Source: https://github.com/monicahq/docs-gitbook/blob/main/developers/setup-telegram.md These are the essential environment variables required for Telegram integration in MonicaHQ. They include the bot token, bot URL, and a custom webhook URL for security. ```shell TELEGRAM_BOT_TOKEN=393828013:AAEaw8ewefwhKIdkW2E TELEGRAM_BOT_URL=https://t.me/monicahq_bot TELEGRAM_BOT_WEBHOOK_URL=lkjl2kjl2k3232IOWEJFkek ``` -------------------------------- ### GET /api/user/notification-channels/{channel_id}/logs Source: https://context7.com/monicahq/docs-gitbook/llms.txt Retrieve the notification logs for a specific channel, showing past delivery attempts and their statuses. ```APIDOC ## GET /api/user/notification-channels/{channel_id}/logs ### Description Fetches the historical logs for a given notification channel, providing details on when notifications were sent and their delivery status. ### Method GET ### Endpoint `/api/user/notification-channels/{channel_id}/logs` ### Parameters #### Path Parameters - **channel_id** (string) - Required - The ID of the notification channel whose logs are to be retrieved. #### Query Parameters None #### Request Body None ### Request Example (No request body needed) ### Response #### Success Response (200) - **channel_id** (string) - The ID of the notification channel. - **logs** (array) - An array of log entries. - **sent_at** (string) - The timestamp when the notification was sent. - **type** (string) - The type of notification sent (e.g., "reminder"). - **status** (string) - The delivery status of the notification (e.g., "delivered", "failed"). #### Response Example ```json { "channel_id": "nc_55555", "logs": [ {"sent_at": "2026-01-12T09:00:00Z", "type": "reminder", "status": "delivered"}, {"sent_at": "2026-01-11T09:00:00Z", "type": "reminder", "status": "delivered"}, {"sent_at": "2026-01-10T09:00:00Z", "type": "reminder", "status": "failed"} ] } ``` ``` -------------------------------- ### Docker Compose Configuration for MonicaHQ Source: https://context7.com/monicahq/docs-gitbook/llms.txt This `docker-compose.yml` file defines a multi-container setup for MonicaHQ, including the Monica application service, a MySQL database service, and volume configurations for persistent data. It specifies environment variables for database and mailer settings. ```yaml version: '3.8' services: monica: image: ghcr.io/monicahq/monica-next:main ports: - "8080:80" environment: - APP_KEY=${APP_KEY} - DB_CONNECTION=mysql - DB_HOST=db - DB_DATABASE=monica - DB_USERNAME=monica - DB_PASSWORD=secret - MAIL_MAILER=smtp - MAIL_HOST=mailhog - MAIL_PORT=1025 volumes: - ./storage:/var/www/html/storage depends_on: - db db: image: mysql:8.0 environment: - MYSQL_DATABASE=monica - MYSQL_USER=monica - MYSQL_PASSWORD=secret - MYSQL_ROOT_PASSWORD=rootsecret volumes: - mysql-data:/var/lib/mysql volumes: mysql-data: ``` -------------------------------- ### Construct Telegram Webhook URL Source: https://github.com/monicahq/docs-gitbook/blob/main/developers/setup-telegram.md This demonstrates the structure for constructing the webhook URL, which combines your public URL, the Telegram endpoint, and your custom webhook secret. This URL is used by Telegram to send notifications to your Monica instance. ```bash https://[PUBLIC URL].'/telegram/webhook/'.[TELEGRAM_BOT_WEBHOOK_URL] ``` -------------------------------- ### Set Up Telegram Notification Channel (API & cURL) Source: https://context7.com/monicahq/docs-gitbook/llms.txt This section details setting up Telegram notifications. It involves first configuring environment variables for the Telegram bot token, URL, and webhook URL, then registering the webhook with the Telegram API using cURL. Finally, it shows the API call to add the Telegram channel within Monica, including the bot's Telegram ID, a label, and preferred notification time. ```bash # Configure Telegram bot for notifications # First, set environment variables in .env: # TELEGRAM_BOT_TOKEN=393828013:AAEaw8ewefwhKIdkW2E # TELEGRAM_BOT_URL=https://t.me/monicahq_bot # TELEGRAM_BOT_WEBHOOK_URL=lkjl2kjl2k3232IOWEJFkek # Register webhook with Telegram API curl "https://api.telegram.org/bot393828013:AAEaw8ewefwhKIdkW2E/setWebhook?url=https://app.monicahq.com/telegram/webhook/lkjl2kjl2k3232IOWEJFkek" # Expected response { "ok": true, "result": true, "description": "Webhook was set" } # Add Telegram notification channel in Monica POST /api/user/notification-channels/telegram Authorization: Bearer {token} Content-Type: application/json { "telegram_id": "123456789", "label": "My Telegram", "preferred_time": "08:00" } ``` -------------------------------- ### Set Up Email Notification Channel (API) Source: https://context7.com/monicahq/docs-gitbook/llms.txt This API endpoint allows users to configure email notification channels. It requires the email address, a label for the channel, the preferred time for notifications, and the user's timezone. The response indicates the channel ID and its initial status, which is typically pending verification. ```bash # Add an email notification channel POST /api/user/notification-channels/email Authorization: Bearer {token} Content-Type: application/json { "email": "john.doe.personal@gmail.com", "label": "Personal Gmail", "preferred_time": "09:00", "timezone": "America/New_York" } # Response { "channel_id": "nc_55555", "type": "email", "email": "john.doe.personal@gmail.com", "label": "Personal Gmail", "status": "pending_verification", "verification_sent": true } ``` -------------------------------- ### Telegram Webhook Confirmation Source: https://github.com/monicahq/docs-gitbook/blob/main/developers/setup-telegram.md This is the expected JSON response from the Telegram API upon successful registration of your webhook URL. It indicates that Telegram is now configured to send notifications to your Monica instance. ```json {"ok":true,"result":true,"description":"Webhook was set"} ``` -------------------------------- ### Create Custom Contact Template (API) Source: https://context7.com/monicahq/docs-gitbook/llms.txt This API endpoint enables the creation of custom contact templates, which define the structure and modules for different contact types. It requires a name for the template and an array of pages, each with a name, position, and a list of modules. ```bash # Create a new contact template POST /api/account/contact-templates Authorization: Bearer {token} Content-Type: application/json { "name": "Professional Contact", "pages": [ { "name": "Professional Info", "position": 1, "modules": ["work_history", "skills", "projects"] }, { "name": "Networking", "position": 2, "modules": ["meetings", "reminders", "notes"] } ] } # Response { "template_id": "ct_33333", "name": "Professional Contact", "pages": [ {"page_id": "pg_001", "name": "Professional Info", "modules": ["work_history", "skills", "projects"]}, {"page_id": "pg_002", "name": "Networking", "modules": ["meetings", "reminders", "notes"]} ] } ``` -------------------------------- ### Account Creation API Source: https://context7.com/monicahq/docs-gitbook/llms.txt This endpoint allows for the creation of a new user account in Monica. It requires the user's full name, email, and a password. ```APIDOC ## POST /register ### Description Creates a new user account in Monica. ### Method POST ### Endpoint /register ### Parameters #### Request Body - **full_name** (string) - Required - The full name of the user. - **email** (string) - Required - The email address for the account. - **password** (string) - Required - The password for the account. ### Request Example ```json { "full_name": "John Doe", "email": "john.doe@example.com", "password": "SecurePassword123!" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of the operation. - **account_id** (string) - The unique identifier for the newly created account. - **message** (string) - A confirmation message. - **first_vault** (string) - The ID of the default vault created for the account. - **first_contact** (string) - The ID of the initial contact created. #### Response Example ```json { "status": "success", "account_id": "acc_12345", "message": "Account created. Please verify your email.", "first_vault": "vault_67890", "first_contact": "contact_11111" } ``` ``` -------------------------------- ### Localize Strings via Artisan Command Source: https://github.com/monicahq/docs-gitbook/blob/main/developers/translation.md Artisan command to automate the localization process. The 'monica:localize' script extracts translatable strings from views and backend files, updates the corresponding locale files, and uses Google Translate for empty strings. ```shell php artisan monica:localize ``` -------------------------------- ### Run MonicaHQ Docker Image Source: https://github.com/monicahq/docs-gitbook/blob/main/developers/docker.md This command runs the MonicaHQ Docker image locally on port 8080 using SQLite. Access the application at http://localhost:8080. Ensure you have authenticated to the Container registry. ```sh docker run -p 8080:80 ghcr.io/monicahq/monica-next:main ``` -------------------------------- ### Create Journal Post with Custom Template (API) Source: https://context7.com/monicahq/docs-gitbook/llms.txt This API endpoint allows creating a new journal post using a predefined template. It requires the journal ID and a JSON payload containing the template ID and content for each section. The response includes the newly created post's ID and associated journal information. ```bash # Create a journal post using a custom template POST /api/journals/{journal_id}/posts Authorization: Bearer {token} Content-Type: application/json { "template_id": "template_22222", "date": "2026-01-12", "sections": [ { "section_id": "sec_001", "content": "I'm grateful for my family's health and support." }, { "section_id": "sec_002", "content": "1. Morning walk in the park\n2. Productive meeting with my team\n3. Delicious home-cooked meal" }, { "section_id": "sec_003", "content": "I helped my neighbor carry groceries upstairs." } ] } # Response { "post_id": "post_88888", "journal_id": "journal_45678", "template_name": "Daily Gratitude", "created_at": "2026-01-12T20:15:00Z" } ``` -------------------------------- ### Test and View Notification Channel Logs (API) Source: https://context7.com/monicahq/docs-gitbook/llms.txt This API provides functionality to test a notification channel and retrieve its logs. The test endpoint sends a sample notification and returns its status. The logs endpoint retrieves a history of sent notifications, including timestamp, type, and delivery status. ```bash # Send a test notification POST /api/user/notification-channels/{channel_id}/test Authorization: Bearer {token} # Response { "status": "test_sent", "channel_id": "nc_55555", "delivered": true, "sent_at": "2026-01-12T15:30:00Z" } # View notification logs GET /api/user/notification-channels/{channel_id}/logs Authorization: Bearer {token} # Response { "channel_id": "nc_55555", "logs": [ {"sent_at": "2026-01-12T09:00:00Z", "type": "reminder", "status": "delivered"}, {"sent_at": "2026-01-11T09:00:00Z", "type": "reminder", "status": "delivered"}, {"sent_at": "2026-01-10T09:00:00Z", "type": "reminder", "status": "failed"} ] } ``` -------------------------------- ### POST /api/account/contact-templates Source: https://context7.com/monicahq/docs-gitbook/llms.txt Create a new custom contact template to define different data structures for various contact types. ```APIDOC ## POST /api/account/contact-templates ### Description Creates a new custom contact template. These templates allow for flexible data organization based on contact type (e.g., professional, personal). ### Method POST ### Endpoint `/api/account/contact-templates` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **name** (string) - Required - The name of the contact template. - **pages** (array) - Required - An array of page objects that define the structure of the template. - **name** (string) - Required - The name of the page. - **position** (integer) - Required - The display order of the page. - **modules** (array) - Required - An array of strings representing the modules to include on this page. ### Request Example ```json { "name": "Professional Contact", "pages": [ { "name": "Professional Info", "position": 1, "modules": ["work_history", "skills", "projects"] }, { "name": "Networking", "position": 2, "modules": ["meetings", "reminders", "notes"] } ] } ``` ### Response #### Success Response (200) - **template_id** (string) - The ID of the newly created contact template. - **name** (string) - The name of the contact template. - **pages** (array) - An array of page objects defining the template structure. - **page_id** (string) - The ID of the page. - **name** (string) - The name of the page. - **modules** (array) - An array of module names included on the page. #### Response Example ```json { "template_id": "ct_33333", "name": "Professional Contact", "pages": [ {"page_id": "pg_001", "name": "Professional Info", "modules": ["work_history", "skills", "projects"]}, {"page_id": "pg_002", "name": "Networking", "modules": ["meetings", "reminders", "notes"]} ] } ``` ``` -------------------------------- ### POST /api/user/notification-channels/email Source: https://context7.com/monicahq/docs-gitbook/llms.txt Set up an email notification channel, allowing users to receive reminders at a preferred time and timezone. ```APIDOC ## POST /api/user/notification-channels/email ### Description Configures an email address to receive notifications and reminders. The channel requires an email address, an optional label, a preferred time for notifications, and the user's timezone. ### Method POST ### Endpoint `/api/user/notification-channels/email` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **email** (string) - Required - The email address to send notifications to. - **label** (string) - Optional - A human-readable label for the notification channel. - **preferred_time** (string) - Required - The preferred time of day to receive notifications (HH:MM format). - **timezone** (string) - Required - The IANA timezone identifier (e.g., "America/New_York"). ### Request Example ```json { "email": "john.doe.personal@gmail.com", "label": "Personal Gmail", "preferred_time": "09:00", "timezone": "America/New_York" } ``` ### Response #### Success Response (200) - **channel_id** (string) - The unique identifier for this notification channel. - **type** (string) - The type of channel, "email" in this case. - **email** (string) - The configured email address. - **label** (string) - The label for the channel. - **status** (string) - The current status of the channel (e.g., "pending_verification"). - **verification_sent** (boolean) - Indicates if a verification email has been sent. #### Response Example ```json { "channel_id": "nc_55555", "type": "email", "email": "john.doe.personal@gmail.com", "label": "Personal Gmail", "status": "pending_verification", "verification_sent": true } ``` ``` -------------------------------- ### Customize Contact Name Formatting with Variables Source: https://github.com/monicahq/docs-gitbook/blob/main/user-and-account-settings/manage-preferences.md Defines how contact names are displayed by composing them using predefined variables and custom characters. Supports variables like %first_name%, %last_name%, %nickname%, %maiden_name%, and %middle_name%. Ensures variables are enclosed in '%' for correct parsing. ```plaintext %first_name% %last_name% (%nickname%) ``` -------------------------------- ### User Management API Source: https://context7.com/monicahq/docs-gitbook/llms.txt Endpoints for managing users within an account, including inviting new users and deleting existing ones. ```APIDOC ## POST /api/account/users/invite ### Description Invites a new user to join an existing account. ### Method POST ### Endpoint /api/account/users/invite ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **email** (string) - Required - The email address of the user to invite. - **permission** (string) - Required - The permission level for the invited user (e.g., `regular_user`, `administrator`). ### Request Example ```json { "email": "jane.smith@example.com", "permission": "regular_user" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the invitation. - **email** (string) - The email address of the invited user. - **invitation_expires** (string) - The date and time when the invitation expires. #### Response Example ```json { "status": "invitation_sent", "email": "jane.smith@example.com", "invitation_expires": "2026-01-19T12:00:00Z" } ``` ## DELETE /api/account/users/{user_id} ### Description Deletes a user from the account. ### Method DELETE ### Endpoint /api/account/users/{user_id} ### Parameters #### Path Parameters - **user_id** (string) - Required - The ID of the user to delete. #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **status** (string) - Indicates the status of the deletion. - **vaults_deleted** (integer) - The number of vaults that were deleted because the user was the sole manager. - **vaults_removed_from** (integer) - The number of vaults the user was removed from. - **message** (string) - A message detailing the outcome of the deletion. #### Response Example ```json { "status": "user_deleted", "vaults_deleted": 2, "vaults_removed_from": 3, "message": "User deleted. Vaults where user was sole manager have been deleted." } ``` ``` -------------------------------- ### POST /api/journals/{journal_id}/posts Source: https://context7.com/monicahq/docs-gitbook/llms.txt Create a new journal post using a specified template and content for various sections. ```APIDOC ## POST /api/journals/{journal_id}/posts ### Description Creates a new journal post within a specified journal. Requires a `template_id`, `date`, and content for each section defined in the template. ### Method POST ### Endpoint `/api/journals/{journal_id}/posts` ### Parameters #### Path Parameters - **journal_id** (string) - Required - The ID of the journal to add the post to. #### Query Parameters None #### Request Body - **template_id** (string) - Required - The ID of the template to use for the post. - **date** (string) - Required - The date of the journal post (YYYY-MM-DD). - **sections** (array) - Required - An array of section objects, each containing `section_id` and `content`. - **section_id** (string) - Required - The ID of the section. - **content** (string) - Required - The content for the section. ### Request Example ```json { "template_id": "template_22222", "date": "2026-01-12", "sections": [ { "section_id": "sec_001", "content": "I'm grateful for my family's health and support." }, { "section_id": "sec_002", "content": "1. Morning walk in the park\n2. Productive meeting with my team\n3. Delicious home-cooked meal" }, { "section_id": "sec_003", "content": "I helped my neighbor carry groceries upstairs." } ] } ``` ### Response #### Success Response (200) - **post_id** (string) - The ID of the created journal post. - **journal_id** (string) - The ID of the journal the post belongs to. - **template_name** (string) - The name of the template used. - **created_at** (string) - The timestamp when the post was created. #### Response Example ```json { "post_id": "post_88888", "journal_id": "journal_45678", "template_name": "Daily Gratitude", "created_at": "2026-01-12T20:15:00Z" } ``` ``` -------------------------------- ### Vault Management API Source: https://context7.com/monicahq/docs-gitbook/llms.txt Endpoints for managing vaults, including creating new vaults and adding users to existing ones. ```APIDOC ## POST /api/vaults ### Description Creates a new vault within an account. ### Method POST ### Endpoint /api/vaults ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **name** (string) - Required - The name of the new vault. - **description** (string) - Optional - A description for the vault. ### Request Example ```json { "name": "Personal Contacts", "description": "My personal relationships and family" } ``` ### Response #### Success Response (200) - **vault_id** (string) - The unique identifier for the newly created vault. - **name** (string) - The name of the vault. - **created_at** (string) - The timestamp when the vault was created. - **users** (array) - A list of users associated with the vault and their roles. - **user_id** (string) - The ID of the user. - **role** (string) - The role of the user in the vault (e.g., `manager`). #### Response Example ```json { "vault_id": "vault_98765", "name": "Personal Contacts", "created_at": "2026-01-12T10:30:00Z", "users": [ { "user_id": "user_12345", "role": "manager" } ] } ``` ## POST /api/vaults/{vault_id}/users ### Description Adds an existing user to a specific vault with a defined role. ### Method POST ### Endpoint /api/vaults/{vault_id}/users ### Parameters #### Path Parameters - **vault_id** (string) - Required - The ID of the vault to add the user to. #### Query Parameters None #### Request Body - **user_id** (string) - Required - The ID of the user to add. - **role** (string) - Required - The role to assign to the user in the vault (e.g., `contributor`, `viewer`, `manager`). ### Request Example ```json { "user_id": "user_67890", "role": "contributor" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the operation. - **vault_id** (string) - The ID of the vault. - **user_id** (string) - The ID of the user added. - **role** (string) - The role assigned to the user. #### Response Example ```json { "status": "user_added", "vault_id": "vault_98765", "user_id": "user_67890", "role": "contributor" } ``` ``` -------------------------------- ### Add New Language via Artisan Command Source: https://github.com/monicahq/docs-gitbook/blob/main/developers/translation.md Command to add a new language to the application. It uses the 'lang:add' Artisan command, requiring a two-letter language code as an argument. This command initializes the necessary language files for the newly added locale. ```shell php artisan lang:add fr ``` -------------------------------- ### Update Language Files via Artisan Command Source: https://github.com/monicahq/docs-gitbook/blob/main/developers/translation.md Artisan command to update existing language files. The 'lang:update' command helps in managing and synchronizing translation files across different locales, ensuring consistency. ```shell php artisan lang:update ```