Edges
class. It simplifies authentication and gives access to the core
api and multiple integrations such as linkedin
, and salesnavigator
.
✨ Features
- Unified
Edges
interface - Individual API clients:
core
,linkedin
,salesnavigator
, etc. - Auto-generated TypeScript types for safety and autocompletion
- Built using OpenAPI Generator with the
typescript-fetch
generator and custom templates - Supports modern async/await and Fetch API
- Supports ES6 Language level (es2019 and newer)
- Supports CommonJS and ES6 module systems
- Can be used in both Typescript and Javascript. In TypeScript, the definition will be automatically resolved via
package.json
. (Reference)
📦 Installation
🔐 Authentication
Each user has their own unique API Key tied to their account. API Keys are not shared across the workspace. To get your API Key:- Log into the Edges Platform
- Go to Developer Settings
- Copy your API Key
🚀 Usage
Basic Usage
Responses
All SDK operations return an enhanced Response wrapper that provides access to the full HTTP response as well as convenience methods to work with its content and metadata. This design allows you to:- Inspect HTTP status, headers, and success flags
- Parse and access the response body easily
- Handle paginated endpoints with built-in pagination helpers
Property | Description |
---|---|
raw | The native fetch Response object, with full access if needed |
status | HTTP status code (e.g., 200 , 404 ) |
statusText | HTTP status text (e.g., "OK" , "Not Found" ) |
ok | Boolean indicating if status is in the range 200–299 |
headers | The native Response.headers object – use .get() to retrieve header values |
previousPage | The value of the X-Pagination-Previous header, or null if not present |
nextPage | The value of the X-Pagination-Next header, or null if not present |
data | The parsed body of the response (lazily evaluated on first access) |
💡 Use the ok
flag to easily gate logic on successful requests:
Error handling
API calls can fail, and production-ready code should always handle errors properly. When an error occurs, the SDK throws aResponseError
, which extends the native Error
object and adds:
response
: the raw Fetch Response objectbody
: the decoded API error body (already parsed from JSON)
body
follows the API error definition. For more details, check about errors in the API doc.
Each error response includes:
error_label
: A machine-readable identifier for the error typeerror_scope
: Indicates which part of the request caused the error (e.g., “input”, “auth”, “server”)error_ref
: A unique reference code for tracking and debuggingmessage
: A human-readable description of the errorstatus_code
: The HTTP status codeparams
: Additional error parameters (if any)
200
: The request was successful (some API calls may return 201 instead)400
: Bad Request - Invalid input or parameters401
: Unauthorized - Invalid or missing API key403
: Forbidden - Insufficient permissions404
: Not Found - Resource doesn’t exist500
: Internal Server Error - Server-side issue
Always check the
error_label
and error_scope
fields to programmatically handle different types of errors in your application.If you encounter an unusual error, such as a 500 or 503, feel free to reach out! These are internal errors on our end, and we’re
happy to help resolve them.
Async execution mode Usage
All the actions that can benefit of being executed in async mode will have “Async” suffixed methods, corresponding to the API async endpoints (for example Extract LinkedIn People Async). This means a few things for the expected params:inputs
: you can now pass an array ofinput
to batch fetch the resultscallback
:url
: the url, on your side, where we will stream you the resultsheaders
: an array of{ name: string, value: string}
header’s definitions we will include on each call of your url
async
call:
input
match the input of the corresponding live actionerror
match the error format (see “Error handling”)results
is an array of results that match the response format of the corresponding live action
parameters.max_results
parameter available on relevant actions.
Schedule execution mode Usage
All the actions that can benefit of being executed in schedule mode will have “Schedule” suffixed methods, corresponding to the API schedule endpoints (for example Extract LinkedIn People Schedule). Basically, it is an async execution, so it shares all the async specifics described above, but we added some params to plan future executions:schedule_at
: ISO 8601 datetime. It will define the next execution date (defaults to UTC). If you use acron
expression the recurrence will start at the first occurence after this datetimecron
: a* * * * *
cron format expression to schedule repeated executions. By default it will be UTC based and start to evaluate immediately (useschedule_at
if you want to delay).timezone
: IANA timezone to evaluate thecron
expression. Note that it is not compatible withschedule_at
that will always use the timezone of the datetime expression
CRON intervals below 15 minutes are currently blocked. Contact support if you require shorter intervals for real-time use cases.
schedule
call:
Account Rotation
Actions are performed over third-party services, the integrations (LinkedIn, Sales Navigator,…). Most of the time, those services need authenticated accounts to be able to do their job. If you’re new to Edges, we strongly recommend reviewing the following resources before diving into the API and the SDK:- Quickstart – A brief overview of how to use the API.
- Core Concepts – A description of core objects and how to interact with them.
identity_ids
body param is an array of identity uids that allows you to better control the identities used to execute your call. You can
then dedicate some identities and their integration accounts to specific tasks.
Core methods
The core scope (Edges.core
) provides methods to manage operational entities used by the Edges platform.
Available methods include:
- Identities: The building blocks of integration management
- Integrations: Connections to third-party platforms that enable action execution
- Schedules, runs, and callbacks: Insights into platform activities and triggered operations
- Additional methods are continuously being added as the platform evolves
🧠 SDK Structure
The Edges API allows you to interact with various third-party services through integrations (LinkedIn, Sales Navigator, and more). Actions available for each integration are exposed through dedicated scoped clients.📘 API Reference
The full API reference is available at: Edges API Docs This SDK is auto-generated from our OpenAPI specification. A full SDK reference is also auto-generated under the installed packagedocs/
if needed.