Skip to content

[api-sync 2026-07-31] gradientlabs-nodejs: split outbound conversation start into chat/email/phone - #14

Merged
gmtuca merged 2 commits into
mainfrom
api-client-sync/2026-07-31
Aug 4, 2026
Merged

[api-sync 2026-07-31] gradientlabs-nodejs: split outbound conversation start into chat/email/phone#14
gmtuca merged 2 commits into
mainfrom
api-client-sync/2026-07-31

Conversation

@gmtuca

@gmtuca gmtuca commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Syncs the Node.js SDK to a single public-API change: POST /outbound/conversations was removed and replaced by three channel-specific endpoints.

Outbound conversation start split per channel

client.outboundConversations.start() is removed. So are StartOutboundConversationParams and its customer_source field.

Replaced by one method per channel, all returning { conversation_id }:

New method Endpoint Required Optional
startChat() POST /outbound/conversations/chat customer_id, procedure_id, support_platform body, customer_support_platform_identifiers, resources
startEmail() POST /outbound/conversations/email customer_id, procedure_id, support_platform subject+body (together or neither), customer_support_platform_identifiers, resources
startPhone() POST /outbound/conversations/phone customer_id, procedure_id, to_phone_number, from_phone_number customer_support_platform_identifiers, resources

Migration

Before After
start({ channel: "voice", ... }) startPhone({ to_phone_number, from_phone_number, ... })
start({ channel: "email", ... }) startEmail({ ... })
start({ channel: "web", ... }) startChat({ ... })
customer_source: "intercom" No replacement. customer_id is now always your own customer ID; third-party platform IDs move to customer_support_platform_identifiers, keyed by platform (Zendesk requires type zendesk_support_user, Salesforce salesforce_contact_id).
support_platform optional (auto-selected highest-priority platform) Required on startChat/startEmail. No auto-selection. startPhone has no support_platform at all — the API pins voice/livekit.
subject / body independently optional On email they are a matched pair, enforced in the type: supply both or neither.

Channel is no longer part of any outbound param — the endpoint path selects the channel.

Version

0.1.20.1.3 (patch — the removed endpoint has no known users, so this does not warrant a major bump). Bumped in package.json and the VERSION constant behind the User-Agent header so the publish workflow's tag check passes. CHANGELOG.md updated. No tag pushed.

Note: 0.1.2 was never published to npm (latest published is 0.1.1), so tagging v0.1.3 will ship the unreleased reason_code change alongside this one.

Verification

npm ci && npm run build && npm test && npm run lint
  • build: ESM + CJS + DTS all green
  • tests: 48 passed (6 files), including 4 new cases covering the three endpoints (URL, method, body shape, and that phone sends no support_platform)
  • lint: eslint . clean
  • also ran npm run typecheck and npm run format:check — both clean

🤖 Generated with Claude Code

POST /outbound/conversations has been removed from the public API and
replaced by /outbound/conversations/{chat,email,phone}.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gmtuca
gmtuca requested review from a team as code owners July 31, 2026 13:21
@gmtuca
gmtuca force-pushed the api-client-sync/2026-07-31 branch from 4131b84 to f75d416 Compare July 31, 2026 13:43
Comment thread src/internal/version.ts Outdated
@@ -1,2 +1,2 @@
// Kept in sync with the "version" field in package.json.
export const VERSION = "0.1.2";
export const VERSION = "0.2.0";

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make it 0.1.3

@gmtuca
gmtuca force-pushed the api-client-sync/2026-07-31 branch from f75d416 to 713b345 Compare August 4, 2026 14:51
@gmtuca
gmtuca merged commit 1e78f16 into main Aug 4, 2026
2 checks passed
@gmtuca
gmtuca deleted the api-client-sync/2026-07-31 branch August 4, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants