An Overview

ReachAPI is a REST-oriented service suite, optimized for seamless data access within applications. Using REST principles, ReachAPI supports efficient data retrieval through HTTP requests, delivering structured JSON responses.

The API’s well-defined JSON schemas ensure data clarity and consistency, making integration straightforward. With ReachAPI, you can easily embed real-time data into development workflows, eliminating the need for manual updates.

Authentication

API & Webhook Integration

ReachAPI and Webhooks work together to deliver data efficiently. While the API handles requests, the webhook instantly pushes data to a specified endpoint once it’s ready, such as after email verification. This setup enables real-time data flow without repeated manual requests.

A unique webhook secret key is also provided, allowing you to authenticate and confirm data origin. This streamlined API-webhook combination ensures real-time, secure data integration into customer workflows.

API Key:

ReachAPI uses API Key authentication to ensure secure access for authorized applications. After obtaining your unique API Key, include it in each request header to securely access and integrate ReachAPI data into your application workflows.

Generating Your API Key

1.    Log In: Go to ReachStream Login and sign in with your credentials.

2.   Click on Your Profile: In the top-right corner, click on your Profile.

3.   Select Account Details: Within the Profile menu, click on a Account Details

4.   Generate API Key: In Account Details, find the Generate API Key option. Click it to create your API Key.

5.   Copy and Secure: Copy your new API Key and store it safely for authorized API access.

Setting Up Webhook

1.    Access Webhook Setup: From your Account Details Page where the API Key was created, click Add Webhook to open the configuration window.

2.   Generate Webhook Secret Key: Select Generate Webhook Secret to create a unique key for secure data exchanges. Use Re-generate if you need a new key.

3.   Select Account Details: Within the Profile menu, click on a Account Details

4.   Configure Webhook Settings:
a.    Enter the Endpoint URL (must support POST) for data delivery.
b.    Set Webhook Status to Active to ensure real-time data deliverability.

Once configured and set to Active, the webhook will automatically push data to your endpoint upon completion, using the secret key for secure authentication.

Webhook Key

Setting Up Webhook and Generating its secret key:

1. Navigate to Webhook Setup:

  • Go to the account page where your API Key is generated.
  • Click the "Add Webhook" button to access a popup window for configuring your webhook.

2. Generate Webhook Secret:

  • Click on the "Generate Webhook Secret" button.
  • This will generate a unique webhook secret key, which is used for authenticating requests and responses.
  • If needed, you can click the "Re-generate" button to create a new secret key

3. Configure Webhook:

  • Provide your Endpoint URL where the data will be sent which should support post method.
  • This will generate a unique webhook secret key, which is used for authenticating requests and responses.
  • Set the webhook status to either Active or Inactive based on your preference.

Once set, the webhook will trigger when the data process is complete, and the response will be sent securely using the secret key for authentication.

Predefined Values:

Overview

This API endpoint allows you to query predefined records based on various parameters such as job titles, SIC codes, company names, and more. You can use this API to retrieve specific lists of data, such as job titles, company names, employee size, etc. The API returns the data in JSON format.

API Endpoint

GET /api/v2/predefined/records/preset-values

Base URL

https://api-prd.reachstream.com/api/v2/predefined/records/preset-values

Authentication

The API requires an X-API-Key header for authentication. You need to provide your API key in the request header to access the endpoint. Replace 'your-api-key-here' with your actual API key.

Request Format

  • HTTP Method: GET
  • URL: /api/v2/predefined/records/preset-values
  • Query Parameters:
    • job_title (optional) - The job title to filter results by.
    • sic_code (optional) - The SIC code to filter results by.
    • address_zipcode (optional) - The address zip code to filter results by.
    • address_city (optional) - The address city to filter results by.
    • address_state (optional) - The address state to filter results by.
    • address_country (optional) - The address country to filter results by.
    • company_name (optional) - The company name to filter results by.
    • website (optional) - The website to filter results by.
    • tech_keywords (optional) - The technology keywords to filter results by.
    • job_title_level (optional) - The job title level to filter results by.
    • job_dept_name (optional) - The job department name to filter results by.
    • job_function_name (optional) - The job function name to filter results by.
    • company_type (optional) - The company type to filter results by.
    • company_industry_categories_list (optional) - The company industry categories to filter results by.
    • employee_size (optional) - The employee size to filter results by.
    • annual_revenue_amount (optional) - The annual revenue amount to filter results by.

