### Retrieve All Opportunities via Apollo.io API Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_opportunities.md This snippet demonstrates how to make a GET request to the Apollo.io API to fetch a list of all opportunities. It includes examples using `curl` for a quick command-line test and `Python` for programmatic integration. An API key is required for authentication, which should be replaced with 'YOUR API KEY HERE'. ```shell curl -X GET -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" "https://api.apollo.io/v1/opportunities/search" ``` ```python import requests url = "https://api.apollo.io/v1/opportunities/search" headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("GET", url, headers=headers) print(response.text) ``` -------------------------------- ### Install Python 'requests' Library via pip Source: https://github.com/apolloio/apollo-api-docs/blob/master/README.md This command demonstrates how to install the 'requests' HTTP library for Python using the pip package manager. It's a common prerequisite for running Python examples that interact with web services. ```bash /usr/bin/python3 -m pip install requests ``` -------------------------------- ### Install Ruby Gems for Native Development Source: https://github.com/apolloio/apollo-api-docs/blob/master/README.md This command installs all required Ruby gems (dependencies) specified in the project's Gemfile. It ensures that the development environment has all necessary libraries to run the Middleman static site generator for native development. ```bash bundle install ``` -------------------------------- ### Start Local Development Server with Docker Source: https://github.com/apolloio/apollo-api-docs/blob/master/README.md This command starts a local development server for the Apolloio API documentation using Docker. It maps port 4567 from the container to the host and mounts the local 'source' directory. The server will be accessible at http://localhost:4567/ for development and preview purposes. ```bash docker run --rm --name slate -p 4567:4567 -v $(pwd)/source:/srv/slate/source slatedocs/slate serve ``` -------------------------------- ### Retrieve Users via Python Requests Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_misc.md Illustrates how to fetch a list of users from the Apollo API using the Python `requests` library. The example sets up the API endpoint URL and required headers, including the API key, then executes a GET request and prints the response. ```python import requests url = "https://api.apollo.io/v1/users/search" headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("GET", url, headers=headers) print(response.text) ``` -------------------------------- ### Get a list of account stages Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_accounts.md This snippet demonstrates how to retrieve a list of all available account stages from the Apollo.io API. It includes examples for making a GET request using `curl` and Python's `requests` library, along with a sample JSON response showing the structure of the returned account stage objects. ```shell curl -X GET -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" "https://api.apollo.io/v1/account_stages" ``` ```python import requests url = "https://api.apollo.io/v1/account_stages" headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("GET", url, headers=headers) print(response.text) ``` ```json { "account_stages": [ { "id": "5c1004XXXXXXXXXXXXXXXXXX", "team_id": "5c1004XXXXXXXXXXXXXXXXXX", "display_name": "Cold", "name": "Cold", "display_order": 0, "default_exclude_for_leadgen": false, "category": "in_progress" }, { "id": "5c1004XXXXXXXXXXXXXXXXXX", "team_id": "5c1004XXXXXXXXXXXXXXXXXX", "display_name": "Current Client", "name": "Current Client", "display_order": 1, "default_exclude_for_leadgen": true, "category": "succeeded" }, { "id": "5c1004a04XXXXXXXXXXXXXX", "team_id": "5c1004aXXXXXXXXXXXXXXXX", "display_name": "Active Opportunity", "name": "Active Opportunity", "display_order": 2, "default_exclude_for_leadgen": true, "category": "succeeded" }, { "id": "5c1004XXXXXXXXXXXXXXXXXX", "team_id": "5c1004XXXXXXXXXXXXXXXXXX", "display_name": "Dead Opportunity", "name": "Dead Opportunity", "display_order": 3, "default_exclude_for_leadgen": false, "category": "failed" }, { "id": "5c1004XXXXXXXXXXXXXXXXXX", "team_id": "5c1004XXXXXXXXXXXXXXXXXX", "display_name": "Do Not Prospect", "name": "Do Not Prospect", "display_order": 4, "default_exclude_for_leadgen": true, "category": "failed" } ] } ``` ```APIDOC GET https://api.apollo.io/v1/account_stages Query Parameters: sort_ascending: Possible values: true or false page: which page to return. Defaults to 1 ``` -------------------------------- ### Retrieve All Labels/Tags via Apollo.io API Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_misc.md This section provides examples for retrieving a list of all labels or tags defined within your Apollo.io account. It includes `curl` and Python code snippets for making the GET request, along with a sample JSON array demonstrating the structure of the returned label objects. An API key is required for authentication. ```APIDOC GET https://api.apollo.io/v1/labels ``` ```shell curl -X GET -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" "https://api.apollo.io/v1/labels" ``` ```python import requests url = "https://api.apollo.io/v1/labels" headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("GET", url, headers=headers) print(response.text) ``` ```json [ { "_id": "5f21ccXXXXXXXXXXXXXXXXXX", "cached_count": 5, "created_at": "2020-07-29T19:23:14.220Z", "modality": "contacts", "name": "test API label", "team_id": "5c1004XXXXXXXXXXXXXXXXXX", "updated_at": "2020-08-04T18:16:32.733Z", "user_id": "5c1004XXXXXXXXXXXXXXXXXX", "id": "5f21ccXXXXXXXXXXXXXXXXXX", "key": "5f21ccXXXXXXXXXXXXXXXXXX" }, { "_id": "5dc34dXXXXXXXXXXXXXXXXXX", "cached_count": 0, "created_at": "2019-11-06T22:48:53.173Z", "modality": "contacts", "name": "Test", "team_id": "5c1004XXXXXXXXXXXXXXXXXX", "updated_at": "2020-07-29T19:23:14.308Z", "user_id": "5c1004XXXXXXXXXXXXXXXXXX", "id": "5dc34dXXXXXXXXXXXXXXXXXX", "key": "5dc34dXXXXXXXXXXXXXXXXXX" }, { "_id": "5cd9eeXXXXXXXXXXXXXXXXXX", "cached_count": 3001, "created_at": "2019-05-13T22:22:30.843Z", "modality": "contacts", "name": "Test List 1000 Net New Contacts", "team_id": "5c1004XXXXXXXXXXXXXXXXXX", "updated_at": "2019-05-13T23:38:49.323Z", "user_id": "5c1004XXXXXXXXXXXXXXXXXX", "id": "5cd9eeXXXXXXXXXXXXXXXXXX", "key": "5cd9eeXXXXXXXXXXXXXXXXXX" } ] ``` -------------------------------- ### Tasks Bulk Create API Endpoint Reference Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_tasks.md This section provides detailed API documentation for the POST /v1/tasks/bulk_create endpoint. It lists all available parameters, their descriptions, whether they are required, and example values for creating tasks. ```APIDOC POST https://api.apollo.io/v1/tasks/bulk_create Parameters: priority (required): Priority of the task (Example: "high"/"medium"/"low") user_id: The ID of the user the task is to be assigned to (Example: "583f2f7ed9ced98ab5bfXXXX") due_at: the due date and time for the task (Example: 2020-12-21T16:16:48.311Z) type: The type of the task (valid types: `call`, `outreach_manual_email`, `action_item`) contact_ids (required): An array of contact Ids (Example: ["583f2f7ed9ced98ab5bfXXXX", "583f2f7ed9ced98ab5bfXXXX"]) note: note to be attached to the task (Example: "Example note") status: the status of the task (Example: "scheduled") ``` -------------------------------- ### Apollo.io API Task/Activity Object Example Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_tasks.md Demonstrates the structure of a task or activity object from the Apollo.io API. This example details task specifics such as type ('call'), status ('scheduled'), due dates, and notes. It also shows how related 'account' and 'contact' objects are nested within the task, providing comprehensive context for the activity. ```APIDOC { "emailer_campaign_id": null, "id": "5ff3XXXXXXXXXXXXXXXXXXXX", "user_id": "5fc6XXXXXXXXXXXXXXXXXXXX", "created_at": "2021-01-04T15:36:09.033Z", "completed_at": null, "note": "Call Contact", "skipped_at": null, "due_at": "2021-01-04T15:35:58.054+00:00", "type": "call", "priority": "medium", "status": "scheduled", "answered": null, "contact_id": "5fd1XXXXXXXXXXXXXXXXXXXX", "person_id": null, "account_id": "5fd1XXXXXXXXXXXXXXXXXXXX", "organization_id": null, "persona_ids": [], "subject": null, "created_from": "zp_ui", "salesforce_type": null, "playbook_step_ids": [], "playbook_id": null, "needs_playbook_autoprospecting": null, "starred_by_user_ids": [], "salesforce_id": null, "hubspot_id": null, "account": { "id": "5fd1XXXXXXXXXXXXXXXXXXXX", "domain": "apple.com", "name": "Apple", "team_id": "5fcXXXXXXXXXXXXXXXXXXXX", "typed_custom_fields": {}, "organization_id": null, "account_stage_id": null, "source": "salesforce", "original_source": "salesforce", "owner_id": "5fc6XXXXXXXXXXXXXXXXXXXX", "created_at": "2020-12-09T21:41:51.657Z", "phone": "(X00) 4X4-XXXX", "phone_status": "no_status", "test_predictive_score": null, "hubspot_id": null, "salesforce_id": "0011U0XXXXXXXXXXXX", "crm_owner_id": "0051U0XXXXXXXXXXXX", "parent_account_id": null, "sanitized_phone": "+3X0042XXXXX", "account_playbook_statuses": [], "existence_level": "full", "label_ids": [], "modality": "account", "salesforce_record_url": "https://na85.salesforce.com/0011U0XXXXXXXXXXXX", "persona_counts": {} }, "contact": { "id": "5fd1XXXXXXXXXXXXXXXXXXXX", "first_name": "Jane", "last_name": "doe", "name": "Jane Doe", "linkedin_url": null, "title": "Senior Engineer", "contact_stage_id": "5fc6XXXXXXXXXXXXXXXXXXXX", "owner_id": "5fc6XXXXXXXXXXXXXXXXXXXX", "person_id": null, "email_needs_tickling": false, "organization_name": null, "source": "salesforce_contact", "original_source": "salesforce_contact", "organization_id": null, "headline": null, "photo_url": null, "present_raw_address": "Washington, District of Columbia, United States", "linkedin_uid": null, "extrapolated_email_confidence": 0.0, "salesforce_id": "003XXXXXXXXXXXXXXX", "salesforce_lead_id": null, "salesforce_contact_id": "0031XXXXXXXxXXXXX", "salesforce_account_id": "0011U00XXXXXXxXXX", "crm_owner_id": "0051U0XXXXXXXXXXXX", "created_at": "2020-12-09T21:41:57.503Z", "test_predictive_score": null, "emailer_campaign_ids": [], "email_manually_changed": false, "direct_dial_status": null, "direct_dial_enrichment_failed_at": null, "email_status": "verified", "account_id": "5fd1XXXXXXXXXXXXXXXXXXXX", "last_activity_date": null, "hubspot_vid": null } } ``` -------------------------------- ### Request Contact Stages from Apollo.io API Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_contacts.md Demonstrates how to make a GET request to the Apollo.io API to retrieve a list of contact stages. Examples are provided for both cURL (command-line) and Python using the `requests` library. An API key is required for authentication. ```shell curl -X GET -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" "https://api.apollo.io/v1/contact_stages" ``` ```python import requests url = "https://api.apollo.io/v1/contact_stages" headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("GET", url, headers=headers) print(response.text) ``` -------------------------------- ### Example Apollo User/Team API Response Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_misc.md A sample JSON response from the Apollo API, illustrating the structure of user and team configuration data. This includes various boolean flags for feature enablement, CRM integration statuses, user-specific settings like credit limits and email preferences, and nested assistant settings with detailed configuration options. The response typically contains an array of user/team objects and a fetch result count. ```APIDOC { "users": [ { "linked_hubspot": false, "linked_salesloft": false, "default_chrome_extension_log_email_send_to_salesforce": true, "chrome_extension_auto_match_salesforce_opportunity": true, "chrome_extension_gmail_enable_email_tools": true, "enable_desktop_notifications": true, "default_chrome_extension_enable_reminders": false, "chrome_extension_gmail_enable_crm_sidebar": true }, { "id": "5c1004XXXXXXXXXXXXXXXXXX", "team_id": "5c1004XXXXXXXXXXXXXXXXXX", "first_name": "Alan", "last_name": "Rios", "title": null, "email": "example@domain.io", "created_at": "2018-12-11T18:40:32.639Z", "credit_limit": 50, "direct_dial_credit_limit": 0, "salesforce_account": "fencefeet@gmail.com", "deleted": false, "should_include_unsubscribe_link": false, "opt_out_html_template": "If you don't want to hear from me again, please <%let me know%>.", "name": "Alan Rios", "enable_click_tracking": true, "password_needs_reset": false, "salesforce_id": "0051XXXXXXXXXXXXXX", "default_cockpit_layout": "5c1004XXXXXXXXXXXXXXXXXX", "default_finder_view_ids": {}, "default_account_overview_layout_id": null, "default_organization_overview_layout_id": null, "default_contact_overview_layout_id": null, "bridge_calls": false, "bridge_phone_number": null, "bridge_incoming_calls": false, "bridge_incoming_phone_number": "+1 (408) 201-2216", "current_email_verified": true, "record_calls": true, "salesforce_instance_url": "https://na85.salesforce.com", "permission_set_id": "5c1004XXXXXXXXXXXXXXXXXX", "assistant_setting": { "_id": "5c1004XXXXXXXXXXXXXXXXXX", "deal_size_metric": "amount", "inactive_account_stage_ids": [], "inactive_contact_stage_ids": [], "insight_deal_size_signals": {}, "insight_sale_cycle_signals": {}, "insight_win_rate_signals": {}, "job_posting_locations": [], "job_posting_titles": [], "latest_funding_days": 90, "latest_news_days": 30, "max_num_active_accounts": 100, "max_people_in_sequence_per_account": 5, "num_inactive_days_to_re_engage": 180, "persona_ids": [ "5c1004XXXXXXXXXXXXXXXXXX", "5c1004XXXXXXXXXXXXXXXXXX" ], "success_case_account_stage_ids": [], "technology_uids": [], "territory_company_size_ranges": [], "territory_location_override": false, "territory_locations": [ "United States" ], "territory_person_locations": [ "United States" ], "id": "5c1004XXXXXXXXXXXXXXXXXX", "key": "5c1004XXXXXXXXXXXXXXXXXX" }, "typed_custom_fields": {}, "default_use_local_numbers": false, "disable_email_linking": null, "sync_salesforce_id": "0051UXXXXXXXXXXXXXX", "sync_crm_id": null, "zp_contact_id": "5a9de5XXXXXXXXXXXXXXXXXX", "chrome_extension_downloaded": true, "user_roles": [ "admin" ], "email_oauth_signin_only": false, "notification_last_created_at": "2019-11-06T22:48:12.812+00:00", "crm_requested_to_integrate": null, "has_invited_user": false, "notification_last_read_at": "2019-09-25T18:09:05.000+00:00", "daily_data_request_email": true, "data_request_emails": true, "daily_task_email": true, "free_data_credits_email": true, "dismiss_new_team_suggestion": true, "request_email_change_to": null, "self_identified_persona": null, "subteam_ids": [], "prospect_territory_ids": [], "linked_salesforce": true, "linked_hubspot": false, "linked_salesloft": true, "default_chrome_extension_log_email_send_to_salesforce": true, "chrome_extension_auto_match_salesforce_opportunity": true, "chrome_extension_gmail_enable_email_tools": true, "enable_desktop_notifications": true, "default_chrome_extension_enable_reminders": false, "chrome_extension_gmail_enable_crm_sidebar": true } ], "num_fetch_result": null } ``` -------------------------------- ### API Endpoint: POST /v1/emailer_campaigns/search Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_sequences.md This section documents the `POST /v1/emailer_campaigns/search` API endpoint, which is used to search for emailer campaigns (sequences). It specifies the HTTP method, URL, and details the `q_name` parameter, including its type and an example value. ```APIDOC POST https://api.apollo.io/v1/emailer_campaigns/search Parameter | Description | Example --------- | ----------- | --------- q_name | Name | "Name of Sequence" ``` -------------------------------- ### Apollo API User Search Sample Response Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_misc.md Provides a detailed example of the JSON payload returned by the Apollo API's `/v1/users/search` endpoint. It outlines the structure of the `pagination` object and the `users` array, showcasing various fields for each user, such as ID, name, email, and associated settings. ```json { "pagination": { "page": null, "per_page": 25, "total_entries": 2, "total_pages": 1 }, "users": [ { "id": "5cc77dXXXXXXXXXXXXXXXXXX", "team_id": "5c1004XXXXXXXXXXXXXXXXXX", "first_name": "Test", "last_name": "User", "title": null, "email": "alangrios14@gmail.com", "created_at": "2019-04-29T22:39:36.645Z", "credit_limit": 50, "direct_dial_credit_limit": 0, "salesforce_account": null, "deleted": false, "should_include_unsubscribe_link": false, "opt_out_html_template": "If you don't want to hear from me again, please <%let me know%>.", "name": "Test User", "enable_click_tracking": false, "password_needs_reset": false, "salesforce_id": null, "default_cockpit_layout": null, "default_finder_view_ids": {}, "default_account_overview_layout_id": null, "default_organization_overview_layout_id": null, "default_contact_overview_layout_id": null, "bridge_calls": false, "bridge_phone_number": null, "bridge_incoming_calls": false, "bridge_incoming_phone_number": null, "current_email_verified": true, "record_calls": true, "salesforce_instance_url": null, "permission_set_id": "5c1004XXXXXXXXXXXXXXXXXX", "assistant_setting": { "_id": "5cc77dXXXXXXXXXXXXXXXXXX", "deal_size_metric": "amount", "inactive_account_stage_ids": [], "inactive_contact_stage_ids": [], "insight_deal_size_signals": {}, "insight_sale_cycle_signals": {}, "insight_win_rate_signals": {}, "job_posting_locations": [], "job_posting_titles": [], "latest_funding_days": 90, "latest_news_days": 30, "max_num_active_accounts": 100, "max_people_in_sequence_per_account": 5, "num_inactive_days_to_re_engage": 180, "persona_ids": [ "5c1004XXXXXXXXXXXXXXXXXX", "5c1004XXXXXXXXXXXXXXXXXX" ], "success_case_account_stage_ids": [], "technology_uids": [], "territory_company_size_ranges": [], "territory_location_override": false, "territory_locations": [ "United States" ], "territory_person_locations": [ "United States" ], "id": "5cc77dXXXXXXXXXXXXXXXXXX", "key": "5cc77XXXXXXXXXXXXXXXXXX" }, "typed_custom_fields": {}, "default_use_local_numbers": false, "disable_email_linking": null, "sync_salesforce_id": null, "sync_crm_id": null, "zp_contact_id": "59f9e0XXXXXXXXXXXXXXXXXX", "chrome_extension_downloaded": false, "user_roles": [], "email_oauth_signin_only": false, "notification_last_created_at": "2020-04-07T00:40:12.399+00:00", "crm_requested_to_integrate": null, "has_invited_user": false, "notification_last_read_at": null, "daily_data_request_email": false, "data_request_emails": true, "daily_task_email": true, "free_data_credits_email": true, "dismiss_new_team_suggestion": null, "request_email_change_to": null, "self_identified_persona": "Product", "added_contact_to_sequence": false, "has_approved_emailer_campaign": false, "main_emailer_campaign_id": null, "current_onboarding_step": "create_account", "onboarding_use_cases": { "bulk_status": "started", "current_use_case": "bulk", "first_user_case": "bulk", "searched_people": true, "download_leads": true }, "skip_use_case_selection": false, "subteam_ids": [ "5cc77XXXXXXXXXXXXXXXXXX" ], "prospect_territory_ids": [], "linked_salesforce": null } ] } ``` -------------------------------- ### Apollo.io Company/Account Data Structure Examples Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_enrichment.md These examples showcase the JSON format for company and account objects retrieved from the Apollo.io API. Each example demonstrates different aspects of the data, including nested objects like `account_playbook_statuses` and `departmental_head_count`, and various company attributes. ```JSON { "test_predictive_score":null, "hubspot_id":null, "salesforce_id":null, "crm_owner_id":null, "parent_account_id":null, "sanitized_phone":"+12023741312", "account_playbook_statuses":[ { "_id":"61844b47a4258e00c2499c8e", "added_by_id":"6181a50a99668600ded6feed", "added_on":"2021-11-04T21:06:15.053+00:00", "completed_step_ids":[ "6184391f26e0aa00a4ccc56b" ], "created_at":null, "current_step_id":"61844dba8b94530112288546", "finished_reason_cd":"completed_all_steps", "paused_reason_cd":null, "playbook_id":"6184388a0515e4008cbf5129", "position":2, "status_cd":"finished", "updated_at":null, "id":"61844b47a4258e00c2499c8e", "key":"61844b47a4258e00c2499c8e" } ], "existence_level":"full", "label_ids":[ ], "typed_custom_fields":{ "618438b906b01300da086546":"Google, Okta, Lyft" }, "modality":"account", "persona_counts":{}, "departmental_head_count":{ "engineering":46, "business_development":14, "support":21, "finance":2, "marketing":10, "administrative":1, "product_management":7, "arts_and_design":8, "operations":7, "accounting":2, "entrepreneurship":3, "information_technology":2, "consulting":9, "human_resources":6, "sales":17, "education":3, "legal":0, "media_and_commmunication":0, "data_science":0 } } ``` ```JSON { "id":"55ea57fdf3e5bb1430000ac7", "name":"Outreach, Inc.", "website_url":"http://www.outreach.com", "blog_url":null, "angellist_url":null, "linkedin_url":"http://www.linkedin.com/company/outreach-inc-", "twitter_url":null, "facebook_url":"https://www.facebook.com/outreachinc", "primary_phone":{ "number":"+1 800-991-6011", "source":"Owler" }, "languages":[ "English", "English" ], "alexa_ranking":597090, "phone":"+1 800-991-6011", "linkedin_uid":"314305", "founded_year":1996, "publicly_traded_symbol":null, "publicly_traded_exchange":null, "logo_url":"https://zenprospect-production.s3.amazonaws.com/uploads/pictures/623369279d4f650001b93cb3/picture", "crunchbase_url":null, "primary_domain":"outreach.com", "persona_counts":{}, "industry":"marketing & advertising", "keywords":[ "outreach marketing product for christian churches", "customized design services", "professional design", "print & full service delivery", "targeted mailings done by inhouse mail services", "thought leader in outreach", "resource provider & content network", "churches", "marketing", "professional services", "religious organizations" ], "estimated_num_employees":170, "snippets_loaded":true, "industry_tag_id":"5567cd467369644d39040000", "retail_location_count":1, "raw_address":"5550 tech center drive, colorado springs, co 80919, us", "street_address":"5550 Tech Center Drive", "city":"Colorado Springs", "state":"Colorado", "country":"United States", "postal_code":"80919", "owned_by_organization_id":null, "departmental_head_count":{ "accounting":3, "operations":4, "finance":2, "arts_and_design":5, "human_resources":3, "sales":11, "marketing":8, "media_and_commmunication":7, "product_management":3, "engineering":5, "consulting":6, "support":4, "entrepreneurship":2, "information_technology":5, "business_development":1, "administrative":2, "legal":0, "education":0, "data_science":0 } } ``` ```JSON { "id":"5d09312ca3ae61489386b467", "name":"Microsoft", "website_url":"http://www.microsoft.com", "blog_url":null, "angellist_url":null, "linkedin_url":"http://www.linkedin.com/company/microsoft" } ``` -------------------------------- ### API Endpoint: Get All Opportunities Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_opportunities.md Documents the API endpoint for retrieving a list of all opportunities created by the user. This endpoint provides a high-level overview of all available opportunities. ```APIDOC GET https://api.apollo.io/v1/opportunities Description: This endpoint returns all opportunities you have created. ``` -------------------------------- ### Fetch Sales Opportunity Stages Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_misc.md This section outlines the API endpoint for retrieving a list of sales opportunity stages defined within Apollo.io. It provides examples for making the API call using 'curl' (shell) and Python's 'requests' library, along with a sample JSON response showing the structure of opportunity stage objects, including 'id', 'name', 'probability', and 'forecast_category_cd'. ```APIDOC GET https://api.apollo.io/v1/opportunity_stages ``` ```shell curl -X GET -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" "https://api.apollo.io/v1/opportunity_stages" ``` ```python import requests url = "https://api.apollo.io/v1/opportunity_stages" headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("GET", url, headers=headers) print(response.text) ``` ```json { "opportunity_stages": [ { "id": "5c14XXXXXXXXXXXXXXXXXXXX", "team_id": "5c10XXXXXXXXXXXXXXXXXXXX", "name": "Negotiation/Review", "display_order": 0.0, "forecast_category_cd": "Pipeline", "is_won": false, "is_closed": false, "probability": 90.0, "description": null, "salesforce_id": "01XXXXXXXXXX", "type": "Open" }, { "team_id": "5c10XXXXXXXXXXXXXXXXXXXX", "team_id": "5c10XXXXXXXXXXXXXXXXXXXX", "name": "Commit", "display_order": 2.0, "forecast_category_cd": "Committed", "is_won": false, "is_closed": false, "probability": 90.0, "description": "Self-explanatory", "salesforce_id": null, "type": "Open" }, { "team_id": "5c10XXXXXXXXXXXXXXXXXXXX", "team_id": "5c10XXXXXXXXXXXXXXXXXXXX", "name": "Closed Won", "display_order": 3.0, "forecast_category_cd": "Closed", "is_won": true, "is_closed": true, "probability": 100.0, "description": "Self-explanatory", "salesforce_id": "01J1UXXXXXXXXXX", "type": "Closed/Won" }, { "team_id": "5c10XXXXXXXXXXXXXXXXXXXX", "team_id": "5c10XXXXXXXXXXXXXXXXXXXX", "name": "Closed Lost", "display_order": 4.0, "forecast_category_cd": "Omitted", "is_won": false, "is_closed": true, "probability": 0.0, "description": "Self-explanatory", "salesforce_id": "0XX1U00XXXXXXXXXAC", "type": "Closed/Lost" } ] } ``` -------------------------------- ### Example Organization Data Structure (JSON Fragment) Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_organizations.md A partial JSON example illustrating the structure of an organization record returned by the Apollo API. It includes fields such as custom fields, modality, Salesforce URL, contact campaign IDs and statuses, number of contacts, last activity date, and intent data. ```JSON "typed_custom_fields": { "5b7aff6c55884769e38XXXXX": 7.0, "5ee1d989add32701128XXXXX": "0015a00003AjsaS", "5f28afc474e70000f12XXXXX": "High Tier" }, "modality": "account", "salesforce_record_url": "https://apolloio.my.salesforce.com/0015a00003AjsXXXXX", "contact_emailer_campaign_ids": [ "6488dbeb72e68a00d9XXXXX" ], "contact_campaign_status_tally": { "finished": 6, "paused": 4, "not_sent": 1, "active": 1 }, "num_contacts": 17, "last_activity_date": "2023-09-26T05:31:52.000+00:00", "intent_strength": null, "show_intent": true } ], "organizations": [], "model_ids": [ "63b3e47f0deb820001fXXXXX" ], "num_fetch_result": null, "derived_params": { "recommendation_config_id": "650bc3a2c7d5a700d09XXXXX" } } ``` -------------------------------- ### Apollo.io API Contact/Person Object Example Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_tasks.md Illustrates the structure of a typical contact or person object returned by the Apollo.io API. This example includes personal details, contact information (like email and phone numbers), and integration IDs for CRM systems such as Salesforce, Outreach, and Salesloft. ```APIDOC { "suggested_from_rule_engine_config_id": null, "email_unsubscribed": false, "label_ids": [], "has_pending_email_arcgate_request": false, "has_email_arcgate_request": false, "existence_level": "full", "email": "email@domain.io", "salesforce_record_url": "https://na85.salesforce.com/0031U0XXXXXXXXXXXX", "outreach_id": "1X7", "outreach_url": "https://app2a.outreach.io/prospects/XXX/overview", "salesloft_id": "6XX1XX5X", "salesloft_url": "https://app.salesloft.com/app/people/6XXXXXXX", "phone_numbers": [ { "raw_number": "(X00) 4X4-XXXX", "sanitized_number": "+280XXXXXXXX", "type": "other", "position": 0, "status": "no_status" } ], "account_phone_note": null } ``` -------------------------------- ### Search Sequences API Request (Shell & Python) Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_sequences.md This snippet demonstrates how to perform a POST request to search for sequences by name using the Apollo.io API. It includes examples for both `curl` in shell and `requests` in Python, showing the necessary headers and JSON payload. ```shell curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" -d '{ "q_name": "Sequence Name" }' "https://api.apollo.io/v1/emailer_campaigns/search" ``` ```python import requests url = "https://api.apollo.io/v1/emailer_campaigns/search" data = { "q_name": "Sequence Name" } headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("POST", url, headers=headers, json=data) print(response.text) ``` -------------------------------- ### Search Apollo.io Tasks API with cURL and Python Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_tasks.md This snippet demonstrates how to search for tasks using the Apollo.io API. It shows how to construct a POST request with JSON data for sorting and filtering, and includes examples in both cURL and Python. The API key is required for authentication. ```shell curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" -d '{ "sort_by_field": "task_created_at", "per_page": 100, "open_factor_names": [ "task_types" ] }' "https://api.apollo.io/v1/tasks/search" ``` ```python import requests url = "https://api.apollo.io/v1/tasks/search" data = { "sort_by_field": "task_created_at", "open_factor_names": [ "task_types" ] } headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("POST", url, headers=headers, json=data) print(response.text) ``` -------------------------------- ### Start Middleman Development Server Natively Source: https://github.com/apolloio/apollo-api-docs/blob/master/README.md This command launches a local development server using Middleman, a static site generator. It allows developers to preview and interact with the website or web application during native development, typically accessible via a local URL. ```bash bundle exec middleman server ``` -------------------------------- ### Retrieve All Custom Fields from Apollo API Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_misc.md This snippet demonstrates how to make a GET request to the Apollo API's `/v1/typed_custom_fields` endpoint to retrieve a list of all custom fields. It provides examples using cURL for command-line execution and Python for programmatic integration, both requiring an API key for authentication. ```shell curl -X GET -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" "https://api.apollo.io/v1/typed_custom_fields" ``` ```python import requests url = "https://api.apollo.io/v1/typed_custom_fields" headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("GET", url, headers=headers) print(response.text) ``` -------------------------------- ### Build and Deploy Documentation to Production with Docker Source: https://github.com/apolloio/apollo-api-docs/blob/master/README.md These commands are used to build the documentation for production and then deploy it. The first command builds the static site using Docker, mounting the 'build' and 'source' directories. The second command executes a shell script for the final deployment step, specifically for pushing changes after a PR is approved and merged. ```bash docker run --rm --name slate -v $(pwd)/build:/srv/slate/build -v $(pwd)/source:/srv/slate/source slatedocs/slate build ./deploy.sh --push-only ``` -------------------------------- ### Retrieve Email Accounts via Apollo.io API Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_misc.md This section demonstrates how to fetch a list of email accounts associated with your Apollo.io account. It includes `curl` and Python examples for making the GET request, along with a sample JSON response illustrating the structure of the returned data. Authentication is done using an API key. ```APIDOC GET https://api.apollo.io/v1/email_accounts ``` ```shell curl -X GET -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" "https://api.apollo.io/v1/email_accounts" ``` ```python import requests url = "https://api.apollo.io/v1/email_accounts" headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("GET", url, headers=headers) print(response.text) ``` ```json { "email_accounts": [ { "aliases": [ "alan@apollo.io" ], "id": "5a298fXXXXXXXXXXXXXXXXXX", "user_id": "5c1004XXXXXXXXXXXXXXXXXX", "email": "example@random.io", "type": "gmail", "active": true, "default": true, "seconds_delay_between_emails": 0, "provider_display_name": "Gmail", "nylas_provider": null, "last_synced_at": "2020-08-18T06:28:04.028+00:00", "email_sending_policy_cd": "default", "sendgrid_api_user": null, "mailgun_domains": null, "signature_edit_disabled": true, "email_daily_threshold": 100, "max_outbound_emails_per_hour": 50, "signature_html": "null" } ] } ``` -------------------------------- ### Create Tasks API Request Examples Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_tasks.md These code snippets demonstrate how to send a POST request to the Apollo.io Tasks API to bulk create tasks. The request body includes parameters such as priority, assigned user, due date, task type, associated contact IDs, a note, and status. An API key is required for authentication. ```shell curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" -d '{ "priority": "medium", "user_id": "5c10XXXXXXXXXXXXXXXXXXXX", "due_at": "2020-12-21T16:16:48.311Z", "type": "call", "contact_ids": [ "5cd9XXXXXXXXXXXXXXXXXXXX", "5cd9XXXXXXXXXXXXXXXXXXXX" ], "note": "Note to be attached to the task", "status": "scheduled" }' "https://api.apollo.io/v1/tasks/bulk_create" ``` ```python import requests url = "https://api.apollo.io/v1/tasks/bulk_create" data = { "priority": "medium", "user_id": "5c10XXXXXXXXXXXXXXXXXXXX", "due_at": "2020-12-21T16:16:48.311Z", "type": "call", "contact_ids": [ "5cd9XXXXXXXXXXXXXXXXXXXX", "5cd9XXXXXXXXXXXXXXXXXXXX" ], "note": "Note to be attached to the task", "status": "scheduled" } headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("POST", url, headers=headers, json=data) print(response.text) ``` -------------------------------- ### Opportunities API: Create Endpoint Reference Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_opportunities.md Defines the POST endpoint for creating new opportunities, detailing all required parameters, their types, and descriptions. This reference is crucial for understanding the data structure needed for successful API calls. ```APIDOC POST https://api.apollo.io/v1/opportunities Parameters: - owner_id: Owner ID. You can GET a list of possible users and their associated information from misc/users - name: Opportunity name - amount: The amount of money involved in the opportunity/ deal - opportunity_stage_id: The ID of the current stage. You can get a list of all opportunity stages from misc/opportunity stages - closed_date: The date the opportunity was closed - account_id: ID of the account ``` -------------------------------- ### API Reference: Get Organization Job Postings Endpoint Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_organizations.md This section details the API endpoint for retrieving an organization's job postings. It specifies the HTTP method, URL structure, and available query parameters, including their descriptions and examples for proper usage. ```APIDOC GET /v1/organizations/{ORGANIZATION_ID}/job_postings Description: Get a list of active job postings for a company. Query Parameters: id (string, required): Description: The id of the organization (i.e. NOT account id). You can obtain this with a company's domain by using the enrich endpoint. Example: 54fca1087369647fcXXXXXXX ``` -------------------------------- ### Retrieve Organization Job Postings via API Request Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_organizations.md This snippet demonstrates how to fetch a list of active job postings associated with a specific organization using the Apollo API. It includes examples for making the GET request using cURL and Python, requiring an API key and the organization's ID. ```shell curl -X GET -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" "https://api.apollo.io/v1/organizations/ORGANIZATION_ID/job_postings" ``` ```python import requests url = "https://api.apollo.io/v1/organizations/ORGANIZATION_ID/job_postings" headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("GET", url, headers=headers) print(response.text) ``` -------------------------------- ### API Query Parameters Reference Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_accounts.md This section details the available query parameters for Apollo.io API requests. Each parameter's purpose, type, and any relevant usage notes or associated APIs are described. ```APIDOC Query Parameters: - Parameter: account_ids Description: An array of account ids. You can filter for a list of account IDS with the accounts/search API. - Parameter: owner_id Description: The owner id to change into. You can GET a list of possible users and its associated information from /users ``` -------------------------------- ### Create an Account using Apollo API Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_accounts.md This snippet demonstrates how to create a new account in Apollo via its API. It shows how to send a POST request with account details like name, domain, phone number, and address. An API key is required for authentication. ```shell curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" -d '{ "name": "Google", "domain": "google.com", "phone_number": "1-866-246-6453", "raw_address": "1600 Amphitheatre Parkway" }' "https://api.apollo.io/v1/accounts" ``` ```python import requests url = "https://api.apollo.io/v1/accounts" data = { "name": "Google", "domain": "google.com", "phone_number": "1-866-246-6453", "raw_address": "1600 Amphitheatre Parkway" } headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("POST", url, headers=headers, json=data) print(response.text) ``` ```json { "account": { "id": "5fe0XXXXXXXXXXXXXXXXXXXX", "domain": "google.com", "name": "Google", "team_id": "5fc6XXXXXXXXXXXXXXXXXXXX", "typed_custom_fields": {}, "organization_id": null, "account_stage_id": "5fc6XXXXXXXXXXXXXXXXXXXX", "source": "api", "original_source": "api", "owner_id": "5fc6XXXXXXXXXXXXXXXXXXXX", "created_at": "2020-12-21T15:33:02.709Z", "phone": null, "phone_status": "no_status", "test_predictive_score": null, "hubspot_id": null, "salesforce_id": null, "crm_owner_id": null, "parent_account_id": null, "account_playbook_statuses": [], "existence_level": "full", "label_ids": [], "modality": "account", "persona_counts": {} }, "team": { "id": "5fc6XXXXXXXXXXXXXXXXXXX", "accounts_finder_empty": false } } ``` ```APIDOC POST https://api.apollo.io/v1/accounts Parameters: name: The account's name domain: The domain of the account you are adding phone_number: The corporate phone for this account. raw_address: The address string for this account, Apollo will intelligently infer the city, state, country, and time zone from your address ``` -------------------------------- ### Execute Native Deployment Script Source: https://github.com/apolloio/apollo-api-docs/blob/master/README.md This command runs the `deploy.sh` shell script, which is responsible for deploying the project to a web server or hosting platform. It's typically executed after a pull request has been approved and merged into the master branch for native deployments. ```bash ./deploy.sh ``` -------------------------------- ### Update Contact Stage API Request Examples Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_contacts.md Demonstrates how to send a POST request to the Apollo.io API to update the stage of one or more contacts. Examples are provided for both cURL and Python, showing the required headers and JSON payload structure. ```shell curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" -d '{ "contact_ids": ["contact_id1", "contact_id2"], "contact_stage_id": "stage_id" }' "https://api.apollo.io/v1/contacts/update_stages" ``` ```python import requests url = "https://api.apollo.io/v1/contacts/update_stages" data = { "contact_ids": ["contact_id1", "contact_id2"], "contact_stage_id": "stage_id" } headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("POST", url, headers=headers, json=data) print(response.text) ``` -------------------------------- ### Create New Opportunity Record Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_opportunities.md This section demonstrates how to create a new opportunity record in Apollo. Opportunities track potential deals and can be associated with accounts and owners. The examples show how to send a POST request with the necessary parameters like owner ID, name, amount, stage, closed date, and account ID. ```shell curl -X POST -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" -d '{ "owner_id":"5c10XXXXXXXXXXXXXXXXXXXX", "name":"Opportunity Name", "amount":"200", "opportunity_stage_id":"5c14XXXXXXXXXXXXXXXXXXXX", "closed_date":"2020-12-18", "account_id":"5f06XXXXXXXXXXXXXXXXXXXX" }' "https://app.apollo.io/api/v1/opportunities" ``` ```python import requests url = "https://app.apollo.io/api/v1/opportunities" data = { "owner_id":"5c10XXXXXXXXXXXXXXXXXXXX", "name":"Opportunity Name", "amount":"200", "opportunity_stage_id":"5c14XXXXXXXXXXXXXXXXXXXX", "closed_date":"2020-12-18", "account_id":"5f06XXXXXXXXXXXXXXXXXXXX" } headers = { 'Cache-Control': 'no-cache', 'Content-Type': 'application/json', 'X-Api-Key': 'YOUR API KEY HERE' } response = requests.request("POST", url, headers=headers, json=data) print(response.text) ``` -------------------------------- ### Sample JSON Response for Search Sequences API Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_sequences.md This JSON snippet illustrates the typical structure and content of a successful response from the `/v1/emailer_campaigns/search` endpoint. It provides details such as pagination, breadcrumbs, and an array of `emailer_campaigns` objects, each containing various sequence attributes. ```json { "pagination": { "page": 1, "per_page": 25, "total_entries": 1, "total_pages": 1 }, "breadcrumbs": [ { "label": "Name", "signal_field_name": "q_name", "value": "Manual Message Sequence", "display_name": "Manual Message Sequence" } ], "emailer_campaigns": [ { "id": "5c8751XXXXXXXXXXXXXXXX", "name": "Manual Message Sequence", "archived": false, "created_at": "2019-03-12T06:27:23.539Z", "emailer_schedule_id": "5c1004XXXXXXXXXXXXXXXXXX", "max_emails_per_day": null, "user_id": "5c1004XXXXXXXXXXXXXXXXXX", "same_account_reply_policy_cd": null, "excluded_account_stage_ids": [ "5c1004XXXXXXXXXXXXXXXXXX", "5c1004XXXXXXXXXXXXXXXXXX", "5c1004XXXXXXXXXXXXXXXXXX", "5c1004XXXXXXXXXXXXXXXXXX" ], "excluded_contact_stage_ids": [ "5c1004XXXXXXXXXXXXXXXXXX", "5c1004XXXXXXXXXXXXXXXXXX", "5c1004XXXXXXXXXXXXXXXXXX", "5c1004XXXXXXXXXXXXXXXXXX" ], "contact_email_event_to_stage_mapping": {}, "label_ids": [], "create_task_if_email_open": false, "email_open_trigger_task_threshold": 3, "mark_finished_if_click": false, "active": false, "days_to_wait_before_mark_as_response": 5, "starred_by_user_ids": [], "mark_finished_if_reply": true, "mark_finished_if_interested": true, "mark_paused_if_ooo": true, "sequence_by_exact_daytime": null, "permissions": "team_can_view", "last_used_at": "2020-04-07T00:34:36.244+00:00", "sequence_ruleset_id": "5c1004a041f5ac0995d5f61f", "folder_id": null, "same_account_reply_delay_days": 30, "num_steps": 1, "unique_scheduled": 0, "unique_delivered": 1, "unique_bounced": 0, "unique_opened": 1, "unique_replied": 0, "unique_demoed": 0, "unique_clicked": 0, "unique_unsubscribed": 0, "bounce_rate": 0, "open_rate": 1, "click_rate": 0, "reply_rate": 0, "spam_blocked_rate": 0, "opt_out_rate": 0, "demo_rate": 0, "loaded_stats": true, "cc_emails": "", "bcc_emails": "" } ], "num_fetch_result": null } ``` -------------------------------- ### Retrieve Users via cURL Source: https://github.com/apolloio/apollo-api-docs/blob/master/source/includes/_misc.md Demonstrates how to perform a GET request to the Apollo API's user search endpoint using the cURL command-line tool. It specifies necessary headers for content type, cache control, and API key authentication. ```shell curl -X GET -H "Content-Type: application/json" -H "Cache-Control: no-cache" -H "X-Api-Key: YOUR API KEY HERE" "https://api.apollo.io/v1/users/search" ```