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

# Create List

> >
Create a list of people to enrich.

Once the list is completed, an update will be posted to the webhook URL as configured in your [ account settings ]( http://wiza.co/app/settings/api ). The payload will be the same as the response of this endpoint. If you wish to do added authentication, the headers in the webhook request will include `x-auth-key` which will be a SHA256 hash of your api key.

You can get the status of the list by calling the `GET /api/lists/:id` endpoint.
And you can get the contacts by calling the `GET /api/lists/:id/contacts` endpoint.

**Note:** Please check the status of the list as it may fail sometimes due to LinkedIn rate limiting.




## OpenAPI

````yaml /swagger/v1/openapi.yaml post /api/lists
openapi: 3.0.1
info:
  title: Wiza API Documentation
  version: v1
servers:
  - url: https://wiza.co
    variables:
      defaultHost:
        default: wiza.co
security: []
paths:
  /api/lists:
    post:
      tags:
        - Lists
      summary: Create List
      description: >
        >

        Create a list of people to enrich.


        Once the list is completed, an update will be posted to the webhook URL
        as configured in your [ account settings ](
        http://wiza.co/app/settings/api ). The payload will be the same as the
        response of this endpoint. If you wish to do added authentication, the
        headers in the webhook request will include `x-auth-key` which will be a
        SHA256 hash of your api key.


        You can get the status of the list by calling the `GET /api/lists/:id`
        endpoint.

        And you can get the contacts by calling the `GET
        /api/lists/:id/contacts` endpoint.


        **Note:** Please check the status of the list as it may fail sometimes
        due to LinkedIn rate limiting.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                list:
                  type: object
                  properties:
                    name:
                      type: string
                      description: Name of the list. e.g. "VP of Sales in San Francisco"
                      example: VP of Sales in San Francisco
                    enrichment_level:
                      type: string
                      enum:
                        - none
                        - partial
                        - full
                      description: >-
                        >

                        Enrichment level of the list.

                        | Enrichment Level   |
                        Description                          |

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

                        | none   | Will enrich with contact's data when you
                        provide a Linkedin profile url or email. But will not
                        find emails or phone numbers |

                        | partial| Will find emails.                     |

                        | full   | Will find emails and phone numbers.   |
                    email_options:
                      description: Types of emails to return.
                      type: object
                      properties:
                        accept_work:
                          type: boolean
                          description: Professional email address, i.e. tim.cooke@apple.com
                        accept_personal:
                          type: boolean
                          description: A personal email address, i.e. tcooke1960@gmail.com
                        accept_generic:
                          type: boolean
                          description: A generic email address, i.e. hello@apple.com
                    items:
                      description: >-
                        List of items to be enriched. Each item can be either
                        contact details or a Linkedin profile URL of any type
                        (Linkedin, Sales Navigator, or Recruiter). There is a
                        limit of 2500 items per list.
                      type: array
                      items:
                        anyOf:
                          - $ref: '#/components/schemas/ContactDetailsInput'
                          - $ref: '#/components/schemas/LinkedinProfileInput'
                          - $ref: '#/components/schemas/EmailInput'
                    callback_url:
                      type: string
                      description: >-
                        URL to send the list update to. If not provided, the
                        default webhook URL configured in your account settings
                        will be used.
                    skip_duplicates:
                      type: boolean
                      description: >-
                        Skip contacts that already exist in recently completed
                        lists in the API folder.
                  required:
                    - name
                    - enrichment_level
                    - email_options
                    - items
                  example:
                    name: VP of Sales in San Francisco
                    enrichment_level: partial
                    email_options:
                      accept_work: true
                      accept_personal: true
                      accept_generic: true
                    items:
                      - full_name: Stephen Hakami
                        company: Wiza
                        domain: wiza.co
                      - profile_url: https://www.linkedin.com/in/stephen-hakami-5babb21b0/
                      - email: stephen@wiza.co
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse'
        '400':
          description: Error creating list
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: object
                    properties:
                      code:
                        type: integer
                        example: 400
                      message:
                        type: string
                        example: Please add a valid payment method to start this scan.
                        description: >
                          >

                          Potential error messages:


                          - Your seat is currently paused. Contact your account
                          owner.

                          - Please make sure you have an active subscription.

                          - Please add a valid payment method to start this
                          scan.

                          - Please accept either personal or work email types.
        '401':
          description: Unauthorized
      security:
        - bearer_auth: []
      x-codeSamples:
        - lang: Javascript
          source: |
            const apiKey = "your api key here" // update with your api_key

            const myHeaders = new Headers();
            myHeaders.append("Content-Type", "application/json");
            myHeaders.append("Authorization", `Bearer ${apiKey}`);

            const raw = JSON.stringify({
              "list": {
                "name": "List name",
                "enrichment_level": "partial",
                "email_options": {
                  "accept_work": true,
                  "accept_personal": true,
                  "accept_generic": true
                },
                "items": [
                  {
                    "full_name": "Stephen Hakami",
                    "company": "Wiza",
                    "domain": "wiza.co"
                  }, {
                    "profile_url": "https://www.linkedin.com/in/stephen-hakami-5babb21b0/"
                  }, {
                    "email": "stephen@wiza.co"
                  }
                ]
              }
            });

            const requestOptions = {
              method: "POST",
              headers: myHeaders,
              body: raw,
              redirect: "follow"
            };

            fetch("https://wiza.co/api/lists", requestOptions)
              .then((response) => response.text())
              .then((result) => console.log(result))
              .catch((error) => console.error(error));
        - lang: Python
          source: |
            import http.client
            import json

            api_key = "your api key here" # update with your api_key

            conn = http.client.HTTPSConnection("wiza.co")
            payload = json.dumps({
              "list": {
                "name": "List name",
                "enrichment_level": "partial",
                "email_options": {
                  "accept_work": True,
                  "accept_personal": True,
                  "accept_generic": True
                },
                "items": [
                  {
                    "full_name": "Stephen Hakami",
                    "company": "Wiza",
                    "domain": "wiza.co"
                  }, {
                    "profile_url": "https://www.linkedin.com/in/stephen-hakami-5babb21b0/"
                  }, {
                    "email": "stephen@wiza.co"
                  }
                ]
              }
            })
            authorization = ("Bearer {api_key}").format(api_key=api_key)
            headers = {
              'Content-Type': 'application/json',
              'Authorization': authorization
            }
            conn.request("POST", "/api/lists", payload, headers)
            res = conn.getresponse()
            data = res.read()
            print(data.decode("utf-8"))
        - lang: Ruby
          source: |
            require "uri"
            require "json"
            require "net/http"

            api_key = "your api key here" # update with your api_key

            url = URI("https://wiza.co/api/lists")

            https = Net::HTTP.new(url.host, url.port);
            https.use_ssl = true
            request = Net::HTTP::Post.new(url)
            request["Content-Type"] = "application/json"
            request["Authorization"] = "Bearer #{api_key}"
            request.body = JSON.dump({
              "list": {
                "name": "List name",
                "enrichment_level": "partial",
                "email_options": {
                  "accept_work": true,
                  "accept_personal": true,
                  "accept_generic": true
                },
                "items": [
                  {
                    "full_name": "Stephen Hakami",
                    "company": "Wiza",
                    "domain": "wiza.co"
                  }, {
                    "profile_url": "https://www.linkedin.com/in/stephen-hakami-5babb21b0/"
                  }, {
                    "email": "stephen@wiza.co"
                  }
                ]
              }
            })

            response = https.request(request)
            puts response.read_body
        - lang: Curl
          source: >
            api_key="your api key here" # update with your api_key


            curl --location 'https://wiza.co/api/lists' --header 'Content-Type:
            application/json' --header "Authorization: Bearer ${api_key}" --data
            '{
              "list": {
                "name": "List name",
                "enrichment_level": "partial",
                "email_options": {
                  "accept_work": true,
                  "accept_personal": true,
                  "accept_generic": true
                },
                "items": [
                  {
                    "full_name": "Stephen Hakami",
                    "company": "Wiza",
                    "domain": "wiza.co"
                  }, {
                    "profile_url": "https://www.linkedin.com/in/stephen-hakami-5babb21b0/"
                  }, {
                    "email": "stephen@wiza.co"
                  }
                ]
              }
            }'
components:
  schemas:
    ContactDetailsInput:
      type: object
      required:
        - full_name
      anyOf:
        - required:
            - company
        - required:
            - domain
      properties:
        full_name:
          type: string
          description: Full name of the contact. e.g. "Stephen Hakami".
          example: Stephen Hakami
        company:
          type: string
          description: >-
            Name of the company. e.g. "Wiza". Either company (company name) or
            domain is required.
          example: Wiza
        domain:
          type: string
          description: >-
            Domain of the company. e.g. "wiza.co". Either company (company name)
            or domain is required.
          example: wiza.co
        profile_url:
          type: string
          description: >-
            URL of the Linkedin profile. e.g.
            "https://www.linkedin.com/in/stephen-hakami-5babb21b0/".
          example: https://www.linkedin.com/in/stephen-hakami-5babb21b0/
        email:
          type: string
          description: Email address of the contact.
          example: stephen@wiza.co
    LinkedinProfileInput:
      type: object
      required:
        - profile_url
      properties:
        profile_url:
          type: string
          description: >-
            URL of the Linkedin profile. e.g.
            "https://www.linkedin.com/in/stephen-hakami-5babb21b0/".
          example: https://www.linkedin.com/in/stephen-hakami-5babb21b0/
    EmailInput:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          description: Email address of the contact.
          example: stephen@wiza.co
    ListResponse:
      type: object
      properties:
        status:
          type: object
          properties:
            code:
              type: integer
              example: 200
            message:
              type: string
              example: 🧙 Wiza is working on it!
        type:
          type: string
          enum:
            - list
          example: list
        data:
          type: object
          properties:
            id:
              type: integer
              example: 15
            name:
              type: string
              example: VP of Sales in San Francisco
            status:
              type: string
              example: queued
            stats:
              type: object
              properties:
                people:
                  type: integer
                  example: 2
                credits:
                  type: object
                  properties:
                    email_credits:
                      type: integer
                      nullable: true
                      example: 1
                    phone_credits:
                      type: integer
                      nullable: true
                      example: 1
                    export_credits:
                      type: integer
                      nullable: true
                      example: 1
                    api_credits:
                      type: object
                      nullable: true
                      properties:
                        email_credits:
                          type: integer
                          example: 2
                        phone_credits:
                          type: integer
                          example: 5
                        scrape_credits:
                          type: integer
                          example: 1
                        total:
                          type: integer
                          example: 8
            finished_at:
              type: string
              format: date-time
              nullable: true
            created_at:
              type: string
              format: date-time
            enrichment_level:
              type: string
              example: partial
            email_options:
              type: object
              properties:
                accept_work:
                  type: boolean
                  example: true
                accept_personal:
                  type: boolean
                  example: true
                accept_generic:
                  type: boolean
                  example: true
            report_type:
              type: string
              example: people
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: >-
        Enter your bearer token (your API key) in the **Authorization** header
        in the format `Bearer {token}`

````