### Add Third-Party Account Success Response Example (JSON) Source: https://docs.zapmail.ai/add-third-party-account-details-13490752e0 Example JSON response when successfully adding a third-party account. It indicates a status of 200, a success message, and null data. ```json { "status": 200, "message": "Account added successfully", "data": null } ``` -------------------------------- ### Add Third-Party Account Details Request Example (JSON) Source: https://docs.zapmail.ai/add-third-party-account-details-13490752e0 An example JSON payload for the 'POST /v2/exports/accounts/third-party' endpoint. It demonstrates the required structure including the 'email', 'password', and 'app' fields for specifying the third-party account details. ```json { "email": "user@example.com", "password": "securepassword", "app": "INSTANTLY" } ``` -------------------------------- ### Upgrade Subscription Request Example (JSON) Source: https://docs.zapmail.ai/v1/upgrade-existing-subscription-13489501e0 Example JSON payload for upgrading an existing subscription. It requires the `uniquePlanKey` for the new plan and the `subscriptionId` of the subscription to be upgraded. This is a key part of the request body for the upgrade operation. ```json { "uniquePlanKey": "premium-plan-2024", "subscriptionId": "sub_123456789" } ``` -------------------------------- ### Get Name Servers to Connect Domain Source: https://docs.zapmail.ai/llms Retrieves the necessary nameservers required to connect a domain with Zapmail. ```APIDOC ## GET /domains/nameservers ### Description Get nameservers required to connect a domain with Zapmail. ### Method GET ### Endpoint /domains/nameservers ### Parameters None ### Request Example None ### Response #### Success Response (200) - **nameservers** (array of strings) - A list of nameservers to configure for the domain. ``` -------------------------------- ### GET /v2/dns/ Source: https://docs.zapmail.ai/get-dns-records-13627177e0 Fetches all DNS records for a domain associated with a user by providing the domain ID. ```APIDOC ## GET /v2/dns/ ### Description Fetches all DNS records for a domain associated with a user by providing the domain ID. ### Method GET ### Endpoint /v2/dns/ ### Parameters #### Query Parameters - **id** (string) - Required - The domain ID for which to fetch DNS records. #### Header Parameters - **x-auth-zapmail** (string) - Required - Authentication token for Zapmail. - **x-workspace-key** (string) - Optional - Workspace key for context. - **x-service-provider** (string) - Optional - Specifies the service provider. ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **message** (string) - A message indicating the result of the operation. - **data** (object) - Contains the DNS records and disabled records. - **records** (array) - An array of DNS record objects. - **id** (string) - The ID of the DNS record. - **assignedDomainId** (string) - The ID of the assigned domain. - **cdfRecordId** (string) - The CDF record ID. - **cdfResponse** (object) - Details from the CDF response. - **id** (string) - The CDF response ID. - **name** (string) - The name of the record. - **type** (string) - The type of the record. - **content** (string) - The content of the record. - **recordType** (string) - The type of the DNS record. - **value** (string) - The value of the DNS record. - **host** (string) - The host of the DNS record. - **priority** (null) - The priority of the DNS record (can be null). - **createdAt** (string) - The timestamp when the record was created. - **updatedAt** (string) - The timestamp when the record was last updated. - **deletedAt** (null) - The timestamp when the record was deleted (can be null). - **disabledRecords** (array) - An array of disabled DNS record objects. - **id** (string) - The ID of the disabled record. - **zone_id** (string) - The zone ID of the disabled record. - **name** (string) - The name of the disabled record. - **type** (string) - The type of the disabled record. - **content** (string) - The content of the disabled record. - **ttl** (integer) - The Time To Live for the disabled record. #### Response Example ```json { "status": 200, "message": "DNS records fetched successfully", "data": { "records": [ { "id": "rec_123", "assignedDomainId": "domain_abc", "cdfRecordId": "cdf_xyz", "cdfResponse": { "id": "cdf_resp_1", "name": "mail", "type": "MX", "content": "mx.zapmail.ai" }, "recordType": "MX", "value": "mx.zapmail.ai", "host": "zapmail.ai", "priority": null, "createdAt": "2023-10-27T10:00:00Z", "updatedAt": "2023-10-27T10:00:00Z", "deletedAt": null } ], "disabledRecords": [ { "id": "dis_rec_456", "zone_id": "zone_def", "name": "www", "type": "A", "content": "192.168.1.1", "ttl": 3600 } ] } } ``` ``` -------------------------------- ### GET /websites/zapmail_ai/domains Source: https://docs.zapmail.ai/get-available-domains-for-registration-13521189e0 Retrieves a list of available domains with their pricing details. This endpoint is used to check domain availability and associated costs. ```APIDOC ## GET /websites/zapmail_ai/domains ### Description Retrieves a list of available domains with their pricing details. This endpoint is used to check domain availability and associated costs. ### Method GET ### Endpoint /websites/zapmail_ai/domains ### Parameters #### Query Parameters None #### Request Body None ### Request Example (No request body for GET request) ### Response #### Success Response (200) - **domains** (array) - A list of available domain objects. - **domainName** (string) - The name of the domain. - **status** (string) - The availability status of the domain (e.g., AVAILABLE). - **domainPrice** (string) - The price for registering the domain. - **renewPrice** (string) - The price for renewing the domain. #### Response Example ```json { "domains": [ { "domainName": "incclub.org", "status": "AVAILABLE", "domainPrice": "19.86", "renewPrice": "15.88" }, { "domainName": "global-brewing-company.com", "status": "AVAILABLE", "domainPrice": "21.24", "renewPrice": "17.71" } ] } ``` #### Error Response (400) - **status** (integer) - The HTTP status code (e.g., 400). - **message** (string) - A description of the error. - **errorId** (string) - A unique identifier for the error. #### Error Response Example (Subdomain not accepted) ```json { "status": 400, "message": "subdomain.company.com is not allowed for registration.", "errorId": "44c5ea63-1d2c-4959-b29a-485eb6dd7157" } ``` #### Error Response Example (Invalid TLD) ```json { "status": 400, "message": "ru domains are not allowed for registration.", "errorId": "353a05de-7b71-45de-b40f-050bd972a708" } ``` ``` -------------------------------- ### GET /v1/user/details Source: https://docs.zapmail.ai/v1/retrieve-user-details-13489341e0 This endpoint allows you to fetch information about a user, including their profile details, subscription plan, and mailbox usage. ```APIDOC ## GET /v1/user/details ### Description This endpoint allows you to fetch information about a user. ### Method GET ### Endpoint /v1/user/details ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **status** (integer) - HTTP status code, expected to be 200. - **message** (string) - A message indicating the success of the operation. - **data** (object) - An object containing the user's details. - **id** (string) - The unique identifier for the user. - **email** (string) - The email address of the user. - **firstName** (string) - The first name of the user. - **lastName** (string) - The last name of the user. - **activePlan** (string) - The user's current active subscription plan (e.g., 'Premium'). - **planEndsOn** (string) - The date and time when the user's current plan expires, in ISO 8601 format. - **purchasedMailboxes** (integer) - The total number of mailboxes purchased by the user. - **assignedMailboxes** (integer) - The number of mailboxes currently assigned to the user. - **userCreatedAt** (string) - The date and time when the user account was created, in ISO 8601 format. - **walletBalance** (number) - The current balance in the user's wallet. #### Response Example ```json { "status": 200, "message": "User details fetched successfully", "data": { "id": "12345678-abcd-4efg-90hi-1234567890jk", "email": "example@domain.com", "firstName": "John", "lastName": "Doe", "activePlan": "Premium", "planEndsOn": "2025-03-10T15:00:00.000Z", "purchasedMailboxes": 120, "assignedMailboxes": 85, "userCreatedAt": "2023-01-15T08:30:00.000Z", "walletBalance": 100.5 } } ``` ``` -------------------------------- ### POST /websites/zapmail_ai/workspaces Source: https://docs.zapmail.ai/create-new-workspace-13489947e0 Creates a new workspace for the user. It returns the created workspace details upon success. ```APIDOC ## POST /websites/zapmail_ai/workspaces ### Description Creates a new workspace. The response includes details of the successfully created workspace. ### Method POST ### Endpoint /websites/zapmail_ai/workspaces ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **name** (string) - Required - The name of the new workspace. ### Request Example ```json { "name": "New Workspace" } ``` ### Response #### Success Response (200) - **status** (integer) - The HTTP status code. - **message** (string) - A message indicating success. - **data** (object) - Contains the details of the created workspace. - **id** (string) - The unique identifier of the workspace. - **name** (string) - The name of the workspace. - **userId** (string) - The ID of the user who owns the workspace. - **updatedAt** (string) - The timestamp when the workspace was last updated. - **createdAt** (string) - The timestamp when the workspace was created. - **deletedAt** (null) - Indicates if the workspace has been deleted. #### Response Example ```json { "status": 200, "message": "Workspace created successfully", "data": { "id": "f69cde69-ab43-4168-b78b-77a50a02b8dd", "name": "New Workspace", "userId": "fbf34af0-be3b-4add-bd97-462e2471f65d", "updatedAt": "2024-08-09T06:10:04.855Z", "createdAt": "2024-08-09T06:10:04.855Z", "deletedAt": null } } ``` #### Error Response (409 Conflict) - **status** (integer) - The HTTP status code (409). - **message** (string) - A message indicating that a workspace with the same name already exists. - **errorId** (string) - A unique identifier for the error. #### Error Response Example (409 Conflict) ```json { "status": 409, "message": "Workspace with the same name already exists", "errorId": "5ec7b4e6-3693-49f5-ade3-84158c6c2daa" } ``` ``` -------------------------------- ### Get Domains Purchase Payment Link Source: https://docs.zapmail.ai/llms Gets the payment link for a list of domains or purchases domains via wallet. ```APIDOC ## POST /domains/purchase/payment-link ### Description Get the payment link for a list of domains or purchase domains via wallet. ### Method POST ### Endpoint /domains/purchase/payment-link ### Parameters #### Request Body - **domainNames** (array of strings) - Required - The names of the domains to purchase. - **useWallet** (boolean) - Optional - Whether to use the wallet for payment. ``` -------------------------------- ### POST /v2/domains/available Source: https://docs.zapmail.ai/get-available-domains-for-registration-13521189e0 Retrieves a list of domains available for registration based on provided TLDs and registration years. It also suggests similar domains. ```APIDOC ## POST /v2/domains/available ### Description This endpoint returns a list of domains that are available for registration, along with the exact match and a list of similar domains for a given set of TLDs and years of registration. > Note: Only the following TLDs are allowed for registration - > `com`, `net`, `or`, `in`, `io`, `biz`, `live`, `info` ### Method POST ### Endpoint /v2/domains/available ### Parameters #### Header Parameters - **x-auth-zapmail** (string) - Required - Authentication token for Zapmail. - **x-workspace-key** (string) - Optional - Workspace key for the request. - **x-service-provider** (string) - Optional - Specifies the service provider. #### Request Body - **domainName** (string) - Required - The domain name to check for availability and similar domains. - **tlds** (array of strings) - Required - A list of TLDs to target (e.g., `"com"`, `"live"`, `"info"`). - **years** (integer) - Optional - The number of years to register the domain for. Defaults to 1 year. ### Request Example ```json { "domainName": "company.com", "tlds": [ "com" ], "years": 1 } ``` ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **message** (string) - A message indicating the success of the operation. - **data** (object) - Contains the availability information for the domains. - **availableDomains** (array of objects) - A list of available domains. - **domainName** (string) - The name of the available domain. - **status** (string) - The availability status (e.g., AVAILABLE). - **domainPrice** (string) - The price for registering the domain. - **renewPrice** (string) - The price for renewing the domain. #### Response Example ```json { "status": 200, "message": "Domains fetched successfully", "data": { "availableDomains": [ { "domainName": "globalbrewingcompany.com", "status": "AVAILABLE", "domainPrice": "21.24", "renewPrice": "17.71" }, { "domainName": "brewingcompanyclub.com", "status": "AVAILABLE", "domainPrice": "21.24", "renewPrice": "17.71" }, { "domainName": "globalcoclub.com", "status": "AVAILABLE", "domainPrice": "21.24", "renewPrice": "17.71" }, { "domainName": "brewinginc.com", "status": "AVAILABLE", "domainPrice": "21.24", "renewPrice": "17.71" } ] } } ``` ``` -------------------------------- ### Cancel Subscription API Request Example (JSON) Source: https://docs.zapmail.ai/v1/cancel-subscription-13489478e0 This is an example of a JSON request body to cancel a user subscription. It requires the 'subscriptionId' field, which is a string representing the unique identifier of the subscription to be cancelled. ```json { "subscriptionId": "sub_123456789" } ``` -------------------------------- ### Get Available Domains for Registration Source: https://docs.zapmail.ai/llms Returns a list of domains available for registration, along with exact match and similar domains for given TLDs and registration years. ```APIDOC ## GET /domains/available ### Description This endpoint returns a list of domains that are available for registration, along with the exact match and a list of similar domains for a given set of TLDs and years of registration. ### Method GET ### Endpoint /domains/available ### Parameters #### Query Parameters - **query** (string) - Required - The base domain name or keywords to search for. - **tlds** (array of strings) - Required - A list of Top-Level Domains to check. - **years** (integer) - Required - The number of years to register the domain for. ``` -------------------------------- ### GET /users Source: https://docs.zapmail.ai/v1 Retrieves the details of a specific user. ```APIDOC ## GET /users ### Description Retrieves the details of a specific user. ### Method GET ### Endpoint `/users` ### Parameters #### Query Parameters - **userId** (string) - Required - The unique identifier for the user. ``` -------------------------------- ### Add Third-Party Account Invalid Credentials Response Example (JSON) Source: https://docs.zapmail.ai/add-third-party-account-details-13490752e0 Example JSON response for an invalid credentials error when attempting to add a third-party account. It returns a status of 400 with an error message and null data. ```json { "status": 400, "message": "Invalid credentials, failed to authenticate", "data": null } ``` -------------------------------- ### Connect Domain with Zapmail (New) Source: https://docs.zapmail.ai/llms Use this endpoint to connect a domain to Zapmail. ```APIDOC ## POST /domains/connect/new ### Description Use this endpoint to connect domain to Zapmail. ### Method POST ### Endpoint /domains/connect/new ### Parameters #### Request Body - **domainId** (string) - Required - The ID of the domain to connect. ``` -------------------------------- ### Get All Subscriptions - OpenAPI Specification Source: https://docs.zapmail.ai/get-all-subscriptions-13489431e0 This OpenAPI specification defines the GET /v2/subscriptions endpoint. It allows authenticated users to fetch a list of their subscriptions, including details like status, plan, pricing, and billing information. Requires 'x-auth-zapmail' header. ```yaml openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /v2/subscriptions: get: summary: Get all subscriptions deprecated: false description: >- Fetch all subscriptions associated with the authenticated user, including active, cancelled, and expired subscriptions, along with plan and billing details. tags: - subscriptions parameters: - name: x-auth-zapmail in: header description: '' required: true example: '' schema: type: string - name: x-workspace-key in: header description: '' required: false example: '' schema: type: string - name: ' x-service-provider' in: header description: '' required: false example: '' schema: type: string responses: '200': description: '' content: application/json: schema: type: object properties: status: type: integer message: type: string data: type: array items: type: object properties: id: type: string subscriptionId: type: string subscriptionStatus: type: string plan: type: string price: type: integer totalMailboxQuantity: type: integer periodStart: type: string periodEnd: type: string subscriptionCreationDate: type: string planUpgradeCancelPossible: type: boolean paymentFailureMessage: type: string nullable: true invoiceDetails: type: string required: - id - subscriptionId - subscriptionStatus - plan - price - totalMailboxQuantity - periodStart - periodEnd - subscriptionCreationDate - planUpgradeCancelPossible - paymentFailureMessage - invoiceDetails x-apidog-orders: - id - subscriptionId - subscriptionStatus - plan - price - totalMailboxQuantity - periodStart - periodEnd - subscriptionCreationDate - planUpgradeCancelPossible - paymentFailureMessage - invoiceDetails required: - status - message - data x-apidog-orders: - status - message - data example: status: 200 message: User subscriptions data: - id: abcd1234-5678-90ef-ghij-klmn12345678 subscriptionId: sub_1XYZabc1234567890QWERTY subscriptionStatus: ACTIVE plan: ENTERPRISE price: 199 totalMailboxQuantity: 500 periodStart: '2025-01-01T08:00:00.000Z' periodEnd: '2025-02-01T08:00:00.000Z' subscriptionCreationDate: '2024-12-01T08:00:00.000Z' planUpgradeCancelPossible: false paymentFailureMessage: null invoiceDetails: https://invoice.example.com/i/test_invoicenumber_1 - id: efgh5678-1234-90ij-klmn-opqr45678901 subscriptionId: sub_2XYZabc1234567890ASDFGH subscriptionStatus: CANCELLED plan: BASIC price: 29 totalMailboxQuantity: 20 periodStart: '2024-06-15T08:00:00.000Z' periodEnd: '2024-07-15T08:00:00.000Z' subscriptionCreationDate: '2024-05-15T08:00:00.000Z' planUpgradeCancelPossible: true ``` -------------------------------- ### POST /v2/billing - Add Billing Details Source: https://docs.zapmail.ai/add-billing-details-13490005e0 This endpoint allows you to add billing information for a workspace. It includes details such as the user's name, company, address, and contact information. ```APIDOC ## POST /v2/billing ### Description Use this endpoint to add billing information for a workspace. Billing details include the user’s name, company, address, and contact information. ### Method POST ### Endpoint /v2/billing ### Parameters #### Header Parameters - **x-auth-zapmail** (string) - Required - - **x-workspace-key** (string) - Optional - - ** x-service-provider** (string) - Optional - #### Request Body - **firstName** (string) - Required - - **lastName** (string) - Required - - **company** (string) - Required - - **addressLineOne** (string) - Required - - **addressLineTwo** (string) - Required - - **addressLineThree** (null) - Required - - **city** (string) - Required - - **state** (string) - Required - - **country** (string) - Required - - **postalCode** (string) - Required - - **phoneCc** (string) - Required - - **phone** (string) - Required - - **workspaceId** (string) - Required - ### Request Example ```json { "firstName": "Michael", "lastName": "Johnson", "company": "Tech Innovations", "addressLineOne": "2207 Maple Avenue, Suite 500", "addressLineTwo": "Building B", "addressLineThree": null, "city": "Dallas", "state": "Texas", "country": "US", "postalCode": "75201", "phoneCc": "1", "phone": "2149876543", "workspaceId": "" } ``` ### Response #### Success Response (200) - **status** (integer) - - **message** (string) - - **data** (null) - #### Response Example ```json { "status": 200, "message": "Billing details added successfully", "data": null } ``` ``` -------------------------------- ### Add DMARC Record Request Example (JSON) Source: https://docs.zapmail.ai/v1/add-dmarc-record-13520817e0 An example of the JSON request body required to add a DMARC record to one or more domains. It specifies the domain IDs, an email address, and an optional filter for domain names. ```json { "domainIds": ["1234-abcd-5678-efgh"], "email": "admin@mydomain.com", "contains": "example" } ``` -------------------------------- ### Verify Name Server Propagation Source: https://docs.zapmail.ai/llms Verifies the propagation of Name Servers for domain connection with Zapmail. ```APIDOC ## GET /domains/verify-nameservers ### Description Verify Name Servers for Domain Connection with Zapmail. ### Method GET ### Endpoint /domains/verify-nameservers ### Parameters #### Query Parameters - **domainId** (string) - Required - The ID of the domain to verify. ``` -------------------------------- ### GET /v2/mailboxes/list Source: https://docs.zapmail.ai/retrieve-all-mailboxes-13490172e0 Retrieves a list of all mailboxes with optional filtering and sorting parameters. ```APIDOC ## GET /v2/mailboxes/list ### Description This endpoint lets you fetch a list of all mailboxes. You can filter the results using query parameters and authenticate your request using the `x-auth-zapmail` header. ### Method GET ### Endpoint /v2/mailboxes/list ### Parameters #### Query Parameters - **page** (string) - Optional - The page number for pagination. - **limit** (string) - Optional - The number of items to return per page. - **contains** (string) - Optional - Filters mailboxes to those associated with domains containing the specified string. #### Header Parameters - **x-auth-zapmail** (string) - Required - Authentication token for Zapmail. - **x-workspace-key** (string) - Optional - The workspace key for accessing specific resources. - **x-service-provider** (string) - Optional - Specifies the service provider (e.g., GOOGLE, MICROSOFT). ### Response #### Success Response (200) - **status** (integer) - The status code of the response. - **message** (string) - A message indicating the success or failure of the request. - **data** (object) - An object containing mailbox-related data. - **totalSearchedCount** (integer) - The total number of mailboxes matching the search criteria. - **currentPage** (integer) - The current page number. - **nextPage** (integer) - The page number for the next set of results. - **totalPages** (integer) - The total number of available pages. - **purchasedMailboxes** (integer) - The number of purchased mailboxes. - **totalAssignedMailboxes** (integer) - The total number of assigned mailboxes. - **totalAssignedPreWarmedUpMailboxes** (integer) - The total number of assigned pre-warmed-up mailboxes. - **totalActiveMailboxes** (integer) - The total number of active mailboxes. - **totalActivePreWarmedUpMailboxes** (integer) - The total number of active pre-warmed-up mailboxes. - **availableMailboxes** (integer) - The number of available mailboxes. - **domainMailboxCounts** (integer) - The count of mailboxes per domain. - **scheduledMailboxes** (integer) - The number of scheduled mailboxes. - **expiredMailboxesCount** (integer) - The count of expired mailboxes. - **domains** (array) - A list of domains and their associated mailboxes. - **id** (string) - The unique identifier for the domain. - **domain** (string) - The domain name. - **status** (string) - The status of the domain. - **mailboxes** (array) - A list of mailboxes for the domain. - **id** (string) - The unique identifier for the mailbox. - **username** (string) - The username of the mailbox. - **email** (string) - The email address of the mailbox. - **firstName** (string) - The first name associated with the mailbox. - **lastName** (string) - The last name associated with the mailbox. - **password** (string) - The password for the mailbox. - **appPassword** (string, nullable) - The application-specific password for the mailbox. - **secret** (string, nullable) - A secret associated with the mailbox. - **recoveryEmail** (string) - The recovery email address for the mailbox. - **status** (string) - The status of the mailbox. - **profilePicture** (null) - Placeholder for profile picture information. - **domain** (string) - The domain the mailbox belongs to. - **domainId** (string) - The ID of the domain the mailbox belongs to. - **assignedOn** (string) - The date and time the mailbox was assigned. - **expireOn** (string) - The date and time the mailbox expires. ### Request Example ```json { "example": "Not applicable for GET request" } ``` ### Response Example #### Success Response (200) ```json { "status": 200, "message": "Mailboxes retrieved successfully.", "data": { "totalSearchedCount": 5, "currentPage": 1, "nextPage": 2, "totalPages": 10, "purchasedMailboxes": 100, "totalAssignedMailboxes": 50, "totalAssignedPreWarmedUpMailboxes": 20, "totalActiveMailboxes": 45, "totalActivePreWarmedUpMailboxes": 15, "availableMailboxes": 50, "domainMailboxCounts": 10, "scheduledMailboxes": 5, "expiredMailboxesCount": 2, "domains": [ { "id": "domain123", "domain": "example.com", "status": "active", "mailboxes": [ { "id": "mailbox001", "username": "user1", "email": "user1@example.com", "firstName": "John", "lastName": "Doe", "password": "hashed_password1", "appPassword": null, "secret": null, "recoveryEmail": "recovery@example.com", "status": "active", "profilePicture": null, "domain": "example.com", "domainId": "domain123", "assignedOn": "2023-10-27T10:00:00Z", "expireOn": "2024-10-27T10:00:00Z" } ] } ] } } ``` ``` -------------------------------- ### GET /v2/mailboxes Source: https://docs.zapmail.ai/get-mailbox-details-by-id-13490215e0 Retrieves the details of a specific mailbox by its ID. Authentication is required. ```APIDOC ## GET /v2/mailboxes ### Description Use this endpoint to retrieve the details of a specific mailbox by its ID. Authentication is required. ### Method GET ### Endpoint https://api.zapmail.ai/api/v2/mailboxes ### Parameters #### Query Parameters - **id** (string) - Required - The ID of the mailbox to retrieve. #### Header Parameters - **x-auth-zapmail** (string) - Required - Zapmail authentication token. - **x-workspace-key** (string) - Optional - The workspace key. - **x-service-provider** (string) - Optional - The service provider. ### Response #### Success Response (200) - The response body is an empty object for a successful retrieval. #### Error Response (403) - **status** (integer) - The HTTP status code. - **message** (string) - A message describing the error. - **errorId** (string) - A unique identifier for the error. #### Error Response (404) - **status** (integer) - The HTTP status code. - **message** (string) - A message describing the error. - **errorId** (string) - A unique identifier for the error. ### Request Example ```json { "id": "your_mailbox_id" } ``` ### Response Example (Success) ```json { } ``` ### Response Example (Error 403) ```json { "status": 403, "message": "Forbidden", "errorId": "some_error_id" } ``` ### Response Example (Error 404) ```json { "status": 404, "message": "Not Found", "errorId": "another_error_id" } ``` ``` -------------------------------- ### Authentication Source: https://docs.zapmail.ai/zapmail-docs-825990m0 Information on how to obtain and use your API key for authenticating requests. Includes details on workspace and service provider headers. ```APIDOC ## Authentication ### Description Before making any API requests, you’ll need your unique **API key**. This key is used to authenticate and authorize your requests. To locate your API key: 1. Navigate to your **Zapmail Dashboard**. 2. Go to **Settings**. 3. Open **Integrations**. 4. Click on **API**. Your **API key** will be visible under **Zapmail Dashboard → API Settings**. > **Note:** > If you want to perform operations outside your primary workspace, include the following headers in your requests: > - `x-workspace-key`: The workspace ID you want to access. > - `x-service-provider`: The service provider (`GOOGLE` or `MICROSOFT`). ### Request Headers - **Authorization**: `Bearer YOUR_API_KEY` (Required) - **x-workspace-key**: (Optional) The workspace ID you want to access. - **x-service-provider**: (Optional) The service provider (`GOOGLE` or `MICROSOFT`). ``` -------------------------------- ### Enable Email Forwarding Request Body Example (JSON) Source: https://docs.zapmail.ai/v1/enable-email-forwarding-13521023e0 This JSON object represents an example request body for enabling email forwarding. It includes an array of domain IDs, the target forwarding email address, and an optional 'contains' keyword to filter which domains the forwarding applies to. ```json { "domainIds": ["domainId1", "domainId2"], "email": "forwardto@example.com", "contains": "example" } ``` -------------------------------- ### POST /v2/domains/buy Source: https://docs.zapmail.ai/get-domains-purchase-payment-link-13521209e0 Retrieves a payment link for purchasing one or more domains, or to purchase domains using an existing wallet balance. ```APIDOC ## POST /v2/domains/buy ### Description Get the payment link for a list of domains or purchase domains via wallet. ### Method POST ### Endpoint /v2/domains/buy ### Parameters #### Header Parameters - **x-auth-zapmail** (string) - Optional - - **x-workspace-key** (string) - Optional - - **x-service-provider** (string) - Optional - #### Request Body - **domains** (array) - Required - List of domains to purchase. - **domainName** (string) - Required - The domain name that you want to purchase. - **years** (number) - Optional - The number of years you want to register the domain for. Default is 1. - **useWallet** (boolean) - Required - Set to `true` if you want to use wallet balance for the purchase. ### Request Example ```json { "domains": [ { "domainName": "domain.com", "years": 1 } ], "useWallet": false } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message. - **paymentLink** (string) - The URL for the payment. #### Response Example ```json { "message": "Your payment Link is generated", "paymentLink": "https://payment.example.com" } ``` ``` -------------------------------- ### API Server Configuration Source: https://docs.zapmail.ai/retrieve-user-details-13489341e0 Defines the production environment server URL for the Zapmail AI API. This is used by clients to interact with the live API. ```yaml servers: - url: https://api.zapmail.ai/api description: Prod Env ``` -------------------------------- ### Get Domain Connection Requests Source: https://docs.zapmail.ai/llms Retrieves a list of domains that are in progress and pending connection with Zapmail. ```APIDOC ## GET /domains/connection-requests ### Description This endpoint allows you to retrieve a list of domains that are still in progress and pending connection with Zapmail. ### Method GET ### Endpoint /domains/connection-requests ### Parameters None ### Request Example None ### Response #### Success Response (200) - **requests** (array) - A list of pending domain connection requests. ``` -------------------------------- ### POST /v1/payment/add-wallet-balance Source: https://docs.zapmail.ai/v1/add-balance-to-wallet-13490582e0 This endpoint allows you to add balance to a user's wallet. ```APIDOC ## POST /v1/payment/add-wallet-balance ### Description This endpoint allows you to add balance to a user's wallet. ### Method POST ### Endpoint /v1/payment/add-wallet-balance ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **amount** (number) - Required - The amount to add to the wallet. ### Request Example ```json { "amount": 100.00 } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. - **paymentLink** (string) - URL for the payment session. #### Response Example ```json { "message": "Checkout session created successfully", "paymentLink": "https://example.com/payment-link/12345" } ``` ``` -------------------------------- ### POST /v2/domains/available-bulk Source: https://docs.zapmail.ai/get-availability-of-multiple-domain-names-22701420e0 Check the availability and pricing of multiple domain names in a single request. Supports up to 20 domains per request. ```APIDOC ## POST /v2/domains/available-bulk ### Description This endpoint allows you to check the availability of up to 20 domain names in a single request. This is ideal for bulk domain searches, letting you quickly determine which domains are available for registration and their corresponding prices for the specified number of years. Rate Limit: 10 requests every 30 minutes per client. ### Method POST ### Endpoint /v2/domains/available-bulk ### Parameters #### Header Parameters - **x-auth-zapmail** (string) - Required - Authentication token for Zapmail. - **x-workspace-key** (string) - Optional - Workspace key for the request. - **x-service-provider** (string) - Optional - Specifies the service provider. #### Request Body - **domainNames** (string array) - Required - The list of domain names you want to check for availability. - **years** (string) - Required - Number of years for which you intend to register the domain. ### Request Example ```json { "domainNames": [ "example.com", "example1.com", "example2.com" ], "years": "1" } ``` ### Response #### Success Response (200) - **status** (integer) - HTTP status code. - **message** (string) - A message indicating the result of the request. - **data** (object) - Contains domain availability details. - **domains** (array) - List of domain objects. - **domainName** (string) - The name of the domain. - **status** (string) - Availability status (e.g., AVAILABLE, UNAVAILABLE). - **isPremiumDomain** (boolean) - Indicates if the domain is a premium domain. - **domainPrice** (string) - The price for registering the domain. - **renewPrice** (string) - The price for renewing the domain. - **total** (integer) - Total number of domains checked. - **available** (integer) - Number of available domains. - **unavailable** (integer) - Number of unavailable domains. - **01K7KVK04A7S2KA491J9KXRNVR** (string) - Potentially an internal identifier or status code. #### Response Example ```json { "status": 200, "message": "List of available domains", "data": { "domains": [ { "domainName": "example.com", "status": "UNAVAILABLE", "isPremiumDomain": false, "domainPrice": "12.99", "renewPrice": "17.99" }, { "domainName": "example1.com", "status": "AVAILABLE", "isPremiumDomain": false, "domainPrice": "11.50", "renewPrice": "15.75" } ], "total": 2, "available": 1, "unavailable": 1 }, "01K7KVK04A7S2KA491J9KXRNVR": "some_value" } ``` ```