### GET Response Example from Dropcontact API Source: https://developer.dropcontact.com/index This JSON object illustrates the structure of a typical GET response from the Dropcontact API, containing comprehensive contact and company information. It includes personal details, email addresses, company data, and custom fields. ```json { "civility": "M", "first_name": "Denis", "last_name": "Dupont", "full_name": "Denis Dupont", "email": [ {"email": "denis@companyTest.com", "qualification": "nominative@pro"}, {"email": "contact@companyTest.com", "qualification": "generic@pro"} ], "phone": "0707070707", "company": "companyTest", "website": "www.companyTest.fr", "linkedin": "https://fr.linkedin.com/in/denis.dupont", "siren": "500 500 500", "siret": "222 222 222 00022", "siret_address": "2 Rue Rotland, 67140 Mittelbergheim", "vat": "79", "nb_employees": "202", "naf5_code": "01.22E", "naf5_des":"Culture de la vigne", "company_linkedin": "https://www.linkedin.com/company/companyTest/", "company_turnover": "12345", "company_results": "6789", "job": "Customer Success Manager", "job_level": "Senior", "job_function": "Sales", "custom_fields": { "your_custom_id": "18181818181818", "some_key": "some_value" } } ``` -------------------------------- ### Receive Webhook Example Source: https://developer.dropcontact.com/index This JSON structure represents an example of a webhook payload that might be received from the Dropcontact API. It contains details about an enrichment event, including unique IDs and processed data. ```json [ { "id": "", "version": 1, "event_type": "enrich_api_result", "occurred_at": 1623153600, "data": { "data": [ { "first_name": "Peter", "last_name": "Jackson", ... } ], "request_id": "", } }, { ... } ] ``` -------------------------------- ### View Webhook Subscriptions - cURL Source: https://developer.dropcontact.com/index This cURL command demonstrates how to retrieve a list of all webhook subscriptions. It sends a GET request to the /webhooks/subscriptions endpoint, authenticating with an API key. ```curl curl -X GET \ -H "X-Access-Token: apiKey" \ 'https://api.dropcontact.com/v1/webhooks/subscriptions' ``` -------------------------------- ### Check Enrichment Status (Python) Source: https://developer.dropcontact.com/index This Python snippet demonstrates how to make a GET request to check the status of an ongoing contact enrichment process. It requires an API key and a request ID. The response will indicate if the request is still processing or if the results are ready. ```python import requests r = requests.get("https://api.dropcontact.com/v1/enrich/all/{}".format('your-request-id'), headers={'X-Access-Token': apiKey}) ``` -------------------------------- ### POST Request Body Example for Dropcontact API Source: https://developer.dropcontact.com/index This JSON object represents the structure of data that can be sent in a POST request to the Dropcontact API, typically for enriching contact information. It includes fields like first name, last name, company, website, and custom fields. ```json { "first_name": "Denis", "last_name": "Dupont", "company": "companyTest", "website": "www.companyTest.fr", "custom_fields": { "your_custom_id": "18181818181818", "some_key": "some_value" } } ``` -------------------------------- ### View Webhook Subscriptions - Python Source: https://developer.dropcontact.com/index This Python script uses the 'requests' library to send a GET request to the Dropcontact API's /webhooks/subscriptions endpoint. It retrieves a list of all active webhook subscriptions associated with the provided API key. ```python import requests r = requests.get( "https://api.dropcontact.com/v1/webhooks/subscriptions", headers={ 'X-Access-Token': apiKey } ) ``` -------------------------------- ### Check Enrichment Status (cURL) Source: https://developer.dropcontact.com/index This cURL command shows how to perform a GET request to check the status of a contact enrichment job. It includes the necessary API key in the headers and the request ID in the URL. The output will be a JSON object indicating the processing status. ```bash curl -X GET \ -H "X-Access-Token: apiKey" \ 'https://api.dropcontact.com/v1/enrich/all/your-request-id' ``` -------------------------------- ### GET /v1/enrich/all/{request_id} Source: https://developer.dropcontact.com/index Retrieves the results of a previously initiated enrichment process using the provided request ID. It can also fetch partial results if not all contacts are processed yet by adding `forceResults=true`. ```APIDOC ## GET /v1/enrich/all/{request_id} ### Description Retrieves the results of a previously initiated enrichment process using the provided request ID. It can also fetch partial results if not all contacts are processed yet by adding `forceResults=true`. ### Method GET ### Endpoint https://api.dropcontact.com/v1/enrich/all/{request_id} ### Parameters #### Path Parameters - **request_id** (string) - Required - The unique identifier for the enrichment request. #### Query Parameters - **forceResults** (boolean) - Optional - If true, returns results even if not all contacts are processed. Unprocessed contacts will return their input data. #### Request Body None ### Request Example ```bash curl -X GET \ -H "X-Access-Token: apiKey" \ 'https://api.dropcontact.com/v1/enrich/all/your-request-id' ``` ### Response #### Success Response (200) - **data** (array) - Contains the enriched contact data. If `forceResults=true` is used and some contacts are not yet processed, their original input data will be returned for those specific contacts. - **error** (boolean) - Indicates if an error occurred. - **success** (boolean) - Indicates if the request was successful. #### Response Example (Processing) ```json { "error": false, "reason": "Request not ready yet, try again in 30 seconds", "success": false } ``` #### Response Example (Completed) ```json { "data": [ { "first_name": "Peter", "last_name": "Jackson", "email": [ {"email": "peter.jackson@company.com", "qualification": "nominative@pro"} ], "company": "Company", "website": "www.company.com" }, { "first_name": "John", "last_name": "Smith", "email": [ {"email": "johnsmith@corporation.com", "qualification": "nominative@pro"} ], "company": "corporation", "website": "www.corporation.com" }, { "first_name": "Samuel", "last_name": "Jones", "email": [ {"email": "samuel_jones@bigcorp.com", "qualification": "nominative@pro"}, {"email": "contact@bigcorp.com", "qualification": "generic@pro"} ], "company": "Big Corp", "website": "www.bigcorp.com" } ], "error": false, "success": true } ``` ``` -------------------------------- ### Configure Dropcontact MCP Server in Claude Desktop Source: https://developer.dropcontact.com/index This JSON configuration is used to set up Dropcontact's MCP server within the Claude Desktop application. It specifies the command to run and the arguments needed to connect to the Dropcontact MCP service. ```json { "mcpServers": { "dropcontact": { "command": "npx", "args": [ "-y", "mcp-remote", "https://mcp.dropcontact.com/mcp/", "--header", "X-Access-Token:" ] } } } ``` -------------------------------- ### Model Context Protocol (MCP) Server Source: https://developer.dropcontact.com/index Connect to the Dropcontact MCP server to access your data through compatible AI clients. ```APIDOC ## Model Context Protocol (MCP) Server ### Description The MCP server provides a standardized interface for AI models and agents to securely access Dropcontact data. It supports data enrichment and email validation. ### Setup Instructions To connect to the Dropcontact MCP server, use the following configuration in your compatible client: - **Server URL**: `https://mcp.dropcontact.com/mcp/` - **Authentication**: Provide your Dropcontact API key in the `X-Access-Token` header for all requests. ### Supported Operations - Enrich a contact from: - First Name + Last Name + Company - Full Name + Company - Linkedin URL - Validate an email address. ``` -------------------------------- ### Create Webhook Subscription (Python) Source: https://developer.dropcontact.com/index This Python script demonstrates how to create a webhook subscription for the 'enrich_api_result' event using the requests library. It sends a POST request to the Dropcontact API with subscription details including callback URL and event type. ```python import requests r = requests.post( "https://api.dropcontact.com/v1/webhooks/subscriptions", json={ "event_type": "enrich_api_result", "active": True, "callback_url": "http://your-domain.com/callback", "period_s": 5, "max_webhooks_per_period": 30 }, headers={ 'Content-Type': 'application/json', 'X-Access-Token': apiKey } ) ``` -------------------------------- ### Enrich Contacts with POST /all (Python) Source: https://developer.dropcontact.com/index This Python snippet shows how to send a batch of contacts to the Dropcontact API's /all endpoint for enrichment. It includes sample contact data, optional parameters like 'siren' and 'language', and authentication headers. ```python import requests r = requests.post( "https://api.dropcontact.com/v1/enrich/all", json={ 'data': [ {'email': 'peter.jackson@company.com'}, {'first_name': 'John', 'last_name': 'Smith', 'website': 'corporation.com'}, {'first_name': 'Samuel', 'last_name': 'Jones', 'email': 'contact@bigcorp.com'} ], 'siren': True, 'language': 'en' }, headers={ 'Content-Type': 'application/json', 'X-Access-Token': apiKey } ) ``` -------------------------------- ### Create Webhook Subscription (cURL) Source: https://developer.dropcontact.com/index This cURL command shows how to create a webhook subscription for the 'enrich_api_result' event. It specifies the event type, activation status, callback URL, and rate limiting parameters in the request payload. ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "X-Access-Token: apiKey" \ -d '{ "event_type": "enrich_api_result", "active": true, "callback_url": "http://your-domain.com/callback", "period_s": 5, "max_webhooks_per_period": 30 }' \ 'https://api.dropcontact.com/v1/webhooks/subscriptions' ``` -------------------------------- ### Enrich Contacts with POST /all (cURL) Source: https://developer.dropcontact.com/index This cURL command demonstrates how to use the POST /all endpoint to enrich multiple contacts in a single request. It specifies the JSON content type, provides contact data, and includes the authentication token. ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "X-Access-Token: apiKey" \ -d '{"data": [{"email": "name@company.com"}, {"first_name": "John", "last_name": "Smith", "website": "corporation.com"}, {"first_name": "Samuel", "last_name": "Jones", "email": "contact@bigcorp.com"}]}' \ 'https://api.dropcontact.com/v1/enrich/all' ``` -------------------------------- ### Authenticate API Request (Python) Source: https://developer.dropcontact.com/index This Python snippet demonstrates how to make a POST request to the Dropcontact API, including the necessary access token in the headers for authentication. It uses the 'requests' library. ```python import requests r = requests.post("https://api.dropcontact.com/v1/enrich/all", headers={'X-Access-Token': apiKey}) ``` -------------------------------- ### POST /v1/enrich/all Source: https://developer.dropcontact.com/index Initiates the enrichment process for a batch of contacts. It accepts an array of contact objects and optional parameters like 'siren' and 'language'. ```APIDOC ## POST /v1/enrich/all ### Description Initiates the enrichment process for a batch of contacts. It accepts an array of contact objects and optional parameters like 'siren' and 'language'. ### Method POST ### Endpoint https://api.dropcontact.com/v1/enrich/all ### Parameters #### Query Parameters None #### Request Body - **data** (array) - Required - An array of objects, where each object contains the contact data to be enriched. - **siren** (boolean) - Optional - If true, includes SIREN number, NAF code, TVA number, company address, and leader information. - **language** (string) - Optional - Specifies the language for the results ('en' for English, defaults to French if not specified). #### Data Object Parameters (within the 'data' array) - **email** (string) - Optional - The email address to verify. - **first_name** (string) - Optional - The first name of the contact. - **last_name** (string) - Optional - The last name of the contact. - **full_name** (string) - Optional - The full name of the contact. - **phone** (string) - Optional - The phone number. - **company** (string) - Optional - The company name. - **website** (string) - Optional - The company website URL. - **num_siren** (string) - Optional - The company's SIREN number. - **linkedin** (string) - Optional - The contact's LinkedIn profile URL. - **siret** (string) - Optional - The company's SIRET number. - **country** (string) - Optional - The country code to base data enrichment on (e.g., 'US'). - **job** (string) - Optional - The job title. - **company_linkedin** (string) - Optional - The company's LinkedIn profile URL. - **custom_fields** (dictionary of strings) - Optional - Custom fields that will be returned as-is in the output. ### Request Example ```json { "data": [ { "email": "example_email@email.com", "first_name": "Denis", "last_name": "Dupont", "full_name": "Denis Dupont", "phone": "0707070707", "company": "Dropcontact", "website": "https://dropcontact.com", "num_siren": "01010101", "country": "france", "job": "CEO" } ], "siren": true, "language": "en" } ``` ### Response #### Success Response (200) - **data** (array) - Contains the enriched contact data. - **error** (boolean) - Indicates if an error occurred. - **success** (boolean) - Indicates if the request was successful. #### Response Example (Processing) ```json { "error": false, "reason": "Request not ready yet, try again in 30 seconds", "success": false } ``` #### Response Example (Completed) ```json { "data": [ { "first_name": "Peter", "last_name": "Jackson", "email": [ {"email": "peter.jackson@company.com", "qualification": "nominative@pro"} ], "company": "Company", "website": "www.company.com" } ], "error": false, "success": true } ``` ``` -------------------------------- ### Authentication Source: https://developer.dropcontact.com/index Dropcontact API uses access tokens for authentication. Include your access token in the 'X-Access-Token' header for all requests. ```APIDOC ## Authentication ### Description Dropcontact uses access tokens to allow access to the API. Subscribe here to get your access token. Our API authenticates requests with an access token that must be passed on the request's header. Include `'X-Access-Token': apiKey` in your header for authentication. You must replace `apiKey` with your personal access token. ### Request Example (Python) ```python import requests r = requests.post("https://api.dropcontact.com/v1/enrich/all", headers={'X-Access-Token': apiKey}) ``` ### Request Example (cURL) ```bash curl -X POST -H "X-Access-Token: apiKey" https://api.dropcontact.com/v1/enrich/all ``` ``` -------------------------------- ### Specify Custom Callback URL for POST Request (Python) Source: https://developer.dropcontact.com/index This Python script illustrates how to send a POST request to the Dropcontact API's '/enrich/all' endpoint while specifying a 'custom_callback_url'. This allows for dynamic webhook delivery to a different URL for specific requests, useful for integrations. ```python import requests r = requests.post( "https://api.dropcontact.com/v1/enrich/all", json={ 'data': [ {'email': 'peter.jackson@company.com'}, {'first_name': 'John', 'last_name': 'Smith', 'website': 'corporation.com'}, {'first_name': 'Samuel', 'last_name': 'Jones', 'email': 'contact@bigcorp.com'} ], 'siren': True, 'language': 'en', 'custom_callback_url': 'http://your-domain.com/callback/my-custom-path' }, headers={ 'Content-Type': 'application/json', 'X-Access-Token': apiKey } ) ``` -------------------------------- ### Authenticate API Request (cURL) Source: https://developer.dropcontact.com/index This cURL command shows how to authenticate a POST request to the Dropcontact API by including the access token in the 'X-Access-Token' header. Replace 'apiKey' with your actual token. ```bash curl -X POST -H "X-Access-Token: apiKey" https://api.dropcontact.com/v1/enrich/all ``` -------------------------------- ### Submit Enrichment Request (cURL) Source: https://developer.dropcontact.com/index This cURL command demonstrates how to submit a POST request for contact enrichment. It sends a JSON payload containing contact details and API configuration options. The request includes the API key for authentication and specifies the content type as JSON. ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "X-Access-Token: apiKey" \ -d '{ "data": [ { "email": "example_email@email.com", "first_name": "Denis", "last_name": "Dupont", "full_name": "Denis Dupont", "phone": "0707070707", "company": "Dropcontact", "website": "https://dropcontact.com", "num_siren": "01010101", "country": "france", "job": "CEO" } ], "siren": true, "language": "en" }' \ 'https://api.dropcontact.com/v1/enrich/all' ``` -------------------------------- ### Response Fields Source: https://developer.dropcontact.com/index Details on the fields available in the API responses for data enrichment. ```APIDOC ## Response Fields ### Description This section details the fields that can be returned by the Dropcontact API, particularly for data enrichment responses. ### Available Fields | Information | Type | Available | |---------------------|---------------------------|-----------| | civility | string | Yes | | first_name | string | Yes | | last_name | string | Yes | | full_name | string | Yes | | email | array of objects | Yes | | | - email (string) | | | | - qualification (string) | | | phone | string | Yes | | mobile_phone | string | Yes | | company | string | Yes | | website | string | Yes | | linkedin | string | Yes | | siren | string | Yes | | siret | string | Yes | | siret_address | string | Yes | | vat | string | Yes | | nb_employees | string | Yes | | naf5_code | string | Yes | | naf5_des | string | Yes | | siret_zip | string | Yes | | siret_city | string | Yes | | country | string | Yes | | company_linkedin | string | Yes | | company_turnover | string | Yes | | company_results | string | Yes | | job | string | Yes | | job_level | string | Yes | | job_function | string | Yes | | custom_fields | dictionary of strings | Yes | ### Response Example (GET) ```json { "civility": "M", "first_name": "Denis", "last_name": "Dupont", "full_name": "Denis Dupont", "email": [ {"email": "denis@companyTest.com", "qualification": "nominative@pro"}, {"email": "contact@companyTest.com", "qualification": "generic@pro"} ], "phone": "0707070707", "company": "companyTest", "website": "www.companyTest.fr", "linkedin": "https://fr.linkedin.com/in/denis.dupont", "siren": "500 500 500", "siret": "222 222 222 00022", "siret_address": "2 Rue Rotland, 67140 Mittelbergheim", "vat": "79", "nb_employees": "202", "naf5_code": "01.22E", "naf5_des":"Culture de la vigne", "company_linkedin": "https://www.linkedin.com/company/companyTest/", "company_turnover": "12345", "company_results": "6789", "job": "Customer Success Manager", "job_level": "Senior", "job_function": "Sales", "custom_fields": { "your_custom_id": "18181818181818", "some_key": "some_value" } } ``` ``` -------------------------------- ### POST /v1/enrich/all Source: https://developer.dropcontact.com/index Enriches contact data by sending a POST request with contact details. Supports custom callback URLs for asynchronous results. ```APIDOC ## POST /v1/enrich/all ### Description Enriches contact data by sending a POST request with contact details. Supports custom callback URLs for asynchronous results. ### Method POST ### Endpoint `https://api.dropcontact.com/v1/enrich/all` ### Parameters #### Header Parameters - **X-Access-Token** (string) - Required - Your Dropcontact API key. - **Content-Type** (string) - Required - Must be `application/json`. #### Request Body - **data** (array) - Required - A list of contact objects to enrich. Each object can contain email, first_name, last_name, website, etc. - **siren** (boolean) - Optional - If true, includes SIREN information. - **language** (string) - Optional - Language code for the results (e.g., 'en'). - **custom_callback_url** (string) - Optional - A custom URL to receive webhook notifications for this request. ### Request Example ```json { "data": [ {"email": "name@company.com"}, {"first_name": "John", "last_name": "Smith", "website": "corporation.com"}, {"first_name": "Samuel", "last_name": "Jones", "email": "contact@bigcorp.com"} ], "siren": true, "language": "en", "custom_callback_url": "http://your-domain.com/callback/my-custom-path" } ``` ### Response #### Success Response (200) - **request_id** (string) - The unique ID for this enrichment request. - **status** (string) - The status of the request. #### Response Example ```json { "request_id": "req_abc123xyz", "status": "pending" } ``` ``` -------------------------------- ### Check Remaining Credits via Dropcontact API (Python) Source: https://developer.dropcontact.com/index This Python script demonstrates how to check your remaining credits on the Dropcontact API without consuming any. It sends a POST request with an empty data object to the /v1/enrich/all endpoint. ```python import requests r = requests.post( "https://api.dropcontact.com/v1/enrich/all", json={ 'data': [ {} ], }, headers={ 'Content-Type': 'application/json', 'X-Access-Token': apiKey } ) ``` -------------------------------- ### Submit Enrichment Request (Python) Source: https://developer.dropcontact.com/index This Python snippet illustrates how to send a POST request to the Dropcontact API to initiate contact enrichment. It includes a JSON payload with contact data and specifies optional parameters like 'siren' and 'language'. An API key is required for authentication. ```python import requests r = requests.post( "https://api.dropcontact.com/v1/enrich/all", json = { 'data': [ { 'email': 'example_email@email.com', 'first_name': 'Denis', 'last_name': 'Dupont', 'full_name': 'Denis Dupont', 'phone': '0707070707', 'company': 'Dropcontact', 'website': 'https://dropcontact.com', "num_siren": "01010101", "country": "france", "job": "CEO" } ], 'siren': True, 'language': 'en' }, headers={ 'Content-Type': 'application/json', 'X-Access-Token': apiKey } ) ``` -------------------------------- ### POST /v1/enrich/all Source: https://developer.dropcontact.com/index This endpoint processes contacts and organizations in batches. It can handle up to 250 contacts per request, with each contact data being less than 15 kB. The API accepts only 'application/json' and returns only 'JSON' type. ```APIDOC ## POST /v1/enrich/all ### Description This request retrieves the civility, the company, the validity of the email, the first name, the full name and a lot of information for all contacts in the request. Using our endpoint you can process up to 250 contacts with a single request. One contact data must be less than 15 kB. To launch the process POST /all, and to recover the output GET /all/{your_request_id}. ### Method POST ### Endpoint `https://api.dropcontact.com/v1/enrich/all` ### Parameters #### Query Parameters - **siren** (boolean) - Optional - If true, includes company siren information. - **language** (string) - Optional - Specifies the language for the response (e.g., 'en'). #### Request Body - **data** (array) - Required - An array of contact objects. Each object can contain: - **email** (string) - Optional - The email address of the contact. - **first_name** (string) - Optional - The first name of the contact. - **last_name** (string) - Optional - The last name of the contact. - **website** (string) - Optional - The website of the company associated with the contact. ### Request Example (Python) ```python import requests r = requests.post( "https://api.dropcontact.com/v1/enrich/all", json={ 'data': [ {'email': 'peter.jackson@company.com'}, {'first_name': 'John', 'last_name': 'Smith', 'website': 'corporation.com'}, {'first_name': 'Samuel', 'last_name': 'Jones', 'email': 'contact@bigcorp.com'} ], 'siren': True, 'language': 'en' }, headers={ 'Content-Type': 'application/json', 'X-Access-Token': apiKey } ) ``` ### Request Example (cURL) ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "X-Access-Token: apiKey" \ -d '{"data": [{"email": "name@company.com"}, {"first_name": "John", "last_name": "Smith", "website": "corporation.com"}, {"first_name": "Samuel", "last_name": "Jones", "email": "contact@bigcorp.com"}]}' \ 'https://api.dropcontact.com/v1/enrich/all' ``` ### Response #### Success Response (200) - **error** (boolean) - Indicates if an error occurred. - **request_id** (string) - A unique identifier for the request. - **success** (boolean) - Indicates if the request was successful. - **credits_left** (integer) - The number of credits remaining after the request. #### Response Example ```json { "error": false, "request_id": "your-request-id", "success": true, "credits_left": 100 } ``` ``` -------------------------------- ### Error Handling Source: https://developer.dropcontact.com/index Information on HTTP status codes and error types returned by the API. ```APIDOC ## Errors ### Http Status codes | Error Code | Title | Description | |---|---|---| | 400 | Bad Request | Your request is invalid. | | 401 | Unauthorized | Your access token is wrong. | | 403 | Unauthorized | API call Token exceeded quota. | | 404 | Not Found | The specified resource could not be found. | | 429 | Too Many Requests | Too many requests in a given slot of time. | | 500 | Internal Server Error | We have been informed of this and will solve it as soon as possible. | | 503 | Service Unavailable | We're temporarily offline for maintenance. Please try again later. | | 504 | Service Unavailable | Gateway timeout. Please try again later. | | 524 | Timeout | A timeout occured. | ### Error type | Type | Value | Desctiption | |---|---|---| | email qualificiation | 'invalid' | The email you provide to the API is invalid | ``` -------------------------------- ### Send POST Request with Custom Callback URL - cURL Source: https://developer.dropcontact.com/index This cURL command demonstrates how to send a POST request to the Dropcontact API's /enrich/all endpoint. It includes custom data for enrichment and specifies a custom_callback_url for receiving results. ```curl curl -X POST \ -H "Content-Type: application/json" \ -H "X-Access-Token: apiKey" \ -d '{"data": [{"email": "name@company.com"}, {"first_name": "John", "last_name": "Smith", "website": "corporation.com"}, {"first_name": "Samuel", "last_name": "Jones", "email": "contact@bigcorp.com"}], "siren": true, "language": "en", "custom_callback_url": "http://your-domain.com/callback/my-custom-path"}' \ 'https://api.dropcontact.com/v1/enrich/all' ``` -------------------------------- ### Webhook Subscriptions API Source: https://developer.dropcontact.com/index Manage webhook subscriptions to receive notifications for events like enrichment results. ```APIDOC ## Create a Subscription ### Description Creates a new webhook subscription to receive notifications for specified events. Returns the subscription ID. ### Method POST ### Endpoint `https://api.dropcontact.com/v1/webhooks/subscriptions` ### Parameters #### Header Parameters - **X-Access-Token** (string) - Required - Your Dropcontact API key. #### Request Body - **event_type** (string) - Required - The type of event to subscribe to (e.g., 'enrich_api_result'). - **active** (boolean) - Required - Indicates if the subscription is active. - **callback_url** (string) - Required - The URL to receive webhook notifications. - **period_s** (integer) - Optional - Time interval in seconds between dispatches (1-60). Recommended: 5. - **max_webhooks_per_period** (integer) - Optional - Maximum webhooks per period (1-100). Recommended: 30. ### Request Example ```json { "event_type": "enrich_api_result", "active": true, "callback_url": "http://your-domain.com/callback", "period_s": 5, "max_webhooks_per_period": 30 } ``` ## Receive a Webhook ### Description Example payload structure for a received webhook notification. ### Response Example ```json [ { "id": "", "version": 1, "event_type": "enrich_api_result", "occurred_at": 1623153600, "data": { "data": [ { "first_name": "Peter", "last_name": "Jackson", ... } ], "request_id": "" } } ] ``` ### Webhook Payload Fields - **id** (string) - Unique ID of the webhook. - **version** (integer) - Version of the webhook. - **event_type** (string) - The type of event subscribed to. - **occurred_at** (integer) - Timestamp in seconds since EPOCH. - **data** (dict/list/str) - The actual data of the webhook. ## See Your Subscriptions ### Description Retrieves a list of all your current webhook subscriptions. ### Method GET ### Endpoint `https://api.dropcontact.com/v1/webhooks/subscriptions` ### Parameters #### Header Parameters - **X-Access-Token** (string) - Required - Your Dropcontact API key. ### Request Example (Python) ```python import requests r = requests.get( "https://api.dropcontact.com/v1/webhooks/subscriptions", headers={ 'X-Access-Token': 'apiKey' } ) ``` ### Request Example (cURL) ```bash curl -X GET \ -H "X-Access-Token: apiKey" \ 'https://api.dropcontact.com/v1/webhooks/subscriptions' ``` ## Edit a Subscription ### Description Updates an existing webhook subscription. You can modify fields like `callback_url`, `period_s`, `max_webhooks_per_period`, or `active` status. ### Method PUT ### Endpoint `https://api.dropcontact.com/v1/webhooks/subscriptions/` ### Parameters #### Path Parameters - **subscription_id** (string) - Required - The ID of the subscription to edit. #### Header Parameters - **X-Access-Token** (string) - Required - Your Dropcontact API key. - **Content-Type** (string) - Required - Must be `application/json`. #### Request Body - **callback_url** (string) - Optional - The new URL for webhook notifications. - **period_s** (integer) - Optional - The new time interval in seconds. - **max_webhooks_per_period** (integer) - Optional - The new maximum webhooks per period. - **active** (boolean) - Optional - The new active status. ### Request Example (Python) ```python import requests r = requests.put( "https://api.dropcontact.com/v1/webhooks/subscriptions/", json={ "callback_url": "http://your-domain.com/callback" }, headers={ 'Content-Type': 'application/json', 'X-Access-Token': 'apiKey' } ) ``` ### Request Example (cURL) ```bash curl -X PUT \ -H "Content-Type: application/json" \ -H "X-Access-Token: apiKey" \ -d '{"callback_url": "http://your-domain.com/callback"}' \ 'https://api.dropcontact.com/v1/webhooks/subscriptions/' ``` **Note**: The `event_type` field cannot be changed. To change it, delete and recreate the subscription. ## Delete a Subscription ### Description Removes a webhook subscription. ### Method DELETE ### Endpoint `https://api.dropcontact.com/v1/webhooks/subscriptions/` ### Parameters #### Path Parameters - **subscription_id** (string) - Required - The ID of the subscription to delete. #### Header Parameters - **X-Access-Token** (string) - Required - Your Dropcontact API key. ### Request Example (Python) ```python import requests r = requests.delete( "https://api.dropcontact.com/v1/webhooks/subscriptions/", headers={ 'X-Access-Token': 'apiKey' } ) ``` ### Request Example (cURL) ```bash curl -X DELETE \ -H "X-Access-Token: apiKey" \ 'https://api.dropcontact.com/v1/webhooks/subscriptions/' ``` **Note**: Subscriptions can also be paused using the PUT endpoint. ``` -------------------------------- ### Webhook Subscription API Source: https://developer.dropcontact.com/index Manage webhook subscriptions to receive real-time notifications for events like data enrichment results. You can specify a default callback URL and other subscription parameters. ```APIDOC ## POST /v1/webhooks/subscriptions ### Description Creates a webhook subscription to receive notifications for specific events, such as data enrichment results. You can define the event type, activation status, callback URL, and notification frequency. ### Method POST ### Endpoint /v1/webhooks/subscriptions ### Parameters #### Request Body - **event_type** (string) - Required - The type of event to subscribe to (e.g., "enrich_api_result"). - **active** (boolean) - Required - Whether the subscription is active. - **callback_url** (string) - Required - The URL where webhook notifications will be sent. - **period_s** (integer) - Optional - The time period in seconds for webhook rate limiting. - **max_webhooks_per_period** (integer) - Optional - The maximum number of webhooks allowed per period. ### Request Example ```json { "event_type": "enrich_api_result", "active": true, "callback_url": "http://your-domain.com/callback", "period_s": 5, "max_webhooks_per_period": 30 } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the created subscription. - **message** (string) - A confirmation message. #### Response Example ```json { "id": "sub_12345abcde", "message": "Webhook subscription created successfully." } ``` ``` -------------------------------- ### Check Remaining Credits via Dropcontact API (cURL) Source: https://developer.dropcontact.com/index This cURL command shows how to check your remaining credits on the Dropcontact API without consuming any. It sends a POST request with an empty data object to the /v1/enrich/all endpoint. ```curl curl -X POST \ -H "Content-Type: application/json" \ -H "X-Access-Token: apiKey" \ -d '{"data": [{}]}' \ 'https://api.dropcontact.com/v1/enrich/all' ``` -------------------------------- ### Data Enrichment API Source: https://developer.dropcontact.com/index This endpoint allows you to enrich data by providing a JSON payload containing an array of objects. It supports both Python requests and cURL. ```APIDOC ## POST /v1/enrich/all ### Description Enriches data by processing a list of objects. Returns the remaining credits after the operation. ### Method POST ### Endpoint `https://api.dropcontact.com/v1/enrich/all` ### Parameters #### Query Parameters - **X-Access-Token** (string) - Required - Your Dropcontact API access token. #### Request Body - **data** (array) - Required - An array of objects to be enriched. Each object can be empty `{}` if you only want to check credits. - **Example**: `[{}]` ### Request Example (Python) ```python import requests apiKey = "YOUR_API_KEY" r = requests.post( "https://api.dropcontact.com/v1/enrich/all", json={ 'data': [ {}, ], }, headers={ 'Content-Type': 'application/json', 'X-Access-Token': apiKey } ) ``` ### Request Example (cURL) ```bash curl -X POST \ -H "Content-Type: application/json" \ -H "X-Access-Token: apiKey" \ -d '{"data": [{}]}' \ 'https://api.dropcontact.com/v1/enrich/all' ``` ### Response #### Success Response (200) - **error** (boolean) - Indicates if an error occurred. - **request_id** (string) - A unique identifier for the request. - **success** (boolean) - Indicates if the operation was successful. - **credits_left** (integer) - The number of credits remaining after the operation. #### Response Example ```json { "error": false, "request_id": "your-request-id", "success": true, "credits_left": 100 } ``` ### Note To check your remaining credits without consuming any, send a POST request to this endpoint with an empty object in the `data` array (e.g., `{"data": [{}]}`). ``` -------------------------------- ### Data Enrichment API Source: https://developer.dropcontact.com/index This endpoint allows you to enrich contact data by providing various contact details. It supports specifying a custom callback URL for webhook notifications. ```APIDOC ## POST /v1/enrich/all ### Description Enriches contact data by providing various contact details. Supports specifying a custom callback URL for webhook notifications. ### Method POST ### Endpoint /v1/enrich/all ### Parameters #### Query Parameters - **siren** (boolean) - Optional - Request siren information. - **language** (string) - Optional - Language for the enrichment results. #### Request Body - **data** (array) - Required - An array of contact objects to enrich. - **email** (string) - Optional - Email address of the contact. - **first_name** (string) - Optional - First name of the contact. - **last_name** (string) - Optional - Last name of the contact. - **company** (string) - Optional - Company name. - **website** (string) - Optional - Website of the company. - **custom_callback_url** (string) - Optional - A custom URL to receive webhook notifications for this specific request. ### Request Example ```json { "data": [ {"email": "peter.jackson@company.com"}, {"first_name": "John", "last_name": "Smith", "website": "corporation.com"}, {"first_name": "Samuel", "last_name": "Jones", "email": "contact@bigcorp.com"} ], "siren": true, "language": "en", "custom_callback_url": "http://your-domain.com/callback/my-custom-path" } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the status of the request. - **message** (string) - A message describing the result of the request. #### Response Example ```json { "status": "success", "message": "Enrichment request received." } ``` ``` -------------------------------- ### Edit Webhook Subscription - Python Source: https://developer.dropcontact.com/index This Python script shows how to modify an existing webhook subscription using a PUT request. It targets a specific subscription by its ID and allows updating fields like 'callback_url'. ```python import requests r = requests.put( "https://api.dropcontact.com/v1/webhooks/subscriptions/", json={ "callback_url": "http://your-domain.com/callback" }, headers={ 'Content-Type': 'application/json', 'X-Access-Token': apiKey } ) ``` -------------------------------- ### Delete Webhook Subscription - Python Source: https://developer.dropcontact.com/index This Python script demonstrates how to delete a webhook subscription by sending a DELETE request to the API. It requires the subscription ID to identify the target subscription. ```python import requests r = requests.delete( "https://api.dropcontact.com/v1/webhooks/subscriptions/", headers={ 'X-Access-Token': apiKey } ) ``` -------------------------------- ### Edit Webhook Subscription - cURL Source: https://developer.dropcontact.com/index This cURL command illustrates how to edit a webhook subscription. It sends a PUT request to a specific subscription ID, allowing modification of parameters such as the callback URL. ```curl curl -X PUT \ -H "Content-Type: application/json" \ -H "X-Access-Token: apiKey" \ -d '{"callback_url": "http://your-domain.com/callback"}' \ 'https://api.dropcontact.com/v1/webhooks/subscriptions/' ``` -------------------------------- ### Delete Webhook Subscription - cURL Source: https://developer.dropcontact.com/index This cURL command shows how to delete a webhook subscription. A DELETE request is sent to the API, targeting the specific subscription using its unique identifier. ```curl curl -X DELETE \ -H "X-Access-Token: apiKey" \ 'https://api.dropcontact.com/v1/webhooks/subscriptions/' ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.