This command will fetch predefined job titles based on the query parameter job_title=dev. You can replace 'dev' with any other job title or value.

This command will fetch predefined SIC codes based on the query parameter sic_code=1234. You can replace 1234 with any valid SIC code.

This command will fetch predefined records based on the city "New York."

Response Format

The response from the API will be in JSON format. A successful response (HTTP Status 200) will contain the data that matches the query parameters. If the request fails, the response will contain an error message with an appropriate status code.

Response Fields

  • status: The status of the request, typically "200" or "404."
  • data:An array of results that match the query parameters

Error Handling

The API may return various HTTP status codes, such as:

  • 200 OK:The request was successful, and the data is returned.
  • 400 Bad Request:The request was malformed or missing required parameters.
  • 401 Unauthorized:The API key is missing or invalid.
  • 500 Internal Server Error:There was an error processing the request.

List of Query Parameters

Parameter Description
job_title Filter results by job title.
sic_code Filter results by SIC code.
address_zipcode Filter results by address zip code.
address_city Filter results by address city.
address_state Filter results by address state.
address_country Filter results by address country.
company_name Filter results by company name.
website Filter results by website.
tech_keywords Filter results by technology keywords.
job_title_level Filter results by job title level
job_dept_name Filter results by job department name.
job_function_name Filter results by job function name. .
company_type Filter results by company type.
company_industry_categories_list Filter results by company industry categories list.
employee_size Filter results by employee size.
annual_revenue_amount Filter results by annual revenue amount.

Notes

  • 200 OK:The request was successful, and the data is returned.
  • 400 Bad Request:The request was malformed or missing required parameters.
  • 401 Unauthorized:The API key is missing or invalid.
  • 500 Internal Server Error:There was an error processing the request.

Predefined values for the search criteria can be obtained from the provided SDK on GitHub. GitHub

Code Copied!

Example: Query Job Titles

curl --location 'https://api-prd.reachstream.com/api/v2/predefined/records/preset-values?job_title=dev' \ --header 'X-API-Key: your-api-key-here'

Code Copied!

Example: Query SIC Codes

curl --location 'https://api-prd.reachstream.com/api/v2/predefined/records/preset-values?sic_code=1234' \ --header 'X-API-Key: your-api-key-here'

Code Copied!

Example: Query Address City

curl --location 'https://api-prd.reachstream.com/api/v2/predefined/records/preset-values?address_city=New York' \ --header 'X-API-Key: your-api-key-here'

                                    { 
                                          "status": 200, 
                                          "message": "Success",
                                          "data": [ 
                                                "Software Engineer", 
                                                "DevOps Engineer", 
                                                "Frontend Developer", 
                                                "Backend Developer" 
                                              ] 
                                        }
                                            
                                
                                    { 
                                          "status": 401, 
                                          "message": "Unauthorized",
                                          "data": null
                                        }
                                            
                                
                                    { 
                                          "status": 404, 
                                          "message": "Not Found",
                                          "data": null
                                        }
                                            
                                
                                    { 
                                          "status": 500, 
                                          "message": "Server Error",
                                          "data": null
                                        }
                                            
                                

Filter Property

The `filter` property enables users to conduct detailed, criteria-driven searches by utilizing a set of additional parameters.

Additional Query Parameters

The following query parameters can be used in conjunction with the `filter` JSON object:

