curl --request GET \
--url https://api.enrik.ai/v1/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.enrik.ai/v1/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.enrik.ai/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.enrik.ai/v1/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.enrik.ai/v1/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.enrik.ai/v1/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enrik.ai/v1/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"apiKeyId": "0199a1b2-0000-7000-8000-00000000a001",
"name": "Nightly sync",
"prefix": "crm_live_7Ff4mS0k",
"expiresAt": "2027-01-01T00:00:00.000Z",
"workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
"scopes": [
"crm:read",
"discovery:read"
]
}{
"error": {
"code": "malformed_json",
"message": "Bad Request",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}{
"error": {
"code": "unauthenticated",
"message": "Unauthorized",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}{
"error": {
"code": "insufficient_scope",
"message": "Forbidden",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}{
"error": {
"code": "validation_error",
"message": "Unprocessable Entity",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}{
"error": {
"code": "internal_error",
"message": "Internal Server Error",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}{
"error": {
"code": "service_unavailable",
"message": "Service Unavailable",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}{
"error": {
"code": "not_found",
"message": "Not found",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}Describe the calling API key
Answers the id of the API key that sent the request, its name, display prefix and expiry, its workspace and the scope names it holds. Any valid API key may call it, whatever its scopes; a browser session gets 401. What a key may do is also bounded by the permissions frozen when it was minted, so a later change to what a scope covers does not reach it: an operation that needs a scope the key lacks still answers 403 insufficient_scope naming the scopes it needs. Requests count against the key’s ordinary rate limit.
curl --request GET \
--url https://api.enrik.ai/v1/me \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.enrik.ai/v1/me"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.enrik.ai/v1/me', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.enrik.ai/v1/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.enrik.ai/v1/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.enrik.ai/v1/me")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enrik.ai/v1/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"apiKeyId": "0199a1b2-0000-7000-8000-00000000a001",
"name": "Nightly sync",
"prefix": "crm_live_7Ff4mS0k",
"expiresAt": "2027-01-01T00:00:00.000Z",
"workspaceId": "0199a1b2-0000-7000-8000-00000000b001",
"scopes": [
"crm:read",
"discovery:read"
]
}{
"error": {
"code": "malformed_json",
"message": "Bad Request",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}{
"error": {
"code": "unauthenticated",
"message": "Unauthorized",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}{
"error": {
"code": "insufficient_scope",
"message": "Forbidden",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}{
"error": {
"code": "validation_error",
"message": "Unprocessable Entity",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}{
"error": {
"code": "rate_limited",
"message": "Too many requests",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}{
"error": {
"code": "internal_error",
"message": "Internal Server Error",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}{
"error": {
"code": "service_unavailable",
"message": "Service Unavailable",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}{
"error": {
"code": "not_found",
"message": "Not found",
"requestId": "5b1d3c1e-8d6f-4f2a-9a57-3a9b1f2c7d10"
}
}Authorizations
An Enrik API key, sent as Authorization: Bearer <key>. A key reaches public operations only, and only those whose scopes it holds. A few parameters need a scope beyond their operation’s, which the parameter names. The scopes:
setup:read: Read the workspace setup and its company profile.setup:run: Change the setup: confirm the company profile, authorize sponsored drafting and background company research, choose what to set up and complete setup.workspace:read: Read the workspace’s own profile: its health summary and setup state.crm:read: Read companies with their signals, contacts and the saved views over them.crm:write: Create, update and restore companies and contacts, and create, update and delete saved views.crm:delete: Delete companies and contacts.twin:read: Read the Company Twin: structured company knowledge and its signals.discovery:read: Read ICP profiles, ICP assessments, discovery briefs, discovery jobs, candidates and the signal library.discovery:write: Create and change ICP profiles, discovery briefs and signal-definition drafts, and review discovery candidates.discovery:run: Create, start and cancel discovery jobs, and edit a draft one. Uses provider budget.enrichment:read: Read the enrichment configuration and its results, including a record’s enrichment, formula and custom-API cells.enrichment:run: Launch and cancel enrichment. Spends enrichment credits.automation:read: Read workflows and agents with their run history, including a record’s agent cells.automation:run: Run existing workflows and agents.exports:read: Read export jobs and the fields an export can carry.exports:run: Create, preview, start, cancel and archive CSV exports of companies, contacts and candidates, and download the file. Also needscrm:read. Delivering an export to a webhook destination stays in the app.integrations:read: Read connections, field mappings, CRM sync jobs and webhook destinations.webhooks:read: Read webhook subscriptions, the event types they can name and their delivery log.webhooks:write: Subscribe a receiver URL to webhook events; edit, test, pause, resume and archive a subscription and rotate its signing secret; redeliver an event. Only workspace owners and admins can grant it.reporting:read: Read analytics and dashboards.assistant:read: Read the Assistant: its threads, messages and pending approvals.assistant:run: Converse with the Assistant. Uses the workspace’s AI quota.assistant:write: Approve or reject the changes the Assistant proposes.
Headers
The ETag of an answer you kept. While the answer is still the same, the API answers 304 Not Modified with no body. Several tags, separated by commas, a weak tag (W/"…") and * are accepted.
Response
The API key that sent the request: its id, name, display prefix, expiry, workspace and scopes.
The API key that sent the request: its id, name, display prefix, expiry, workspace and scopes.
The id of the API key that sent the request: the apiKeyId a timeline names as the actor of what this key did.
The label the key was given when it was minted, as Settings → API keys shows it.
The first characters of the key’s secret, as Settings → API keys shows them: enough to tell keys apart, never enough to use one.
When the key stops authenticating (ISO 8601), or null for a key that does not expire. From then on every request with it answers 401.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$The workspace the key belongs to. Every operation the key calls acts in it.
The scope names the key holds, in a fixed order; the apiKey security scheme says what each one grants. What the key may do is also bounded by the permissions frozen when it was minted, so a scope listed here does not promise that every operation naming it succeeds.
Was this page helpful?