Skip to content

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

Open
gmtuca wants to merge 2 commits into
mainfrom
api-client-sync/2026-07-31
Open

[api-sync 2026-07-31] gradientlabs-go: split outbound conversation start into chat/email/phone#101
gmtuca wants to merge 2 commits into
mainfrom
api-client-sync/2026-07-31

Conversation

@gmtuca

@gmtuca gmtuca commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

⚠️ Breaking change — version 0.4.0

POST /outbound/conversations has been removed from the public API and replaced by three channel-specific endpoints. This SDK follows suit:

Removed Added
Client.StartOutboundConversation Client.StartOutboundChatConversationPOST /outbound/conversations/chat
Client.StartOutboundEmailConversationPOST /outbound/conversations/email
Client.StartOutboundPhoneConversationPOST /outbound/conversations/phone

Also removed: StartOutboundConversationParams and the CustomerSource type/constants (the field has no replacement in the new API). SupportPlatform and its constants are unchanged, just moved to support_platform.go now that they outlive the outbound start params. StartOutboundConversationResponse is kept as the shared {conversation_id} response of all three methods.

Migration

Old Channel New method
ChannelVoice StartOutboundPhoneConversation
ChannelEmail StartOutboundEmailConversation
ChannelWeb StartOutboundChatConversation
  • CustomerSource has no replacement. CustomerID is now always your own customer ID — the one echoed back in tool and webhook payloads. Identifiers for third-party platforms move to CustomerSupportPlatformIdentifiers (the existing CustomerSupportPlatformIdentifier type already used by StartConversation), keyed by platform. Zendesk requires type zendesk_support_user; Salesforce requires salesforce_contact_id.
  • SupportPlatform is now required on chat and email. The API no longer auto-selects the highest-priority connected platform.
  • Phone has no support platform or channel field at all — the backend pins the call to voice/livekit. It gains required ToPhoneNumber and FromPhoneNumber (E.164; the from number must already be provisioned for your company).
  • Email's Subject and Body are required together and forbidden individually. Chat takes Body only.
  • Resources is now map[string]any rather than json.RawMessage, matching StartConversationParams.Resources.

Version

version.go: 0.3.10.4.0 (minor bump, by request — note this is still a breaking change for callers, so the version alone will not signal it). The module stays pre-1.0, so go.mod needs no /vN suffix. No tag is created by this PR.

Two notes for whoever tags the release:

  • version.go on main had already drifted from the tag line — it said 0.3.1 while the latest tag is v0.3.11.
  • Version collision: the unmerged branch api-client-sync/2026-07-22 also bumps version.go to 0.4.0. Whichever of the two lands second must be re-bumped to 0.5.0.

Verification

gofmt -l . is empty; go build ./... && go vet ./... && go test ./... all pass (the repo has no test files).

🤖 Generated with Claude Code

gmtuca and others added 2 commits July 31, 2026 14:09
POST /outbound/conversations has been removed from the public API and
replaced by /outbound/conversations/{chat,email,phone}.

StartOutboundConversation, its params type, and CustomerSource (which
has no replacement in the new API) are gone. SupportPlatform moves to
its own file now that it outlives the outbound start params.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@gmtuca
gmtuca force-pushed the api-client-sync/2026-07-31 branch from 55a4f0e to a16536e Compare July 31, 2026 13:43
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.

1 participant