Parameter Description
filter(Object) The primary object that contains the search criteria.
job_title (Object) Specifies one or more job titles to search for. For example, you can search for "Business Manager" or "Project Manager" to find candidates or listings with those specific roles.
job_title_level (Object) Defines the level of job titles to filter by, such as "Manager" or "Supervisor." This allows you to narrow searches to specific tiers within an organizatio
job_dept_name (Object) Identifies one or more department names within a company. For instance, you can specify "Marketing" or "Finance" to focus on those areas of expertise.
job_function_name (Object) Specifies the job functions, such as "Engineering" or "Sales." This helps in filtering candidates based on their professional expertise.
company_industry_categories_list (Object) Allows for the specification of one or more industry categories, such as "Information Technology" or "Healthcare," to target specific fields.
sic_code (Object) Enables filtering by one or more Standard Industrial Classification (SIC) codes. For example, you might include "111" for Agriculture and "112" for Forestry, allowing for industry-specific searches.
company_employee_size (Object) Lets you specify ranges for company employee sizes, such as "10 to 50" or "100 to 500." This can help in targeting small startups or larger enterprises.
company_annual_revenue_amount (Object) Specifies ranges for annual revenue, such as "$1M to $5M" or "$5M to $10M." This is useful for filtering companies based on financial size and stability.
company_address_country (Object) Allows you to specify one or more countries where the company operates, such as "United States" or "Germany," ensuring relevant regional results.
company_address_zipcode (Object) Lets you filter by specific zip codes, such as "92111" or "90210," to target businesses in particular areas.
company_address_state (Object) Specifies one or more states where the company is located, such as "California" or "Texas," facilitating localized searches.
company_address_city (Object) Enables filtering by one or more cities, such as "San Francisco" or "New York," to focus on urban markets.
company_name (Object) Allows you to search for specific company names, such as "DataCaptive" or "Spokesly," to find targeted results related to particular organizations.
company_website (Object) Lets you specify one or more company websites, such as "www.datacaptive.com" or "www.spokesly.com," for precise digital presence searches.
company_type (Object) Enables filtering by types of companies, such as "Public Company" or "Non-Profit," which can help in categorizing the search results appropriately.
tech_keywords (Object) Allows for the inclusion of technology-related keywords, such as "Artificial Intelligence" or "Cloud Computing," to filter candidates or organizations with specific tech expertise.

This structured approach to querying enables users to perform highly targeted searches based on a comprehensive set of criteria, ensuring relevant and meaningful results.

Use this payload request to customize and refine your search by providing multiple values for each search criterion, with the option to reference predefined values from the SDK on GitHub. This flexibility allows you to find related information that aligns with your specific preferences or requirements.

"X-API-Key": "gEqboyoK7JSfMvxxxxxxxxxx",
"Content-Type": "application/json",
"Accept": "application/json",


Code Copied!

Credit check API

API Endpoint: POST /api/v2/retrive/users/active/credits

Base URL: https://api-prd.reachstream.com/api/v2/retrive/users/active/credits

Authentication:
The API requires an X-API-Key header for authentication. You need to provide your API key in the request header to access the endpoint. Replace 'your-api-key-here' with your actual API key.

Request:

Headers

"X-API-Key": "gEqboyoK7JSfMvxxxxxxxxxx",
"Content-Type": "application/json",
"Accept": "application/json",


Code Copied!

EXPECTED RESPONSES

                                    { 
                                          "status": 200, 
                                          "message": "success",
                                          "data": {
                                            "available_credit":720
                                          } 
                                        }
                                            
                                
                                    { 
                                          "status": 401, 
                                          "message": "Unauthorized",
                                          "data": null
                                        }
                                            
                                
                                    { 
                                          "status": 404, 
                                          "message": "Page Not Found",
                                          "data": null
                                        }
                                            
                                
                                    { 
                                          "status": 500, 
                                          "message": "Server Error",
                                          "data": null
                                        }
                                            
                                

Counts API

Get counts and sample data for the filter query:

API Endpoint: POST /api/v2/request/records/count
Base URL: https://api-prd.reachstream.com/api/v2/request/records/count

Authentication:

The API requires an X-API-Key header for authentication. You need to provide your API key in the request header to access the endpoint. Replace 'your-api-key-here' with your actual API key.

Request Format:

  • HTTP Method: POST
  • URL: /api/v2/request/records/count
  • Body:
    • filter(Object) - As mentioned earlier, this remains the same.

Request:

"X-API-Key": "gEqboyoK7JSfMvxxxxxxxxxx",
"Content-Type": "application/json",
"Accept": "application/json",


