General Introduction
Authorization
6min
authorization key to start using our api, you need an api key you can get the api key from coresignal's self service platform moreover, your account manager or sales representative can generate the key for you upon your request for the api plan authorization header all requests must contain an api key header its value is your unique api key authorization header h “apikey {api key}” authorization header headers={"apikey {api key}"} curl authorization several examples of authorization in curl are given according to the required request here, requests are made using base company api docid\ c1soeagckbt 1tqdpbpjb endpoints elasticsearch dsl curl x 'post' \\ 'https //api coresignal com/cdapi/v2/company base/search/es dsl' \\ h 'accept application/json' \\ h 'apikey {api key}' \\ h 'content type application/json' \\ d '{ "query" { "bool" { "must" \[ { "query string" { "query" "2023", "default field" "founded", "default operator" "and" } } ] } } }' search filter curl x 'post' \\ 'https //api coresignal com/cdapi/v2/company base/search/filter' \\ h 'accept application/json' \\ h 'apikey {api key}' \\ h 'content type application/json' \\ d '{ "industry" "software development", "country" "united states", "founded year lte" 2022 }' collect curl x 'get' \\ 'https //api coresignal com/cdapi/v2/company base/collect/1234' \\ h 'accept application/json' \\ h 'apikey {api key}' general authorization templates templates for authentication in various programming languages and programming environment import requests api endpoint = "api endpoint" api key = {api key} headers = { "apikey" api key } response = requests get(api endpoint, headers=headers) \# print the response content or handle it as needed print(response text)require 'net/http' require 'uri' uri = uri parse("api endpoint") http = net http new(uri host, uri port) request = net http get new(uri request uri) api key = {api key} request\['apikey'] = api key response = http request(request) puts response bodyconst https = require('https'); const apiendpoint = 'api endpoint'; const apikey = {api key}; const options = { headers { 'apikey' apikey } }; https get(apiendpoint, options, (response) => { let data = ''; response on('data', (chunk) => { data += chunk; }); response on('end', () => { console log(data); }); });\<?php $apiendpoint = "api endpoint"; $apikey = {api key}; $options = \[ 'http' => \[ 'header' => "apikey $apikey" ] ]; $context = stream context create($options); $response = file get contents($apiendpoint, false, $context); ?> use any api compatible tool to authorize and start querying the api faq where can i find my api key? api key is stored in the self service platform home page's authentication section how do i use api key? if you've previously used a jwt token, you need to change it to an api key change your authorization request header's to api key h 'apikey {api key}' here, insert your api key instead of {api key} make sure that you are using the correct endpoints api key is compatible with v2 endpoints for example /v2/company base/search/es dsl note several enrichment endpoints do not have v2, but still work with api key