smartlyq

package module
v0.1.17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 12 Imported by: 0

README

SmartlyQ Go SDK

The official Go SDK for the SmartlyQ API - social posting and scheduling, AI content generation (articles, images, video, audio, presentations), SEO research, CRM, chatbots, and more, from one API key.

  • Zero dependencies - built on net/http and encoding/json only.
  • Batteries included - automatic retries with backoff, idempotency keys, request timeouts, typed errors.
  • Context aware - every method takes a context.Context for cancellation and deadlines.

Installation

go get github.com/SmartlyQ/smartlyq-go

Requires Go 1.22+.

Quickstart

package main

import (
	"context"
	"fmt"
	"log"
	"os"

	smartlyq "github.com/SmartlyQ/smartlyq-go"
)

func main() {
	client := smartlyq.NewClient(os.Getenv("SMARTLYQ_API_KEY"))
	ctx := context.Background()

	// Who am I?
	me, err := client.Account.GetMe(ctx, nil)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(string(me.Data))

	// Generate an image with AI
	image, err := client.Images.Generate(ctx, map[string]any{
		"prompt": "A minimalist product shot of a smart speaker",
	}, nil)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(string(image.Data))

	// Publish a social post
	post, err := client.Social.CreatePost(ctx, map[string]any{
		"text":        "Hello from the SmartlyQ SDK!",
		"account_ids": []string{"acc_123"},
	}, nil)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(string(post.Data))
}

Get an API key from your Developer Dashboard. Keys look like sqk_live_... (production) or sqk_test_... (sandbox - free simulated responses, no charges).

Configuration

client := smartlyq.NewClient(
	"sqk_live_xxxxxxxxxxxx", // or leave empty to use SMARTLYQ_API_KEY
	smartlyq.WithTimeout(60*time.Second),   // per-request timeout
	smartlyq.WithMaxRetries(2),             // automatic retries on 429/5xx
	smartlyq.WithBaseURL("https://api.smartlyq.com/v1"),
	smartlyq.WithHTTPClient(&http.Client{}),
)

Per-request options are accepted as the last argument of every method (pass nil for defaults):

post, err := client.Social.CreatePost(ctx, body, &smartlyq.RequestOptions{
	IdempotencyKey: "my-unique-key", // safe retries for writes
	ProfileID:      "prof_123",      // act on behalf of a managed Profile
})

Responses

Every method returns a *smartlyq.Envelope. The Data field is raw JSON so you can unmarshal it into your own types:

resp, err := client.Jobs.Get(ctx, "job_123", nil)
if err != nil {
	log.Fatal(err)
}

var job struct {
	Status string          `json:"status"`
	Result json.RawMessage `json:"result"`
}
if err := resp.UnmarshalData(&job); err != nil {
	log.Fatal(err)
}

Async jobs

Generation endpoints (articles, images, videos, audio) are asynchronous: they return a job. Poll it until it completes:

resp, _ := client.Videos.Generate(ctx, map[string]any{
	"prompt": "A 5s product teaser",
	"model":  "standard",
}, nil)

var gen struct {
	JobID string `json:"job_id"`
}
_ = resp.UnmarshalData(&gen)

for {
	jobResp, err := client.Jobs.Get(ctx, gen.JobID, nil)
	if err != nil {
		log.Fatal(err)
	}
	var job struct {
		Status string `json:"status"`
	}
	_ = jobResp.UnmarshalData(&job)
	if job.Status != "processing" && job.Status != "queued" {
		break
	}
	time.Sleep(3 * time.Second)
}

Error handling

Every non-2xx response returns a typed *smartlyq.APIError:

_, err := client.Articles.Generate(ctx, map[string]any{"topic": "AI trends"}, nil)
if err != nil {
	var apiErr *smartlyq.APIError
	if errors.As(err, &apiErr) {
		fmt.Println(apiErr.StatusCode, apiErr.Code, apiErr.Message, apiErr.RequestID)
	}
}

API Reference

All methods below are available on the client. Every method also accepts a trailing opts *smartlyq.RequestOptions argument (shown here as omitted - pass nil for defaults). Full request/response documentation lives at docs.smartlyq.com.

