SAP Emarsys Contact List API

The Contact List API from SAP Emarsys — 10 operation(s) for contact list.

GitHub OpenAPI
Business capability
Customer Relationship Management BC-420

Operations 11

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 /v2/contactlist Create or update a contact list · Create a Contact List #
Ask an LLM
“How do I create a new contact list from a set of email addresses?”
“Can I update an existing contact list by replacing its members?”
Tell an agent
Create a contact list named {name} with external IDs {external_ids} keyed by {key_id}.
Create or replace contact list {name} using {external_ids} as {key_id}.
GET /v2/contactlist List contact lists · List Contact Lists #
Ask an LLM
“Which contact lists do I have in Emarsys?”
“Can I see all my contact lists?”
Tell an agent
List my contact lists.
Show every contact list available.
POST /v2/contactlist/{listId}/rename Rename a contact list · Rename a Contact List #
Ask an LLM
“How do I rename an existing contact list?”
“Can I change a contact list's name?”
Tell an agent
Rename contact list {listId} to {name}.
Change the name of contact list {listId} to {name}.
POST /v2/contactlist/{listId}/replace Replace all contacts in a list · Replace a Contact List #
Ask an LLM
“How do I overwrite a contact list with a fresh set of email addresses?”
“Can I replace every member of a contact list at once?”
Tell an agent
Replace all contacts in contact list {listId} with {external_ids}, keyed by {key_id}.
Overwrite contact list {listId} using {external_ids} as {key_id}.
POST /v2/contactlist/{listId}/deletelist Delete a contact list · Delete a Contact List #
Ask an LLM
“How do I delete a contact list I no longer use?”
“What happens to contacts when I delete their list?”
Tell an agent destructive · confirm first
Delete contact list {listId}.
Remove the contact list {listId} from my account.
POST /v2/contactlist/{listId}/add Add contacts to a list · Add Contacts to a Contact List #
Ask an LLM
“How do I add new email addresses to an existing contact list?”
“Can I grow a contact list by appending more members?”
Tell an agent
Add {external_ids} to contact list {listId}, keyed by {key_id}.
Append {external_ids} to existing list {listId} using {key_id}.
GET /v2/contactlist/{listId}/count Count contacts in a list · Count Contacts in a Contact List #
Ask an LLM
“How many contacts are in a given contact list?”
“What is the size of a contact list?”
Tell an agent
Count the contacts in contact list {listId}.
Tell me how many members list {listId} has.
GET /v2/contactlist/{listId}/contacts List contacts in a list (deprecated) · List Contacts in a Contact List #
Ask an LLM
“How do I get the contact IDs of everyone in a list?”
“Is the old contacts-in-list endpoint still available?”
Tell an agent
List the contacts in contact list {listId} using the deprecated endpoint.
Show contact IDs from list {listId} with the legacy contacts-in-list call.
GET /v2/contactlist/{contactlistId}/contactIds Get contact IDs in a contact list · Fetch Contacts in a Contact List #
Ask an LLM
“Which contact IDs are in one of my contact lists?”
“Can I page through a contact list's members?”
Tell an agent
Get contact IDs in contact list {contactlistId}.
Page through contact list {contactlistId} from skip token {skiptoken}.
GET /v2/contactlist/{listId}/contacts/data Get contact data for a list · Get Contact Data in a Contact List #
Ask an LLM
“How do I pull specific fields for the contacts in a list?”
“Can I fetch only certain fields for a contact list's members?”
Tell an agent
Get fields {fields} for the contacts in contact list {listId}.
Fetch {fields} for up to {limit} members of list {listId}.
POST /v2/contactlist/{listId}/delete Remove contacts from a list · Remove Contacts from a Contact List #
Ask an LLM
“How do I take specific email addresses out of a contact list?”
“Can I remove up to 10,000 contacts from a list in one request?”
Tell an agent
Remove {external_ids} from contact list {listId}, keyed by {key_id}.
Delete {external_ids} from list {listId} using {key_id}.

