🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@saperly/sdk

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@saperly/sdk

Typed TypeScript client for the Saperly API. The phone carrier for AI agents.

latest
Source
npmnpm
Version
0.4.0
Version published
Weekly downloads
8
-20%
Maintainers
1
Weekly downloads
 
Created
Source

@saperly/sdk

Typed TypeScript client for the Saperly API. The phone carrier for AI agents.

One API call gives your agent a real phone number with TCPA compliance, consent capture, and an audit trail built in. Zero runtime dependencies, Node.js 18+.

Install

npm install @saperly/sdk

Quickstart

Provision a hosted line and print its phone number.

import { Saperly } from "@saperly/sdk";

const saperly = new Saperly({ apiKey: process.env.SAPERLY_API_KEY! });

const line = await saperly.lines.create({
  name: "my agent",
  mode: "hosted",
  systemPrompt: "You are a helpful assistant.",
});

console.log(line.phoneNumber);

Get an API key at saperly.com/settings/keys. Signup is portal-only (magic link, Google, or GitHub).

Auth

Saperly uses a two-tier credential model. Both authenticate via Authorization: Bearer <key>.

CredentialUse case
API key (sk_live_…, sk_test_…)Place calls, send SMS, manage lines, read usage and audit.
Service key (sk_svc_live_…, sk_svc_test_…)Mint, rotate, and revoke child API keys via POST /v1/keys. Credential management only.

Child API keys minted by a service key carry their own scope: full, call_only, sms_only, or read_only, optionally bound to a single line_id with a monthly_cap_cents ceiling. Full reference at docs.saperly.com/service-keys.

Resources

License

MIT. See LICENSE.

Contact

hello@saperly.com or open an issue.

FAQs

Package last updated on 14 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts