### API Key Authentication Example Source: https://forwardemail.net/en/email-api This example demonstrates how to construct the Authorization header using your API Key for Basic Authentication. Replace YOUR_API_KEY with your actual key. ```bash Authorization: Basic WU9VUl9BUElfS0VZOg== ``` -------------------------------- ### Account Update Response Example Source: https://forwardemail.net/en/email-api This is a sample JSON response after successfully updating account information. The response structure mirrors the GET /v1/account response. ```json { "sessions": [], "has_newsletter": true, "plan": "free", "email": "test1@test1.com", "max_quota_per_alias": 10737418240, "full_email": "test1@test1.com", "display_name": "test1@test1.com", "otp_enabled": false, "last_locale": "en", "address_country": "None", "id": "683fb2e81cc5d449a0d4cd9d", "object": "user", "locale": "en", "created_at": "2025-06-04T02:43:52.646Z", "updated_at": "2025-06-04T02:43:55.350Z", "address_html": "", "api_token": "15ac16ae21784ae2cb4d5508" } ``` -------------------------------- ### Pagination Example with cURL Source: https://forwardemail.net/en/email-api Endpoints returning lists support pagination via query parameters. This example shows how to retrieve the second page of results with 20 items per page and pagination enabled. ```bash curl "https://api.forwardemail.net/v1/domains?page=2&limit=20&pagination=true" \ -u API_TOKEN: ``` -------------------------------- ### API Key Authentication Example Source: https://forwardemail.net/en/email-api Use your API Key as the username for Basic Authentication. The password field should be left empty. This example shows the format for the Authorization header. ```bash echo -n "YOUR_API_KEY:" | base64 ``` ```http Authorization: Basic WU9VUl9BUElfS0VZOg== ``` -------------------------------- ### Account Retrieval Response Example Source: https://forwardemail.net/en/email-api This is a sample JSON response when successfully retrieving account information. It includes user details and plan information. ```json { "sessions": [], "has_newsletter": true, "plan": "enhanced_protection", "email": "user@example.com", "max_quota_per_alias": 10737418240, "full_email": "user@example.com", "display_name": "John Doe", "otp_enabled": false, "last_locale": "en", "address_country": "US", "id": "683fb2e81cc5d449a0d4cd9d", "object": "user", "locale": "en", "created_at": "2025-06-04T02:43:52.646Z", "updated_at": "2025-06-04T02:43:55.350Z", "address_html": "", "api_token": "15ac16ae21784ae2cb4d5508" } ``` -------------------------------- ### Basic Authentication Header Example Source: https://forwardemail.net/en/email-api Most endpoints require authentication using your API Key. Provide the API Key as the username in the Basic Authentication header, leaving the password empty. ```http Authorization: Basic QVBJX1RPS0VOOg== ``` -------------------------------- ### Retrieve Account Information Source: https://forwardemail.net/en/email-api Send a GET request to the /v1/account endpoint to retrieve account details. Ensure you have set up the correct authentication headers. ```curl curl -X GET "https://api.forwardemail.net/v1/account" \ -H "Authorization: Basic WU9VUl9BUElfS0VZOg==" ``` -------------------------------- ### Get Account Source: https://forwardemail.net/en/email-api Retrieves the account details. This endpoint is part of the Account management operations. ```APIDOC ## GET /v1/account ### Description Retrieves the account details. ### Method GET ### Endpoint /v1/account ### Parameters #### Query Parameters - **page** (Integer) - Optional - Page number to retrieve. - **limit** (Integer) - Optional - Number of results per page. - **pagination** (Boolean) - Optional - Opt-in to pagination behavior. ### Response #### Success Response (200) - **message** (string) - Description of the account details. ``` -------------------------------- ### Update Account Information Source: https://forwardemail.net/en/email-api Updates your account information. Supports updating user profile fields with API token authentication or alias-scoped settings with alias credentials. The response mirrors the structure of the GET /v1/account endpoint. ```APIDOC ## PUT /v1/account ### Description Update your account information. Supports updating user profile fields with API token authentication or alias-scoped settings with alias credentials. The response mirrors the structure of the GET /v1/account endpoint. ### Method PUT ### Endpoint /v1/account ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **settings** (object) - Required - Alias settings (alias authentication only) - **mail** (object) - - **archive_folder** (any) - - **sent_folder** (any) - - **drafts_folder** (any) - - **label_settings** (object) - - **ANY_ADDITIONAL_PROPERTY** (object) - - **name** (string) - - **color** (string) - - **hidden** (boolean) - - **source** (string) - - **aliases** (object) - - **defaults** (object) - - **ANY_ADDITIONAL_PROPERTY** (string) - - **display_name** (string) - Display name - **locale** (string) - Locale preference - **email** (string) - Required - Updated email address (user authentication only) - **avatar_url** (string) - Avatar URL (user authentication only) ### Request Example ``` curl https://api.forwardemail.net/v1/account \ --request PUT \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic username:password' \ --data '{ "settings": { "mail": { "archive_folder": null, "sent_folder": null, "drafts_folder": null }, "label_settings": { "ANY_ADDITIONAL_PROPERTY": { "name": "", "color": "", "hidden": true, "source": "custom" } }, "aliases": { "defaults": { "ANY_ADDITIONAL_PROPERTY": "anything" } } }, "display_name": "", "locale": "", "email": "", "avatar_url": "" }' ``` ### Response #### Success Response (200) Account updated successfully. - **sessions** (array) - - **has_newsletter** (boolean) - - **plan** (string) - - **email** (string) - - **max_quota_per_alias** (integer) - - **full_email** (string) - - **display_name** (string) - - **otp_enabled** (boolean) - - **last_locale** (string) - - **address_country** (string) - - **id** (string) - - **object** (string) - - **locale** (string) - - **created_at** (string) - - **updated_at** (string) - - **address_html** (string) - - **api_token** (string) - #### Response Example ```json { "sessions": [], "has_newsletter": true, "plan": "free", "email": "test1@test1.com", "max_quota_per_alias": 10737418240, "full_email": "test1@test1.com", "display_name": "test1@test1.com", "otp_enabled": false, "last_locale": "en", "address_country": "None", "id": "683fb2e81cc5d449a0d4cd9d", "object": "user", "locale": "en", "created_at": "2025-06-04T02:43:52.646Z", "updated_at": "2025-06-04T02:43:55.350Z", "address_html": "", "api_token": "15ac16ae21784aa2cb4d5508" } ``` ``` -------------------------------- ### Retrieve Account Information Source: https://forwardemail.net/en/email-api Use this endpoint to fetch your user or alias account details. Authentication can be done via API token or alias credentials. ```shell curl https://api.forwardemail.net/v1/account \ --header 'Authorization: Basic username:password' ``` -------------------------------- ### Update Account Information Source: https://forwardemail.net/en/email-api Use this endpoint to modify your account details, including user profile fields or alias-scoped settings. Ensure correct authentication. ```shell curl https://api.forwardemail.net/v1/account \ --request PUT \ --header 'Content-Type: application/json' \ --header 'Authorization: Basic username:password' \ --data '{ \ "settings": { \ "mail": { \ "archive_folder": null, \ "sent_folder": null, \ "drafts_folder": null \ }, \ "label_settings": { \ "ANY_ADDITIONAL_PROPERTY": { \ "name": "", \ "color": "", \ "hidden": true, \ "source": "custom" \ } \ }, \ "aliases": { \ "defaults": { \ "ANY_ADDITIONAL_PROPERTY": "anything" \ } \ } \ }, \ "display_name": "", \ "locale": "", \ "email": "", \ "avatar_url": "" \ }' ``` -------------------------------- ### Retrieve Account Information Source: https://forwardemail.net/en/email-api Retrieves your account information. Supports both API token and alias credentials authentication. Returns user or alias details based on the authentication method used. ```APIDOC ## GET /v1/account ### Description Retrieve your account information. This endpoint supports both API token authentication and alias credentials authentication. ### Method GET ### Endpoint /v1/account ### Parameters #### Query Parameters None #### Request Body None ### Request Example ``` curl https://api.forwardemail.net/v1/account \ --header 'Authorization: Basic username:password' ``` ### Response #### Success Response (200) Account retrieved successfully. - **sessions** (array) - - **has_newsletter** (boolean) - - **plan** (string) - - **email** (string) - - **max_quota_per_alias** (integer) - - **full_email** (string) - - **display_name** (string) - - **otp_enabled** (boolean) - - **last_locale** (string) - - **address_country** (string) - - **id** (string) - - **object** (string) - - **locale** (string) - - **created_at** (string) - - **updated_at** (string) - - **address_html** (string) - - **api_token** (string) - #### Response Example ```json { "sessions": [], "has_newsletter": true, "plan": "enhanced_protection", "email": "user@example.com", "max_quota_per_alias": 10737418240, "full_email": "user@example.com", "display_name": "John Doe", "otp_enabled": false, "last_locale": "en", "address_country": "US", "id": "683fb2e81cc5d449a0d4cd9d", "object": "user", "locale": "en", "created_at": "2025-06-04T02:43:52.646Z", "updated_at": "2025-06-04T02:43:55.350Z", "address_html": "", "api_token": "15ac16ae21784aa2cb4d5508" } ``` ``` -------------------------------- ### Invite Management Source: https://forwardemail.net/en/email-api Endpoints for managing domain invites. ```APIDOC ## Invites ### Description Domain invite management endpoints. ### Operations * **GET** `/v1/domains/{domain_id}/invites` * **POST** `/v1/domains/{domain_id}/invites` * **DELETE** `/v1/domains/{domain_id}/invites` ``` -------------------------------- ### Alias Management Source: https://forwardemail.net/en/email-api Endpoints for managing domain aliases, including password generation. ```APIDOC ## Aliases ### Description Domain alias management endpoints. ### Operations * **POST** `/v1/domains/{domain_id}/aliases/{alias_id}/generate-password` * **GET** `/v1/domains/{domain_id}/aliases` * **POST** `/v1/domains/{domain_id}/aliases` * **GET** `/v1/domains/{domain_id}/aliases/{alias_id}` * **PUT** `/v1/domains/{domain_id}/aliases/{alias_id}` * **DELETE** `/v1/domains/{domain_id}/aliases/{alias_id}` ``` -------------------------------- ### WebSockets Source: https://forwardemail.net/en/email-api Connect to the WebSocket endpoint for real-time push notifications on various events. ```APIDOC ## GET /v1/ws ### Description Establishes a WebSocket connection for real-time event notifications. Authentication is optional. ### Method GET ### Endpoint /v1/ws ### Parameters #### Query Parameters - **token** (string) - Optional - Authentication token for authenticated connections. ### Events - **message_delivered** - **message_moved** - **message_copied** - **message_flag_changed** - **message_expunged** - **mailbox_created** - **mailbox_renamed** - **mailbox_deleted** - **calendar_created** - **calendar_updated** - **calendar_deleted** - **calendar_event_created** - **calendar_event_updated** - **calendar_event_deleted** - **contact_created** - **contact_updated** - **contact_deleted** - **address_book_created** - **address_book_updated** - **address_book_deleted** - **new_release** ### Response Example (Event Payload) { "type": "message_delivered", "payload": { "message_id": "message_id_1", "alias_id": "alias_id_1" } } ``` -------------------------------- ### Domain Management Source: https://forwardemail.net/en/email-api Endpoints for managing domains, including verification and testing. ```APIDOC ## Domains ### Description Domain endpoints with a domain's name or ID as their endpoint are interchangeable. ### Operations * **GET** `/v1/domains` * **POST** `/v1/domains` * **GET** `/v1/domains/{domain_id}` * **PUT** `/v1/domains/{domain_id}` * **DELETE** `/v1/domains/{domain_id}` * **GET** `/v1/domains/{domain_id}/verify-records` * **GET** `/v1/domains/{domain_id}/verify-smtp` * **POST** `/v1/domains/{domain_id}/test-s3-connection` * **POST** `/v1/domains/{domain_id}/catch-all-passwords` * **GET** `/v1/domains/{domain_id}/catch-all-passwords` * **DELETE** `/v1/domains/{domain_id}/catch-all-passwords/{token_id}` * **PUT** `/v1/domains/{domain_id}/allowlist` * **PUT** `/v1/domains/{domain_id}/denylist` ``` -------------------------------- ### Search Domain Availability Source: https://forwardemail.net/en/email-api-integration-developers Allows developers to check the availability of a domain name. This is a crucial first step for setting up custom domain email hosting. ```APIDOC ## GET /v1/domains/availability ### Description Checks the availability of a domain name for registration. ### Method GET ### Endpoint /v1/domains/availability ### Parameters #### Query Parameters - **domain** (string) - Required - The domain name to check for availability. ### Response #### Success Response (200) - **available** (boolean) - Indicates if the domain is available for registration. #### Response Example { "available": true } ``` -------------------------------- ### Calendar Management Source: https://forwardemail.net/en/email-api Endpoints for managing alias calendars (CalDAV) with timezone and color support. ```APIDOC ## Calendars ### Description Alias calendars management endpoints (CalDAV). These endpoints require Basic Authorization headers. ### Operations * **GET** `/v1/calendars` * **POST** `/v1/calendars` * **GET** `/v1/calendars/{id}` * **PUT** `/v1/calendars/{id}` * **DELETE** `/v1/calendars/{id}` ``` -------------------------------- ### Retrieve Account Source: https://forwardemail.net/en/email-api This endpoint retrieves the account details for the authenticated user. It requires API Key authentication. ```APIDOC ## GET /v1/account ### Description Retrieve account details for the authenticated user. ### Method GET ### Endpoint https://api.forwardemail.net/v1/account ### Authentication Requires API Key authentication. Use your API Key as the **username** for Basic Authentication. Leave the password field empty. The `Authorization` header should be formatted as `Basic :`. Example: `Authorization: Basic WU9VUl9BUElfS0VZOg==` ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **field1** (type) - Description #### Response Example { "example": "response body" } ``` -------------------------------- ### Calendar Event Management Source: https://forwardemail.net/en/email-api Endpoints for managing alias calendar events (CalDAV) with iCalendar support. ```APIDOC ## Calendar Events ### Description Alias calendar events management endpoints (CalDAV). These endpoints require Basic Authorization headers. ### Operations * **GET** `/v1/calendar-events` * **POST** `/v1/calendar-events` * **GET** `/v1/calendar-events/{id}` * **PUT** `/v1/calendar-events/{id}` * **DELETE** `/v1/calendar-events/{id}` ``` -------------------------------- ### Folders Operations Source: https://forwardemail.net/en/email-api Endpoints for managing email folders, including creation, retrieval, renaming, and deletion. Folder paths can include parent folders. ```APIDOC ## GET /v1/folders ### Description Retrieves a list of all folders. ### Method GET ### Endpoint /v1/folders ### Response #### Success Response (200) - **folders** (array) - A list of folder objects. #### Response Example { "folders": [ { "id": "folder_id_1", "path": "INBOX" } ] } ``` ```APIDOC ## POST /v1/folders ### Description Creates a new folder. Parent folders will be created automatically if they do not exist. ### Method POST ### Endpoint /v1/folders ### Parameters #### Request Body - **path** (string) - Required - The path for the new folder (e.g., 'INBOX/Subfolder'). ### Request Example { "path": "INBOX/Archive" } ### Response #### Success Response (200) - **id** (string) - The ID of the newly created folder. - **path** (string) - The path of the newly created folder. #### Response Example { "id": "new_folder_id", "path": "INBOX/Archive" } ``` ```APIDOC ## GET /v1/folders/{id} ### Description Retrieves a specific folder by its ID or path. ### Method GET ### Endpoint /v1/folders/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID or path of the folder to retrieve. ### Response #### Success Response (200) - **folder** (object) - The folder object. #### Response Example { "folder": { "id": "folder_id_1", "path": "INBOX" } } ``` ```APIDOC ## PUT /v1/folders/{id} ### Description Renames a specific folder by its ID or path. ### Method PUT ### Endpoint /v1/folders/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID or path of the folder to rename. #### Request Body - **path** (string) - Required - The new path for the folder. ### Request Example { "path": "INBOX/Archived" } ### Response #### Success Response (200) - **folder** (object) - The updated folder object. #### Response Example { "folder": { "id": "folder_id_1", "path": "INBOX/Archived" } } ``` ```APIDOC ## DELETE /v1/folders/{id} ### Description Deletes a specific folder by its ID or path. ### Method DELETE ### Endpoint /v1/folders/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID or path of the folder to delete. ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the folder was deleted. #### Response Example { "message": "Folder deleted successfully." } ``` -------------------------------- ### Member Management Source: https://forwardemail.net/en/email-api Endpoints for managing domain members. ```APIDOC ## Members ### Description Domain member management endpoints. ### Operations * **PUT** `/v1/domains/{domain_id}/members/{member_id}` * **DELETE** `/v1/domains/{domain_id}/members/{member_id}` ``` -------------------------------- ### Contact Management Source: https://forwardemail.net/en/email-api Endpoints for managing alias contacts (CardDAV) with vCard support. ```APIDOC ## Contacts ### Description Alias contacts management endpoints (CardDAV). These endpoints require Basic Authorization headers. ### Operations * **GET** `/v1/contacts` * **POST** `/v1/contacts` * **GET** `/v1/contacts/{id}` * **PUT** `/v1/contacts/{id}` * **DELETE** `/v1/contacts/{id}` ``` -------------------------------- ### Email Management Source: https://forwardemail.net/en/email-api Endpoints for managing emails, including retrieval, creation, and deletion. ```APIDOC ## Emails ### Description Endpoints for managing emails. ### Operations * **GET** `/v1/emails` * **POST** `/v1/emails` * **GET** `/v1/emails/limit` * **GET** `/v1/emails/{id}` * **DELETE** `/v1/emails/{id}` ``` -------------------------------- ### Push Tokens Operations Source: https://forwardemail.net/en/email-api Endpoints for registering and managing push notification tokens for APNs, FCM, UnifiedPush, and Web Push. ```APIDOC ## GET /v1/push-tokens ### Description Retrieves a list of registered push notification tokens for the authenticated alias. ### Method GET ### Endpoint /v1/push-tokens ### Response #### Success Response (200) - **tokens** (array) - A list of push token objects. #### Response Example { "tokens": [ { "id": "token_id_1", "token": "device_token_string", "provider": "fcm" } ] } ``` ```APIDOC ## POST /v1/push-tokens ### Description Registers a new push notification token for the authenticated alias. ### Method POST ### Endpoint /v1/push-tokens ### Parameters #### Request Body - **token** (string) - Required - The push notification token. - **provider** (string) - Required - The provider of the token (e.g., 'apns', 'fcm', 'unifiedpush', 'webpush'). ### Request Example { "token": "new_device_token_string", "provider": "fcm" } ### Response #### Success Response (200) - **id** (string) - The ID of the newly registered token. #### Response Example { "id": "new_token_id" } ``` ```APIDOC ## DELETE /v1/push-tokens ### Description Deletes all push notification tokens for the authenticated alias. ### Method DELETE ### Endpoint /v1/push-tokens ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the tokens were deleted. #### Response Example { "message": "All push tokens deleted successfully." } ``` ```APIDOC ## DELETE /v1/push-tokens/{id} ### Description Deletes a specific push notification token by its ID. ### Method DELETE ### Endpoint /v1/push-tokens/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the push token to delete. ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the token was deleted. #### Response Example { "message": "Push token deleted successfully." } ``` -------------------------------- ### Encryption Source: https://forwardemail.net/en/email-api Endpoint for encryption operations. ```APIDOC ## Encrypt ### Description Encryption endpoints. ### Operations * **POST** `/v1/encrypt` ``` -------------------------------- ### Sieve Scripts Operations Source: https://forwardemail.net/en/email-api Endpoints for managing Sieve scripts, which are used for automatic email filtering and organization. Supports two authentication methods. ```APIDOC ## GET /v1/domains/{domain_id}/aliases/{alias_id}/sieve ### Description Retrieves Sieve scripts for a specific alias using API Token Auth. ### Method GET ### Endpoint /v1/domains/{domain_id}/aliases/{alias_id}/sieve ### Parameters #### Path Parameters - **domain_id** (string) - Required - The ID of the domain. - **alias_id** (string) - Required - The ID of the alias. ### Response #### Success Response (200) - **scripts** (array) - A list of Sieve script objects. #### Response Example { "scripts": [ { "id": "script_id_1", "name": "Spam Filter", "script": "if header :contains \"subject\" \"spam\" { discard; }" } ] } ``` ```APIDOC ## POST /v1/domains/{domain_id}/aliases/{alias_id}/sieve ### Description Creates a new Sieve script for a specific alias using API Token Auth. ### Method POST ### Endpoint /v1/domains/{domain_id}/aliases/{alias_id}/sieve ### Parameters #### Path Parameters - **domain_id** (string) - Required - The ID of the domain. - **alias_id** (string) - Required - The ID of the alias. #### Request Body - **name** (string) - Required - The name of the script. - **script** (string) - Required - The Sieve script content. ### Request Example { "name": "Vacation Responder", "script": "require \"vacation\"; vacation text: \"Out of office.\" " } ### Response #### Success Response (200) - **id** (string) - The ID of the newly created script. #### Response Example { "id": "new_script_id" } ``` ```APIDOC ## GET /v1/domains/{domain_id}/aliases/{alias_id}/sieve/{script_id} ### Description Retrieves a specific Sieve script by its ID or name using API Token Auth. ### Method GET ### Endpoint /v1/domains/{domain_id}/aliases/{alias_id}/sieve/{script_id} ### Parameters #### Path Parameters - **domain_id** (string) - Required - The ID of the domain. - **alias_id** (string) - Required - The ID of the alias. - **script_id** (string) - Required - The ID or name of the script. ### Response #### Success Response (200) - **script** (object) - The Sieve script object. #### Response Example { "script": { "id": "script_id_1", "name": "Spam Filter", "script": "if header :contains \"subject\" \"spam\" { discard; }" } } ``` ```APIDOC ## PUT /v1/domains/{domain_id}/aliases/{alias_id}/sieve/{script_id} ### Description Updates a specific Sieve script by its ID or name using API Token Auth. ### Method PUT ### Endpoint /v1/domains/{domain_id}/aliases/{alias_id}/sieve/{script_id} ### Parameters #### Path Parameters - **domain_id** (string) - Required - The ID of the domain. - **alias_id** (string) - Required - The ID of the alias. - **script_id** (string) - Required - The ID or name of the script. #### Request Body - **script** (string) - Required - The updated Sieve script content. ### Request Example { "script": "if header :contains \"subject\" \"urgent\" { fileinto \"Urgent\"; }" } ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the script was updated. #### Response Example { "message": "Sieve script updated successfully." } ``` ```APIDOC ## DELETE /v1/domains/{domain_id}/aliases/{alias_id}/sieve/{script_id} ### Description Deletes a specific Sieve script by its ID or name using API Token Auth. ### Method DELETE ### Endpoint /v1/domains/{domain_id}/aliases/{alias_id}/sieve/{script_id} ### Parameters #### Path Parameters - **domain_id** (string) - Required - The ID of the domain. - **alias_id** (string) - Required - The ID of the alias. - **script_id** (string) - Required - The ID or name of the script. ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the script was deleted. #### Response Example { "message": "Sieve script deleted successfully." } ``` ```APIDOC ## POST /v1/domains/{domain_id}/aliases/{alias_id}/sieve/{script_id}/activate ### Description Activates a specific Sieve script using API Token Auth. ### Method POST ### Endpoint /v1/domains/{domain_id}/aliases/{alias_id}/sieve/{script_id}/activate ### Parameters #### Path Parameters - **domain_id** (string) - Required - The ID of the domain. - **alias_id** (string) - Required - The ID of the alias. - **script_id** (string) - Required - The ID or name of the script to activate. ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the script was activated. #### Response Example { "message": "Sieve script activated successfully." } ``` ```APIDOC ## GET /v1/sieve-scripts ### Description Retrieves a list of all Sieve scripts using Alias Auth. ### Method GET ### Endpoint /v1/sieve-scripts ### Response #### Success Response (200) - **scripts** (array) - A list of Sieve script objects. #### Response Example { "scripts": [ { "id": "script_id_1", "name": "Spam Filter" } ] } ``` ```APIDOC ## POST /v1/sieve-scripts ### Description Creates a new Sieve script using Alias Auth. ### Method POST ### Endpoint /v1/sieve-scripts ### Parameters #### Request Body - **name** (string) - Required - The name of the script. - **script** (string) - Required - The Sieve script content. ### Request Example { "name": "Forwarding Rule", "script": "require \"fileinto\"; fileinto \"Forwarded\";" } ### Response #### Success Response (200) - **id** (string) - The ID of the newly created script. #### Response Example { "id": "new_script_id" } ``` ```APIDOC ## GET /v1/sieve-scripts/{script_id} ### Description Retrieves a specific Sieve script by its ID or name using Alias Auth. ### Method GET ### Endpoint /v1/sieve-scripts/{script_id} ### Parameters #### Path Parameters - **script_id** (string) - Required - The ID or name of the script. ### Response #### Success Response (200) - **script** (object) - The Sieve script object. #### Response Example { "script": { "id": "script_id_1", "name": "Spam Filter", "script": "if header :contains \"subject\" \"spam\" { discard; }" } } ``` ```APIDOC ## PUT /v1/sieve-scripts/{script_id} ### Description Updates a specific Sieve script by its ID or name using Alias Auth. ### Method PUT ### Endpoint /v1/sieve-scripts/{script_id} ### Parameters #### Path Parameters - **script_id** (string) - Required - The ID or name of the script. #### Request Body - **script** (string) - Required - The updated Sieve script content. ### Request Example { "script": "require \"reject\"; reject \"Spam detected\";" } ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the script was updated. #### Response Example { "message": "Sieve script updated successfully." } ``` ```APIDOC ## DELETE /v1/sieve-scripts/{script_id} ### Description Deletes a specific Sieve script by its ID or name using Alias Auth. ### Method DELETE ### Endpoint /v1/sieve-scripts/{script_id} ### Parameters #### Path Parameters - **script_id** (string) - Required - The ID or name of the script. ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the script was deleted. #### Response Example { "message": "Sieve script deleted successfully." } ``` ```APIDOC ## POST /v1/sieve-scripts/{script_id}/activate ### Description Activates a specific Sieve script using Alias Auth. ### Method POST ### Endpoint /v1/sieve-scripts/{script_id}/activate ### Parameters #### Path Parameters - **script_id** (string) - Required - The ID or name of the script to activate. ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the script was activated. #### Response Example { "message": "Sieve script activated successfully." } ``` -------------------------------- ### Messages Operations Source: https://forwardemail.net/en/email-api Endpoints for managing email messages, including retrieval, creation, updating, and deletion. These operations support advanced search capabilities and require specific authentication headers. ```APIDOC ## GET /v1/messages ### Description Retrieves a list of messages. Supports advanced search capabilities. ### Method GET ### Endpoint /v1/messages ### Parameters #### Query Parameters - **folder** (string) - Optional - The folder to search within. - **flags** (string) - Optional - Flags to filter messages by. - **query** (string) - Optional - Search query for message content, headers, etc. - **date_from** (string) - Optional - Start date for filtering. - **date_to** (string) - Optional - End date for filtering. - **size_from** (integer) - Optional - Minimum message size. - **size_to** (integer) - Optional - Maximum message size. ### Response #### Success Response (200) - **messages** (array) - A list of message objects. #### Response Example { "messages": [ { "id": "message_id_1", "subject": "Example Subject", "from": "sender@example.com", "date": "2023-10-27T10:00:00Z" } ] } ``` ```APIDOC ## POST /v1/messages ### Description Creates a new message. Supports standard Nodemailer format. ### Method POST ### Endpoint /v1/messages ### Parameters #### Request Body - **message** (object) - Required - The message content in Nodemailer format. ### Request Example { "message": { "to": "recipient@example.com", "subject": "New Message", "text": "This is the message body." } } ### Response #### Success Response (200) - **id** (string) - The ID of the newly created message. #### Response Example { "id": "new_message_id" } ``` ```APIDOC ## GET /v1/messages/{id} ### Description Retrieves a specific message by its ID. ### Method GET ### Endpoint /v1/messages/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the message to retrieve. ### Response #### Success Response (200) - **message** (object) - The message object. #### Response Example { "message": { "id": "message_id_1", "subject": "Example Subject", "body": "This is the message body." } } ``` ```APIDOC ## PUT /v1/messages/{id} ### Description Updates a specific message by its ID. Supports moving messages between folders and managing flags. ### Method PUT ### Endpoint /v1/messages/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the message to update. #### Request Body - **folder** (string) - Optional - The new folder to move the message to. - **flags** (array) - Optional - An array of flags to set for the message. ### Response #### Success Response (200) - **message** (object) - The updated message object. #### Response Example { "message": { "id": "message_id_1", "folder": "INBOX/Archive", "flags": ["\Seen"] } } ``` ```APIDOC ## DELETE /v1/messages/{id} ### Description Deletes a specific message by its ID. ### Method DELETE ### Endpoint /v1/messages/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The ID of the message to delete. ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the message was deleted. #### Response Example { "message": "Message deleted successfully." } ``` -------------------------------- ### Update Account Source: https://forwardemail.net/en/email-api Updates the account details. This endpoint is part of the Account management operations. ```APIDOC ## PUT /v1/account ### Description Updates the account details. ### Method PUT ### Endpoint /v1/account ### Parameters #### Request Body - **message** (string) - Required - The updated account details. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.