Documentation

📖
Documentation
https://dev.emarsys.com/
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/43noz8h08gqdv-emarsys-core-api-accounts-endpoint-batch
📖
Authentication
https://dev.emarsys.com/docs/emarsys-core-api-guides/b3c3a1eba8515-authentication
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/vq6ozhk87xpct-emarsys-core-api-auto-import-profiles-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/b8bkfdpzdnrmn-bulk-response-summary
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/f2udgdha9qqax-emarsys-core-api-conditional-text-rules-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/jxv7xghhduivk-emarsys-core-api-contact-and-email-data-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/czeg4wbctz2ey-emarsys-core-api-contact-lists-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/nbmm6cavfbful-emarsys-core-api-contact-sources-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/vhlytrvjmpva3-emarsys-core-api-contacts-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/111vbiacis1pw-emarsys-core-api-email-campaign-lifecycle-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/9mp221uux5ijk-emarsys-core-api-email-campaigns-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/jntjf6yd8bbyp-email-reporting-api
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/ywep93d8zjj38-emarsys-core-api-email-templates-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/a9elofmiccck4-emarsys-core-api-events-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/7nxw96vrmb8uy-emarsys-core-api-external-content-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/mtzemy547drl7-emarsys-core-api-fields-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/k53pb4h4cekls-emarsys-core-api-forms-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/j2c7sbanej44c-emarsys-core-api-keys-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/o26j9gs8fjm9q-emarsys-core-api-media-database-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/mzyq7rihy8uv9-emarsys-core-api-programs-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/0h26fkyuh837z-emarsys-core-api-relational-data-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/14tmor5bfxbov-emarsys-core-api-sections-endpoint-batch
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/ehr0tded4ctcw-emarsys-core-api-segments-endpoint-batch
📖
APIReference
https://emartech.github.io/sms-partner-api-spec/
📖
APIReference
https://dev.emarsys.com/docs/core-api-reference/4kmyl4vlpf9mv-emarsys-core-api-tracked-links-endpoint-batch

Specifications

Other Resources

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/emarsys:emarsys-contact-list-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

emarsys-contact-list-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Emarsys Core API - Contact lists endpoint batch Contactlist…
  description: In this batch you may find endpoints related to contact lists.
  version: v2
servers:
- url: https://api.emarsys.net/api
security:
- X-WSSE: []
tags:
- name: Contact List
paths:
  /v2/contactlist:
    post:
      summary: Create a Contact List
      description: Creates or updates a contact list with the provided parameters.
      operationId: createContactList
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: See the example or [Response Codes](docs/response-codes/error-codes.md) for details.
                additionalProperties: false
                properties:
                  replyCode:
                    type: integer
                    description: The Emarsys [response code](docs/response-codes/error-codes.md).
                    format: int32
                  replyText:
                    type: string
                    description: The summary of the [response](docs/response-codes/error-codes.md).
                  data:
                    type: object
                    description: The requested data.
                    properties:
                      id:
                        type: integer
                        description: The contact list identifier.
                      errors:
                        type: object
                        description: 'Details any contacts not added to the list, expressed as an array that contains the error code and reason.


                          **Note:** The `errors` property is not included if the contact list is empty. If the contact list contains contacts, but no error occurred, the `errors` property is an empty array.'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
      security:
      - X-WSSE: []
      servers:
      - url: https://api.emarsys.net/api
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                key_id:
                  description: Identifies the contact by their `id`, `uid`, or the name/integer id of a custom field, such as `email`.
                  default: 3
                  oneOf:
                  - type: string
                  - type: integer
                name:
                  type: string
                  description: The unique name of the contact list.
                description:
                  type: string
                  description: Additional information about the contact list.
                external_ids:
                  description: 'List of contact identifiers to be inserted.


                    **Format:**

                    | Value | Type | Example |

                    | --- | --- | --- |

                    | Simple | string or integer | [<br>    "thor@example.com",<br>    "odin@example.com",<br>    "loki@example.com"<br> ] |

                    | Multichoice | array | [<br>    [1,2,3],<br>    [2,3],<br>    [1,4]<br>] |'
                  oneOf:
                  - type: integer
                  - type: string
                  - type: array
              required:
              - key_id
              - name
              - external_ids
              x-examples:
              - key_id: '3'
                name: asgard_protectors
                description: those who fight for Asgard
                external_ids:
                - thor@example.com
                - odin@example.com
                - loki@example.com
      tags:
      - Contact List
    get:
      summary: List Contact Lists
      description: Returns a list of the available contact lists.
      operationId: listContactLists
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: See the example or [Response Codes](docs/response-codes/error-codes.md) for details.
                additionalProperties: false
                properties:
                  replyCode:
                    type: integer
                    description: The Emarsys [response code](docs/response-codes/error-codes.md).
                    format: int32
                  replyText:
                    type: string
                    description: The summary of the [response](docs/response-codes/error-codes.md).
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          description: Contact list identifier
                        name:
                          type: string
                          description: Contact list name
                        created:
                          type: string
                          description: The date of creation.
                        type:
                          type: integer
                          description: 'Note: This is a standard response, reserved for future use.'
                          default: 0
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
      security:
      - X-WSSE: []
      servers:
      - url: https://api.emarsys.net/api
      tags:
      - Contact List
  /v2/contactlist/{listId}/rename:
    post:
      summary: Rename a Contact List
      description: Renames an existing contact list.
      operationId: renameContactList
      parameters:
      - name: listId
        in: path
        description: The contact list identifier.
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: See the example or [Response Codes](docs/response-codes/error-codes.md) for details.
                additionalProperties: false
                properties:
                  replyCode:
                    type: integer
                    description: The Emarsys [response code](docs/response-codes/error-codes.md).
                    format: int32
                  replyText:
                    type: string
                    description: The summary of the [response](docs/response-codes/error-codes.md).
                  data:
                    type: object
                    description: The requested data.
                    properties:
                      id:
                        type: integer
                        description: The contact list identifier.
                      name:
                        type: string
                        description: The new name of the contact list.
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
      security:
      - X-WSSE: []
      servers:
      - url: https://api.emarsys.net/api
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: The new unique name of the contact list.
              required:
              - name
              x-examples:
              - name: blade
      tags:
      - Contact List
  /v2/contactlist/{listId}/replace:
    post:
      summary: Replace a Contact List
      description: Overwrites an existing contact list.
      operationId: replaceContactList
      parameters:
      - name: listId
        in: path
        description: The contact list identifier.
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: See the example or [Response Codes](docs/response-codes/error-codes.md) for details.
                additionalProperties: false
                properties:
                  replyCode:
                    type: integer
                    description: The Emarsys [response code](docs/response-codes/error-codes.md).
                  replyText:
                    type: string
                    description: The summary of the [response](docs/response-codes/error-codes.md).
                  data:
                    type: object
                    description: The requested data.
                    properties:
                      inserted_contacts:
                        type: integer
                        description: The number of contacts successfully added to the list.
                      errors:
                        type: object
                        description: Details any contacts not added to the list, expressed as an array that contains the error code and reason.
                        properties:
                          loki@example.com:
                            type: object
                            properties:
                              '2008':
                                type: string
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
      security:
      - X-WSSE: []
      servers:
      - url: https://api.emarsys.net/api
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                key_id:
                  description: Identifies the contact by their `id`, `uid`, or the name/integer id of a custom field, such as `email`.
                  default: 3
                  oneOf:
                  - type: string
                  - type: integer
                external_ids:
                  description: 'List of contact identifiers to be included.


                    **Format:**

                    | Value | Type | Example |

                    | --- | --- | --- |

                    | Simple | string or integer | [<br>    "thor@example.com",<br>    "odin@example.com",<br>    "loki@example.com"<br> ] |

                    | Multichoice | array | [<br>    [1,2,3],<br>    [2,3],<br>    [1,4]<br>] |'
                  oneOf:
                  - type: integer
                  - type: string
                  - type: array
              required:
              - key_id
              - external_ids
              x-examples:
              - key_id: '3'
                external_ids:
                - natasha.romanoff@example.com
                - loki@example.com
      tags:
      - Contact List
  /v2/contactlist/{listId}/deletelist:
    post:
      summary: Delete a Contact List
      description: 'Deletes a contact list.


        **Note:** Contacts in the list are not affected.


        **Warning:** If a contact list is used in a combined segment, you cannot delete it (error ``400``, reply ``3008``).'
      operationId: deleteContactList
      parameters:
      - name: listId
        in: path
        description: The contact list identifier.
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
      security:
      - X-WSSE: []
      servers:
      - url: https://api.emarsys.net/api
      tags:
      - Contact List
  /v2/contactlist/{listId}/add:
    post:
      summary: Add Contacts to a Contact List
      description: Adds new contacts to an existing contact list.
      operationId: addContactsToContactList
      parameters:
      - name: listId
        in: path
        description: The contact list identifier.
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: See the example or [Response Codes](docs/response-codes/error-codes.md) for details.
                additionalProperties: false
                properties:
                  replyCode:
                    type: integer
                    description: The Emarsys [response code](docs/response-codes/error-codes.md).
                    format: int32
                  replyText:
                    type: string
                    description: The summary of the [response](docs/response-codes/error-codes.md).
                  data:
                    type: object
                    description: The requested data.
                    properties:
                      inserted_contacts:
                        type: integer
                        description: The number of contacts successfully added to the list.
                      errors:
                        type: object
                        description: Details any contacts not added to the list, expressed as an array that contains the error code and reason.
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
      security:
      - X-WSSE: []
      servers:
      - url: https://api.emarsys.net/api
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                key_id:
                  description: Identifies the contact by their `id`, `uid`, or the name/integer id of a custom field, such as `email`.
                  default: 3
                  oneOf:
                  - type: string
                  - type: integer
                external_ids:
                  description: 'List of contact identifiers to be inserted.


                    **Format:**

                    | Value | Type | Example |

                    | --- | --- | --- |

                    | Simple | string or integer | [<br>    "thor@example.com",<br>    "odin@example.com",<br>    "loki@example.com"<br> ] |

                    | Multichoice | array | [<br>    [1,2,3],<br>    [2,3],<br>    [1,4]<br>] |'
                  oneOf:
                  - type: integer
                  - type: string
                  - type: array
              required:
              - key_id
              - external_ids
              x-examples:
              - key_id: '3'
                external_ids:
                - thor@example.com
                - odin@example.com
                - loki@example.com
      tags:
      - Contact List
  /v2/contactlist/{listId}/count:
    get:
      summary: Count Contacts in a Contact List
      description: Returns the number of contacts in a contact list.
      operationId: countContactsInContactLict
      parameters:
      - name: listId
        in: path
        description: The contact list identifier.
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: See the example or [Response Codes](docs/response-codes/error-codes.md) for details.
                additionalProperties: false
                properties:
                  replyCode:
                    type: integer
                    description: The Emarsys [response code](docs/response-codes/error-codes.md).
                  replyText:
                    type: string
                    description: The summary of the [response](docs/response-codes/error-codes.md).
                  data:
                    type: integer
                    description: The number of contacts in the contact list.
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
      security:
      - X-WSSE: []
      servers:
      - url: https://api.emarsys.net/api
      tags:
      - Contact List
  /v2/contactlist/{listId}/contacts:
    get:
      summary: List Contacts in a Contact List
      description: '> #### Important!

        >

        > Please note that this endpoint is now deprecated. It will be decommisioned in December 2024.

        >

        > We recommend using the Fetch contacts in a contact list endpoint instead.


        Returns a list of contacts and their identifiers (`id`) in a contact list.


        **Example**


        https://api.emarsys.net/api/v2/contactlist/123456789/contacts/?limit=100000&offset=0'
      operationId: listContactsInContactList
      parameters:
      - name: listId
        in: path
        description: The contact list identifier.
        required: true
        schema:
          type: integer
      - $ref: '#/components/parameters/trait_offset_offset'
      - $ref: '#/components/parameters/trait_limit1M_limit'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: See the example or [Response Codes](docs/response-codes/error-codes.md) for details.
                additionalProperties: false
                properties:
                  replyCode:
                    type: integer
                    description: The Emarsys [response code](docs/response-codes/error-codes.md).
                  replyText:
                    type: string
                    description: The summary of the [response](docs/response-codes/error-codes.md).
                  data:
                    type: array
                    description: The list of contact identifiers (`id`) in the contact list.
                    items:
                      type: string
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
      deprecated: true
      security:
      - X-WSSE: []
      servers:
      - url: https://api.emarsys.net/api
      tags:
      - Contact List
  /v2/contactlist/{contactlistId}/contactIds:
    get:
      summary: Fetch Contacts in a Contact List
      description: 'Returns a list of contact identifiers (`contactIds`) from the contact list.


        **Example**


        https://api.emarsys.net/api/v2/contactlist/123456789/contactIds?$skiptoken=330&$top=10000'
      operationId: fetchContactsInContactList
      parameters:
      - name: listId
        in: path
        description: The contact list identifier.
        required: true
        schema:
          type: integer
      - name: $top
        in: query
        description: Number of contact ids to be batched together in the response.
        required: false
        schema:
          type: integer
          default: 10000
          maximum: 100000
          minimum: 1
      - name: $skiptoken
        in: query
        description: A token which specifies the position of the page to be fetched.
        required: false
        schema:
          type: integer
          default: 0
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: See the example or [Response Codes](docs/response-codes/error-codes.md) for details.
                additionalProperties: false
                properties:
                  value:
                    type: array
                    description: List of contact ids.
                    x-examples:
                    - - 1
                      - 2
                      - 3
                  next:
                    type: string
                    description: Path that can be used to obtain the next result chunk. In case `next` is null in the response, then this was the last chunk, no further chunks can be obtained.
                    x-examples:
                    - /contactlist/330/contactIds?$skiptoken=750&$top=1000
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
      security:
      - X-WSSE: []
      servers:
      - url: https://api.emarsys.net/api
      tags:
      - Contact List
  /v2/contactlist/{listId}/contacts/data:
    get:
      summary: Get Contact Data in a Contact List
      description: '> #### Important!

        >

        > Please note that this endpoint is now deprecated. It will be decommisioned in December 2024.

        >

        > As a replacement, we recommend using the Fetch contacts in a contact list endpoint first and then the Get contact data endpoint.

        Returns the data of the specified contacts in a contact list.'
      operationId: getContactDataInContactList
      parameters:
      - name: listId
        in: path
        description: The contact list identifier.
        required: true
        schema:
          type: integer
      - name: fields
        in: query
        description: 'Specifies the fields by identifier or name to include in the returned result.


          Multiple fields must be separated by a comma. For example `1,2,3` or `email,first_name`.'
        required: true
        schema:
          type: string
      - name: limit
        in: query
        description: Specifies the maximum number of records to return.
        schema:
          type: integer
          default: 1000
          maximum: 1000000
          minimum: 1
      - $ref: '#/components/parameters/trait_offset_offset'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: See the example or [Response Codes](docs/response-codes/error-codes.md) for details.
                additionalProperties: false
                properties:
                  replyCode:
                    type: integer
                    description: The Emarsys [response code](docs/response-codes/error-codes.md).
                  replyText:
                    type: string
                    description: The summary of the [response](docs/response-codes/error-codes.md).
                  data:
                    type: object
                    description: The requested data.
                    patternProperties:
                      ^[0-9]+:
                        type: object
                        description: The contact identifier (`id`).
                        properties:
                          fields:
                            type: object
                            properties:
                              id:
                                type: string
                                description: The contact identifier (`id`).
                              uid:
                                type: string
                                description: The contact identifier (`uid`).
                            patternProperties:
                              ^[0-8]:
                                description: The requested field and its value.
                                oneOf:
                                - type: string
                                - type: integer
                                - type: array
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
      deprecated: true
      security:
      - X-WSSE: []
      servers:
      - url: https://api.emarsys.net/api
      tags:
      - Contact List
  /v2/contactlist/{listId}/delete:
    post:
      summary: Remove Contacts from a Contact List
      description: 'Removes contacts from an existing contact list.


        **Note:** At most 10,000 contacts can be deleted by each request.'
      operationId: removeContactsFromContactList
      parameters:
      - name: listId
        in: path
        description: The contact list identifier.
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                description: See the example or [Response Codes](docs/response-codes/error-codes.md) for details.
                additionalProperties: false
                properties:
                  replyCode:
                    type: integer
                    description: The Emarsys [response code](docs/response-codes/error-codes.md).
                  replyText:
                    type: string
                    description: The summary of the [response](docs/response-codes/error-codes.md).
                  data:
                    type: object
                    description: The requested data.
                    properties:
                      deleted_contacts:
                        type: integer
                        description: The number of contacts successfully removed from the list.
                      errors:
                        type: object
                        description: Details any contacts not removed from the list, expressed as an array that contains the error code and reason.
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/default-response'
      security:
      - X-WSSE: []
      servers:
      - url: https://api.emarsys.net/api
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                key_id:
                  description: Identifies the contact by their `id`, `uid`, or the name/integer id of a custom field, such as `email`.
                  default: 3
                  oneOf:
                  - type: string
                  - type: integer
                external_ids:
                  description: 'List of contact identifiers to be inserted.


                    **Format:**

                    | Value | Type | Example |

                    | --- | --- | --- |

                    | Simple | string or integer | [<br>    "thor@example.com",<br>    "odin@example.com",<br>    "loki@example.com"<br> ] |

                    | Multichoice | array | [<br>    [1,2,3],<br>    [2,3],<br>    [1,4]<br>] |'
                  oneOf:
                  - type: integer
                  - type: string
                  - type: array
              required:
              - key_id
              - external_ids
      tags:
      - Contact List
