Bitrix24 Mail Services API

The Mail Services API from Bitrix24 — 6 operation(s) for mail services.

GitHub OpenAPI

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /mailservice.add Add a mail service · Create Mail Service mailservice.add #
Ask an LLM
“How do I add an email account to Bitrix24?”
“Can I set the IMAP server and port when adding a mail service?”
Tell an agent
Add mail service {name}.
Create mail service {name} on server {server} port {port}.
POST /mailservice.delete Delete a mail service · Delete Mail Service mailservice.delete #
Ask an LLM
“How do I remove an email account from Bitrix24?”
“Can I delete a mail service by its ID?”
Tell an agent destructive · confirm first
Delete mail service {id}.
Remove the email account {id} from Bitrix24.
POST /mailservice.fields Get the field names for mail services · Get Mail Service Fields mailservice.fields #
Ask an LLM
“What field names are used for mail services?”
“Which localized labels does the mail service form use?”
Tell an agent
Show the field names for mail services.
Get the localized labels of mail service fields.
POST /mailservice.get Get a mail service · Get the mailservice.get method #
Ask an LLM
“How do I look up one email account's settings?”
“What server and port does a particular mail service use?”
Tell an agent
Get mail service {id}.
Show the settings of email account {id}.
POST /mailservice.list List active mail services · Get the list of mail services mailservice.list #
Ask an LLM
“Which email accounts are currently active?”
“Can I see all mail services on the account?”
Tell an agent
List active mail services.
Show every email account configured.
POST /mailservice.update Update a mail service · Update Mail Service mailservice.update #
Ask an LLM
“How do I change the IMAP server of an existing email account?”
“Can I rename a mail service or switch its encryption?”
Tell an agent
Rename mail service {id} to {name}.
Point existing email account {id} at server {server} port {port}.

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/bitrix24:bitrix24-mail-services-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

bitrix24-mail-services-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Bitrix24 REST Mail Services API
  version: 1.0.0
  description: 'Bitrix24 REST API provides access to CRM, tasks, drive, chats, telephony, e-commerce, automation, and other modules. Documentation: https://apidocs.bitrix24.com'
  contact:
    name: Bitrix24 Developer Support
    url: https://apidocs.bitrix24.com/support.html
  license:
    name: MIT
    url: https://github.com/bitrix-tools/b24-rest-docs/blob/main/LICENSE
  x-logo:
    url: https://apidocs.bitrix24.com/_images/bitrix24logo.svg
servers:
- url: https://{portal}.bitrix24.com/rest
  description: Your Bitrix24 portal (cloud)
  variables:
    portal:
      default: your-portal
      description: Subdomain of your Bitrix24 portal
- url: https://{host}/rest
  description: On-Premise Bitrix24 installation
  variables:
    host:
      default: your-bitrix24.example.com
      description: Host of your on-premise installation
security:
- AccessToken: []
tags:
- name: Mail Services
paths:
  /mailservice.add:
    post:
      summary: Create Mail Service mailservice.add
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation. The method `mailservice.add` creates a mail service for the current Bitrix24.
      operationId: mailservice_add
      tags:
      - Mail Services
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/mailservice/mailservice-add.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                NAME:
                  type: string
                  description: '| Name of the mail service ||'
                ACTIVE:
                  type: string
                  description: '| Service activity status. Allowed values:'
                SERVER:
                  type: string
                  description: '| IMAP server address. Stored in lowercase in the database ||'
                PORT:
                  type: integer
                  description: '| IMAP server port ||'
                ENCRYPTION:
                  type: string
                  description: '| Secure connection status. Allowed values:'
                LINK:
                  type: string
                  description: '| Web interface address of the mail service ||'
                ICON:
                  type: string
                  description: 'Bitrix24 type: file'
                SORT:
                  type: integer
                  description: '| Sort index. Default value: `100` ||'
              required:
              - NAME
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                NAME:
                  type: string
                  description: '| Name of the mail service ||'
                ACTIVE:
                  type: string
                  description: '| Service activity status. Allowed values:'
                SERVER:
                  type: string
                  description: '| IMAP server address. Stored in lowercase in the database ||'
                PORT:
                  type: integer
                  description: '| IMAP server port ||'
                ENCRYPTION:
                  type: string
                  description: '| Secure connection status. Allowed values:'
                LINK:
                  type: string
                  description: '| Web interface address of the mail service ||'
                ICON:
                  type: string
                  description: 'Bitrix24 type: file'
                SORT:
                  type: integer
                  description: '| Sort index. Default value: `100` ||'
              required:
              - NAME
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - mailservice
  /mailservice.delete:
    post:
      summary: Delete Mail Service mailservice.delete
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation. The method `mailservice.delete` removes a mail service by its identifier.
      operationId: mailservice_delete
      tags:
      - Mail Services
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/mailservice/mailservice-delete.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ID:
                  type: integer
                  description: '| Identifier of the mail service.'
              required:
              - ID
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                ID:
                  type: integer
                  description: '| Identifier of the mail service.'
              required:
              - ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - mailservice
  /mailservice.fields:
    post:
      summary: Get Mail Service Fields mailservice.fields
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation. The method `mailservice.fields` returns localized names of the mail service fields.
      operationId: mailservice_fields
      tags:
      - Mail Services
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/mailservice/mailservice-fields.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
          application/x-www-form-urlencoded:
            schema:
              type: object
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - mailservice
  /mailservice.get:
    post:
      summary: Get the mailservice.get method
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation. The `mailservice.get` method returns the parameters of the mail service by its identifier.
      operationId: mailservice_get
      tags:
      - Mail Services
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/mailservice/mailservice-get.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ID:
                  type: integer
                  description: '| Identifier of the mail service.'
              required:
              - ID
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                ID:
                  type: integer
                  description: '| Identifier of the mail service.'
              required:
              - ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - mailservice
  /mailservice.list:
    post:
      summary: Get the list of mail services mailservice.list
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation. The method `mailservice.list` returns a list of active mail services.
      operationId: mailservice_list
      tags:
      - Mail Services
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/mailservice/mailservice-list.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
          application/x-www-form-urlencoded:
            schema:
              type: object
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - mailservice
  /mailservice.update:
    post:
      summary: Update Mail Service mailservice.update
      description: If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation. The method `mailservice.update` modifies the parameters of an existing mail service.
      operationId: mailservice_update
      tags:
      - Mail Services
      externalDocs:
        url: https://apidocs.bitrix24.com/api-reference/mailservice/mailservice-update.html
        description: Official Documentation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                ID:
                  type: integer
                  description: '| Identifier of the mail service.'
                ACTIVE:
                  type: string
                  description: '| Service activity status. Acceptable values:'
                NAME:
                  type: string
                  description: '| Name of the service ||'
                SERVER:
                  type: string
                  description: '| IMAP server address. Stored in lowercase in the database. ||'
                PORT:
                  type: integer
                  description: '| IMAP server port ||'
                ENCRYPTION:
                  type: string
                  description: '| Secure connection status. Acceptable values:'
                LINK:
                  type: string
                  description: '| Web interface address of the service ||'
                ICON:
                  type: string
                  description: 'Bitrix24 type: file'
                SORT:
                  type: integer
                  description: '| Sort index ||'
              required:
              - ID
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                ID:
                  type: integer
                  description: '| Identifier of the mail service.'
                ACTIVE:
                  type: string
                  description: '| Service activity status. Acceptable values:'
                NAME:
                  type: string
                  description: '| Name of the service ||'
                SERVER:
                  type: string
                  description: '| IMAP server address. Stored in lowercase in the database. ||'
                PORT:
                  type: integer
                  description: '| IMAP server port ||'
                ENCRYPTION:
                  type: string
                  description: '| Secure connection status. Acceptable values:'
                LINK:
                  type: string
                  description: '| Web interface address of the service ||'
                ICON:
                  type: string
                  description: 'Bitrix24 type: file'
                SORT:
                  type: integer
                  description: '| Sort index ||'
              required:
              - ID
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixResponse'
        4XX:
          description: Request error (400, 401, 403)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BitrixError'
      security:
      - AccessToken: []
      - OAuth2:
        - mailservice
components:
  schemas:
    BitrixError:
      type: object
      description: Bitrix24 REST API error response
      required:
      - error
      - error_description
      properties:
        error:
          type: string
          description: Error code
          example: ACCESS_DENIED
        error_description:
          type: string
          description: Human-readable error description
          example: Access denied.
    BitrixTime:
      type: object
      description: Request execution time information
      properties:
        start:
          type: number
          format: double
        finish:
          type: number
          format: double
        duration:
          type: number
          format: double
        processing:
          type: number
          format: double
        date_start:
          type: string
          format: date-time
        date_finish:
          type: string
          format: date-time
        operating_reset_at:
          type: integer
        operating:
          type: number
          format: double
    BitrixResponse:
      type: object
      description: Standard Bitrix24 REST API response
      properties:
        result:
          description: Method execution result
        total:
          type: integer
          description: Total number of records (for list methods)
        next:
          type: integer
          description: Next offset for pagination
        time:
          $ref: '#/components/schemas/BitrixTime'
  securitySchemes:
    AccessToken:
      type: apiKey
      in: query
      name: auth
      description: OAuth 2.0 access_token or incoming webhook token
    OAuth2:
      type: oauth2
      description: OAuth 2.0 authorization
      flows:
        authorizationCode:
          authorizationUrl: https://oauth.bitrix.info/oauth/authorize/
          tokenUrl: https://oauth.bitrix.info/oauth/token/
          scopes:
            crm: CRM — leads, deals, contacts, companies, smart processes
            task: Tasks and projects
            disk: Drive — files and folders
            im: Chats and notifications
            imbot: Chatbots
            imopenlines: Open Lines — messenger connectors
            telephony: Telephony
            sale: E-Commerce — orders, shipments
            catalog: Trade Catalog — products, prices
            calendar: Calendar
            bizproc: Business processes and robots
            user: Users
            department: Company structure
            timeman: Time tracking
            landing: Sites and landing pages
            pay_system: Payment systems
            cashbox: Online cash registers
            delivery: Delivery services
            documentgenerator: Document generator
            lists: Universal lists
            entity: Data storage
            log: News feed
            sonet_group: Workgroups and projects
            mailservice: Mail services
            messageservice: Message providers (SMS)
            biconnector: BIconnector — BI analytics
            ai_admin: CoPilot / AI
            sign.b2e: Signature — e-document signing
            vote: Polls and voting
            booking: Online booking
            userconsent: User consent agreements
            userfieldconfig: Custom field settings
            basic: Basic access
            placement: Widget placements
            rpa: Robots process automation
            sonet: Social network
            intranet: Intranet
            socialnetwork: Social network
            workgroups: Workgroups
            salescenter: Sales center
            main: Main module
            imconnector: IM connector
            user.userfield: User custom fields
            user_basic: Basic user access
            userfieldconfig, module scope: Custom field config
externalDocs:
  description: Official Bitrix24 REST API Documentation
  url: https://apidocs.bitrix24.com