Go SDK
The Partner API, events and webhooks for Go.
Requirements
Install
Coming at general availability. Until then, this page shows the requirements and how the SDK is used.
The package name is evvapartner.
Configure
main.go
Create an ES256 key pair
Config, Secret and Token redact themselves in fmt and log/slog; the SDK logs neither secrets nor tokens.
First calls
first_calls.go
Every operation of the API reference is reachable through client.API.
Receive events and reply
bot.go
Errors
Every API error is an *evvapartner.APIError (Code, Message, Details, RequestID, RetryAfter) wrapped in a
typed error — use errors.As.
Conversation leases
client.Conversations.HoldLease(ctx, creatorID, conversationID, fn) holds one conversation — 60 seconds by default
(15–300), renewed at a third of its life, released when fn returns. Send with lease.FencingToken() and
ExpectedLastMessageID; when the lease is lost, fn’s context is cancelled. See
Conversation leases and handoff.
Webhooks
webhooks.go
