> ## 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.

# Post Mailing Entity

> Creates a new MailingEntity

Calls the Marketing agent service SaveMailingEntity.
NsApiSlow threshold: 5000 ms.



## OpenAPI

````yaml /openapi/rest/openapi-v3-Mailing.json post /api/v1/Mailing
openapi: 3.0.0
info:
  version: v1-REST
  title: SuperOffice REST API v1
  description: SuperOffice REST API - Mailing
  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/Mailing:
    post:
      tags:
        - Mailing
      summary: Post Mailing Entity
      description: "Creates a new MailingEntity\n\nCalls the Marketing agent service SaveMailingEntity.\r\nNsApiSlow threshold: 5000 ms."
      operationId: v1MailingEntity_PostMailingEntity
      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: Accept-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code.
          required: false
          schema:
            type: string
        - name: SO-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code. Overrides Accept-Language value.
          required: false
          schema:
            type: string
        - name: SO-Culture
          in: header
          description: >-
            Number, date formatting in a specified culture (iso2 language) code.
            Partially overrides SO-Language/Accept-Language value. Ignored if no
            Language set.
          required: false
          schema:
            type: string
        - name: SO-TimeZone
          in: header
          description: >-
            Specify the timezone code that you would like date/time responses
            converted to.
          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:
        $ref: '#/components/requestBodies/SuperOffice.CRM.Services.MailingEntity'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.WebApi.v1.Carriers.MarketingCarriers.MailingEntityWithLinks
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.WebApi.v1.Carriers.MarketingCarriers.MailingEntityWithLinks
            application/xml:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.WebApi.v1.Carriers.MarketingCarriers.MailingEntityWithLinks
            text/xml:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.WebApi.v1.Carriers.MarketingCarriers.MailingEntityWithLinks
            application/json-patch+json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.WebApi.v1.Carriers.MarketingCarriers.MailingEntityWithLinks
            application/merge-patch+json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.WebApi.v1.Carriers.MarketingCarriers.MailingEntityWithLinks
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  requestBodies:
    SuperOffice.CRM.Services.MailingEntity:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.MailingEntity'
        text/json:
          schema:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.MailingEntity'
        application/xml:
          schema:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.MailingEntity'
        text/xml:
          schema:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.MailingEntity'
        application/x-www-form-urlencoded:
          schema:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.MailingEntity'
        application/json-patch+json:
          schema:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.MailingEntity'
        application/merge-patch+json:
          schema:
            $ref: '#/components/schemas/SuperOffice.CRM.Services.MailingEntity'
      description: The MailingEntity to be saved.
      required: true
  schemas:
    SuperOffice.WebApi.v1.Carriers.MarketingCarriers.MailingEntityWithLinks:
      description: "A mailing (shipment) — the run that sends a message to a set of recipients\r\n<para />\r\nMailingEntity entity with API _Links added."
      type: object
      properties:
        MailingId:
          format: int32
          description: Primary key
          type: integer
        Description:
          description: Describes the shipment
          type: string
        MessageId:
          format: int32
          description: The id of the message that is sent in this shipment
          type: integer
        FolderId:
          format: int32
          description: >-
            The folder which this shipment belongs to. -1 indicates that the
            shipment is on the root
          type: integer
        StartDate:
          format: date-time
          description: The date and time when to start this shipment
          type: string
        EndDate:
          format: date-time
          description: Is set when this shipment is ended
          type: string
        FromAddr:
          description: Email address to put in the From header of the messages
          type: string
        ReplyAddr:
          description: 'Email address to put in the Reply To: header of the messages'
          type: string
        EnvelopeFrom:
          description: Email address for the MTA envelope (where bounces are returned)
          type: string
        Status:
          description: Sending/stopped/failed etc.
          enum:
            - None
            - Ok
            - Canceled
            - Waiting
            - Started
            - StatusFailed
            - Retry
            - Populating
            - Deleted
            - AwaitPopulate
            - PopulatingOnly
            - PopulateAborted
            - PopulateError
            - TooManyRecipients
          type: string
        Recipients:
          format: int32
          description: The total number of recipients to send message to.
          type: integer
        Configuration:
          format: int32
          description: This field indicates what kind of shipment this is.
          type: integer
        SelectionId:
          format: int32
          description: Set if this shipment should be related to a Selection
          type: integer
        ProjectId:
          format: int32
          description: Set if this shipment should be related to a Project
          type: integer
        ShipmenttypeId:
          format: int32
          description: >-
            Id of subscriptionType that this shipment has, so we may check for
            reservations
          type: integer
        SentNum:
          format: int32
          description: Number of mails sent
          type: integer
        DeliveredNum:
          format: int32
          description: Number of mails sent minus bounces
          type: integer
        Registered:
          format: date-time
          description: Registered when  in UTC.
          type: string
        RegisteredAssociateId:
          format: int32
          description: Registered by whom
          type: integer
        Updated:
          format: date-time
          description: Last updated when  in UTC.
          type: string
        UpdatedAssociateId:
          format: int32
          description: Last updated by whom
          type: integer
        UpdatedCount:
          format: int32
          description: Number of updates made to this record
          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'
        _Links:
          type: object
          additionalProperties:
            type: string
    SuperOffice.CRM.Services.MailingEntity:
      description: "A mailing (shipment) — the run that sends a message to a set of recipients\r\n<para />\r\nCarrier object for MailingEntity.\r\nServices for the MailingEntity Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IMarketingAgent\">Marketing Agent</see>."
      type: object
      properties:
        MailingId:
          format: int32
          description: Primary key
          type: integer
        Description:
          description: Describes the shipment
          type: string
        MessageId:
          format: int32
          description: The id of the message that is sent in this shipment
          type: integer
        FolderId:
          format: int32
          description: >-
            The folder which this shipment belongs to. -1 indicates that the
            shipment is on the root
          type: integer
        StartDate:
          format: date-time
          description: The date and time when to start this shipment
          type: string
        EndDate:
          format: date-time
          description: Is set when this shipment is ended
          type: string
        FromAddr:
          description: Email address to put in the From header of the messages
          type: string
        ReplyAddr:
          description: 'Email address to put in the Reply To: header of the messages'
          type: string
        EnvelopeFrom:
          description: Email address for the MTA envelope (where bounces are returned)
          type: string
        Status:
          description: Sending/stopped/failed etc.
          enum:
            - None
            - Ok
            - Canceled
            - Waiting
            - Started
            - StatusFailed
            - Retry
            - Populating
            - Deleted
            - AwaitPopulate
            - PopulatingOnly
            - PopulateAborted
            - PopulateError
            - TooManyRecipients
          type: string
        Recipients:
          format: int32
          description: The total number of recipients to send message to.
          type: integer
        Configuration:
          format: int32
          description: This field indicates what kind of shipment this is.
          type: integer
        SelectionId:
          format: int32
          description: Set if this shipment should be related to a Selection
          type: integer
        ProjectId:
          format: int32
          description: Set if this shipment should be related to a Project
          type: integer
        ShipmenttypeId:
          format: int32
          description: >-
            Id of subscriptionType that this shipment has, so we may check for
            reservations
          type: integer
        SentNum:
          format: int32
          description: Number of mails sent
          type: integer
        DeliveredNum:
          format: int32
          description: Number of mails sent minus bounces
          type: integer
        Registered:
          format: date-time
          description: Registered when  in UTC.
          type: string
        RegisteredAssociateId:
          format: int32
          description: Registered by whom
          type: integer
        Updated:
          format: date-time
          description: Last updated when  in UTC.
          type: string
        UpdatedAssociateId:
          format: int32
          description: Last updated by whom
          type: integer
        UpdatedCount:
          format: int32
          description: Number of updates made to this record
          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

- [Delete Mailing Entity](/en/api/reference/restful/agent/marketing_agent/delete-mailing-entity.md)
- [Post Web Panel Entity](/en/api/reference/restful/rest/list_webpanel/post-web-panel-entity.md)
- [Get Mailing Entity](/en/api/reference/restful/rest/mailing/get-mailing-entity.md)
- [Default Mailing Entity](/en/api/reference/restful/rest/mailing/default-mailing-entity.md)
- [Put Mailing Entity](/en/api/reference/restful/rest/mailing/put-mailing-entity.md)