Account
Method Endpoint Description
client.Account.GetMe(ctx) GET /me Get current user profile
client.Account.GetMeUsage(ctx, query) GET /me/usage Get usage summary
client.Account.GetMeBalance(ctx) GET /me/balance Get wallet balance
client.Account.GetBilling(ctx) GET /me/billing Billing overview
AI Captain
Method Endpoint Description
client.Captain.SendMessage(ctx, body) POST /captain/messages Send AI Captain message
client.Captain.ListConversations(ctx, query) GET /captain/conversations List AI Captain conversations
client.Captain.GetConversation(ctx, conversationId) GET /captain/conversations/{conversation_id} Get AI Captain conversation
Analytics
Method Endpoint Description
client.Analytics.GetOverview(ctx, query) GET /analytics/overview Get analytics overview
client.Analytics.GetPosts(ctx, query) GET /analytics/posts Get post analytics
client.Analytics.GetAccount(ctx, accountId, query) GET /analytics/accounts/{account_id} Get account analytics
client.Analytics.DailyMetrics(ctx, query) GET /analytics/daily-metrics Daily metrics
client.Analytics.BestTime(ctx, query) GET /analytics/best-time Best time to post
client.Analytics.ContentDecay(ctx, query) GET /analytics/content-decay Content decay
client.Analytics.PostingFrequency(ctx, query) GET /analytics/posting-frequency Posting frequency vs engagement
client.Analytics.PostTimeline(ctx, postId) GET /analytics/posts/{post_id}/timeline Post metric timeline
client.Analytics.InboxVolume(ctx, query) GET /analytics/inbox/volume Inbox volume
client.Analytics.InboxHeatmap(ctx, query) GET /analytics/inbox/heatmap Inbox heatmap
client.Analytics.InboxSourceBreakdown(ctx, query) GET /analytics/inbox/source-breakdown Inbox source breakdown
client.Analytics.InboxResponseTime(ctx, query) GET /analytics/inbox/response-time Inbox response time
client.Analytics.InboxTopAccounts(ctx, query) GET /analytics/inbox/top-accounts Inbox top accounts
client.Analytics.InboxConversations(ctx, query) GET /analytics/inbox/conversations Inbox conversation stats
client.Analytics.InboxConversationDetail(ctx, conversationId) GET /analytics/inbox/conversations/{conversation_id} Conversation analytics
client.Analytics.GetYoutubeChannelInsights(ctx, query) GET /analytics/youtube/channel-insights YouTube channel insights
client.Analytics.GetYoutubeDailyViews(ctx, query) GET /analytics/youtube/daily-views YouTube daily views
client.Analytics.GetYoutubeVideoRetention(ctx, query) GET /analytics/youtube/video-retention YouTube audience retention
client.Analytics.GetYoutubeDemographics(ctx, query) GET /analytics/youtube/demographics YouTube viewer demographics
Articles
Method Endpoint Description
client.Articles.Generate(ctx, body) POST /articles/generate Generate article
client.Articles.List(ctx, query) GET /articles List articles
client.Articles.Get(ctx, articleId) GET /articles/{article_id} Get article
client.Articles.Delete(ctx, articleId) DELETE /articles/{article_id} Delete article
Audio
Method Endpoint Description
client.Audio.TextToSpeech(ctx, body) POST /audio/text-to-speech Text to speech
client.Audio.SpeechToText(ctx, body) POST /audio/speech-to-text Speech to text
client.Audio.Get(ctx, audioId) GET /audio/{audio_id} Get audio
Automations
Method Endpoint Description
client.Automations.List(ctx, query) GET /automations List automations
client.Automations.Get(ctx, automationId) GET /automations/{automation_id} Get automation
client.Automations.Activate(ctx, automationId) POST /automations/{automation_id}/activate Activate automation
client.Automations.Deactivate(ctx, automationId) POST /automations/{automation_id}/deactivate Pause automation
client.Automations.Trigger(ctx, automationId, body) POST /automations/{automation_id}/trigger Trigger automation
client.Automations.ListRuns(ctx, automationId, query) GET /automations/{automation_id}/runs List runs
client.Automations.GetRun(ctx, automationId, runId) GET /automations/{automation_id}/runs/{run_id} Get run
Chatbot
Method Endpoint Description
client.Chatbots.List(ctx, query) GET /chatbots List chatbots
client.Chatbots.Create(ctx, body) POST /chatbots Create chatbot
client.Chatbots.Get(ctx, id) GET /chatbots/{id} Get chatbot
client.Chatbots.Update(ctx, id, body) PATCH /chatbots/{id} Update chatbot
client.Chatbots.Delete(ctx, id) DELETE /chatbots/{id} Delete chatbot
client.Chatbots.Train(ctx, id) POST /chatbots/{id}/train Start chatbot training
client.Chatbots.GetTrainStatus(ctx, id) GET /chatbots/{id}/train-status Get chatbot training status
client.Chatbots.SendMessage(ctx, id, body) POST /chatbots/{id}/messages Send chatbot message
client.Chatbots.ListConversations(ctx, id, query) GET /chatbots/{id}/conversations List chatbot conversations
client.Chatbots.GetConversationMessages(ctx, id, convId) GET /chatbots/{id}/conversations/{conv_id}/messages Get conversation messages
Comments
Method Endpoint Description
client.Comments.List(ctx, query) GET /social/comments List comments
client.Comments.ReplyTo(ctx, commentId, body) POST /social/comments/{comment_id}/reply Reply to a comment
client.Comments.Hide(ctx, commentId) POST /social/comments/{comment_id}/hide Hide or unhide a comment
client.Comments.Delete(ctx, commentId) DELETE /social/comments/{comment_id} Delete a comment
client.Comments.GetPost(ctx, postId) GET /social/comments/{post_id} Get one post's comments (threaded)
Content
Method Endpoint Description
client.Content.Rewrite(ctx, body) POST /content/rewrite Rewrite content
client.Content.GenerateCaption(ctx, body) POST /content/caption Generate a social caption
CRM
Method Endpoint Description
client.CRM.DeleteContact(ctx, id) DELETE /contacts/{id} Delete contact
client.CRM.UpdateCustomField(ctx, id, body) PATCH /custom-fields/{id} Update custom field
client.CRM.BulkImportContacts(ctx, body) POST /contacts/bulk Bulk import contacts
client.CRM.ContactChannels(ctx, id) GET /contacts/{id}/channels Contact channels
CRM Contacts
Method Endpoint Description
client.Contacts.List(ctx, query) GET /contacts List contacts
client.Contacts.Create(ctx, body) POST /contacts Create or upsert a contact
client.Contacts.Get(ctx, id) GET /contacts/{id} Get a contact
client.Contacts.Update(ctx, id, body) PATCH /contacts/{id} Update a contact
client.Contacts.AddTags(ctx, id, body) POST /contacts/{id}/tags Add tags to a contact
client.Contacts.RemoveTags(ctx, id, body) DELETE /contacts/{id}/tags Remove tags from a contact
client.Contacts.ListNotes(ctx, id) GET /contacts/{id}/notes List contact notes
client.Contacts.AddNote(ctx, id, body) POST /contacts/{id}/notes Add a note to a contact
client.Contacts.Enroll(ctx, id, body) POST /contacts/{id}/enroll Enroll a contact in an automation
client.Contacts.AddMessage(ctx, id, body) POST /contacts/{id}/messages Log a message on a contact's timeline
client.Contacts.SetField(ctx, id, slug, body) PUT /contacts/{id}/fields/{slug} Set one custom field
client.Contacts.ClearField(ctx, id, slug) DELETE /contacts/{id}/fields/{slug} Clear one custom field
CRM Custom Fields
Method Endpoint Description
client.CustomFields.List(ctx) GET /custom-fields List custom fields
client.CustomFields.Create(ctx, body) POST /custom-fields Create a custom field
client.CustomFields.Delete(ctx, id) DELETE /custom-fields/{id} Delete a custom field
CRM Opportunities
Method Endpoint Description
client.Opportunities.ListPipelines(ctx) GET /pipelines List pipelines
client.Opportunities.CreatePipeline(ctx, body) POST /pipelines Create a pipeline
client.Opportunities.List(ctx, query) GET /opportunities List opportunities
client.Opportunities.Create(ctx, body) POST /opportunities Create an opportunity
client.Opportunities.Get(ctx, id) GET /opportunities/{id} Get an opportunity
client.Opportunities.Update(ctx, id, body) PATCH /opportunities/{id} Update an opportunity
client.Opportunities.Delete(ctx, id) DELETE /opportunities/{id} Delete an opportunity
client.Opportunities.UpdateStatus(ctx, id, body) POST /opportunities/{id}/status Update opportunity status
Direct Messages
Method Endpoint Description
client.Messages.ListConversations(ctx, query) GET /social/conversations List DM conversations
client.Messages.List(ctx, conversationId, query) GET /social/conversations/{conversation_id}/messages List messages in a conversation
client.Messages.Send(ctx, conversationId, body) POST /social/conversations/{conversation_id}/messages Send a direct message
client.Messages.MarkConversationRead(ctx, conversationId) POST /social/conversations/{conversation_id}/read Mark a conversation read
client.Messages.ReactTo(ctx, conversationId, messageId, body) POST /social/conversations/{conversation_id}/messages/{message_id}/reactions React to a message
client.Messages.RemoveReaction(ctx, conversationId, messageId) DELETE /social/conversations/{conversation_id}/messages/{message_id}/reactions Remove a message reaction
Images
Method Endpoint Description
client.Images.Generate(ctx, body) POST /images/generate Generate image
client.Images.List(ctx, query) GET /images List images
client.Images.Get(ctx, imageId) GET /images/{image_id} Get image
client.Images.Delete(ctx, imageId) DELETE /images/{image_id} Delete image
Jobs
Method Endpoint Description
client.Jobs.List(ctx, query) GET /jobs List jobs
client.Jobs.Get(ctx, jobId) GET /jobs/{job_id} Get job
client.Jobs.Cancel(ctx, jobId, body) POST /jobs/{job_id}/cancel Cancel job
Logs
Method Endpoint Description
client.Logs.List(ctx, query) GET /logs List developer logs
Media
Method Endpoint Description
client.Media.List(ctx, query) GET /media List media
client.Media.Get(ctx, mediaId) GET /media/{media_id} Get media
client.Media.Delete(ctx, mediaId) DELETE /media/{media_id} Delete media
client.Media.GetUploadUrl(ctx, body) POST /media/upload-url Get presigned upload URL
client.Media.UploadDirect(ctx, body) POST /media/upload-direct Upload a file directly
Presentations
Method Endpoint Description
client.Presentations.Generate(ctx, body) POST /presentations/generate Generate presentation
client.Presentations.List(ctx, query) GET /presentations List presentations
client.Presentations.Get(ctx, presentationId) GET /presentations/{presentation_id} Get presentation
client.Presentations.Delete(ctx, presentationId) DELETE /presentations/{presentation_id} Delete presentation
Profiles
Method Endpoint Description
client.Profiles.List(ctx, query) GET /profiles List profiles
client.Profiles.Create(ctx, body) POST /profiles Create a profile
client.Profiles.Get(ctx, id) GET /profiles/{id} Get a profile
client.Profiles.Update(ctx, id, body) PATCH /profiles/{id} Update a profile
client.Profiles.Delete(ctx, id, body) DELETE /profiles/{id} Delete a profile
client.Profiles.ListAccounts(ctx, id) GET /profiles/{id}/accounts List a profile's connected accounts
client.Profiles.Pause(ctx, id) POST /profiles/{id}/pause Pause a profile
client.Profiles.Resume(ctx, id) POST /profiles/{id}/resume Resume a profile
client.Profiles.CreateConnectLink(ctx, id, body) POST /profiles/{id}/connect-link Create a hosted connect link
client.Profiles.CreateConnectUrl(ctx, id, platform, body) POST /profiles/{id}/connect/{platform} Get a raw connect URL for one platform
client.Profiles.GetAccountBilling(ctx) GET /me/account-billing Account billing summary
Reviews
Method Endpoint Description
client.Reviews.List(ctx, query) GET /reviews List reviews
client.Reviews.ReplyTo(ctx, reviewId, body) POST /reviews/{review_id}/reply Reply to review
client.Reviews.DeleteReply(ctx, reviewId) DELETE /reviews/{review_id}/reply Delete review reply
client.Reviews.Sync(ctx, body) POST /reviews/sync Sync reviews
SEO
Method Endpoint Description
client.SEO.KeywordResearch(ctx, body) POST /seo/keyword-research Keyword research
client.SEO.Serp(ctx, body) POST /seo/serp Live SERP lookup
client.SEO.KeywordDifficulty(ctx, body) POST /seo/keyword-difficulty Keyword difficulty
client.SEO.RankedKeywords(ctx, body) POST /seo/ranked-keywords Ranked keywords (rank tracking)
client.SEO.DomainOverview(ctx, body) POST /seo/domain-overview Domain rank overview
client.SEO.Competitors(ctx, body) POST /seo/competitors Organic competitors
client.SEO.BacklinksSummary(ctx, body) POST /seo/backlinks-summary Backlink profile summary
client.SEO.Audit(ctx, body) POST /seo/audit On-page SEO audit
client.SEO.BacklinkProspects(ctx, body) POST /seo/backlink-prospects Backlink prospects (link gap)
client.SEO.ReferringDomains(ctx, body) POST /seo/referring-domains Referring domains
client.SEO.BacklinkAnchors(ctx, body) POST /seo/backlink-anchors Backlink anchors
client.SEO.SpamScore(ctx, body) POST /seo/spam-score Backlink spam score
client.SEO.RankHistory(ctx, body) POST /seo/rank-history Historical rank overview
client.SEO.SiteAudit(ctx, body) POST /seo/site-audit Deep site audit
client.SEO.BrandLookup(ctx, body) POST /seo/brand-lookup AI Visibility: brand lookup
client.SEO.PromptExplorer(ctx, body) POST /seo/prompt-explorer AI Visibility: prompt explorer
client.SEO.AiAudit(ctx, body) POST /seo/ai-audit AI Visibility Audit (async)
Shorts
Method Endpoint Description
client.Shorts.Generate(ctx, body) POST /shorts/generate Generate viral shorts from a long video
client.Shorts.List(ctx, query) GET /shorts List shorts jobs
client.Shorts.Get(ctx, uid) GET /shorts/{uid} Get shorts job + clips
Social
Method Endpoint Description
client.Social.ListAccounts(ctx) GET /social/accounts List social accounts
client.Social.ListPosts(ctx, query) GET /social/posts List social posts
client.Social.CreatePost(ctx, body) POST /social/posts Create post (publish immediately)
client.Social.SchedulePost(ctx, body) POST /social/posts/schedule Schedule post
client.Social.GetPost(ctx, postId) GET /social/posts/{post_id} Get social post
client.Social.UpdatePost(ctx, postId, body) PATCH /social/posts/{post_id} Update social post
client.Social.DeletePost(ctx, postId) DELETE /social/posts/{post_id} Delete social post
client.Social.UpdateAccount(ctx, accountId, body) PATCH /social/accounts/{account_id} Rename account
client.Social.DisconnectAccount(ctx, accountId) DELETE /social/accounts/{account_id} Disconnect a social account
client.Social.GetAccountHealth(ctx, accountId) GET /social/accounts/{account_id}/health Account health
client.Social.GetAccountReconnectUrl(ctx, accountId) GET /social/accounts/{account_id}/reconnect-url Account reconnect URL
client.Social.PauseAccount(ctx, accountId) POST /social/accounts/{account_id}/pause Pause posting to an account
client.Social.ResumeAccount(ctx, accountId) POST /social/accounts/{account_id}/resume Resume posting to an account
client.Social.RetryPost(ctx, postId, body) POST /social/posts/{post_id}/retry Retry publishing a post
client.Social.ConnectAccountStatus(ctx, platform) GET /social/connect/{platform} Poll headless connection status
client.Social.ConnectAccount(ctx, platform, body) POST /social/connect/{platform} Start headless account connection
client.Social.ListQueues(ctx) GET /social/queues List queues
client.Social.CreateQueue(ctx, body) POST /social/queues Create queue
client.Social.GetQueue(ctx, queueId) GET /social/queues/{queue_id} Get queue
client.Social.UpdateQueue(ctx, queueId, body) PUT /social/queues/{queue_id} Update queue
client.Social.DeleteQueue(ctx, queueId) DELETE /social/queues/{queue_id} Delete queue
client.Social.GetQueueNextSlot(ctx, queueId) GET /social/queues/{queue_id}/next-slot Get next open slot
client.Social.PreviewQueueSlots(ctx, queueId, query) GET /social/queues/{queue_id}/preview Preview upcoming slots
client.Social.UnpublishPost(ctx, postId, body) POST /social/posts/{post_id}/unpublish Unpublish post
client.Social.ValidatePost(ctx, body) POST /social/validate/post Validate post content
client.Social.ValidateMedia(ctx, body) POST /social/validate/media Validate media URL
client.Social.StopPostRecycle(ctx, postId) DELETE /social/posts/{post_id}/recycle Stop recycling
client.Social.BulkSchedulePosts(ctx, body) POST /social/posts/bulk Bulk schedule posts
client.Social.ValidateBulkBatch(ctx, body) POST /social/posts/bulk/validate Validate a bulk batch
client.Social.BulkAccountHealth(ctx) GET /social/accounts/health Bulk account health
client.Social.AccountFollowerStats(ctx, query) GET /social/accounts/follower-stats Follower stats
client.Social.TiktokCreatorInfo(ctx, accountId) GET /social/accounts/{account_id}/tiktok/creator-info TikTok creator info
client.Social.MoveAccount(ctx, accountId, body) POST /social/accounts/{account_id}/move Move account to profile
client.Social.ListAccountGroups(ctx) GET /social/account-groups List account groups
client.Social.CreateAccountGroup(ctx, body) POST /social/account-groups Create account group
client.Social.GetAccountGroup(ctx, groupId) GET /social/account-groups/{group_id} Get account group
client.Social.UpdateAccountGroup(ctx, groupId, body) PUT /social/account-groups/{group_id} Update account group
client.Social.DeleteAccountGroup(ctx, groupId) DELETE /social/account-groups/{group_id} Delete account group
client.Social.GetConversation(ctx, conversationId) GET /social/conversations/{conversation_id} Get conversation
client.Social.UpdateConversation(ctx, conversationId, body) PATCH /social/conversations/{conversation_id} Archive / reopen conversation
client.Social.SearchConversations(ctx, query) GET /social/conversations/search Search conversations
client.Social.PinterestBoards(ctx, accountId) GET /social/accounts/{account_id}/pinterest/boards Pinterest boards
client.Social.CreatePinterestBoard(ctx, accountId, body) POST /social/accounts/{account_id}/pinterest/boards Create a Pinterest board
client.Social.YoutubePlaylists(ctx, accountId) GET /social/accounts/{account_id}/youtube/playlists YouTube playlists
client.Social.InstagramPublishingLimit(ctx, accountId) GET /social/accounts/{account_id}/instagram/publishing-limit Instagram publishing limit
client.Social.GmbPerformance(ctx, accountId, query) GET /social/accounts/{account_id}/gmb/performance Google Business performance
client.Social.GmbSearchKeywords(ctx, accountId, query) GET /social/accounts/{account_id}/gmb/search-keywords Google Business search keywords
client.Social.RedditSearch(ctx, accountId, query) GET /social/accounts/{account_id}/reddit/search Reddit search
client.Social.RedditFeed(ctx, accountId, query) GET /social/accounts/{account_id}/reddit/feed Reddit feed
client.Social.RedditSubreddits(ctx, accountId) GET /social/accounts/{account_id}/reddit/subreddits Subscribed subreddits
client.Social.RedditSubredditRules(ctx, accountId, subreddit) GET /social/accounts/{account_id}/reddit/subreddits/{subreddit}/rules Subreddit rules
client.Social.InstagramStories(ctx, accountId) GET /social/accounts/{account_id}/instagram/stories Instagram stories
client.Social.FacebookPostReactions(ctx, accountId, query) GET /social/accounts/{account_id}/facebook/post-reactions Facebook post reactions
client.Social.InstagramStoryInsights(ctx, accountId, storyId, query) GET /social/accounts/{account_id}/instagram/stories/{story_id}/insights Instagram story insights
client.Social.XRetweet(ctx, accountId, body) POST /social/accounts/{account_id}/x/retweets Retweet on X
client.Social.XUnretweet(ctx, accountId, tweetId) DELETE /social/accounts/{account_id}/x/retweets/{tweet_id} Undo retweet
client.Social.EditPublishedPost(ctx, postId, body) POST /social/posts/{post_id}/edit Edit published post
client.Social.UpdatePostMetadata(ctx, postId, body) POST /social/posts/{post_id}/update-metadata Update YouTube metadata
client.Social.SyncExternalPosts(ctx, body) POST /social/posts/sync-external Sync external posts
client.Social.AccountInsights(ctx, accountId) GET /social/accounts/{account_id}/insights Live account insights
client.Social.GmbLocations(ctx, accountId, query) GET /social/accounts/{account_id}/gmb/locations List Google locations
client.Social.GmbLocation(ctx, accountId, query) GET /social/accounts/{account_id}/gmb/location Get business info
client.Social.GmbUpdateLocation(ctx, accountId, body) PATCH /social/accounts/{account_id}/gmb/location Update business info
client.Social.GmbAttributes(ctx, accountId) GET /social/accounts/{account_id}/gmb/attributes Get attributes
client.Social.GmbUpdateAttributes(ctx, accountId, body) PUT /social/accounts/{account_id}/gmb/attributes Update attributes
client.Social.GmbAttributeMetadata(ctx, accountId) GET /social/accounts/{account_id}/gmb/attributes/metadata Available attributes
client.Social.GmbMedia(ctx, accountId) GET /social/accounts/{account_id}/gmb/media List media
client.Social.GmbCreateMedia(ctx, accountId, body) POST /social/accounts/{account_id}/gmb/media Add photo
client.Social.GmbDeleteMedia(ctx, accountId, body) DELETE /social/accounts/{account_id}/gmb/media Delete media
client.Social.GmbFoodMenus(ctx, accountId) GET /social/accounts/{account_id}/gmb/food-menus Get food menus
client.Social.GmbUpdateFoodMenus(ctx, accountId, body) PUT /social/accounts/{account_id}/gmb/food-menus Update food menus
client.Social.GmbPlaceActions(ctx, accountId) GET /social/accounts/{account_id}/gmb/place-actions List place-action links
client.Social.GmbCreatePlaceAction(ctx, accountId, body) POST /social/accounts/{account_id}/gmb/place-actions Create place-action link
client.Social.GmbUpdatePlaceAction(ctx, accountId, body) PATCH /social/accounts/{account_id}/gmb/place-actions Update place-action link
client.Social.GmbDeletePlaceAction(ctx, accountId, body) DELETE /social/accounts/{account_id}/gmb/place-actions Delete place-action link
client.Social.GmbVerifications(ctx, accountId) GET /social/accounts/{account_id}/gmb/verifications List verifications
client.Social.GmbVerificationOptions(ctx, accountId, body) POST /social/accounts/{account_id}/gmb/verifications/options Verification options
client.Social.RedditSubredditInfo(ctx, accountId, subreddit) GET /social/accounts/{account_id}/reddit/subreddits/{subreddit} Subreddit info + eligibility
client.Social.XMentions(ctx, accountId, query) GET /social/accounts/{account_id}/x/mentions X mentions
client.Social.SendTypingIndicator(ctx, conversationId) POST /social/conversations/{conversation_id}/typing Typing indicator
client.Social.CommentPrivateReply(ctx, commentId, body) POST /social/comments/{comment_id}/private-reply Private reply (comment-to-DM)
client.Social.GetMessengerMenu(ctx, accountId) GET /social/accounts/{account_id}/messenger/menu Get Messenger menu
client.Social.SetMessengerMenu(ctx, accountId, body) PUT /social/accounts/{account_id}/messenger/menu Set Messenger menu
client.Social.DeleteMessengerMenu(ctx, accountId) DELETE /social/accounts/{account_id}/messenger/menu Delete Messenger menu
client.Social.GetIceBreakers(ctx, accountId) GET /social/accounts/{account_id}/instagram/ice-breakers Get ice breakers
client.Social.SetIceBreakers(ctx, accountId, body) PUT /social/accounts/{account_id}/instagram/ice-breakers Set ice breakers
client.Social.DeleteIceBreakers(ctx, accountId) DELETE /social/accounts/{account_id}/instagram/ice-breakers Delete ice breakers
client.Social.FacebookPageInsights(ctx, accountId, query) GET /social/accounts/{account_id}/facebook/page-insights Facebook page insights
client.Social.InstagramAudience(ctx, accountId, query) GET /social/accounts/{account_id}/instagram/audience Instagram audience demographics
client.Social.ConnectOptions(ctx, accountId) GET /social/accounts/{account_id}/connect-options Connection target options
client.Social.ConnectSelect(ctx, accountId, body) POST /social/accounts/{account_id}/connect-select Select connection target
client.Social.GetFacebookPage(ctx, accountId) GET /social/accounts/{account_id}/facebook/page Get Facebook page details
client.Social.UpdateFacebookPage(ctx, accountId, body) PATCH /social/accounts/{account_id}/facebook/page Update Facebook page details
client.Social.UpdateYoutubePlaylist(ctx, accountId, playlistId, body) PATCH /social/accounts/{account_id}/youtube/playlists/{playlist_id} Update a YouTube playlist
client.Social.ListMentions(ctx, accountId, query) GET /social/accounts/{account_id}/mentions List mentions
client.Social.ReplyToMention(ctx, accountId, mentionId, body) POST /social/accounts/{account_id}/mentions/{mention_id}/reply Reply to a mention
client.Social.ListRedditFlairs(ctx, accountId, subreddit) GET /social/accounts/{account_id}/reddit/subreddits/{subreddit}/flairs List subreddit post flairs
URLs
Method Endpoint Description
client.URLs.Shorten(ctx, body) POST /urls/shorten Shorten URL
client.URLs.List(ctx, query) GET /urls List short URLs
client.URLs.Get(ctx, urlId) GET /urls/{url_id} Get short URL
client.URLs.Delete(ctx, urlId) DELETE /urls/{url_id} Delete short URL
client.URLs.GetStats(ctx, urlId) GET /urls/{url_id}/stats Get short URL stats
client.URLs.UpdateShort(ctx, id, body) PATCH /urls/{id} Update a short URL
Videos
Method Endpoint Description
client.Videos.ListModels(ctx) GET /videos/models List available video models
client.Videos.Generate(ctx, body) POST /videos/generate Generate video
client.Videos.List(ctx, query) GET /videos List videos
client.Videos.Get(ctx, videoId) GET /videos/{video_id} Get video
client.Videos.Delete(ctx, videoId) DELETE /videos/{video_id} Delete video
client.Videos.GenerateHook(ctx, body) POST /videos/hook Generate a viral hook line
client.Videos.SuggestBroll(ctx, body) POST /videos/broll-suggest Suggest B-roll moments
client.Videos.SuggestEmphasis(ctx, body) POST /videos/emphasis Suggest on-screen emphasis
client.Videos.GenerateViralThumbnail(ctx, body) POST /videos/viral-thumbnail Generate a viral thumbnail
Webhooks
Method Endpoint Description
client.Webhooks.List(ctx) GET /webhooks List webhooks
client.Webhooks.Create(ctx, body) POST /webhooks Create webhook
client.Webhooks.Update(ctx, id, body) PUT /webhooks/{id} Update webhook
client.Webhooks.Delete(ctx, id) DELETE /webhooks/{id} Delete webhook
client.Webhooks.ListLogs(ctx, query) GET /webhooks/logs List webhook delivery logs
client.Webhooks.Test(ctx, id) POST /webhooks/{id}/test Send test webhook
client.Webhooks.ReplayDelivery(ctx, id) POST /webhooks/deliveries/{id}/replay Replay a webhook delivery
WhatsApp
Method Endpoint Description
client.WhatsApp.SendWhatsAppMessage(ctx, body) POST /whatsapp/messages Send a WhatsApp message
client.WhatsApp.ListWhatsAppTemplates(ctx, query) GET /whatsapp/templates List message templates
client.WhatsApp.CreateWhatsAppTemplate(ctx, body) POST /whatsapp/templates Create a message template
client.WhatsApp.GetWhatsAppBusinessProfile(ctx, query) GET /whatsapp/business-profile Get business profile
client.WhatsApp.UpdateWhatsAppBusinessProfile(ctx, body) PATCH /whatsapp/business-profile Update business profile
client.WhatsApp.ListWhatsAppPhoneNumbers(ctx, query) GET /whatsapp/phone-numbers List phone numbers
client.WhatsApp.GetTemplate(ctx, name, query) GET /whatsapp/templates/{name} Get a WhatsApp template
client.WhatsApp.UpdateTemplate(ctx, name, body) PATCH /whatsapp/templates/{name} Update a WhatsApp template
client.WhatsApp.DeleteTemplate(ctx, name, query) DELETE /whatsapp/templates/{name} Delete a WhatsApp template
client.WhatsApp.UpdateProfilePhoto(ctx, body) POST /whatsapp/business-profile/photo Set the WhatsApp profile photo
client.WhatsApp.GetDisplayName(ctx, query) GET /whatsapp/business-profile/display-name Get the WhatsApp display name
client.WhatsApp.UpdateDisplayName(ctx, body) POST /whatsapp/business-profile/display-name Request a WhatsApp display-name change
client.WhatsApp.ListTemplateLibrary(ctx, query) GET /whatsapp/template-library Browse the shared template library
client.WhatsApp.CreateTemplateFromLibrary(ctx, body) POST /whatsapp/templates/from-library Adopt a library template
Workspaces
Method Endpoint Description
client.Workspaces.List(ctx) GET /workspaces List workspaces (sub-accounts)
client.Workspaces.Create(ctx, body) POST /workspaces Create a workspace (sub-account)
client.Workspaces.BulkAction(ctx, body) POST /workspaces/bulk Bulk sub-account action
client.Workspaces.Get(ctx, id) GET /workspaces/{id} Get a workspace (sub-account)
client.Workspaces.Delete(ctx, id, body) DELETE /workspaces/{id} Delete a workspace (sub-account)
client.Workspaces.DisableSaas(ctx, id, body) POST /workspaces/{id}/disable-saas Disable SaaS mode for a workspace
client.Workspaces.Pause(ctx, id) POST /workspaces/{id}/pause Pause (suspend) a workspace
client.Workspaces.Resume(ctx, id) POST /workspaces/{id}/resume Resume a paused workspace
client.Workspaces.GetSubscription(ctx, id) GET /workspaces/{id}/subscription Get a sub-account's subscription
client.Workspaces.GetWallet(ctx, id) GET /workspaces/{id}/wallet Get a sub-account's wallet balance
client.Workspaces.ListSaasPlans(ctx) GET /saas/plans List SaaS plans
client.Workspaces.GetSaasPlan(ctx, id) GET /saas/plans/{id} Get a SaaS plan

