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

# Set the import options

> Sets tags, lists and options for the import. Allowed while the import is UPLOADED or MAPPED, so options can be set before or after the mapping; they take effect when the import starts.



## OpenAPI

````yaml /openapi.json patch /api/contact/import/{importId}/settings
openapi: 3.0.0
info:
  description: >-
    Public REST API for Benchmark Email.


    Authenticate every request by including your API key in the `X-API-Key`
    header.

    Each key is issued with one or more scopes that control which endpoints it
    may call.


    Rate limits: 60 requests per minute per account.

    Monthly quota: determined by your subscription plan.


    Contact text field values are HTML-entity encoded. When a contact is
    created, updated or imported, Benchmark stores its text field values
    HTML-entity escaped: `&` `<` `>` `"` `'` `/` `\` and the backtick become
    `&amp;` `&lt;` `&gt;` `&quot;` `&#x27;` `&#x2F;` `&#x5C;` and `&#96;`.
    Responses return that stored form (for example `Maple &amp; Co` for `Maple &
    Co`), so decode values before displaying them. Send plain, unescaped text in
    requests and search filters: Benchmark escapes it before storing or matching
    it. Create and update also remove anything that looks like an HTML tag,
    including the text after a bare `<`.
  title: Benchmark Email API
  version: 1.0.0
servers:
  - description: >-
      Your account's API base URL. Copy the full URL shown on Settings > API
      Keys in your Benchmark Email account and paste it here.
    url: '{apiBaseUrl}'
    variables:
      apiBaseUrl:
        default: ''
        description: >-
          Your account's API base URL. Copy it from Settings > API Keys in your
          Benchmark Email account.
security:
  - apiKeyAuth: []
tags:
  - description: Account related endpoints
    name: account
  - description: File upload (Unlayer custom storage) endpoints
    name: file-upload
  - description: Contact related endpoints
    name: contact
  - description: Contact structure related endpoints
    name: contact-structure
  - description: List related endpoints
    name: lists
  - description: Contact import related endpoints
    name: contact-import
  - description: Email domain related endpoints
    name: email-domain
  - description: Email campaign related endpoints
    name: email-campaign
  - description: Email template related endpoints
    name: email-template
  - description: Report related endpoints
    name: reports
paths:
  /api/contact/import/{importId}/settings:
    patch:
      tags:
        - contact-import
      summary: Set the import options
      description: >-
        Sets tags, lists and options for the import. Allowed while the import is
        UPLOADED or MAPPED, so options can be set before or after the mapping;
        they take effect when the import starts.
      operationId: patch_api_contact_import_by_importId_settings
      parameters:
        - description: Id of the import, as returned by the upload
          in: path
          name: importId
          required: true
          schema:
            format: mongo-id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              description: >-
                Options for the import. Every property is optional; omitted ones
                keep their current value.
              properties:
                lists:
                  description: Ids of lists to add every imported contact to
                  items:
                    format: mongo-id
                    type: string
                  type: array
                settings:
                  properties:
                    dateFormat:
                      description: How date columns in the file are written
                      enum:
                        - MM/DD/YYYY
                        - DD/MM/YYYY
                        - YYYY/MM/DD
                      type: string
                    decimalSeparator:
                      description: The decimal separator number columns in the file use
                      enum:
                        - .
                        - ','
                      type: string
                    overwrite:
                      description: >-
                        When true, an existing contact's field values are
                        replaced by the file's values, and an empty cell clears
                        the stored value; when false existing values are kept
                        and only empty fields are filled
                      type: boolean
                    requiredFields:
                      description: >-
                        When true, a new contact whose row is missing a required
                        field is rejected and counted as failed; when false it
                        is created with the field left empty. Existing contacts
                        are updated either way, skipping the missing field.
                      type: boolean
                    unsubscribe:
                      description: >-
                        Unsubscribe matching: every contact in the file is
                        marked unsubscribed and its email is added to the
                        account's invalid list, which applies to every contact
                        structure. Existing contacts move to unsubscribed unless
                        their status does not allow it (for example bounced);
                        new contacts are created unsubscribed.
                      type: boolean
                  type: object
                tags:
                  description: Ids of existing tags to apply to every imported contact
                  items:
                    format: mongo-id
                    type: string
                  type: array
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  _id:
                    description: Id of the import
                    type: string
                  fileName:
                    description: Original name of the uploaded file
                    type: string
                  lists:
                    description: Ids of lists to add every imported contact to
                    items:
                      format: mongo-id
                      type: string
                    type: array
                  settings:
                    additionalProperties: false
                    properties:
                      dateFormat:
                        description: How date columns in the file are written
                        enum:
                          - MM/DD/YYYY
                          - DD/MM/YYYY
                          - YYYY/MM/DD
                        type: string
                      decimalSeparator:
                        description: The decimal separator number columns in the file use
                        enum:
                          - .
                          - ','
                        type: string
                      overwrite:
                        description: >-
                          When true, an existing contact's field values are
                          replaced by the file's values, and an empty cell
                          clears the stored value; when false existing values
                          are kept and only empty fields are filled
                        type: boolean
                      requiredFields:
                        description: >-
                          When true, a new contact whose row is missing a
                          required field is rejected and counted as failed; when
                          false it is created with the field left empty.
                          Existing contacts are updated either way, skipping the
                          missing field.
                        type: boolean
                      unsubscribe:
                        description: >-
                          Unsubscribe matching: every contact in the file is
                          marked unsubscribed and its email is added to the
                          account's invalid list, which applies to every contact
                          structure. Existing contacts move to unsubscribed
                          unless their status does not allow it (for example
                          bounced); new contacts are created unsubscribed.
                        type: boolean
                    type: object
                  status:
                    description: >-
                      Current status. An import moves through UPLOADING (file
                      being parsed), UPLOADED (ready for a mapping), MAPPING
                      (mapping being applied), MAPPED (ready to start), RUNNING,
                      then SUCCEEDED or FAILED. ABORTED is set by an explicit
                      abort or when a new import for the same contact structure
                      is started with cancelIncomplete=true.
                    enum:
                      - UPLOADING
                      - UPLOADED
                      - MAPPING
                      - MAPPED
                      - RUNNING
                      - SUCCEEDED
                      - FAILED
                      - ABORTED
                    type: string
                  tags:
                    description: Ids of existing tags to apply to every imported contact
                    items:
                      format: mongo-id
                      type: string
                    type: array
                  totalRecords:
                    description: Number of data rows in the uploaded file
                    type: number
                type: object
          description: Options saved
        '400':
          description: >-
            The import is not UPLOADED or MAPPED, or a tag or list id does not
            exist on the contact structure
        '401':
          description: Unauthorized
        '403':
          description: API key missing the required scope
        '404':
          description: Import not found on this account
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      description: API key authentication
      in: header
      name: X-API-Key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.