components:
  parameters:
    trait_offset_offset:
      name: offset
      in: query
      description: Specifies an offset for pagination. The offset of the first record is *0*.
      schema:
        type: integer
        default: 0
    trait_limit1M_limit:
      name: limit
      in: query
      description: Specifies the maximum number of records to return.
      schema:
        type: integer
        default: 1000000
        maximum: 1000000
        minimum: 1
  schemas:
    default-response:
      type: object
      title: Default Response
      description: 'See the following documents for details on the error codes:


        - [HTTP 200 errors](docs/response-codes/http-200-responses.md)

        - [HTTP 400 errors](docs/response-codes/http-400-errors.md)

        - [HTTP 401-429 errors](docs/response-codes/http-401-429-errors.md)

        - [HTTP 500 errors](docs/response-codes/http-500-errors.md)'
      properties:
        replyCode:
          type: integer
          description: The Emarsys response code. Successful requests return *0*; otherwise, see [errors](docs/response-codes/http-400-errors.md).
          default: 0
        replyText:
          type: string
          description: Additional information on the status of the request.
        data:
          description: Contains the requested data, if applicable.
          oneOf:
          - type: string
          - type: integer
          - {}
          - type: object
            properties:
              ? ''
              : type: object
      x-examples:
      - replyCode: 0
        replyText: OK
        data: {}
  securitySchemes:
    X-WSSE:
      type: apiKey
      name: X-WSSE
      in: header