Regeneration

This SDK is generated from the SmartlyQ OpenAPI spec. When the spec changes, CI regenerates the client, README, and tests, bumps the version, tags a release, and Go module proxies pick it up automatically.

License

MIT

Documentation

Overview

Package smartlyq is the official Go SDK for the SmartlyQ API.

The HTTP core in this file is hand-written; the resource surface in resources_gen.go is generated from openapi.json by scripts/generate.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIError

type APIError struct {
	StatusCode int
	Code       string
	Message    string
	RequestID  string
}

APIError is returned for any non-2xx API response.

func (*APIError) Error

func (e *APIError) Error() string

Error implements the error interface.

type AccountResource

type AccountResource struct {
	// contains filtered or unexported fields
}

AccountResource groups the Account endpoints.

func (*AccountResource) GetBilling added in v0.1.12

func (r *AccountResource) GetBilling(ctx context.Context, opts *RequestOptions) (*Envelope, error)

GetBilling - Billing overview.

GET /me/billing

func (*AccountResource) GetMe

func (r *AccountResource) GetMe(ctx context.Context, opts *RequestOptions) (*Envelope, error)

GetMe - Get current user profile.

GET /me

func (*AccountResource) GetMeBalance

func (r *AccountResource) GetMeBalance(ctx context.Context, opts *RequestOptions) (*Envelope, error)

GetMeBalance - Get wallet balance.

GET /me/balance

func (*AccountResource) GetMeUsage