Code Copied!
                                    {
                                           "status": 200,
                                           "message": "success",
                                           "data": {
                                                  "counts": 2410893,
                                                  "records": [
                                                     {
                                                            "id": 3451,
                                                            "contact_name": "xxxxx",
                                                            "contact_first_name": null,
                                                            "contact_middle_name": null,
                                                            "contact_last_name": null,
                                                            "contact_job_title_1": "manager",
                                                            "contact_job_title_level_1": null,
                                                            "contact_job_dept_name_1": null,
                                                            "contact_job_function_name_1": null,
                                                            "contact_email_1": null,
                                                            "contact_phone_1": null,
                                                            "company_company_name": "xxxxx",
                                                            "company_website": null,
                                                            "company_address_street": null,
                                                            "company_address_city": "hayden",
                                                            "company_address_state": "California",
                                                            "company_address_country": "united states",
                                                            "company_address_zipcode": null,
                                                            "company_employee_size": null,
                                                            "company_annual_revenue_amount": null,
                                                            "company_industry_categories_list": null,
                                                            "company_tech_keywords_list": null,
                                                            "sic_code": null,
                                                            "npi_number": null,
                                                            "contact_social_linkedin": null,
                                                            "contact_social_facebook": null,
                                                            "contact_social_twitter": null,
                                                            "contact_social_instagram": null
                                                         },
                                                         {
                                                                "id": 3496,
                                                                "contact_name": "xxxxx",
                                                                "contact_first_name": null,
                                                                "contact_middle_name": null,
                                                                "contact_last_name": null,
                                                                "contact_job_title_1": "manager",
                                                                "contact_job_title_level_1": null,
                                                                "contact_job_dept_name_1": null,
                                                                "contact_job_function_name_1": null,
                                                                "contact_email_1": null,
                                                                "contact_phone_1": null,
                                                                "company_company_name": "xxxxx",
                                                                "company_website": null,
                                                                "company_address_street": null,
                                                                "company_address_city": "burlington",
                                                                "company_address_state": "California",
                                                                "company_address_country": "united states",
                                                                "company_address_zipcode": null,
                                                                "company_employee_size": null,
                                                                "company_annual_revenue_amount": null,
                                                                "company_industry_categories_list": null,
                                                                "company_tech_keywords_list": null,
                                                                "sic_code": null,
                                                                "npi_number": null,
                                                                "contact_social_linkedin": null,
                                                                "contact_social_facebook": null,
                                                                "contact_social_twitter": null,
                                                                "contact_social_instagram": null
                                                             }
                                                          ]
                                                       }
                                    }
                                            
                                
                                    { 
                                          "status": 400, 
                                          "message": "Missing parameter filter",
                                          "data": null
                                        }
                                            
                                
                                    { 
                                          "status": 401, 
                                          "message": "Unauthorized",
                                          "data": null
                                        }
                                            
                                
                                    { 
                                          "status": 404, 
                                          "message": "Page Not Found",
                                          "data": null
                                        }
                                            
                                
                                    { 
                                          "status": 500, 
                                          "message": "Server Error",
                                          "data": null
                                        }
                                            
                                

curl -X POST \
--header 'Content-Type: application/json' \,
--header 'X-API-Key: gEqboyoK7JSfMvxxxxxxxxxx' \,
--data-raw '{
"filter": {
"company_address_state": {
}
}
}


Code Copied!

import http.client
import json
import http.client
conn = http.client.HTTPSConnection("https://api-prd.reachstream.com"),
payload = json.dumps,
({ "filter": {
"job_title_level": {
"0" = "C-Suite",
} } }) headers = {
'Content-Type': = 'application/json',
'X-API-Key': = 'gEqboyoK7JSfMvxxxxxxxxxx',
}
conn.request ("POST", "/api/v2/async/records/filter/count", payload, headers),

res = conn.getresponse(),
data = res.read(),
print(data.decode("utf-8"))


Code Copied!

require "uri"
require "json"
require "net/http"
url = URI ("https://api-prd.reachstream.com/api/v2/async/records/filter/count") http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["X-API-Key"] = "gEqboyoK7JSfMvxxxxxxxxxx"
request.body = JSON.dump({
"filter": {
"job_title_level": {
"0" = "C-Suite"
}
}
})
response = http.request(request)
puts response.read_body


