> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sync Email Account

> Sync the given account, from mail server to SuperOffice database cache.

This API has no throttling, so please be careful with multiple concurrent calls. Mail servers may become angry.
NsApiSlow threshold: 5000 ms.
<para />## Online Restricted: ## The EMail agent is not available in Online by default. Access must be requested specifically when app is registered.



## OpenAPI

````yaml /openapi/agent/openapi-v3-EMailAgent.json post /api/v1/Agents/EMail/SyncEmailAccount
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - EMailAgent
  contact:
    name: SuperOffice DevNet
    url: https://docs.superoffice.com/en/api/index.html
    email: sdk@superoffice.com
servers:
  - url: http://localhost:56350
  - url: https://localhost:56350
security: []
tags: []
externalDocs:
  description: >-
    The SuperOffice DevNet Community has more documentation, examples, and
    discussion forums.
  url: https://community.superoffice.com/en/developer/
paths:
  /api/v1/Agents/EMail/SyncEmailAccount:
    post:
      tags:
        - EMail_Agent
      summary: Sync Email Account
      description: "Sync the given account, from mail server to SuperOffice database cache.\n\nThis API has no throttling, so please be careful with multiple concurrent calls. Mail servers may become angry.\r\nNsApiSlow threshold: 5000 ms.\r\n<para />## Online Restricted: ## The EMail agent is not available in Online by default. Access must be requested specifically when app is registered."
      operationId: v1EMailAgent_SyncEmailAccount
      parameters:
        - name: $select
          in: query
          description: >-
            Optional comma separated list of properties to include in the
            result. Other fields are then nulled out to reduce payload size:
            "Name,department,category". Default = show all fields.
          required: false
          schema:
            type: string
        - name: SO-AppToken
          in: header
          description: >-
            The application token that identifies the partner app. Used when
            calling Online WebAPI from a server.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.EMailCarriers.SyncEmailAccountRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.EMailCarriers.SyncEmailAccountRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.EMailCarriers.SyncEmailAccountRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.EMailCarriers.SyncEmailAccountRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.EMailCarriers.SyncEmailAccountRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.EMailCarriers.SyncEmailAccountRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.EMailCarriers.SyncEmailAccountRequest
        description: SyncUserAccount
        required: true
      responses:
        '204':
          description: No Content
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.EMailCarriers.SyncEmailAccountRequest:
      description: >-
        SyncEmailAccount: Sync the given account, from mail server to
        SuperOffice database cache. This API has no throttling, so please be
        careful with multiple concurrent calls. Mail servers may become angry.
      type: object
      properties:
        SyncUserAccount:
          $ref: '#/components/schemas/SuperOffice.CRM.Services.SyncUserAccount'
    SuperOffice.CRM.Services.SyncUserAccount:
      description: "Details for syncing email user accounts\r\n<para />\r\nCarrier object for SyncUserAccount.\r\nServices for the SyncUserAccount Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IEMailAgent\">EMail Agent</see>."
      type: object
      properties:
        AccountId:
          format: int32
          description: The account primary key
          type: integer
        AssociateName:
          description: The username of the associate owning the account
          type: string
        AssociateId:
          format: int32
          description: Id of the associate who owns this account
          type: integer
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Security.TableRight:
      description: "Wraps a table right together with an explanatory reason.\r\nCode can indicate why access is restricted."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string
    SuperOffice.CRM.Security.FieldProperty:
      description: >-
        Class holding properties like field length, field type about a field in
        the carrier.
      type: object
      properties:
        FieldRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldRight'
        FieldType:
          type: string
        FieldLength:
          format: int32
          description: ''
          type: integer
    SuperOffice.CRM.Security.FieldRight:
      description: "Wraps the field right together with an explanatory reason.\r\nAlso adds logical operators to the field rights so that they can be easily combined."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string

````

## Related topics

- [Sync Email Accounts](/en/api/reference/restful/agent/email_agent/sync-email-accounts.md)
- [Get Ready Sync Email Accounts](/en/api/reference/restful/agent/email_agent/get-ready-sync-email-accounts.md)
- [SuperOffice.WebApi.Data.EMail SyncEmailAccountRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.EMail_SyncEmailAccountRequest.md)
- [SuperOffice.WebApi.Data.EMail SyncEmailAccountsRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.EMail_SyncEmailAccountsRequest.md)
- [SuperOffice.WebApi.Data.EMail GetReadySyncEmailAccountsRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.EMail_GetReadySyncEmailAccountsRequest.md)
- [SuperOffice.WebApi.Agents.EMailAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.EMailAgent.md)
