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

# Get Contacts in a List

> You can collect all your contacts on a single list.



## OpenAPI

````yaml /openapi-v1.json post /contact/search/{id}
openapi: 3.1.0
info:
  title: Mailercloud Marketing API
  version: 1.0.0
  description: >-
    Campaigns, contacts, lists, segments, automations, and webhooks for the
    Mailercloud Marketing Platform.
servers:
  - url: https://cloudapi.mailercloud.com/v1
security:
  - apiKey: []
tags:
  - name: Campaigns
  - name: Contacts
  - name: Lists
  - name: Tags
  - name: Segments
  - name: Custom Properties
  - name: Senders
  - name: Templates
  - name: Automations
  - name: Webhooks
  - name: Webforms
  - name: Inbox Tracker
  - name: Account
paths:
  /contact/search/{id}:
    post:
      tags:
        - Contacts
      summary: Get Contacts in a List
      description: You can collect all your contacts on a single list.
      operationId: get-contacts-in-a-list
      parameters:
        - name: id
          in: path
          required: true
          description: List id
          schema:
            type: string
        - name: Content-Type
          in: header
          required: true
          description: Request body type
          schema:
            type: string
            default: application/json
      requestBody:
        required: true
        content:
          application/json:
            schema:
              description: ''
              type: object
              properties:
                limit:
                  type: number
                  description: |-
                    Maximum number of elements to return. 

                    Maximum: 100
                    Minimum: 10
                  minimum: 10
                  maximum: 100
                page:
                  type: number
                  description: >-
                    You can retrieve a subset of records starting from the page
                    value you have specified. You can add a limit, which will
                    determine the number of records you can retrieve on a single
                    page.


                    Starts From: 1
                search:
                  type: string
                  description: 'Filter contact list by name , giving name as search keyword '
              required:
                - limit
                - page
            examples:
              example-1:
                value:
                  limit: 10
                  page: 1
                  search: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  count:
                    type: number
                  data:
                    type: object
                    properties:
                      city:
                        type: string
                        minLength: 1
                      country:
                        type: string
                        minLength: 1
                      custom_fields:
                        type: object
                      department:
                        type: string
                        minLength: 1
                      dob:
                        type: string
                        minLength: 1
                      email:
                        type: string
                        minLength: 1
                      firstname:
                        type: string
                        minLength: 1
                      industry:
                        type: string
                        minLength: 1
                      job_title:
                        type: string
                        minLength: 1
                      last_name:
                        type: string
                        minLength: 1
                      lead_source:
                        type: string
                        minLength: 1
                      middle_name:
                        type: string
                        minLength: 1
                      name:
                        type: string
                        minLength: 1
                      company_name:
                        type: string
                        minLength: 1
                      phone:
                        type: string
                        minLength: 1
                      salary:
                        type: string
                        minLength: 1
                      state:
                        type: string
                        minLength: 1
                      user_ip:
                        type: string
                        minLength: 1
                      postal_code:
                        type: string
                        minLength: 1
              examples:
                example-1:
                  value:
                    count: 0
                    data:
                      city: string
                      country: string
                      custom_fields: {}
                      department: string
                      dob: string
                      email: string
                      firstname: string
                      id: string
                      industry: string
                      job_title: string
                      last_name: string
                      lead_source: string
                      middle_name: string
                      first_name: string
                      company_name: string
                      phone: string
                      salary: string
                      state: string
                      user_ip: string
                      postal_code: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  errors:
                    type: array
                    uniqueItems: true
                    minItems: 1
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                          minLength: 1
              examples:
                example-1:
                  value:
                    errors:
                      - field: ''
                        message: Invalid input
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  errors:
                    type: array
                    uniqueItems: true
                    minItems: 1
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                          minLength: 1
              examples:
                example-1:
                  value:
                    errors:
                      - field: ''
                        message: Authorization failed
        '404':
          description: Bad Request
          content:
            application/json:
              schema:
                description: ''
                type: object
                properties:
                  errors:
                    type: array
                    uniqueItems: true
                    minItems: 1
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                          minLength: 1
                        message:
                          type: string
                          minLength: 1
              examples:
                example-1:
                  value:
                    errors:
                      - field: id
                        message: Record not found with the given Id
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your Mailercloud API key (plain text, no Bearer prefix). Create keys in
        Settings → API.

````