func (r *AccountResource) GetMeUsage(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

GetMeUsage - Get usage summary.

GET /me/usage

type AnalyticsResource

type AnalyticsResource struct {
	// contains filtered or unexported fields
}

AnalyticsResource groups the Analytics endpoints.

func (*AnalyticsResource) BestTime added in v0.1.1

func (r *AnalyticsResource) BestTime(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

BestTime - Best time to post.

GET /analytics/best-time

func (*AnalyticsResource) ContentDecay added in v0.1.1

func (r *AnalyticsResource) ContentDecay(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

ContentDecay - Content decay.

GET /analytics/content-decay

func (*AnalyticsResource) DailyMetrics added in v0.1.1

func (r *AnalyticsResource) DailyMetrics(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

DailyMetrics - Daily metrics.

GET /analytics/daily-metrics

func (*AnalyticsResource) GetAccount

func (r *AnalyticsResource) GetAccount(ctx context.Context, accountId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

GetAccount - Get account analytics.

GET /analytics/accounts/{account_id}

func (*AnalyticsResource) GetOverview

func (r *AnalyticsResource) GetOverview(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

GetOverview - Get analytics overview.

GET /analytics/overview

func (*AnalyticsResource) GetPosts

func (r *AnalyticsResource) GetPosts(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

GetPosts - Get post analytics.

GET /analytics/posts

func (*AnalyticsResource) GetYoutubeChannelInsights added in v0.1.16

func (r *AnalyticsResource) GetYoutubeChannelInsights(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

GetYoutubeChannelInsights - YouTube channel insights.

GET /analytics/youtube/channel-insights

func (*AnalyticsResource) GetYoutubeDailyViews added in v0.1.16

func (r *AnalyticsResource) GetYoutubeDailyViews(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

GetYoutubeDailyViews - YouTube daily views.

GET /analytics/youtube/daily-views

func (*AnalyticsResource) GetYoutubeDemographics added in v0.1.16

func (r *AnalyticsResource) GetYoutubeDemographics(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

GetYoutubeDemographics - YouTube viewer demographics.

GET /analytics/youtube/demographics

func (*AnalyticsResource) GetYoutubeVideoRetention added in v0.1.16

func (r *AnalyticsResource) GetYoutubeVideoRetention(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

GetYoutubeVideoRetention - YouTube audience retention.

GET /analytics/youtube/video-retention

func (*AnalyticsResource) InboxConversationDetail added in v0.1.2

func (r *AnalyticsResource) InboxConversationDetail(ctx context.Context, conversationId string, opts *RequestOptions) (*Envelope, error)

InboxConversationDetail - Conversation analytics.

GET /analytics/inbox/conversations/{conversation_id}

func (*AnalyticsResource) InboxConversations added in v0.1.2

func (r *AnalyticsResource) InboxConversations(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

InboxConversations - Inbox conversation stats.

GET /analytics/inbox/conversations

func (*AnalyticsResource) InboxHeatmap added in v0.1.2

func (r *AnalyticsResource) InboxHeatmap(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

InboxHeatmap - Inbox heatmap.

GET /analytics/inbox/heatmap

func (*AnalyticsResource) InboxResponseTime added in v0.1.2

func (r *AnalyticsResource) InboxResponseTime(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

InboxResponseTime - Inbox response time.

GET /analytics/inbox/response-time

func (*AnalyticsResource) InboxSourceBreakdown added in v0.1.2

func (r *AnalyticsResource) InboxSourceBreakdown(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

InboxSourceBreakdown - Inbox source breakdown.

GET /analytics/inbox/source-breakdown

func (*AnalyticsResource) InboxTopAccounts added in v0.1.2

func (r *AnalyticsResource) InboxTopAccounts(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

InboxTopAccounts - Inbox top accounts.

GET /analytics/inbox/top-accounts

func (*AnalyticsResource) InboxVolume added in v0.1.2

func (r *AnalyticsResource) InboxVolume(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

InboxVolume - Inbox volume.

GET /analytics/inbox/volume

func (*AnalyticsResource) PostTimeline added in v0.1.1

func (r *AnalyticsResource) PostTimeline(ctx context.Context, postId string, opts *RequestOptions) (*Envelope, error)

PostTimeline - Post metric timeline.

GET /analytics/posts/{post_id}/timeline

func (*AnalyticsResource) PostingFrequency added in v0.1.1

func (r *AnalyticsResource) PostingFrequency(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

PostingFrequency - Posting frequency vs engagement.

GET /analytics/posting-frequency

type ArticlesResource

type ArticlesResource struct {
	// contains filtered or unexported fields
}

ArticlesResource groups the Articles endpoints.

func (*ArticlesResource) Delete

func (r *ArticlesResource) Delete(ctx context.Context, articleId string, opts *RequestOptions) (*Envelope, error)

Delete - Delete article.

DELETE /articles/{article_id}

func (*ArticlesResource) Generate

func (r *ArticlesResource) Generate(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Generate - Generate article.

POST /articles/generate

func (*ArticlesResource) Get

func (r *ArticlesResource) Get(ctx context.Context, articleId string, opts *RequestOptions) (*Envelope, error)

Get - Get article.

GET /articles/{article_id}

func (*ArticlesResource) List

func (r *ArticlesResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List articles.

GET /articles

type AudioResource

type AudioResource struct {
	// contains filtered or unexported fields
}

AudioResource groups the Audio endpoints.

func (*AudioResource) Get

func (r *AudioResource) Get(ctx context.Context, audioId string, opts *RequestOptions) (*Envelope, error)

Get - Get audio.

GET /audio/{audio_id}

func (*AudioResource) SpeechToText

func (r *AudioResource) SpeechToText(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

SpeechToText - Speech to text.

POST /audio/speech-to-text

func (*AudioResource) TextToSpeech

func (r *AudioResource) TextToSpeech(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

TextToSpeech - Text to speech.

POST /audio/text-to-speech

type AutomationsResource added in v0.1.2

type AutomationsResource struct {
	// contains filtered or unexported fields
}

AutomationsResource groups the Automations endpoints.

func (*AutomationsResource) Activate added in v0.1.2

func (r *AutomationsResource) Activate(ctx context.Context, automationId string, opts *RequestOptions) (*Envelope, error)

Activate - Activate automation.

POST /automations/{automation_id}/activate

func (*AutomationsResource) Deactivate added in v0.1.2

func (r *AutomationsResource) Deactivate(ctx context.Context, automationId string, opts *RequestOptions) (*Envelope, error)

Deactivate - Pause automation.

POST /automations/{automation_id}/deactivate

func (*AutomationsResource) Get added in v0.1.2

func (r *AutomationsResource) Get(ctx context.Context, automationId string, opts *RequestOptions) (*Envelope, error)

Get - Get automation.

GET /automations/{automation_id}

func (*AutomationsResource) GetRun added in v0.1.2

func (r *AutomationsResource) GetRun(ctx context.Context, automationId string, runId string, opts *RequestOptions) (*Envelope, error)

GetRun - Get run.

GET /automations/{automation_id}/runs/{run_id}

func (*AutomationsResource) List added in v0.1.2

func (r *AutomationsResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List automations.

GET /automations

func (*AutomationsResource) ListRuns added in v0.1.2

func (r *AutomationsResource) ListRuns(ctx context.Context, automationId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

ListRuns - List runs.

GET /automations/{automation_id}/runs

func (*AutomationsResource) Trigger added in v0.1.2

func (r *AutomationsResource) Trigger(ctx context.Context, automationId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

Trigger - Trigger automation.

POST /automations/{automation_id}/trigger

type CRMResource added in v0.1.2

type CRMResource struct {
	// contains filtered or unexported fields
}

CRMResource groups the CRM endpoints.

func (*CRMResource) BulkImportContacts added in v0.1.2

func (r *CRMResource) BulkImportContacts(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

BulkImportContacts - Bulk import contacts.

POST /contacts/bulk

func (*CRMResource) ContactChannels added in v0.1.6

func (r *CRMResource) ContactChannels(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

ContactChannels - Contact channels.

GET /contacts/{id}/channels

func (*CRMResource) DeleteContact added in v0.1.2

func (r *CRMResource) DeleteContact(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

DeleteContact - Delete contact.

DELETE /contacts/{id}

func (*CRMResource) UpdateCustomField added in v0.1.6

func (r *CRMResource) UpdateCustomField(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdateCustomField - Update custom field.

PATCH /custom-fields/{id}

type CaptainResource

type CaptainResource struct {
	// contains filtered or unexported fields
}

CaptainResource groups the AI Captain endpoints.

func (*CaptainResource) GetConversation

func (r *CaptainResource) GetConversation(ctx context.Context, conversationId string, opts *RequestOptions) (*Envelope, error)

GetConversation - Get AI Captain conversation.

GET /captain/conversations/{conversation_id}

func (*CaptainResource) ListConversations

func (r *CaptainResource) ListConversations(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

ListConversations - List AI Captain conversations.

GET /captain/conversations

func (*CaptainResource) SendMessage

func (r *CaptainResource) SendMessage(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

SendMessage - Send AI Captain message.

POST /captain/messages

type ChatbotsResource

type ChatbotsResource struct {
	// contains filtered or unexported fields
}

ChatbotsResource groups the Chatbot endpoints.

func (*ChatbotsResource) Create

func (r *ChatbotsResource) Create(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Create - Create chatbot.

POST /chatbots

func (*ChatbotsResource) Delete

func (r *ChatbotsResource) Delete(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

Delete - Delete chatbot.

DELETE /chatbots/{id}

func (*ChatbotsResource) Get

func (r *ChatbotsResource) Get(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

Get - Get chatbot.

GET /chatbots/{id}

func (*ChatbotsResource) GetConversationMessages

func (r *ChatbotsResource) GetConversationMessages(ctx context.Context, id string, convId string, opts *RequestOptions) (*Envelope, error)

GetConversationMessages - Get conversation messages.

GET /chatbots/{id}/conversations/{conv_id}/messages

func (*ChatbotsResource) GetTrainStatus

func (r *ChatbotsResource) GetTrainStatus(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

GetTrainStatus - Get chatbot training status.

GET /chatbots/{id}/train-status

func (*ChatbotsResource) List

func (r *ChatbotsResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List chatbots.

GET /chatbots

func (*ChatbotsResource) ListConversations

func (r *ChatbotsResource) ListConversations(ctx context.Context, id string, query map[string]string, opts *RequestOptions) (*Envelope, error)

ListConversations - List chatbot conversations.

GET /chatbots/{id}/conversations

func (*ChatbotsResource) SendMessage

func (r *ChatbotsResource) SendMessage(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

SendMessage - Send chatbot message.

POST /chatbots/{id}/messages

func (*ChatbotsResource) Train

func (r *ChatbotsResource) Train(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

Train - Start chatbot training.

POST /chatbots/{id}/train

func (*ChatbotsResource) Update

func (r *ChatbotsResource) Update(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

Update - Update chatbot.

PATCH /chatbots/{id}

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is the SmartlyQ API client. Construct it with NewClient and access endpoints through its resource fields, e.g. client.Social.CreatePost(...).

func NewClient

func NewClient(apiKey string, opts ...Option) *Client

NewClient returns a SmartlyQ API client. Pass your API key ("sqk_live_..." or "sqk_test_..."); if apiKey is empty the SMARTLYQ_API_KEY environment variable is used.

type CommentsResource

type CommentsResource struct {
	// contains filtered or unexported fields
}

CommentsResource groups the Comments endpoints.

func (*CommentsResource) Delete

func (r *CommentsResource) Delete(ctx context.Context, commentId string, opts *RequestOptions) (*Envelope, error)

Delete - Delete a comment.

DELETE /social/comments/{comment_id}

func (*CommentsResource) GetPost added in v0.1.12

func (r *CommentsResource) GetPost(ctx context.Context, postId string, opts *RequestOptions) (*Envelope, error)

GetPost - Get one post's comments (threaded).

GET /social/comments/{post_id}

func (*CommentsResource) Hide

func (r *CommentsResource) Hide(ctx context.Context, commentId string, opts *RequestOptions) (*Envelope, error)

Hide - Hide or unhide a comment.

POST /social/comments/{comment_id}/hide

func (*CommentsResource) List

func (r *CommentsResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List comments.

GET /social/comments

func (*CommentsResource) ReplyTo

func (r *CommentsResource) ReplyTo(ctx context.Context, commentId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

ReplyTo - Reply to a comment.

POST /social/comments/{comment_id}/reply

type ContactsResource

type ContactsResource struct {
	// contains filtered or unexported fields
}

ContactsResource groups the CRM Contacts endpoints.

func (*ContactsResource) AddMessage

func (r *ContactsResource) AddMessage(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

AddMessage - Log a message on a contact's timeline.

POST /contacts/{id}/messages

func (*ContactsResource) AddNote

func (r *ContactsResource) AddNote(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

AddNote - Add a note to a contact.

POST /contacts/{id}/notes

func (*ContactsResource) AddTags

func (r *ContactsResource) AddTags(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

AddTags - Add tags to a contact.

POST /contacts/{id}/tags

func (*ContactsResource) ClearField added in v0.1.12

func (r *ContactsResource) ClearField(ctx context.Context, id string, slug string, opts *RequestOptions) (*Envelope, error)

ClearField - Clear one custom field.

DELETE /contacts/{id}/fields/{slug}

func (*ContactsResource) Create

func (r *ContactsResource) Create(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Create - Create or upsert a contact.

POST /contacts

func (*ContactsResource) Enroll

func (r *ContactsResource) Enroll(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

Enroll - Enroll a contact in an automation.

POST /contacts/{id}/enroll

func (*ContactsResource) Get

func (r *ContactsResource) Get(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

Get - Get a contact.

GET /contacts/{id}

func (*ContactsResource) List

func (r *ContactsResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List contacts.

GET /contacts

func (*ContactsResource) ListNotes

func (r *ContactsResource) ListNotes(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

ListNotes - List contact notes.

GET /contacts/{id}/notes

func (*ContactsResource) RemoveTags

func (r *ContactsResource) RemoveTags(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

RemoveTags - Remove tags from a contact.

DELETE /contacts/{id}/tags

func (*ContactsResource) SetField added in v0.1.12

func (r *ContactsResource) SetField(ctx context.Context, id string, slug string, body map[string]any, opts *RequestOptions) (*Envelope, error)

SetField - Set one custom field.

PUT /contacts/{id}/fields/{slug}

func (*ContactsResource) Update

func (r *ContactsResource) Update(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

Update - Update a contact.

PATCH /contacts/{id}

type ContentResource

type ContentResource struct {
	// contains filtered or unexported fields
}

ContentResource groups the Content endpoints.

func (*ContentResource) GenerateCaption

func (r *ContentResource) GenerateCaption(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

GenerateCaption - Generate a social caption.

POST /content/caption

func (*ContentResource) Rewrite

func (r *ContentResource) Rewrite(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Rewrite - Rewrite content.

POST /content/rewrite

type CustomFieldsResource

type CustomFieldsResource struct {
	// contains filtered or unexported fields
}

CustomFieldsResource groups the CRM Custom Fields endpoints.

func (*CustomFieldsResource) Create

func (r *CustomFieldsResource) Create(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Create - Create a custom field.

POST /custom-fields

func (*CustomFieldsResource) Delete

func (r *CustomFieldsResource) Delete(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

Delete - Delete a custom field.

DELETE /custom-fields/{id}

func (*CustomFieldsResource) List

List - List custom fields.

GET /custom-fields

type Envelope

type Envelope struct {
	Success    bool            `json:"success"`
	Data       json.RawMessage `json:"data,omitempty"`
	Usage      *Usage          `json:"usage,omitempty"`
	Meta       *Meta           `json:"meta,omitempty"`
	Pagination *Pagination     `json:"pagination,omitempty"`
}

Envelope is the standard SmartlyQ response envelope. Data is left raw so callers can unmarshal it into their own types with UnmarshalData.

func (*Envelope) UnmarshalData

func (e *Envelope) UnmarshalData(v any) error

UnmarshalData unmarshals the envelope's data payload into v.

type ImagesResource

type ImagesResource struct {
	// contains filtered or unexported fields
}

ImagesResource groups the Images endpoints.

func (*ImagesResource) Delete

func (r *ImagesResource) Delete(ctx context.Context, imageId string, opts *RequestOptions) (*Envelope, error)

Delete - Delete image.

DELETE /images/{image_id}

func (*ImagesResource) Generate

func (r *ImagesResource) Generate(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Generate - Generate image.

POST /images/generate

func (*ImagesResource) Get

func (r *ImagesResource) Get(ctx context.Context, imageId string, opts *RequestOptions) (*Envelope, error)

Get - Get image.

GET /images/{image_id}

func (*ImagesResource) List

func (r *ImagesResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List images.

GET /images

type JobsResource

type JobsResource struct {
	// contains filtered or unexported fields
}

JobsResource groups the Jobs endpoints.

func (*JobsResource) Cancel

func (r *JobsResource) Cancel(ctx context.Context, jobId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

Cancel - Cancel job.

POST /jobs/{job_id}/cancel

func (*JobsResource) Get

func (r *JobsResource) Get(ctx context.Context, jobId string, opts *RequestOptions) (*Envelope, error)

Get - Get job.

GET /jobs/{job_id}

func (*JobsResource) List

func (r *JobsResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List jobs.

GET /jobs

type LogsResource added in v0.1.16

type LogsResource struct {
	// contains filtered or unexported fields
}

LogsResource groups the Logs endpoints.

func (*LogsResource) List added in v0.1.16

func (r *LogsResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List developer logs.

GET /logs

type MediaResource

type MediaResource struct {
	// contains filtered or unexported fields
}

MediaResource groups the Media endpoints.

func (*MediaResource) Delete

func (r *MediaResource) Delete(ctx context.Context, mediaId string, opts *RequestOptions) (*Envelope, error)

Delete - Delete media.

DELETE /media/{media_id}

func (*MediaResource) Get

func (r *MediaResource) Get(ctx context.Context, mediaId string, opts *RequestOptions) (*Envelope, error)

Get - Get media.

GET /media/{media_id}

func (*MediaResource) GetUploadUrl

func (r *MediaResource) GetUploadUrl(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

GetUploadUrl - Get presigned upload URL.

POST /media/upload-url

func (*MediaResource) List

func (r *MediaResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List media.

GET /media

func (*MediaResource) UploadDirect added in v0.1.11

func (r *MediaResource) UploadDirect(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

UploadDirect - Upload a file directly.

POST /media/upload-direct

type MessagesResource

type MessagesResource struct {
	// contains filtered or unexported fields
}

MessagesResource groups the Direct Messages endpoints.

func (*MessagesResource) List

func (r *MessagesResource) List(ctx context.Context, conversationId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List messages in a conversation.

GET /social/conversations/{conversation_id}/messages

func (*MessagesResource) ListConversations

func (r *MessagesResource) ListConversations(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

ListConversations - List DM conversations.

GET /social/conversations

func (*MessagesResource) MarkConversationRead

func (r *MessagesResource) MarkConversationRead(ctx context.Context, conversationId string, opts *RequestOptions) (*Envelope, error)

MarkConversationRead - Mark a conversation read.

POST /social/conversations/{conversation_id}/read

func (*MessagesResource) ReactTo added in v0.1.16

func (r *MessagesResource) ReactTo(ctx context.Context, conversationId string, messageId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

ReactTo - React to a message.

POST /social/conversations/{conversation_id}/messages/{message_id}/reactions

func (*MessagesResource) RemoveReaction added in v0.1.16

func (r *MessagesResource) RemoveReaction(ctx context.Context, conversationId string, messageId string, opts *RequestOptions) (*Envelope, error)

RemoveReaction - Remove a message reaction.

DELETE /social/conversations/{conversation_id}/messages/{message_id}/reactions

func (*MessagesResource) Send

func (r *MessagesResource) Send(ctx context.Context, conversationId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

Send - Send a direct message.

POST /social/conversations/{conversation_id}/messages

type Meta

type Meta struct {
	RequestID string `json:"request_id,omitempty"`
	Timestamp string `json:"timestamp,omitempty"`
}

Meta carries response metadata.

type OpportunitiesResource

type OpportunitiesResource struct {
	// contains filtered or unexported fields
}

OpportunitiesResource groups the CRM Opportunities endpoints.

func (*OpportunitiesResource) Create

func (r *OpportunitiesResource) Create(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Create - Create an opportunity.

POST /opportunities

func (*OpportunitiesResource) CreatePipeline

func (r *OpportunitiesResource) CreatePipeline(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

CreatePipeline - Create a pipeline.

POST /pipelines

func (*OpportunitiesResource) Delete

Delete - Delete an opportunity.

DELETE /opportunities/{id}

func (*OpportunitiesResource) Get

Get - Get an opportunity.

GET /opportunities/{id}

func (*OpportunitiesResource) List

func (r *OpportunitiesResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List opportunities.

GET /opportunities

func (*OpportunitiesResource) ListPipelines

func (r *OpportunitiesResource) ListPipelines(ctx context.Context, opts *RequestOptions) (*Envelope, error)

ListPipelines - List pipelines.

GET /pipelines

func (*OpportunitiesResource) Update

func (r *OpportunitiesResource) Update(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

Update - Update an opportunity.

PATCH /opportunities/{id}

func (*OpportunitiesResource) UpdateStatus

func (r *OpportunitiesResource) UpdateStatus(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdateStatus - Update opportunity status.

POST /opportunities/{id}/status

type Option

type Option func(*Client)

Option configures a Client.

func WithBaseURL

func WithBaseURL(baseURL string) Option

WithBaseURL overrides the API base URL (default https://api.smartlyq.com/v1).

func WithHTTPClient

func WithHTTPClient(httpClient *http.Client) Option

WithHTTPClient sets a custom *http.Client for all requests.

func WithMaxRetries

func WithMaxRetries(maxRetries int) Option

WithMaxRetries sets the number of automatic retries on 429/5xx responses (default 2). Zero disables retries.

func WithTimeout

func WithTimeout(timeout time.Duration) Option

WithTimeout sets the per-request timeout (default 60s). Zero disables it.

type Pagination

type Pagination struct {
	Page    int `json:"page,omitempty"`
	PerPage int `json:"per_page,omitempty"`
	Total   int `json:"total,omitempty"`
	Pages   int `json:"pages,omitempty"`
}

Pagination describes list pagination.

type PresentationsResource

type PresentationsResource struct {
	// contains filtered or unexported fields
}

PresentationsResource groups the Presentations endpoints.

func (*PresentationsResource) Delete

func (r *PresentationsResource) Delete(ctx context.Context, presentationId string, opts *RequestOptions) (*Envelope, error)

Delete - Delete presentation.

DELETE /presentations/{presentation_id}

func (*PresentationsResource) Generate

func (r *PresentationsResource) Generate(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Generate - Generate presentation.

POST /presentations/generate

func (*PresentationsResource) Get

func (r *PresentationsResource) Get(ctx context.Context, presentationId string, opts *RequestOptions) (*Envelope, error)

Get - Get presentation.

GET /presentations/{presentation_id}

func (*PresentationsResource) List

func (r *PresentationsResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List presentations.

GET /presentations

type ProfilesResource

type ProfilesResource struct {
	// contains filtered or unexported fields
}

ProfilesResource groups the Profiles endpoints.

func (*ProfilesResource) Create

func (r *ProfilesResource) Create(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Create - Create a profile.

POST /profiles

func (r *ProfilesResource) CreateConnectLink(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

CreateConnectLink - Create a hosted connect link.

POST /profiles/{id}/connect-link

func (*ProfilesResource) CreateConnectUrl

func (r *ProfilesResource) CreateConnectUrl(ctx context.Context, id string, platform string, body map[string]any, opts *RequestOptions) (*Envelope, error)

CreateConnectUrl - Get a raw connect URL for one platform.

POST /profiles/{id}/connect/{platform}

func (*ProfilesResource) Delete

func (r *ProfilesResource) Delete(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

Delete - Delete a profile.

DELETE /profiles/{id}

func (*ProfilesResource) Get

func (r *ProfilesResource) Get(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

Get - Get a profile.

GET /profiles/{id}

func (*ProfilesResource) GetAccountBilling

func (r *ProfilesResource) GetAccountBilling(ctx context.Context, opts *RequestOptions) (*Envelope, error)

GetAccountBilling - Account billing summary.

GET /me/account-billing

func (*ProfilesResource) List

func (r *ProfilesResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List profiles.

GET /profiles

func (*ProfilesResource) ListAccounts

func (r *ProfilesResource) ListAccounts(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

ListAccounts - List a profile's connected accounts.

GET /profiles/{id}/accounts

func (*ProfilesResource) Pause

func (r *ProfilesResource) Pause(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

Pause - Pause a profile.

POST /profiles/{id}/pause

func (*ProfilesResource) Resume

func (r *ProfilesResource) Resume(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

Resume - Resume a profile.

POST /profiles/{id}/resume

func (*ProfilesResource) Update added in v0.1.11

func (r *ProfilesResource) Update(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

Update - Update a profile.

PATCH /profiles/{id}

type RequestOptions

type RequestOptions struct {
	// ProfileID acts on behalf of a managed Profile (sent as X-Profile-Id).
	ProfileID string
	// IdempotencyKey makes write requests safe to retry (sent as Idempotency-Key).
	IdempotencyKey string
	// Headers are extra headers merged into the request.
	Headers map[string]string
}

RequestOptions carries per-request options, passed as the last argument of every method. A nil *RequestOptions is valid and means defaults.

type Response

type Response = Envelope

Response is an alias for Envelope.

type ReviewsResource added in v0.1.2

type ReviewsResource struct {
	// contains filtered or unexported fields
}

ReviewsResource groups the Reviews endpoints.

func (*ReviewsResource) DeleteReply added in v0.1.4

func (r *ReviewsResource) DeleteReply(ctx context.Context, reviewId string, opts *RequestOptions) (*Envelope, error)

DeleteReply - Delete review reply.

DELETE /reviews/{review_id}/reply

func (*ReviewsResource) List added in v0.1.2

func (r *ReviewsResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List reviews.

GET /reviews

func (*ReviewsResource) ReplyTo added in v0.1.2

func (r *ReviewsResource) ReplyTo(ctx context.Context, reviewId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

ReplyTo - Reply to review.

POST /reviews/{review_id}/reply

func (*ReviewsResource) Sync added in v0.1.2

func (r *ReviewsResource) Sync(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Sync - Sync reviews.

POST /reviews/sync

type SEOResource

type SEOResource struct {
	// contains filtered or unexported fields
}

SEOResource groups the SEO endpoints.

func (*SEOResource) AiAudit

func (r *SEOResource) AiAudit(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

AiAudit - AI Visibility Audit (async).

POST /seo/ai-audit

func (*SEOResource) Audit

func (r *SEOResource) Audit(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Audit - On-page SEO audit.

POST /seo/audit

func (*SEOResource) BacklinkAnchors

func (r *SEOResource) BacklinkAnchors(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

BacklinkAnchors - Backlink anchors.

POST /seo/backlink-anchors

func (*SEOResource) BacklinkProspects

func (r *SEOResource) BacklinkProspects(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

BacklinkProspects - Backlink prospects (link gap).

POST /seo/backlink-prospects

func (*SEOResource) BacklinksSummary

func (r *SEOResource) BacklinksSummary(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

BacklinksSummary - Backlink profile summary.

POST /seo/backlinks-summary

func (*SEOResource) BrandLookup

func (r *SEOResource) BrandLookup(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

BrandLookup - AI Visibility: brand lookup.

POST /seo/brand-lookup

func (*SEOResource) Competitors

func (r *SEOResource) Competitors(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Competitors - Organic competitors.

POST /seo/competitors

func (*SEOResource) DomainOverview

func (r *SEOResource) DomainOverview(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

DomainOverview - Domain rank overview.

POST /seo/domain-overview

func (*SEOResource) KeywordDifficulty

func (r *SEOResource) KeywordDifficulty(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

KeywordDifficulty - Keyword difficulty.

POST /seo/keyword-difficulty

func (*SEOResource) KeywordResearch

func (r *SEOResource) KeywordResearch(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

KeywordResearch - Keyword research.

POST /seo/keyword-research

func (*SEOResource) PromptExplorer

func (r *SEOResource) PromptExplorer(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

PromptExplorer - AI Visibility: prompt explorer.

POST /seo/prompt-explorer

func (*SEOResource) RankHistory

func (r *SEOResource) RankHistory(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

RankHistory - Historical rank overview.

POST /seo/rank-history

func (*SEOResource) RankedKeywords

func (r *SEOResource) RankedKeywords(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

RankedKeywords - Ranked keywords (rank tracking).

POST /seo/ranked-keywords

func (*SEOResource) ReferringDomains

func (r *SEOResource) ReferringDomains(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

ReferringDomains - Referring domains.

POST /seo/referring-domains

func (*SEOResource) Serp

func (r *SEOResource) Serp(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Serp - Live SERP lookup.

POST /seo/serp

func (*SEOResource) SiteAudit

func (r *SEOResource) SiteAudit(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

SiteAudit - Deep site audit.

POST /seo/site-audit

func (*SEOResource) SpamScore

func (r *SEOResource) SpamScore(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

SpamScore - Backlink spam score.

POST /seo/spam-score

type ShortsResource

type ShortsResource struct {
	// contains filtered or unexported fields
}

ShortsResource groups the Shorts endpoints.

func (*ShortsResource) Generate

func (r *ShortsResource) Generate(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Generate - Generate viral shorts from a long video.

POST /shorts/generate

func (*ShortsResource) Get

func (r *ShortsResource) Get(ctx context.Context, uid string, opts *RequestOptions) (*Envelope, error)

Get - Get shorts job + clips.

GET /shorts/{uid}

func (*ShortsResource) List

func (r *ShortsResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List shorts jobs.

GET /shorts

type SocialResource

type SocialResource struct {
	// contains filtered or unexported fields
}

SocialResource groups the Social endpoints.

func (*SocialResource) AccountFollowerStats

func (r *SocialResource) AccountFollowerStats(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

AccountFollowerStats - Follower stats.

GET /social/accounts/follower-stats

func (*SocialResource) AccountInsights added in v0.1.5

func (r *SocialResource) AccountInsights(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

AccountInsights - Live account insights.

GET /social/accounts/{account_id}/insights

func (*SocialResource) BulkAccountHealth

func (r *SocialResource) BulkAccountHealth(ctx context.Context, opts *RequestOptions) (*Envelope, error)

BulkAccountHealth - Bulk account health.

GET /social/accounts/health

func (*SocialResource) BulkSchedulePosts

func (r *SocialResource) BulkSchedulePosts(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

BulkSchedulePosts - Bulk schedule posts.

POST /social/posts/bulk

func (*SocialResource) CommentPrivateReply added in v0.1.7

func (r *SocialResource) CommentPrivateReply(ctx context.Context, commentId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

CommentPrivateReply - Private reply (comment-to-DM).

POST /social/comments/{comment_id}/private-reply

func (*SocialResource) ConnectAccount

func (r *SocialResource) ConnectAccount(ctx context.Context, platform string, body map[string]any, opts *RequestOptions) (*Envelope, error)

ConnectAccount - Start headless account connection.

POST /social/connect/{platform}

func (*SocialResource) ConnectAccountStatus

func (r *SocialResource) ConnectAccountStatus(ctx context.Context, platform string, opts *RequestOptions) (*Envelope, error)

ConnectAccountStatus - Poll headless connection status.

GET /social/connect/{platform}

func (*SocialResource) ConnectOptions added in v0.1.7

func (r *SocialResource) ConnectOptions(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

ConnectOptions - Connection target options.

GET /social/accounts/{account_id}/connect-options

func (*SocialResource) ConnectSelect added in v0.1.7

func (r *SocialResource) ConnectSelect(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

ConnectSelect - Select connection target.

POST /social/accounts/{account_id}/connect-select

func (*SocialResource) CreateAccountGroup

func (r *SocialResource) CreateAccountGroup(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

CreateAccountGroup - Create account group.

POST /social/account-groups

func (*SocialResource) CreatePinterestBoard added in v0.1.16

func (r *SocialResource) CreatePinterestBoard(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

CreatePinterestBoard - Create a Pinterest board.

POST /social/accounts/{account_id}/pinterest/boards

func (*SocialResource) CreatePost

func (r *SocialResource) CreatePost(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

CreatePost - Create post (publish immediately).

POST /social/posts

func (*SocialResource) CreateQueue

func (r *SocialResource) CreateQueue(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

CreateQueue - Create queue.

POST /social/queues

func (*SocialResource) DeleteAccountGroup

func (r *SocialResource) DeleteAccountGroup(ctx context.Context, groupId string, opts *RequestOptions) (*Envelope, error)

DeleteAccountGroup - Delete account group.

DELETE /social/account-groups/{group_id}

func (*SocialResource) DeleteIceBreakers added in v0.1.7

func (r *SocialResource) DeleteIceBreakers(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

DeleteIceBreakers - Delete ice breakers.

DELETE /social/accounts/{account_id}/instagram/ice-breakers

func (*SocialResource) DeleteMessengerMenu added in v0.1.7

func (r *SocialResource) DeleteMessengerMenu(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

DeleteMessengerMenu - Delete Messenger menu.

DELETE /social/accounts/{account_id}/messenger/menu

func (*SocialResource) DeletePost

func (r *SocialResource) DeletePost(ctx context.Context, postId string, opts *RequestOptions) (*Envelope, error)

DeletePost - Delete social post.

DELETE /social/posts/{post_id}

func (*SocialResource) DeleteQueue

func (r *SocialResource) DeleteQueue(ctx context.Context, queueId string, opts *RequestOptions) (*Envelope, error)

DeleteQueue - Delete queue.

DELETE /social/queues/{queue_id}

func (*SocialResource) DisconnectAccount added in v0.1.2

func (r *SocialResource) DisconnectAccount(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

DisconnectAccount - Disconnect a social account.

DELETE /social/accounts/{account_id}

func (*SocialResource) EditPublishedPost added in v0.1.5

func (r *SocialResource) EditPublishedPost(ctx context.Context, postId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

EditPublishedPost - Edit published post.

POST /social/posts/{post_id}/edit

func (*SocialResource) FacebookPageInsights added in v0.1.7

func (r *SocialResource) FacebookPageInsights(ctx context.Context, accountId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

FacebookPageInsights - Facebook page insights.

GET /social/accounts/{account_id}/facebook/page-insights

func (*SocialResource) FacebookPostReactions added in v0.1.3

func (r *SocialResource) FacebookPostReactions(ctx context.Context, accountId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

FacebookPostReactions - Facebook post reactions.

GET /social/accounts/{account_id}/facebook/post-reactions

func (*SocialResource) GetAccountGroup

func (r *SocialResource) GetAccountGroup(ctx context.Context, groupId string, opts *RequestOptions) (*Envelope, error)

GetAccountGroup - Get account group.

GET /social/account-groups/{group_id}

func (*SocialResource) GetAccountHealth

func (r *SocialResource) GetAccountHealth(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

GetAccountHealth - Account health.

GET /social/accounts/{account_id}/health

func (*SocialResource) GetAccountReconnectUrl

func (r *SocialResource) GetAccountReconnectUrl(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

GetAccountReconnectUrl - Account reconnect URL.

GET /social/accounts/{account_id}/reconnect-url

func (*SocialResource) GetConversation added in v0.1.2

func (r *SocialResource) GetConversation(ctx context.Context, conversationId string, opts *RequestOptions) (*Envelope, error)

GetConversation - Get conversation.

GET /social/conversations/{conversation_id}

func (*SocialResource) GetFacebookPage added in v0.1.16

func (r *SocialResource) GetFacebookPage(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

GetFacebookPage - Get Facebook page details.

GET /social/accounts/{account_id}/facebook/page

func (*SocialResource) GetIceBreakers added in v0.1.7

func (r *SocialResource) GetIceBreakers(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

GetIceBreakers - Get ice breakers.

GET /social/accounts/{account_id}/instagram/ice-breakers

func (*SocialResource) GetMessengerMenu added in v0.1.7

func (r *SocialResource) GetMessengerMenu(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

GetMessengerMenu - Get Messenger menu.

GET /social/accounts/{account_id}/messenger/menu

func (*SocialResource) GetPost

func (r *SocialResource) GetPost(ctx context.Context, postId string, opts *RequestOptions) (*Envelope, error)

GetPost - Get social post.

GET /social/posts/{post_id}

func (*SocialResource) GetQueue

func (r *SocialResource) GetQueue(ctx context.Context, queueId string, opts *RequestOptions) (*Envelope, error)

GetQueue - Get queue.

GET /social/queues/{queue_id}

func (*SocialResource) GetQueueNextSlot

func (r *SocialResource) GetQueueNextSlot(ctx context.Context, queueId string, opts *RequestOptions) (*Envelope, error)

GetQueueNextSlot - Get next open slot.

GET /social/queues/{queue_id}/next-slot

func (*SocialResource) GmbAttributeMetadata added in v0.1.5

func (r *SocialResource) GmbAttributeMetadata(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

GmbAttributeMetadata - Available attributes.

GET /social/accounts/{account_id}/gmb/attributes/metadata

func (*SocialResource) GmbAttributes added in v0.1.5

func (r *SocialResource) GmbAttributes(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

GmbAttributes - Get attributes.

GET /social/accounts/{account_id}/gmb/attributes

func (*SocialResource) GmbCreateMedia added in v0.1.5

func (r *SocialResource) GmbCreateMedia(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

GmbCreateMedia - Add photo.

POST /social/accounts/{account_id}/gmb/media

func (*SocialResource) GmbCreatePlaceAction added in v0.1.5

func (r *SocialResource) GmbCreatePlaceAction(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

GmbCreatePlaceAction - Create place-action link.

POST /social/accounts/{account_id}/gmb/place-actions

func (*SocialResource) GmbDeleteMedia added in v0.1.5

func (r *SocialResource) GmbDeleteMedia(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

GmbDeleteMedia - Delete media.

DELETE /social/accounts/{account_id}/gmb/media

func (*SocialResource) GmbDeletePlaceAction added in v0.1.5

func (r *SocialResource) GmbDeletePlaceAction(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

GmbDeletePlaceAction - Delete place-action link.

DELETE /social/accounts/{account_id}/gmb/place-actions

func (*SocialResource) GmbFoodMenus added in v0.1.5

func (r *SocialResource) GmbFoodMenus(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

GmbFoodMenus - Get food menus.

GET /social/accounts/{account_id}/gmb/food-menus

func (*SocialResource) GmbLocation added in v0.1.5

func (r *SocialResource) GmbLocation(ctx context.Context, accountId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

GmbLocation - Get business info.

GET /social/accounts/{account_id}/gmb/location

func (*SocialResource) GmbLocations added in v0.1.5

func (r *SocialResource) GmbLocations(ctx context.Context, accountId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

GmbLocations - List Google locations.

GET /social/accounts/{account_id}/gmb/locations

func (*SocialResource) GmbMedia added in v0.1.5

func (r *SocialResource) GmbMedia(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

GmbMedia - List media.

GET /social/accounts/{account_id}/gmb/media

func (*SocialResource) GmbPerformance added in v0.1.3

func (r *SocialResource) GmbPerformance(ctx context.Context, accountId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

GmbPerformance - Google Business performance.

GET /social/accounts/{account_id}/gmb/performance

func (*SocialResource) GmbPlaceActions added in v0.1.5

func (r *SocialResource) GmbPlaceActions(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

GmbPlaceActions - List place-action links.

GET /social/accounts/{account_id}/gmb/place-actions

func (*SocialResource) GmbSearchKeywords added in v0.1.3

func (r *SocialResource) GmbSearchKeywords(ctx context.Context, accountId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

GmbSearchKeywords - Google Business search keywords.

GET /social/accounts/{account_id}/gmb/search-keywords

func (*SocialResource) GmbUpdateAttributes added in v0.1.5

func (r *SocialResource) GmbUpdateAttributes(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

GmbUpdateAttributes - Update attributes.

PUT /social/accounts/{account_id}/gmb/attributes

func (*SocialResource) GmbUpdateFoodMenus added in v0.1.5

func (r *SocialResource) GmbUpdateFoodMenus(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

GmbUpdateFoodMenus - Update food menus.

PUT /social/accounts/{account_id}/gmb/food-menus

func (*SocialResource) GmbUpdateLocation added in v0.1.5

func (r *SocialResource) GmbUpdateLocation(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

GmbUpdateLocation - Update business info.

PATCH /social/accounts/{account_id}/gmb/location

func (*SocialResource) GmbUpdatePlaceAction added in v0.1.6

func (r *SocialResource) GmbUpdatePlaceAction(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

GmbUpdatePlaceAction - Update place-action link.

PATCH /social/accounts/{account_id}/gmb/place-actions

func (*SocialResource) GmbVerificationOptions added in v0.1.5

func (r *SocialResource) GmbVerificationOptions(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

GmbVerificationOptions - Verification options.

POST /social/accounts/{account_id}/gmb/verifications/options

func (*SocialResource) GmbVerifications added in v0.1.5

func (r *SocialResource) GmbVerifications(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

GmbVerifications - List verifications.

GET /social/accounts/{account_id}/gmb/verifications

func (*SocialResource) InstagramAudience added in v0.1.7

func (r *SocialResource) InstagramAudience(ctx context.Context, accountId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

InstagramAudience - Instagram audience demographics.

GET /social/accounts/{account_id}/instagram/audience

func (*SocialResource) InstagramPublishingLimit added in v0.1.3

func (r *SocialResource) InstagramPublishingLimit(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

InstagramPublishingLimit - Instagram publishing limit.

GET /social/accounts/{account_id}/instagram/publishing-limit

func (*SocialResource) InstagramStories added in v0.1.3

func (r *SocialResource) InstagramStories(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

InstagramStories - Instagram stories.

GET /social/accounts/{account_id}/instagram/stories

func (*SocialResource) InstagramStoryInsights added in v0.1.4

func (r *SocialResource) InstagramStoryInsights(ctx context.Context, accountId string, storyId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

InstagramStoryInsights - Instagram story insights.

GET /social/accounts/{account_id}/instagram/stories/{story_id}/insights

func (*SocialResource) ListAccountGroups

func (r *SocialResource) ListAccountGroups(ctx context.Context, opts *RequestOptions) (*Envelope, error)

ListAccountGroups - List account groups.

GET /social/account-groups

func (*SocialResource) ListAccounts

func (r *SocialResource) ListAccounts(ctx context.Context, opts *RequestOptions) (*Envelope, error)

ListAccounts - List social accounts.

GET /social/accounts

func (*SocialResource) ListMentions added in v0.1.16

func (r *SocialResource) ListMentions(ctx context.Context, accountId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

ListMentions - List mentions.

GET /social/accounts/{account_id}/mentions

func (*SocialResource) ListPosts

func (r *SocialResource) ListPosts(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

ListPosts - List social posts.

GET /social/posts

func (*SocialResource) ListQueues

func (r *SocialResource) ListQueues(ctx context.Context, opts *RequestOptions) (*Envelope, error)

ListQueues - List queues.

GET /social/queues

func (*SocialResource) ListRedditFlairs added in v0.1.16

func (r *SocialResource) ListRedditFlairs(ctx context.Context, accountId string, subreddit string, opts *RequestOptions) (*Envelope, error)

ListRedditFlairs - List subreddit post flairs.

GET /social/accounts/{account_id}/reddit/subreddits/{subreddit}/flairs

func (*SocialResource) MoveAccount

func (r *SocialResource) MoveAccount(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

MoveAccount - Move account to profile.

POST /social/accounts/{account_id}/move

func (*SocialResource) PauseAccount

func (r *SocialResource) PauseAccount(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

PauseAccount - Pause posting to an account.

POST /social/accounts/{account_id}/pause

func (*SocialResource) PinterestBoards added in v0.1.3

func (r *SocialResource) PinterestBoards(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

PinterestBoards - Pinterest boards.

GET /social/accounts/{account_id}/pinterest/boards

func (*SocialResource) PreviewQueueSlots

func (r *SocialResource) PreviewQueueSlots(ctx context.Context, queueId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

PreviewQueueSlots - Preview upcoming slots.

GET /social/queues/{queue_id}/preview

func (*SocialResource) RedditFeed added in v0.1.3

func (r *SocialResource) RedditFeed(ctx context.Context, accountId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

RedditFeed - Reddit feed.

GET /social/accounts/{account_id}/reddit/feed

func (*SocialResource) RedditSearch added in v0.1.3

func (r *SocialResource) RedditSearch(ctx context.Context, accountId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

RedditSearch - Reddit search.

GET /social/accounts/{account_id}/reddit/search

func (*SocialResource) RedditSubredditInfo added in v0.1.6

func (r *SocialResource) RedditSubredditInfo(ctx context.Context, accountId string, subreddit string, opts *RequestOptions) (*Envelope, error)

RedditSubredditInfo - Subreddit info + eligibility.

GET /social/accounts/{account_id}/reddit/subreddits/{subreddit}

func (*SocialResource) RedditSubredditRules added in v0.1.3

func (r *SocialResource) RedditSubredditRules(ctx context.Context, accountId string, subreddit string, opts *RequestOptions) (*Envelope, error)

RedditSubredditRules - Subreddit rules.

GET /social/accounts/{account_id}/reddit/subreddits/{subreddit}/rules

func (*SocialResource) RedditSubreddits added in v0.1.3

func (r *SocialResource) RedditSubreddits(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

RedditSubreddits - Subscribed subreddits.

GET /social/accounts/{account_id}/reddit/subreddits

func (*SocialResource) ReplyToMention added in v0.1.16

func (r *SocialResource) ReplyToMention(ctx context.Context, accountId string, mentionId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

ReplyToMention - Reply to a mention.

POST /social/accounts/{account_id}/mentions/{mention_id}/reply

func (*SocialResource) ResumeAccount

func (r *SocialResource) ResumeAccount(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

ResumeAccount - Resume posting to an account.

POST /social/accounts/{account_id}/resume

func (*SocialResource) RetryPost

func (r *SocialResource) RetryPost(ctx context.Context, postId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

RetryPost - Retry publishing a post.

POST /social/posts/{post_id}/retry

func (*SocialResource) SchedulePost

func (r *SocialResource) SchedulePost(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

SchedulePost - Schedule post.

POST /social/posts/schedule

func (*SocialResource) SearchConversations added in v0.1.2

func (r *SocialResource) SearchConversations(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

SearchConversations - Search conversations.

GET /social/conversations/search

func (*SocialResource) SendTypingIndicator added in v0.1.7

func (r *SocialResource) SendTypingIndicator(ctx context.Context, conversationId string, opts *RequestOptions) (*Envelope, error)

SendTypingIndicator - Typing indicator.

POST /social/conversations/{conversation_id}/typing

func (*SocialResource) SetIceBreakers added in v0.1.7

func (r *SocialResource) SetIceBreakers(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

SetIceBreakers - Set ice breakers.

PUT /social/accounts/{account_id}/instagram/ice-breakers

func (*SocialResource) SetMessengerMenu added in v0.1.7

func (r *SocialResource) SetMessengerMenu(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

SetMessengerMenu - Set Messenger menu.

PUT /social/accounts/{account_id}/messenger/menu

func (*SocialResource) StopPostRecycle

func (r *SocialResource) StopPostRecycle(ctx context.Context, postId string, opts *RequestOptions) (*Envelope, error)

StopPostRecycle - Stop recycling.

DELETE /social/posts/{post_id}/recycle

func (*SocialResource) SyncExternalPosts added in v0.1.5

func (r *SocialResource) SyncExternalPosts(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

SyncExternalPosts - Sync external posts.

POST /social/posts/sync-external

func (*SocialResource) TiktokCreatorInfo

func (r *SocialResource) TiktokCreatorInfo(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

TiktokCreatorInfo - TikTok creator info.

GET /social/accounts/{account_id}/tiktok/creator-info

func (*SocialResource) UnpublishPost

func (r *SocialResource) UnpublishPost(ctx context.Context, postId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

UnpublishPost - Unpublish post.

POST /social/posts/{post_id}/unpublish

func (*SocialResource) UpdateAccount

func (r *SocialResource) UpdateAccount(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdateAccount - Rename account.

PATCH /social/accounts/{account_id}

func (*SocialResource) UpdateAccountGroup

func (r *SocialResource) UpdateAccountGroup(ctx context.Context, groupId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdateAccountGroup - Update account group.

PUT /social/account-groups/{group_id}

func (*SocialResource) UpdateConversation added in v0.1.2

func (r *SocialResource) UpdateConversation(ctx context.Context, conversationId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdateConversation - Archive / reopen conversation.

PATCH /social/conversations/{conversation_id}

func (*SocialResource) UpdateFacebookPage added in v0.1.16

func (r *SocialResource) UpdateFacebookPage(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdateFacebookPage - Update Facebook page details.

PATCH /social/accounts/{account_id}/facebook/page

func (*SocialResource) UpdatePost

func (r *SocialResource) UpdatePost(ctx context.Context, postId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdatePost - Update social post.

PATCH /social/posts/{post_id}

func (*SocialResource) UpdatePostMetadata added in v0.1.5

func (r *SocialResource) UpdatePostMetadata(ctx context.Context, postId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdatePostMetadata - Update YouTube metadata.

POST /social/posts/{post_id}/update-metadata

func (*SocialResource) UpdateQueue

func (r *SocialResource) UpdateQueue(ctx context.Context, queueId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdateQueue - Update queue.

PUT /social/queues/{queue_id}

func (*SocialResource) UpdateYoutubePlaylist added in v0.1.16

func (r *SocialResource) UpdateYoutubePlaylist(ctx context.Context, accountId string, playlistId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdateYoutubePlaylist - Update a YouTube playlist.

PATCH /social/accounts/{account_id}/youtube/playlists/{playlist_id}

func (*SocialResource) ValidateBulkBatch

func (r *SocialResource) ValidateBulkBatch(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

ValidateBulkBatch - Validate a bulk batch.

POST /social/posts/bulk/validate

func (*SocialResource) ValidateMedia

func (r *SocialResource) ValidateMedia(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

ValidateMedia - Validate media URL.

POST /social/validate/media

func (*SocialResource) ValidatePost

func (r *SocialResource) ValidatePost(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

ValidatePost - Validate post content.

POST /social/validate/post

func (*SocialResource) XMentions added in v0.1.6

func (r *SocialResource) XMentions(ctx context.Context, accountId string, query map[string]string, opts *RequestOptions) (*Envelope, error)

XMentions - X mentions.

GET /social/accounts/{account_id}/x/mentions

func (*SocialResource) XRetweet added in v0.1.4

func (r *SocialResource) XRetweet(ctx context.Context, accountId string, body map[string]any, opts *RequestOptions) (*Envelope, error)

XRetweet - Retweet on X.

POST /social/accounts/{account_id}/x/retweets

func (*SocialResource) XUnretweet added in v0.1.4

func (r *SocialResource) XUnretweet(ctx context.Context, accountId string, tweetId string, opts *RequestOptions) (*Envelope, error)

XUnretweet - Undo retweet.

DELETE /social/accounts/{account_id}/x/retweets/{tweet_id}

func (*SocialResource) YoutubePlaylists added in v0.1.3

func (r *SocialResource) YoutubePlaylists(ctx context.Context, accountId string, opts *RequestOptions) (*Envelope, error)

YoutubePlaylists - YouTube playlists.

GET /social/accounts/{account_id}/youtube/playlists

type URLsResource

type URLsResource struct {
	// contains filtered or unexported fields
}

URLsResource groups the URLs endpoints.

func (*URLsResource) Delete

func (r *URLsResource) Delete(ctx context.Context, urlId string, opts *RequestOptions) (*Envelope, error)

Delete - Delete short URL.

DELETE /urls/{url_id}

func (*URLsResource) Get

func (r *URLsResource) Get(ctx context.Context, urlId string, opts *RequestOptions) (*Envelope, error)

Get - Get short URL.

GET /urls/{url_id}

func (*URLsResource) GetStats

func (r *URLsResource) GetStats(ctx context.Context, urlId string, opts *RequestOptions) (*Envelope, error)

GetStats - Get short URL stats.

GET /urls/{url_id}/stats

func (*URLsResource) List

func (r *URLsResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List short URLs.

GET /urls

func (*URLsResource) Shorten

func (r *URLsResource) Shorten(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Shorten - Shorten URL.

POST /urls/shorten

func (*URLsResource) UpdateShort added in v0.1.16

func (r *URLsResource) UpdateShort(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdateShort - Update a short URL.

PATCH /urls/{id}

type Usage

type Usage struct {
	Units            int    `json:"units,omitempty"`
	Cost             string `json:"cost,omitempty"`
	BalanceRemaining string `json:"balance_remaining,omitempty"`
}

Usage reports metered usage charged for a request.

type VideosResource

type VideosResource struct {
	// contains filtered or unexported fields
}

VideosResource groups the Videos endpoints.

func (*VideosResource) Delete

func (r *VideosResource) Delete(ctx context.Context, videoId string, opts *RequestOptions) (*Envelope, error)

Delete - Delete video.

DELETE /videos/{video_id}

func (*VideosResource) Generate

func (r *VideosResource) Generate(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Generate - Generate video.

POST /videos/generate

func (*VideosResource) GenerateHook

func (r *VideosResource) GenerateHook(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

GenerateHook - Generate a viral hook line.

POST /videos/hook

func (*VideosResource) GenerateViralThumbnail

func (r *VideosResource) GenerateViralThumbnail(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

GenerateViralThumbnail - Generate a viral thumbnail.

POST /videos/viral-thumbnail

func (*VideosResource) Get

func (r *VideosResource) Get(ctx context.Context, videoId string, opts *RequestOptions) (*Envelope, error)

Get - Get video.

GET /videos/{video_id}

func (*VideosResource) List

func (r *VideosResource) List(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

List - List videos.

GET /videos

func (*VideosResource) ListModels

func (r *VideosResource) ListModels(ctx context.Context, opts *RequestOptions) (*Envelope, error)

ListModels - List available video models.

GET /videos/models

func (*VideosResource) SuggestBroll

func (r *VideosResource) SuggestBroll(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

SuggestBroll - Suggest B-roll moments.

POST /videos/broll-suggest

func (*VideosResource) SuggestEmphasis

func (r *VideosResource) SuggestEmphasis(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

SuggestEmphasis - Suggest on-screen emphasis.

POST /videos/emphasis

type WebhooksResource

type WebhooksResource struct {
	// contains filtered or unexported fields
}

WebhooksResource groups the Webhooks endpoints.

func (*WebhooksResource) Create

func (r *WebhooksResource) Create(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Create - Create webhook.

POST /webhooks

func (*WebhooksResource) Delete

func (r *WebhooksResource) Delete(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

Delete - Delete webhook.

DELETE /webhooks/{id}

func (*WebhooksResource) List

func (r *WebhooksResource) List(ctx context.Context, opts *RequestOptions) (*Envelope, error)

List - List webhooks.

GET /webhooks

func (*WebhooksResource) ListLogs

func (r *WebhooksResource) ListLogs(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

ListLogs - List webhook delivery logs.

GET /webhooks/logs

func (*WebhooksResource) ReplayDelivery added in v0.1.16

func (r *WebhooksResource) ReplayDelivery(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

ReplayDelivery - Replay a webhook delivery.

POST /webhooks/deliveries/{id}/replay

func (*WebhooksResource) Test

func (r *WebhooksResource) Test(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

Test - Send test webhook.

POST /webhooks/{id}/test

func (*WebhooksResource) Update

func (r *WebhooksResource) Update(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

Update - Update webhook.

PUT /webhooks/{id}

type WhatsAppResource added in v0.1.13

type WhatsAppResource struct {
	// contains filtered or unexported fields
}

WhatsAppResource groups the WhatsApp endpoints.

func (*WhatsAppResource) CreateTemplateFromLibrary added in v0.1.16

func (r *WhatsAppResource) CreateTemplateFromLibrary(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

CreateTemplateFromLibrary - Adopt a library template.

POST /whatsapp/templates/from-library

func (*WhatsAppResource) CreateWhatsAppTemplate added in v0.1.13

func (r *WhatsAppResource) CreateWhatsAppTemplate(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

CreateWhatsAppTemplate - Create a message template.

POST /whatsapp/templates

func (*WhatsAppResource) DeleteTemplate added in v0.1.16

func (r *WhatsAppResource) DeleteTemplate(ctx context.Context, name string, query map[string]string, opts *RequestOptions) (*Envelope, error)

DeleteTemplate - Delete a WhatsApp template.

DELETE /whatsapp/templates/{name}

func (*WhatsAppResource) GetDisplayName added in v0.1.16

func (r *WhatsAppResource) GetDisplayName(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

GetDisplayName - Get the WhatsApp display name.

GET /whatsapp/business-profile/display-name

func (*WhatsAppResource) GetTemplate added in v0.1.16

func (r *WhatsAppResource) GetTemplate(ctx context.Context, name string, query map[string]string, opts *RequestOptions) (*Envelope, error)

GetTemplate - Get a WhatsApp template.

GET /whatsapp/templates/{name}

func (*WhatsAppResource) GetWhatsAppBusinessProfile added in v0.1.13

func (r *WhatsAppResource) GetWhatsAppBusinessProfile(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

GetWhatsAppBusinessProfile - Get business profile.

GET /whatsapp/business-profile

func (*WhatsAppResource) ListTemplateLibrary added in v0.1.16

func (r *WhatsAppResource) ListTemplateLibrary(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

ListTemplateLibrary - Browse the shared template library.

GET /whatsapp/template-library

func (*WhatsAppResource) ListWhatsAppPhoneNumbers added in v0.1.13

func (r *WhatsAppResource) ListWhatsAppPhoneNumbers(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

ListWhatsAppPhoneNumbers - List phone numbers.

GET /whatsapp/phone-numbers

func (*WhatsAppResource) ListWhatsAppTemplates added in v0.1.13

func (r *WhatsAppResource) ListWhatsAppTemplates(ctx context.Context, query map[string]string, opts *RequestOptions) (*Envelope, error)

ListWhatsAppTemplates - List message templates.

GET /whatsapp/templates

func (*WhatsAppResource) SendWhatsAppMessage added in v0.1.13

func (r *WhatsAppResource) SendWhatsAppMessage(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

SendWhatsAppMessage - Send a WhatsApp message.

POST /whatsapp/messages

func (*WhatsAppResource) UpdateDisplayName added in v0.1.16

func (r *WhatsAppResource) UpdateDisplayName(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdateDisplayName - Request a WhatsApp display-name change.

POST /whatsapp/business-profile/display-name

func (*WhatsAppResource) UpdateProfilePhoto added in v0.1.16

func (r *WhatsAppResource) UpdateProfilePhoto(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdateProfilePhoto - Set the WhatsApp profile photo.

POST /whatsapp/business-profile/photo

func (*WhatsAppResource) UpdateTemplate added in v0.1.16

func (r *WhatsAppResource) UpdateTemplate(ctx context.Context, name string, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdateTemplate - Update a WhatsApp template.

PATCH /whatsapp/templates/{name}

func (*WhatsAppResource) UpdateWhatsAppBusinessProfile added in v0.1.13

func (r *WhatsAppResource) UpdateWhatsAppBusinessProfile(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

UpdateWhatsAppBusinessProfile - Update business profile.

PATCH /whatsapp/business-profile

type WorkspacesResource

type WorkspacesResource struct {
	// contains filtered or unexported fields
}

WorkspacesResource groups the Workspaces endpoints.

func (*WorkspacesResource) BulkAction

func (r *WorkspacesResource) BulkAction(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

BulkAction - Bulk sub-account action.

POST /workspaces/bulk

func (*WorkspacesResource) Create

func (r *WorkspacesResource) Create(ctx context.Context, body map[string]any, opts *RequestOptions) (*Envelope, error)

Create - Create a workspace (sub-account).

POST /workspaces

func (*WorkspacesResource) Delete

func (r *WorkspacesResource) Delete(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

Delete - Delete a workspace (sub-account).

DELETE /workspaces/{id}

func (*WorkspacesResource) DisableSaas

func (r *WorkspacesResource) DisableSaas(ctx context.Context, id string, body map[string]any, opts *RequestOptions) (*Envelope, error)

DisableSaas - Disable SaaS mode for a workspace.

POST /workspaces/{id}/disable-saas

func (*WorkspacesResource) Get

Get - Get a workspace (sub-account).

GET /workspaces/{id}

func (*WorkspacesResource) GetSaasPlan

func (r *WorkspacesResource) GetSaasPlan(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

GetSaasPlan - Get a SaaS plan.

GET /saas/plans/{id}

func (*WorkspacesResource) GetSubscription

func (r *WorkspacesResource) GetSubscription(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

GetSubscription - Get a sub-account's subscription.

GET /workspaces/{id}/subscription

func (*WorkspacesResource) GetWallet

func (r *WorkspacesResource) GetWallet(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

GetWallet - Get a sub-account's wallet balance.

GET /workspaces/{id}/wallet

func (*WorkspacesResource) List

List - List workspaces (sub-accounts).

GET /workspaces

func (*WorkspacesResource) ListSaasPlans

func (r *WorkspacesResource) ListSaasPlans(ctx context.Context, opts *RequestOptions) (*Envelope, error)

ListSaasPlans - List SaaS plans.

GET /saas/plans

func (*WorkspacesResource) Pause

func (r *WorkspacesResource) Pause(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

Pause - Pause (suspend) a workspace.

POST /workspaces/{id}/pause

func (*WorkspacesResource) Resume

func (r *WorkspacesResource) Resume(ctx context.Context, id string, opts *RequestOptions) (*Envelope, error)

Resume - Resume a paused workspace.

POST /workspaces/{id}/resume

Directories

Path Synopsis
scripts
generate command
Command generate reads openapi.json and emits the generated parts of the SDK: resources_gen.go (the resource surface), endpoints_gen_test.go (one test per operation), and the README's API reference section.
Command generate reads openapi.json and emits the generated parts of the SDK: resources_gen.go (the resource surface), endpoints_gen_test.go (one test per operation), and the README's API reference section.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL