SDK ↔ REST mapping
Quick-reference for switching between the TypeScript SDK, Go SDK, and raw REST calls. Covers every API resource.
Idempotency: All write operations (POST, PATCH, DELETE) accept an Idempotency-Key header. Pass a stable unique key per logical operation to safely retry on network failure without creating duplicates. See Idempotency for key format rules, behavior, and error codes.
OpenAPI spec: The machine-readable contract is available at https://api.voxburst.io/api/openapi.yaml (YAML) or https://api.voxburst.io/api/openapi.json (JSON). Use it with Postman, Insomnia, code generators, or type-safe HTTP clients.
Posts
| REST | TypeScript SDK | Go SDK |
|---|---|---|
POST /v1/posts | client.posts.create(params) | client.Posts.Create(ctx, params) |
GET /v1/posts | client.posts.list(params) | client.Posts.List(ctx, params) |
GET /v1/posts (all pages) | client.posts.listAll(params) | client.Posts.ListAll(ctx, params) |
GET /v1/posts/:id | client.posts.get(id) | client.Posts.Get(ctx, id) |
PATCH /v1/posts/:id | client.posts.update(id, params) | client.Posts.Update(ctx, id, params) |
DELETE /v1/posts/:id | client.posts.delete(id) | client.Posts.Delete(ctx, id) |
POST /v1/posts/:id/publish | client.posts.publish(id) | client.Posts.Publish(ctx, id) |
POST /v1/posts/:id/retry | client.posts.retry(id) | client.Posts.Retry(ctx, id) |
POST /v1/posts/:id/cancel | client.posts.cancel(id) | client.Posts.Cancel(ctx, id) |
POST /v1/posts/:id/clone | client.posts.clone(id) | client.Posts.Clone(ctx, id) |
POST /v1/posts/:id/platforms/:pid/fix | client.posts.fixPlatform(id, pid, params) | client.Posts.FixPlatform(ctx, id, pid, params) |
POST /v1/posts/validate | client.posts.validate(params) | client.Posts.Validate(ctx, params) |
POST /v1/posts/bulk | client.batch.createPosts(posts) | client.Batch.CreatePosts(ctx, posts) |
Accounts
| REST | TypeScript SDK | Go SDK |
|---|---|---|
GET /v1/accounts | client.accounts.list() | client.Accounts.List(ctx, params) |
GET /v1/accounts/:id | client.accounts.get(id) | client.Accounts.Get(ctx, id) |
POST /v1/accounts/connect/:platform | client.accounts.initiateConnect(platform, callbackUrl) | client.Accounts.InitiateConnect(ctx, platform, callbackUrl) |
POST /v1/accounts/callback/:platform | client.accounts.completeConnect(platform, code, state) | client.Accounts.CompleteConnect(ctx, platform, params) |
DELETE /v1/accounts/:id | client.accounts.delete(id) | client.Accounts.Delete(ctx, id) |
POST /v1/accounts/:id/refresh | client.accounts.refresh(id) | client.Accounts.Refresh(ctx, id) |
POST /v1/accounts/:id/test | client.accounts.test(id) | client.Accounts.Test(ctx, id) |
Media
| REST | TypeScript SDK | Go SDK |
|---|---|---|
POST /v1/media/upload | REST only — use raw fetch/requests for the S3 PUT step | client.Media.RequestUploadURL(ctx, params) |
GET /v1/media/:id | REST only | client.Media.Get(ctx, id) |
GET /v1/media | REST only | client.Media.List(ctx, params) |
DELETE /v1/media/:id | REST only | client.Media.Delete(ctx, id) |
POST /v1/media/register | REST only | REST only |
Webhooks
| REST | TypeScript SDK | Go SDK |
|---|---|---|
GET /v1/webhooks | client.webhooks.list() | client.Webhooks.List(ctx) |
POST /v1/webhooks | client.webhooks.create(params) | client.Webhooks.Create(ctx, params) |
GET /v1/webhooks/:id | client.webhooks.get(id) | client.Webhooks.Get(ctx, id) |
PATCH /v1/webhooks/:id | client.webhooks.update(id, params) | client.Webhooks.Update(ctx, id, params) |
DELETE /v1/webhooks/:id | client.webhooks.delete(id) | client.Webhooks.Delete(ctx, id) |
POST /v1/webhooks/test | client.webhooks.test(id) | client.Webhooks.Test(ctx, id) |
Analytics
All analytics endpoints are REST-only — the TypeScript SDK and Go SDK do not wrap analytics routes. Use raw fetch (TypeScript) or http.Get (Go) with your API key header.
| REST | TypeScript SDK | Go SDK |
|---|---|---|
GET /v1/analytics/posts/:id | REST only | REST only |
GET /v1/analytics/posts/:id/refresh | REST only | REST only |
GET /v1/analytics/accounts/:id | REST only | REST only |
POST /v1/analytics/accounts/:id/refresh | REST only | REST only |
GET /v1/analytics/aggregate | REST only | REST only |
GET /v1/analytics/overview | REST only | REST only |
GET /v1/analytics/timeseries | REST only | REST only |
GET /v1/analytics/account-timeseries | REST only | REST only |
GET /v1/analytics/posting-heatmap | REST only | REST only |
GET /v1/analytics/audience-growth | REST only | REST only |
GET /v1/analytics/content-decay | REST only | REST only |
GET /v1/analytics/hashtag-performance | REST only | REST only |
GET /v1/analytics/content-types | REST only | REST only |
GET /v1/analytics/insights | REST only | REST only |
GET /v1/analytics/publishing-calendar | REST only | REST only |
GET /v1/analytics/content-themes | REST only | REST only |
GET /v1/analytics/goals | REST only | REST only |
POST /v1/analytics/goals | REST only | REST only |
GET /v1/analytics/report-schedule | REST only | REST only |
POST /v1/analytics/report-schedule | REST only | REST only |
POST /v1/analytics/send-report | REST only | REST only |
Batch
| REST | TypeScript SDK | Go SDK |
|---|---|---|
POST /v1/batch (generic) | client.batch.execute(operations) | client.Batch.Execute(ctx, operations) |
POST /v1/posts/bulk (create posts) | client.batch.createPosts(posts) | client.Batch.CreatePosts(ctx, posts) |
GET /v1/batch/limits | REST only | REST only |
POST /v1/batch/async | REST only | REST only |
GET /v1/batch/async/:jobId | REST only | REST only |
GET /v1/batch/async | REST only | REST only |
Personas
| REST | TypeScript SDK | Go SDK |
|---|---|---|
GET /v1/personas | REST only | REST only |
GET /v1/personas/:id | REST only | REST only |
POST /v1/personas | REST only | REST only |
PATCH /v1/personas/:id | REST only | REST only |
DELETE /v1/personas/:id | REST only | REST only |
POST /v1/personas/:id/default | REST only | REST only |
POST /v1/personas/:id/duplicate | REST only | REST only |
POST /v1/personas/:id/modules | REST only | REST only |
GET /v1/personas/:id/accounts | REST only | REST only |
POST /v1/personas/:id/export | REST only | REST only |
POST /v1/personas/import | REST only | REST only |
Hashtag Sets
| REST | TypeScript SDK | Go SDK |
|---|---|---|
GET /v1/hashtag-sets | REST only | REST only |
GET /v1/hashtag-sets/:id | REST only | REST only |
POST /v1/hashtag-sets | REST only | REST only |
PATCH /v1/hashtag-sets/:id | REST only | REST only |
DELETE /v1/hashtag-sets/:id | REST only | REST only |
Contacts
| REST | TypeScript SDK | Go SDK |
|---|---|---|
GET /v1/contacts | client.contacts.list(params) | REST only |
GET /v1/contacts/:id | client.contacts.get(id) | REST only |
POST /v1/contacts | client.contacts.create(params) | REST only |
PATCH /v1/contacts/:id | client.contacts.update(id, params) | REST only |
DELETE /v1/contacts/:id | client.contacts.delete(id) | REST only |
POST /v1/contacts/:id/tags | REST only | REST only |
DELETE /v1/contacts/:id/tags/:tag | REST only | REST only |
Broadcasts
| REST | TypeScript SDK | Go SDK |
|---|---|---|
GET /v1/broadcasts | client.broadcasts.list(params) | REST only |
GET /v1/broadcasts/:id | client.broadcasts.get(id) | REST only |
POST /v1/broadcasts | client.broadcasts.create(params) | REST only |
PATCH /v1/broadcasts/:id | client.broadcasts.update(id, params) | REST only |
POST /v1/broadcasts/:id/send | client.broadcasts.send(id) | REST only |
GET /v1/broadcasts/:id/deliveries | REST only | REST only |
DELETE /v1/broadcasts/:id | client.broadcasts.delete(id) | REST only |
Sequences
| REST | TypeScript SDK | Go SDK |
|---|---|---|
GET /v1/sequences | client.sequences.list(params) | REST only |
GET /v1/sequences/:id | client.sequences.get(id) | REST only |
POST /v1/sequences | client.sequences.create(params) | REST only |
PATCH /v1/sequences/:id | client.sequences.update(id, params) | REST only |
DELETE /v1/sequences/:id | client.sequences.delete(id) | REST only |
GET /v1/sequences/:id/steps | REST only | REST only |
POST /v1/sequences/:id/steps | REST only | REST only |
PATCH /v1/sequences/:id/steps/:stepId | REST only | REST only |
DELETE /v1/sequences/:id/steps/:stepId | REST only | REST only |
GET /v1/sequences/:id/enrollments | REST only | REST only |
POST /v1/sequences/:id/enrollments | REST only | REST only |
DELETE /v1/sequences/:id/enrollments/:contactId | REST only | REST only |
Approval Workflows
| REST | TypeScript SDK | Go SDK |
|---|---|---|
GET /v1/approval-workflows | REST only | REST only |
POST /v1/approval-workflows | REST only | REST only |
PATCH /v1/approval-workflows/:id | REST only | REST only |
POST /v1/posts/:id/approval | REST only | REST only |
GET /v1/posts/:id/approval | REST only | REST only |
POST /v1/posts/:id/approval/approve | REST only | REST only |
POST /v1/posts/:id/approval/reject | REST only | REST only |
Image Generation Jobs
| REST | TypeScript SDK | Go SDK |
|---|---|---|
POST /v1/image-jobs | REST only | REST only |
GET /v1/image-jobs/:id | REST only | REST only |
GET /v1/image-jobs | REST only | REST only |
DELETE /v1/image-jobs/:id | REST only | REST only |
POST /v1/image-jobs/:id/retry-item | REST only | REST only |
Error class mapping
TypeScript SDK
| Class | HTTP status | API error code |
|---|---|---|
AuthenticationError | 401 | UNAUTHORIZED |
ValidationError | 400 / 422 | VALIDATION_ERROR |
NotFoundError | 404 | NOT_FOUND |
RateLimitError | 429 | RATE_LIMITED — includes .retryAfter seconds |
ConflictError | 409 | CONFLICT / IDEMPOTENCY_CONFLICT |
VoxBurstError | all others | base class — check .status and .code |
import { NotFoundError, RateLimitError, ValidationError, VoxBurstError } from '@voxburst/sdk'Go SDK
| Helper | HTTP status | When to use |
|---|---|---|
voxburst.IsNotFound(err) | 404 | Resource does not exist |
voxburst.IsUnauthorized(err) | 401 | Invalid or expired API key |
voxburst.IsRateLimited(err) | 429 | Too many requests |
voxburst.IsServerError(err) | 5xx | Transient server error — retry |
import "github.com/FortheanLabsProjects/voxburst-go/voxburst"SDK-only conveniences
These features are provided by the SDKs and have no direct REST equivalent:
| Feature | TypeScript | Go | Notes |
|---|---|---|---|
| Auto-pagination | client.posts.listAll() | client.Posts.ListAll() | Iterates all cursor pages automatically |
| Automatic retry on 429 | ✅ (maxRetries option) | ✅ (built-in) | Respects Retry-After header |
| Automatic retry on 5xx | ✅ | ✅ | Exponential backoff |
| Typed request/response shapes | ✅ | ✅ | All fields are typed |
| Typed error classes | ✅ | ✅ (helpers) | Branch on error type, not status code |
AbortSignal / context support | ✅ | ✅ (context.Context) | Cancel in-flight requests |
| Response streaming | ✗ | ✗ | Use raw HTTP for streaming use cases |
Using the REST API directly alongside an SDK
The SDKs and raw REST calls are fully interoperable — they share the same base URL, auth scheme, and resource IDs. A common pattern is to use the SDK for most operations and raw HTTP for the S3 upload step (which goes directly to S3, not through the VoxBurst API):
// SDK: request the upload URL
const { mediaId, uploadUrl, uploadHeaders } = await fetch('https://api.voxburst.io/v1/media/upload', {
method: 'POST',
headers: { 'Authorization': `Bearer ${apiKey}`, 'Content-Type': 'application/json' },
body: JSON.stringify({ filename: 'photo.jpg', contentType: 'image/jpeg', sizeBytes: 204800 }),
}).then(r => r.json())
// Raw HTTP: PUT bytes directly to S3 (SDK cannot do this step)
await fetch(uploadUrl, { method: 'PUT', headers: uploadHeaders, body: fileBytes })
// SDK: use the mediaId in a post
const post = await client.posts.create({ content: '...', accountIds: ['acc_123'], media: [mediaId] })