Code Copied!

OkHttpClient client = new OkHttpClient().newBuilder(),
.build();
MediaType mediaType = new OkHttpClient().newBuilder(),
MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType,
"{\r\n \n \"filter\": {\r\n \"job_title_level\": {\r\n \"0\": \"C-Suite\"\r\n }\r\n }\r\n}");
,
MediaType mediaType = MediaType.parse("application/json"); ,
Request request = new Request.Builder() ,
new Request.Builder() .url("http://stag-apigateway.reachstream.com:
9010/api/v2/async/records/filter/count")
,
.method = ("POST", body) ,
.addHeader = ("Content-Type", "application/json") ,
.addHeader = ("X-API-Key", "gEqboyoK7JSfMvxxxxxxxxxx") ,
.build();
Response response = client.newCall(request).execute(); ,


Code Copied!

$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL =>
'http://stag-apigateway.reachstream.com:
9010/api/v2/async/records/filter/count',

CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => '10',
CURLOPT_TIMEOUT => '0',
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => {
"filter": {
"job_title_level": {
"0": "C-Suite"
}
}
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'X-API-Key: gEqboyoK7JSfMvxxxxxxxxxx'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;


Code Copied!

var myHeaders = new Headers();
myHeaders.append("Content-Type",
"application/json");
myHeaders.append("X-API-Key",
"gEqboyoK7JSfMvxxxxxxxxxx");


var raw = JSON.stringify({
"filter": {
"job_title_level": {
"0": "C-Suite"
}
}
});

var requestOptions = { method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("http://stag-apigateway.reachstream.com:
9010/api/v2/async/records/filter/count", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));


Code Copied!

Data Fetch API

Data Request Process via API and Webhook:

1.    Submit Data Request: The API processes the request with specified filters, generating a unique processing ID for future reference.

2.   Email Validation:The requested contact list undergoes an email validity check. A response with valid emails, along with the processing ID and Webhook Secret Key, is sent to the specified webhook endpoint.

3.   Credits Deduction: The system deducts download credits based on the number of valid emails.

4.   Acknowledge Receipt: To confirm receipt, users must respond with a "200 OK" status. Any other response triggers a retry at specified intervals.

Note: Only valid records are returned. For example, if 99 out of 100 emails are valid, the webhook will only include the 99 valid emails, and credits will be deducted accordingly.

To request data via the API, users must submit a valid webhook URL with an Active status. If the webhook is inactive, the API will return a "Bad Request" response.

When users submit a data request, the API will process the specified filters and generate a unique processing ID for future reference. The requested contact list will undergo email validity check. A response with a list of valid emails will be sent to the specified webhook endpoint. This response will go along with the unique processing Id and Webhook Secret Key. Subsequently, the download credits for all valid emails will be deducted from users’ account.

Users are required to acknowledge receipt of the data by responding with a "200 OK" status. A response other than "200 OK" is considered a failed attempt, prompting the server to retry the request at specified intervals.

Please note that only valid records will be returned to the user/client. For instance, if a request is made to retrieve 100 records and 99 emails are deemed valid, the webhook request will contain only the 99 valid records. Correspondingly, credits will be deducted only for the 99 valid records.

API Endpoint

POST /api/v2/async/records/filter

Base URL

https://api-prd.reachstream.com/api/v2/async/records/filter

Authentication

The API requires an X-API-Key header for authentication. You need to provide your API key in the request header to access the endpoint. Replace 'your-api-key-here' with your actual API key.

Request Format:

  • HTTP Method: POST
  • URL: /api/v2/async/records/filter
  • Body:
    • filter (Object) - As mentioned earlier, this remains the same.
    • fetchCount (Integer) - Specifies the quantity of data you wish to retrieve.

Request:


"X-API-Key": 'gEqboyoK7JSfMvxxxxxxxxxx ',
webhook_secret_key: '34906274bxxxxxxxxxx ',
Content-Type: ‘application/json’
Accept: ‘application/json’


Code Copied!
                                { 
                                      "status": 200, 
                                      "message": "Records processing initiated",
                                      "data": {
                                        "unique_processing_id":1300
                                      } 
                                    }
                                        
                            
                                    { 
                                          "status": 400, 
                                          "message": "Required fetchCount and filter",
                                          "data": null
                                    }       
                                    { 
                                          "status": 400, 
                                          "message": "Webhook feature is inactive",
                                          "data": null
                                    }    
                                
                                    { 
                                          "status": 402, 
                                          "message": "Insufficient credit balance",
                                          "data": {
                                            "available_credit":720
                                            "requested_fetch_count":2000
                                          } 
                                        }
                                            
                                
                                    { 
                                          "status": 401, 
                                          "message": "Unauthorized",
                                          "data": null
                                    }  
                                
                                    { 
                                          "status": 404, 
                                          "message": "Page Not Found",
                                          "data": null
                                    }  
                                
                                    { 
                                          "status": 500, 
                                          "message": "Server Error",
                                          "data": null
                                    }  
                                

Webhook

OVERVIEW

A webhook enables the automatic delivery of requested data to a specified endpoint, making it essential when using ReachAPI. Setting up a webhook ensures timely and efficient data delivery directly to your endpoint URL, seamlessly integrating the data into your application or development workflow.

The webhook enhances the ReachAPI experience by automating real-time data flow. Once ReachAPI processes a request, the webhook handles delivery, eliminating the need for customers to poll for updates. A unique webhook secret key verifies the authenticity of incoming data, adding an extra layer of security. Together, the webhook and ReachAPI create a reliable, automated system for accurate, on-time data delivery.

Webhook Payload:

The data sent to your webhook URL will be in JSON format.

Handling Incoming Requests

To handle incoming webhook requests:

1.   Set Up Your Server

Ensure your server is configured to accept POST requests at the specified URL

2.   Parse the Payload

Extract the relevant data from the JSON payload.

3.   Process the Data

Implement your logic based on the event received (e.g., updating a database, notifying a user).


Security Consideration

To secure your webhook:

  • Verify Signatures

    Use the shared secret key to verify the incoming requests from your service
  • Use HTTPS

    Always use HTTPS to encrypt data in transit.
  • IP Whitelisting

    Consider restricting access to your webhook URL to known IP addresses.

Testing Webhooks

To test your webhook integration:

Troubleshooting

If you encounter issues:

  • Check Server Logs: Review your server logs for errors.
  • Payload Format: Ensure the payload format matches the expected structure.
  • Response Codes: Make sure your endpoint returns the correct HTTP response codes.

Request:

                        {
                              "unique_processing_id": 1300,
                              "event": "data_notification",
                              "data": [
                                 {
                                      "id": 30965,
                                      "contact_name": "xxxx",
                                      "contact_first_name": "xxxx",
                                      "contact_middle_name": "xxxx",
                                      "contact_last_name": "xxxx",
                                      "contact_job_title_1": "manager",
                                      "contact_job_title_level_1": "xxxx",
                                      "contact_job_dept_name_1": "xxxx",
                                      "contact_job_function_name_1": "xxxx",
                                      "contact_email_1": "xxxx",
                                      "contact_phone_1": "xxxx",
                                      "company_company_name": "xxxx",
                                      "company_website": "xxxx",
                                      "company_address_street": "xxxx",
                                      "company_address_city": "xxxx",
                                      "company_address_state": "xxxx",
                                      "company_address_country": "xxxx",
                                      "company_address_zipcode": "xxxx",
                                      "company_employee_size": "xxxx",
                                      "company_annual_revenue_amount": "$5m to $10m",
                                      "company_industry_categories_list": "xxxx",
                                      "company_tech_keywords_list": "xxxx",
                                      "sic_code": "8082",
                                      "npi_number": "xxxx",
                                      "contact_social_linkedin": "xxxx",
                                      "contact_social_facebook": "xxxx",
                                      "contact_social_twitter": "xxxx",
                                      "contact_social_instagram": "xxxx"
                                     }
                                  ]
                        }
                    

curl --location 'https://api-prd.reachstream.com/api/v2/async/records/filter' \
--header 'Content-Type: application/json' \
--header 'X-API-Key: GEqboyoK7JSfMvxxxxxxxxxx' \
--header 'webhook_secret_key: 34906274bexxxxxxxx' \
--data '{
"fetchCount": 5000,
"filter": {
"job_title_level": {
"0": "C-Suite"
}
}
}


Code Copied!

import requests
import json
url = "https://api-prd.reachstream.com/api/v2/async/records/filter"
payload = json.dumps({
"fetchCount": 5000,
"filter": {
"job_title_level": {
"0": "C-Suite"
}
}
})
headers = {
'Content-Type': 'application/json',
'X-API-Key': 'GEqboyoK7JSfMvxxxxxxxxxx'
'webhook_secret_key: '34906274be594xxxxxxx'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)


Code Copied!

require "uri"
require "json"
require "net/http"
url = URI("https://api-prd.reachstream.com/api/v2/async/records/filter")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["Content-Type"] = "application/json"
request["X-API-Key"] = "GEqboyoK7JSfMvxxxxxxxxxx"
request["'webhook_secret_key "] = "34906274be594xxxxxxx "
request.body = JSON.dump({
"fetchCount": 5000,
"filter": {
"job_title_level": {
"0": "C-Suite"
}
}
})
response = http.request(request)
puts response.read_body


Code Copied!

OkHttpClient client OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\r\n \n \"fetchCount\": 5000,\r\n \"filter\": {\r\n \"job_title_level\": {\r\n \"0\": \"C-Suite\"\r\n }\r\n }\r\n}\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n");
Request request = new Request.Builder()
.url("https://api-prd.reachstream.com/api/v2/async/records/filter")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("X-API-Key", "GEqboyoK7JSfMvxxxxxxxxxx")
.addHeader("webhook_secret_key", "34906274be594xxxxxxxxxx")
.build();
Response response = client.newCall(request).execute();


Code Copied!

$client = new Client();
$headers = [
'Content-Type' => 'application/json',
'X-API-Key' => 'GEqboyoK7JSfMvxxxxxxxxxx',
'webhook_secret_key’ => '34906274be594xxxxxxx'
];
$body = '{
"fetchCount": 5000,
"filter": {
"job_title_level": {
"0": "C-Suite"
}
}
}';
$request = new Request('POST', 'https://api-prd.reachstream.com/api/v2/async/records/filter', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();


Code Copied!

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("X-API-Key", "GEqboyoK7JSfMvxxxxxxxxxx");
myHeaders.append("webhook_secret_key", "34906274bxxxxxxxxxx");
var raw = JSON.stringify({
"fetchCount": 500,
"filter": {
"job_title_level": {
"0": "C-Suite"
}
}
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api-prd.reachstream.com/api/v2/async/records/filter", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));


Code Copied!

HTTP Return Codes

ReachAPI uses conventional HTTP response codes to indicate the success or failure of an API request.

Codes in the 2xx range indicate success. Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.). Codes in the 5xx range indicate an error with ReachAPI servers (these are rare).

200k

Success

400 Bad Request

This error indicates that the user’s request contains incorrect syntax. This could be due to the request URL or it’s payload (if applicable).

401 Unauthorized

This error indicates that client is not permitted to access the requested resource or perform the requested operation.

402 Payment Required

This error indicates that your account has an insufficient credit balance to complete this operation. Please add more credits to your account.

403 Forbidden

This error indicates that the server will not allow the caller to access the requested API – likely due to an invalid API key. Remember that all API calls must have “X-API-Key” as a header for all requests.

404 Forbidden

This error indicates that the server could not find the API endpoint that the caller requested. This commonly occurs when a URL is mistyped.

429 Too many requests

This error indicates that the client has exceeded quota. This could be due to too many requests within the last second (concurrency).

500 Internal Server Error

This error indicates that the server has faced a critical internal error. if this happens, please reach out to us at reach@reachstream.com.

Rate Limitations

Our API is designed to provide access to our services while maintaining the quality of service for all users. To achieve this, we have implemented rate limitations to prevent abuse, ensure fair usage, and maintain system stability.

Rate limit 10 requests per second (RPS)

A rate limiter is implemented to restrict the number of requests that can be received by the API within a specified time frame (per second). Exceeding this limit will result in an HTTP 429 error response.