### GET /account OpenAPI Specification Source: https://doc.bettercontact.rocks/api-reference/endpoint/account This OpenAPI 3.0.1 specification defines the GET /account endpoint. It includes parameters for email and API key, and defines success and error responses. Use this to understand the API contract for checking your credits balance. ```yaml openapi: 3.0.1 info: title: BetterContact API description: The official BetterContact API to enrich your contacts list and find leads license: name: MIT version: 1.0.0 servers: - url: https://app.bettercontact.rocks/api/v2 security: - apiKey: [] paths: /account: get: summary: Check your credits balance parameters: - name: email in: query schema: type: string required: true - name: api_key in: query schema: type: string required: true responses: '200': description: Credit balance retrieved successfully content: application/json: schema: type: object properties: success: type: boolean example: true credits_left: type: integer example: 32377 email: type: string example: your_email@mycompany.com '401': description: Not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedError' security: - apiKey: [] components: schemas: UnauthorizedError: type: object properties: error: type: string example: Unauthorized securitySchemes: apiKey: type: apiKey in: header name: X-API-Key ``` -------------------------------- ### OpenAPI Specification for GET /async/{request_id} Source: https://doc.bettercontact.rocks/api-reference/endpoint/get This OpenAPI 3.0.1 specification defines the GET /async/{request_id} endpoint for retrieving enrichment results. It includes request parameters, response schemas for success (200), unauthorized (401), and invalid request ID (406) scenarios, as well as detailed schemas for EnrichmentResult and UnauthorizedError. ```yaml GET /async/{request_id} openapi: 3.0.1 info: title: BetterContact API description: The official BetterContact API to enrich your contacts list and find leads license: name: MIT version: 1.0.0 servers: - url: https://app.bettercontact.rocks/api/v2 security: - apiKey: [] paths: /async/{request_id}: get: summary: Get request results description: >- Retrieve the results for a specific request ID (works for both enrichment and lead finder requests) parameters: - name: request_id in: path required: true schema: type: string responses: '200': description: Request results retrieved successfully content: application/json: schema: $ref: '#/components/schemas/EnrichmentResult' '401': description: Not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedError' '406': description: Invalid request_id content: application/json: schema: type: object properties: error: type: string example: Unvalid request_id. security: - apiKey: [] components: schemas: EnrichmentResult: type: object properties: id: type: string example: fefbc2203558eb3adcea status: type: string example: terminated credits_consumed: type: integer example: 1 credits_left: type: integer example: 331 summary: type: object properties: total: type: integer example: 1 valid: type: integer example: 1 catch_all: type: integer example: 0 catch_all_safe: type: integer example: 0 catch_all_not_safe: type: integer example: 0 undeliverable: type: integer example: 0 not_found: type: integer example: 0 data: type: array items: type: object properties: enriched: type: boolean example: true email_provider: type: string example: XXX contact_first_name: type: string example: Elon contact_last_name: type: string example: Musk contact_email_address: type: string example: elon@tesla.com contact_email_address_status: type: string example: deliverable description: >- Available statuses: deliverable, catch_all_safe, catch_all_not_safe, undeliverable contact_gender: type: string example: male contact_job_title: type: string example: CEO of Tesla UnauthorizedError: type: object properties: error: type: string example: Unauthorized securitySchemes: apiKey: type: apiKey in: header name: X-API-Key ``` -------------------------------- ### Get Lead Finder Search Results Source: https://doc.bettercontact.rocks/api-reference/endpoint/lead_finder_get Retrieve leads from a submitted People Find search. ```APIDOC ## GET /lead_finder ### Description Get leads from a submitted People Find search. ### Method GET ### Endpoint /lead_finder ``` -------------------------------- ### Get Company Information Source: https://doc.bettercontact.rocks/api-reference/endpoint/lead_finder_get This endpoint retrieves detailed information about a company based on provided identifiers. It returns a wide range of data points including company description, website, industry, location, and more. ```APIDOC ## GET /company ### Description Retrieves detailed information about a company. ### Method GET ### Endpoint /company ### Query Parameters - **company_name** (string) - Required - The name of the company to search for. - **company_domain** (string) - Optional - The domain name of the company (e.g., bettercontact.rocks). ### Response #### Success Response (200) - **example** (string) - Example of the API endpoint. - **company_description** (string) - A description of the company. - **company_about** (string) - More detailed information about the company. - **company_logo** (string) - URL to the company's logo. - **company_image** (string) - URL to a representative image of the company. - **company_size** (string) - The size of the company (e.g., '11-50 employees'). - **company_linkedin_url** (string) - The LinkedIn profile URL of the company. - **company_linkedin_id** (string) - The LinkedIn ID of the company. - **company_website** (string) - The company's website URL. - **company_crunchbase_url** (string) - The Crunchbase profile URL of the company. - **company_directions_url** (string) - URL for directions to the company's headquarters. - **company_industry** (string) - The primary industry the company operates in. - **company_industries** (string) - A list of industries the company is associated with. - **company_industry_code** (string) - The industry code for the company. - **company_type** (string) - The type of company (e.g., 'privately_held'). - **company_organization_type** (string) - The organizational type of the company. - **company_founded** (string) - The date the company was founded. - **company_founded_year** (integer) - The year the company was founded. - **company_funding** (string) - Information about the company's funding. - **company_investors** (string) - Names of the company's investors. - **company_stock_info** (string) - Stock information for the company. - **company_similar** (string) - Information about similar companies. - **company_specialities** (string) - Specialities of the company. - **company_employees** (string) - Number of employees. - **company_employees_number** (string) - Exact number of employees. - **company_employees_in_linkedin** (string) - Number of employees listed on LinkedIn. - **company_employees_range_start** (integer) - The start of the employee range. - **company_employees_range_end** (integer) - The end of the employee range. - **company_followers** (string) - Number of followers on social media. - **company_head_quarters_city** (string) - The city of the company's headquarters. - **company_head_quarters_country** (string) - The country of the company's headquarters. - **company_headquarters** (string) - Full headquarters address. - **company_address_street** (string) - Street address of the company. - **company_address_city** (string) - City of the company's address. - **company_address_state** (string) - State of the company's address. - **company_address_country** (string) - Country of the company's address. - **company_address_zipcode** (string) - Zip code of the company's address. - **company_formatted_locations** (string) - Formatted list of company locations. - **company_country_code** (string) - The country code of the company's location. - **company_phone_number** (string) - The company's phone number. - **company_legal_id** (string) - The legal ID of the company. - **company_legal_name** (string) - The legal name of the company. - **custom_fields** (array) - A list of custom fields associated with the company. ### Request Example ```json { "company_name": "Bettercontact" } ``` ### Response Example ```json { "example": "bettercontact.rocks", "company_description": "Bettercontact aggregates 20+ premium contact data providers such as people data labs, rocketreach, and datagma into one subscription.", "company_about": null, "company_logo": null, "company_image": null, "company_size": "11-50 employees", "company_linkedin_url": "https://www.linkedin.com/company/bettercontact", "company_linkedin_id": null, "company_website": null, "company_crunchbase_url": null, "company_directions_url": null, "company_industry": "Software development", "company_industries": null, "company_industry_code": null, "company_type": "privately_held", "company_organization_type": null, "company_founded": null, "company_founded_year": 2022, "company_funding": null, "company_investors": null, "company_stock_info": null, "company_similar": null, "company_specialities": null, "company_employees": null, "company_employees_number": null, "company_employees_in_linkedin": null, "company_employees_range_start": 11, "company_employees_range_end": 50, "company_followers": null, "company_head_quarters_city": "Lyon", "company_head_quarters_country": "France", "company_headquarters": null, "company_address_street": null, "company_address_city": null, "company_address_state": null, "company_address_country": null, "company_address_zipcode": null, "company_formatted_locations": null, "company_country_code": null, "company_phone_number": null, "company_legal_id": null, "company_legal_name": null, "custom_fields": [] } ``` ``` -------------------------------- ### Get Enrichment Results Source: https://doc.bettercontact.rocks/api-reference/endpoint/get Retrieve the results for a specific request ID. This endpoint works for both enrichment and lead finder requests. ```APIDOC ## GET /async/{request_id} ### Description Retrieve the results for a specific request ID (works for both enrichment and lead finder requests) ### Method GET ### Endpoint /async/{request_id} ### Parameters #### Path Parameters - **request_id** (string) - Required - The ID of the request to retrieve results for. ### Response #### Success Response (200) - **id** (string) - The unique identifier for the request. - **status** (string) - The current status of the request (e.g., "terminated"). - **credits_consumed** (integer) - The number of credits consumed by this request. - **credits_left** (integer) - The number of credits remaining. - **summary** (object) - An object containing a summary of the results. - **total** (integer) - Total number of items processed. - **valid** (integer) - Number of valid items. - **catch_all** (integer) - Number of catch-all email addresses. - **catch_all_safe** (integer) - Number of safe catch-all email addresses. - **catch_all_not_safe** (integer) - Number of unsafe catch-all email addresses. - **undeliverable** (integer) - Number of undeliverable email addresses. - **not_found** (integer) - Number of items not found. - **data** (array) - An array of enrichment data objects. - **enriched** (boolean) - Indicates if the item was enriched. - **email_provider** (string) - The email provider of the contact. - **contact_first_name** (string) - The first name of the contact. - **contact_last_name** (string) - The last name of the contact. - **contact_email_address** (string) - The email address of the contact. - **contact_email_address_status** (string) - The status of the contact's email address (e.g., "deliverable", "catch_all_safe", "catch_all_not_safe", "undeliverable"). - **contact_gender** (string) - The gender of the contact. - **contact_job_title** (string) - The job title of the contact. #### Error Response (401) - **error** (string) - "Unauthorized" #### Error Response (406) - **error** (string) - "Unvalid request_id." ``` -------------------------------- ### Get Lead Finder Request Results Source: https://doc.bettercontact.rocks/api-reference/endpoint/lead_finder_get Retrieve the results for a specific Lead Finder request ID. This endpoint allows you to fetch the enriched contact data after initiating a lead finding process. ```APIDOC ## GET /lead_finder/async/{request_id} ### Description Retrieve the results for a specific request ID. This endpoint allows you to fetch the enriched contact data after initiating a lead finding process. ### Method GET ### Endpoint /lead_finder/async/{request_id} ### Parameters #### Path Parameters - **request_id** (string) - Required - The unique identifier for the lead finder request. ### Responses #### Success Response (200) - **id** (string) - The unique identifier for the request. - **credits_left** (string) - The number of credits remaining. - **credits_consumed** (string) - The number of credits consumed for this request. - **status** (string) - The status of the request (e.g., "terminated"). - **summary** (object) - Summary of the results. - **leads_found** (integer) - The number of leads found. - **leads** (array) - An array of lead objects. - **contact_id** (integer) - The unique identifier for the contact. - **contact_full_name** (string) - The full name of the contact. - **contact_first_name** (string) - The first name of the contact. - **contact_last_name** (string) - The last name of the contact. - **contact_job_title** (string) - The job title of the contact. - **contact_seniority** (string) - The seniority level of the contact. - **contact_headline** (string) - The headline of the contact. - **contact_industry** (string) - The industry the contact works in. - **contact_linkedin_profile_url** (string) - The URL to the contact's LinkedIn profile. - **contact_linkedin_id** (string) - The LinkedIn ID of the contact (nullable). - **contact_location_continent** (string) - The continent of the contact's location. - **contact_location_country** (string) - The country of the contact's location. - **contact_location_state** (string) - The state of the contact's location (nullable). - **contact_location_city** (string) - The city of the contact's location (nullable). - **contact_city** (string) - The city associated with the contact (nullable). - **contact_location** (string) - The general location of the contact (nullable). - **contact_country_code** (string) - The country code for the contact's location (nullable). - **contact_email_address** (string) - The email address of the contact (nullable). - **contact_email_address_status** (string) - The status of the contact's email address (nullable). - **contact_email_address_provider** (string) - The provider of the contact's email address (nullable). - **contact_phone_number** (string) - The phone number of the contact (nullable). - **contact_phone_number_cc** (string) - The country code for the contact's phone number (nullable). - **contact_additional_phone_number** (string) - Additional phone number for the contact (nullable). - **contact_avatar** (string) - URL to the contact's avatar (nullable). - **contact_gender** (string) - The gender of the contact (nullable). - **contact_activity** (string) - Information about the contact's activity (nullable). - **contact_followers** (string) - The number of followers the contact has (nullable). - **contact_connections** (string) - The number of connections the contact has (nullable). - **contact_experience** (string) - Information about the contact's experience (nullable). - **contact_current_company** (string) - The current company the contact works for (nullable). - **contact_people_also_viewed** (string) - Information about people also viewed (nullable). - **contact_posts** (string) - Information about the contact's posts (nullable). - **company_id** (string) - The ID of the company associated with the contact (nullable). - **company_name** (string) - The name of the company associated with the contact. - **company_domain** (string) - The domain of the company associated with the contact. #### Error Response (401) - **error** (string) - Description of the error, e.g., "Unauthorized". #### Error Response (406) - **error** (string) - Description of the error, e.g., "Unvalid request_id." ``` -------------------------------- ### POST /lead_finder/async Source: https://doc.bettercontact.rocks/api-reference/endpoint/lead_finder_post Initiates an asynchronous lead finder request to discover people within specified companies. The request body defines the search criteria and optional parameters like limit, offset, and webhook URL. ```APIDOC ## POST /lead_finder/async ### Description Create a new lead finder request to find people working in specific companies. ### Method POST ### Endpoint https://app.bettercontact.rocks/api/v2/lead_finder/async ### Request Body - **filters** (LeadFinderFilters) - Required - Filters and parameters for lead finding. - **limit** (integer) - Optional - Maximum number of results to return per request. Accepted values between 1 and 200. By default, up to 100 leads are returned. - **offset** (integer) - Optional - Number of results to skip before returning matches. Use this to paginate through results. - **webhook** (string) - Optional - URL to receive results automatically. ### Request Example ```json { "filters": { "company": { "include": ["example.com"] }, "company_industry": { "include": ["it services and it consulting"] }, "lead_job_title": { "include": ["Software Engineer"] } }, "limit": 50, "webhook": "https://example.com/webhook" } ``` ### Response #### Success Response (201) - **success** (boolean) - Indicates if the request was successful. - **message** (string) - Confirmation message. - **request_id** (string) - Unique identifier for the lead finder request. #### Response Example ```json { "success": true, "message": "Lead finder request accepted.", "request_id": "bc39ffbfc24cf043b748" } ``` #### Error Response (401) - **error** (string) - Error message indicating unauthorized access. ``` -------------------------------- ### OpenAPI Specification for Creating Enrichment Source: https://doc.bettercontact.rocks/api-reference/endpoint/create This OpenAPI 3.0.1 specification defines the POST /async endpoint for creating new lead enrichments. It includes request body schemas, response structures, and security definitions. ```yaml openapi: 3.0.1 info: title: BetterContact API description: The official BetterContact API to enrich your contacts list and find leads license: name: MIT version: 1.0.0 servers: - url: https://app.bettercontact.rocks/api/v2 security: - apiKey: [] paths: /async: post: description: Create a new enrichment parameters: [] requestBody: description: Data to enrich required: true content: application/json: schema: $ref: '#/components/schemas/NewLeadsEnrichment' responses: '201': description: Enrichment task created content: application/json: schema: type: object properties: success: type: boolean example: true id: type: string example: your-request-id message: type: string example: Processing... '401': description: Not authorized content: application/json: schema: $ref: '#/components/schemas/UnauthorizedError' security: - apiKey: [] components: schemas: NewLeadsEnrichment: type: object properties: data: description: 'Array of leads to enrich. Minimum: 1 lead. Maximum: 100 leads.' type: array items: type: object properties: first_name: type: string description: First name of the contact last_name: type: string description: Last name of the contact company: type: string description: >- Company name of the contact (not required if company domain is provided). company_domain: type: string description: >- Company domain of the contact (required if company name not provided). linkedin_url: type: string description: >- Linkedin profile url of the contact (public url is required - recommended if phone number enrichment is requested). custom_fields: type: object description: >- Can be any relevant data you want to be back in the response like CRM id or unique identifier. The following data (uuid, list_name) is just an example properties: uuid: type: string list_name: type: string required: - first_name - last_name - company enrich_email_address: description: If true, work email address of the contact will be enriched. type: boolean enrich_phone_number: description: If true, direct phone number of the contact will be enriched. type: boolean webhook: description: >- You can provide a webhook URL where results will be pushed once enrichment is done. type: string process_flow: description: >- Add the process flow ID to use for your enrichment, if subscribed to the process flow add-on. type: string required: - data - enrich_email_address - enrich_phone_number UnauthorizedError: type: object properties: error: type: string example: Unauthorized securitySchemes: apiKey: type: apiKey in: header name: X-API-Key ``` -------------------------------- ### Check Credits Balance Source: https://doc.bettercontact.rocks/api-reference/endpoint/account Retrieve your current credit balance by providing your email and API key. ```APIDOC ## GET /account ### Description Check your credits balance. ### Method GET ### Endpoint /account ### Parameters #### Query Parameters - **email** (string) - Required - The email associated with your account. - **api_key** (string) - Required - Your API key for authentication. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **credits_left** (integer) - The number of credits remaining. - **email** (string) - The email address associated with the account. #### Response Example ```json { "success": true, "credits_left": 32377, "email": "your_email@mycompany.com" } ``` #### Error Response (401) - **error** (string) - Description of the error, e.g., "Unauthorized". ``` -------------------------------- ### Create New Enrichment Source: https://doc.bettercontact.rocks/api-reference/endpoint/create Initiates a new lead enrichment task. This endpoint allows you to submit a list of leads with specified enrichment options and receive a task ID for tracking. ```APIDOC ## POST /async ### Description Create a new enrichment ### Method POST ### Endpoint /async ### Parameters #### Request Body - **data** (array) - Required - Array of leads to enrich. Minimum: 1 lead. Maximum: 100 leads. - **first_name** (string) - Required - First name of the contact - **last_name** (string) - Required - Last name of the contact - **company** (string) - Optional - Company name of the contact (not required if company domain is provided). - **company_domain** (string) - Optional - Company domain of the contact (required if company name not provided). - **linkedin_url** (string) - Optional - Linkedin profile url of the contact (public url is required - recommended if phone number enrichment is requested). - **custom_fields** (object) - Optional - Can be any relevant data you want to be back in the response like CRM id or unique identifier. - **uuid** (string) - Optional - **list_name** (string) - Optional - **enrich_email_address** (boolean) - Required - If true, work email address of the contact will be enriched. - **enrich_phone_number** (boolean) - Required - If true, direct phone number of the contact will be enriched. - **webhook** (string) - Optional - You can provide a webhook URL where results will be pushed once enrichment is done. - **process_flow** (string) - Optional - Add the process flow ID to use for your enrichment, if subscribed to the process flow add-on. ### Request Example ```json { "data": [ { "first_name": "John", "last_name": "Doe", "company": "Example Corp", "company_domain": "example.com", "linkedin_url": "https://www.linkedin.com/in/johndoe", "custom_fields": { "uuid": "123e4567-e89b-12d3-a456-426614174000", "list_name": "My Leads" } } ], "enrich_email_address": true, "enrich_phone_number": false, "webhook": "https://example.com/webhook", "process_flow": "flow_abc123" } ``` ### Response #### Success Response (201) - **success** (boolean) - Indicates if the request was successful. - **id** (string) - The unique identifier for the enrichment task. - **message** (string) - A message indicating the status of the task. #### Response Example ```json { "success": true, "id": "your-request-id", "message": "Processing..." } ``` #### Error Response (401) - **error** (string) - Indicates an authorization error. ``` -------------------------------- ### Lead Finder Filters Source: https://doc.bettercontact.rocks/api-reference/endpoint/lead_finder_post This section details the available filters for the Lead Finder API. These filters allow for precise targeting of leads based on department, function, job title, and seniority. ```APIDOC ## Lead Finder Filters ### Description This section details the available filters for the Lead Finder API. These filters allow for precise targeting of leads based on department, function, job title, and seniority. ### Schemas #### LeadDepartmentFilter **Properties:** * **include** (array[string], nullable: true) - Lead departments that must match. Must be exact values from the predefined list. * **exclude** (array[string], nullable: true) - Lead departments that must NOT match. Must be exact values from the predefined list. **Predefined List:** customer_retention_development, it_asset_management, it_procurement, channel_sales, data_warehouse, oncology, hr_financial_erp_systems, financial_strategy, financial_systems, opthalmology, anesthesiology, psychiatry, orthopedics, bioengineering, obstetrics_gynecology, optometry, intellectual_property_patent, neurology, labor_employment, acquisitions, sales_enablement, dermatology, workforce_mangement, chiropractics, retail_store_systems, customer_marketing, storage_disaster_recovery, technical_marketing, privacy, ediscovery, virtualization, epidemiology, infectious_disease, ethics, biometrics, collaboration_web_app #### LeadFunctionFilter **Properties:** * **include** (array[string], nullable: true) - Lead functions that must match. Must be exact values from the predefined list. * **exclude** (array[string], nullable: true) - Lead functions that must NOT match. Must be exact values from the predefined list. **Predefined List:** operations, support, engineering, sales, education, information_technology, finance, entrepreneurship, administrative, consulting, marketing, arts_and_design, product_management, human_resources, legal, business_development, media_and_communication, data_science, accounting #### JobTitleFilter **Properties:** * **exact_match** (boolean) - When enabled, only exact job title matches are returned #### SeniorityFilter **Properties:** * **include** (array[string], nullable: true) - Seniority levels that must match. Possible values: senior, entry, manager, mid-level, director, c_suite, owner, intern, founder, head, vp, partner * **exclude** (array[string], nullable: true) - Seniority levels that must NOT match. Possible values: senior, entry, manager, mid-level, director, c_suite, owner, intern, founder, head, vp, partner ### Security * **apiKey**: Requires an `X-API-Key` header. ``` -------------------------------- ### API Key Authentication Source: https://doc.bettercontact.rocks/api-reference/authentication All API endpoints require authentication using the X-API-Key header. This key is unique to your account and can be found in your BetterContact dashboard. ```APIDOC ## Authentication All API endpoints are authenticated using the **X-API-Key** header parameter, which must be provided in the request. This API key can be found [**here**](https://app.bettercontact.rocks/api_requests) in your BetterContact account. ### Request Header Example ```http X-API-Key: YOUR_API_KEY ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.