NAV Navbar
shell
  • Introduction
  • Authentication
  • Methods
  • Errors
  • Introduction

    Welcome to the Anyleads™ API! You can use our API to access the Anyleads™ API endpoints, where you can create, update, delete your contacts and lists.

    You can view code examples in the dark area to the right.

    If you need an API key go on Anyleads, then generate an API key in the API section.

    Authentication

    Main endpoint, use this url:

    var endpoint = 'https://api.anyleads.com/v1/your-data/' + {METHOD}
    

    Make sure to replace {METHOD} with one of the methods listed below.

    Anyleads™ uses API keys to allow access to the API. You can register a new Anyleads™ API key at our developer portal.

    Methods

    List contacts

    Example request to list your contacts at page 1:

    curl -X "POST" "https://api.anyleads.com/v1/your-data/list-contacts" \
         -H "Content-Type: application/json; charset=utf-8" \
         -d $'{
      "api_key": "6af2b19950de365a83837ahea1cf9d9383d28",
      "page": "1"
    }'
    

    The above command returns JSON structured like this:

    {
        "load_in": 0.122,
        "state": true,
        "event": "success",
        "message": "Contacts found.",
        "contacts_count": 31319,
        "contacts_total_page": 314,
        "contacts_current_page": 1,
        "contacts_data": [
            {
                "user_company_size": "5 - 10 employees",
                "user_company_domain": "johndoe.com",
                "user_company_founded": "2017",
                "user_company_industry": "Marketing",
                "user_company_type": "SAS",
                "user_company_phone_number": "+33 1 35 37 87 53",
                "user_company_twitter": "https://twitter.com/johndoe",
                "user_company_facebook": "https://facebook.com/johndoe",
                "user_company_google_plus": "https://plus.google.com/u/0/11477127565398383837",
                "user_company_youtube": "https://youtube.com/johndoe",
                "user_company_email": "contact@johndoe.com",
                "user_connections_count": "500",
                "user_other_email": "user@gmail.com",
                "user_source": "imported",
                "user_type": "people",
                "user_company_address": "24 rue du Lilas, Paris, France",
                "user_website": "https://johndoe.com",
                "user_city": "Région Paris, France",
                "user_list_name": "SAAS US",
                "user_list_id": "57385e8d2f8f544c6e8b4567",
                "user_email_found": true,
                "user_email": "john_doe@gmail.com",
                "user_first_name": "John",
                "user_last_name": "Doe",
                "user_url": "https://fr.linkedin.com/in/johndoe",
                "user_keywords": "CEO, manager",
                "user_job_title": "CEO and Manager",
                "user_company_name": "Example Company Name",
                "user_linkedin_id": 131706671,
                "user_created_timestamp": 1460481190,
                "user_color": "523fe7",
                "user_contact_id": "570d2ca62eai8f547a4b8b4571",
                // below also your custom attributes
                "user_custom_user_age": "Male"
            }
            // and 99 other contacts for this page
        ]
    }
    

    This endpoint retrieves all contacts from your account. Max contacts returned is 100. You will have to use the pagination to get all your contacts.

    HTTP Request

    POST https://api.anyleads.com/v1/your-data/list-contacts

    Query Parameters

    Parameter Required Description
    api_key true Your API key
    page true The pagination number to get your contacts

    List lists

    Example request to list all your lists:

    curl -X "POST" "https://api.anyleads.com/v1/your-data/list-lists" \
         -H "Content-Type: application/json; charset=utf-8" \
         -d $'{
      "api_key": "6af2b19950de365a83837ahea1cf9d9383d28",
      "page": "1"
    }'
    

    The above command returns JSON structured like this:

    {
        "load_in": 0.0347,
        "state": true,
        "event": "success",
        "message": "Lists found.",
        "lists_count": 600,
        "lists_total_page": 60,
        "lists_current_page": 1,
        "lists_data": [
            {
                "list_id": "56edc1252f8f5488318b4576",
                "list_name": "Prospecting"
            },
            {
                "list_id": "57334e8d2f8f544c6e8b4567",
                "list_name": "SaaS US"
            },
            {
                "list_id": "5740348e2f8f548d0b8b458b",
                "list_name": "Facebook"
            },
            {
                "list_id": "576fe3412f8f547c118b4567",
                "list_name": "Marketing"
            },
            {
                "list_id": "5770d34e2f8f5481488b4567",
                "list_name": "Prospecting"
            }
            // and 95 other lists
        ]
    }
    

    This endpoint display all your lists in your account. Max lists returned is 100. You need to use the pagination to get more lists.

    HTTP Request

    POST https://api.anyleads.com/v1/your-data/list-lists

    Query Parameters

    Parameter Required Description
    api_key true Your API key
    page true The page to list your lists

    Search contacts

    Example request to search inside your contacts:

    curl -X "POST" "https://api.anyleads.com/v1/your-data/search-contacts" \
         -H "Content-Type: application/json; charset=utf-8" \
         -d $'{
      "api_key": "6af2b19950de365a83837ahea1cf9d9383d28",
      "page": "1",
      "data_search": [
        {
          "key": "user_email",
          "value": "john_doe@gmail.com",
          "match": "equal"
        }
      ]
    }'
    

    The above command returns JSON structured like this:

    {
        "load_in": 0.122,
        "state": true,
        "event": "success",
        "message": "Contacts found.",
        "contacts_count": 1,
        "contacts_total_page": 1,
        "contacts_current_page": 1,
        "contacts_data": [
            {
                "user_company_size": "5 - 10 employees",
                "user_company_domain": "johndoe.com",
                "user_company_founded": "2017",
                "user_company_industry": "Marketing",
                "user_company_type": "SAS",
                "user_company_phone_number": "+33 1 35 37 87 53",
                "user_company_twitter": "https://twitter.com/johndoe",
                "user_company_facebook": "https://facebook.com/johndoe",
                "user_company_google_plus": "https://plus.google.com/u/0/11477127565398383837",
                "user_company_youtube": "https://youtube.com/johndoe",
                "user_company_email": "contact@johndoe.com",
                "user_connections_count": "500",
                "user_other_email": "user@gmail.com",
                "user_source": "imported",
                "user_type": "people",
                "user_company_address": "24 rue du Lilas, Paris, France",
                "user_website": "https://johndoe.com",
                "user_city": "Région Paris, France",
                "user_list_name": "SAAS US",
                "user_list_id": "57385e8d2f8f544c6e8b4567",
                "user_email_found": true,
                "user_email": "john_doe@gmail.com",
                "user_first_name": "John",
                "user_last_name": "Doe",
                "user_url": "https://fr.linkedin.com/in/johndoe",
                "user_keywords": "CEO, manager",
                "user_job_title": "CEO and Manager",
                "user_company_name": "Example Company Name",
                "user_linkedin_id": 131706671,
                "user_created_timestamp": 1460481190,
                "user_color": "523fe7",
                "user_contact_id": "570d2ca62f8f547a4b8b4987",
                // below also your custom attributes
                "user_custom_user_age": "Male"
            }
            // no more results as it's a perfect match
        ]
    }
    

    This endpoint search inside all contacts from your account. Max contacts returned is 100. You need to use the pagination to get more contacts.

    HTTP Request

    POST https://api.anyleads.com/v1/your-data/search-contacts

    Query Parameters

    Parameter Required Description
    api_key true Your API key
    page true The pagination number to get your contacts
    data_search true Array parameters to search with key value
       -> key true The key you want to search
       -> value true The value you want to search
       -> match true The type of query you want to do 'equal' OR 'contains'

    Search lists

    Example request to search inside your lists:

    curl -X "POST" "https://api.anyleads.com/v1/your-data/search-lists" \
         -H "Content-Type: application/json; charset=utf-8" \
         -d $'{
      "api_key": "6af2b19950de365a83837ahea1cf9d9383d28",
      "page" : "1",
      "data_search": [
        {
          "key": "list_id",
          "value": "57ee93a32f8f54fb788b8765",
          "match": "equal"
        }
      ]
    

    The above command returns JSON structured like this:

    {
        "load_in": 0.0347,
        "state": true,
        "event": "success",
        "message": "Lists found.",
        "lists_count": 1,
        "lists_total_page": 1,
        "lists_current_page": 1,
        "lists_data": [
            {
                "list_id": "57ee93a32f8f54fb788b8765",
                "list_name": "Prospecting"
            }
        ]
    }
    

    This endpoint search inside all your lists from your account. Max lists returned is 100. You need to use the pagination to get more lists.

    HTTP Request

    POST https://api.anyleads.com/v1/your-data/search-lists

    Query Parameters

    Parameter Required Description
    api_key true Your API key
    page true The page number to navigate inside your search
    data_search true Array parameters to search with key value
       -> key true The key you want to search ('list_id' OR 'list_name')
       -> value true The value you want to search
       -> match true The type of query you want to do 'equal' OR 'contains'

    Update a contact

    Example request to update a contact:

    curl -X "POST" "https://api.anyleads.com/v1/your-data/update-contact" \
         -H "Content-Type: application/json; charset=utf-8" \
         -d $'{
      "api_key": "6af2b19950de365a83837ahea1cf9d9383d28",
      "data_update": {
        "user_custom_user_sexe": "Male",
        "user_email": "johndoe@gmail.com",
        "user_contact_id": "59d7425f6bc7c7d0038b48736",
        "user_custom_user_age": 19
      }
    }'
    

    The above command returns JSON structured like this:

    {
        "load_in": 0.3161,
        "state": true,
        "event": "success",
        "message": "Contact updated."
    }
    

    This endpoint will update a contact in your account. You can update main keys or your custom attributes.

    HTTP Request

    POST https://api.anyleads.com/v1/your-data/update-contact

    Query Parameters

    Parameter Required Description
    api_key true Your API key
    data_update true Array parameters to update with key value
       -> user_contact_id true The user_contact_id to update
       -> user_email false E.g The 'email' of the contact you want to update
       -> user_city false E.g The 'user_city' of the contact you want to update
       -> user_custom* false The custom attribute you want to update, for example user_custom_age if your custom attribute key is 'age'

    Create a contact

    Example request to create a contact:

    curl -X "POST" "https://api.anyleads.com/v1/your-data/create-contact" \
         -H "Content-Type: application/json; charset=utf-8" \
         -d $'{
      "api_key": "6af2b19950de365a83837ahea1cf9d9383d28",
      "data_create": {
        "user_email": "johndoe@anyleads.com",
        "user_list_id": "57385e8d2f8f544c6e8b4876",
        "user_custom_user_sexe": "Male"
      }
    }'
    

    The above command returns JSON structured like this:

    {
        "load_in": 0.4536,
        "state": true,
        "event": "success",
        "message": "Contact created.",
        "user_contact_id": "59d7425f6bc7c7d0038b7654"
    }
    

    This endpoint will create a contact in your account. You can use the main keys and your custom attributes as parameters.

    HTTP Request

    POST https://api.anyleads.com/v1/your-data/create-contact

    Query Parameters

    Parameter Required Description
    api_key true Your API key
    data_create true Array parameters to create with key value
       -> user_email true E.g The 'email' of the contact you want to create
       -> user_list_id true The 'user_list_id' value to associate with the contact
       -> user_city false E.g The 'user_city' of the contact you want to create
       -> user_custom* false The custom attribute you want to create for this contact, for example user_custom_age if your custom attribute key is 'age'

    Create a list

    Example request to create a list:

    curl -X "POST" "https://api.anyleads.com/v1/your-data/create-list" \
         -H "Content-Type: application/json; charset=utf-8" \
         -d $'{
      "api_key": "6af2b19950de365a83837ahea1cf9d9383d28",
      "data_create": {
        "list_name": "Prospecting 2017"
      }
    }'
    

    The above command returns JSON structured like this:

    {
        "load_in": 0.2309,
        "state": true,
        "event": "success",
        "message": "List created.",
        "list_id": "59e0ab6292cefdf8b6008766"
    }
    

    This endpoint will create a new list in your account. 'list_name' key is required.

    HTTP Request

    POST https://api.anyleads.com/v1/your-data/create-list

    Query Parameters

    Parameter Required Description
    api_key true Your API key
    data_create true Array parameters to create with key value
       -> list_name true The 'list_name' value you want to use to create your list.

    Delete a list

    Example request to delete a list:

    curl -X "POST" "https://api.anyleads.com/v1/your-data/delete-list" \
         -H "Content-Type: application/json; charset=utf-8" \
         -d $'{
      "api_key": "6af2b19950de365a83837ahea1cf9d9383d28",
      "data_delete": {
        "list_id": "59e0ab6292cefdf8b60abe654"
      }
    }'
    

    The above command returns JSON structured like this:

    {
        "load_in": 0.1772,
        "state": true,
        "event": "success",
        "message": "List deleted.",
        "list_id": "59e0ab6292cefdf8b60abe654"
    }
    

    This endpoint will delete a list in your account. 'list_id' key is required.

    HTTP Request

    POST https://api.anyleads.com/v1/your-data/delete-list

    Query Parameters

    Parameter Required Description
    api_key true Your API key
    data_delete true Array parameters to delete with key value
       -> list_id true The 'list_id' value you want to use to delete your list.

    Delete a contact

    Example request to delete a contact:

    curl -X "POST" "https://api.anyleads.com/v1/your-data/delete-contact" \
         -H "Content-Type: application/json; charset=utf-8" \
         -d $'{
      "api_key": "6af2b19950de365a83837ahea1cf9d9383d28",
      "data_delete": {
        "user_contact_id": "59e0a66f92cefdf5b6037363"
      }
    }'
    

    The above command returns JSON structured like this:

    {
        "load_in": 0.1292,
        "state": true,
        "event": "success",
        "message": "Contact deleted.",
        "contact_id": "59e0a66f92cefdf5b6037363"
    }
    

    This endpoint will delete a contact in your account. 'user_contact_id' key is required.

    HTTP Request

    POST https://api.anyleads.com/v1/your-data/delete-contact

    Query Parameters

    Parameter Required Description
    api_key true Your API key
    data_delete true Array parameters to delete with key value
       -> user_contact_id true The 'user_contact_id' value you want to use to delete your contact.

    Errors

    The Anyleads™ API uses the following error codes:

    Key State Meaning
    state false -- Error during your request.
    state true -- The request is successful.
    event error -- Error during your request.
    event success -- The request is successful.