Skip to content

fix(doc): Correct API reference in Go package documentation#354

Merged
KMKoushik merged 3 commits intousesend:mainfrom
rubixvi:patch-1
Feb 16, 2026
Merged

fix(doc): Correct API reference in Go package documentation#354
KMKoushik merged 3 commits intousesend:mainfrom
rubixvi:patch-1

Conversation

@rubixvi
Copy link
Contributor

@rubixvi rubixvi commented Feb 12, 2026

Updated description to reference the useSend API instead of Unsend API.


Summary by cubic

Replaced the community Go SDK page with an official useSend “Get Started” guide and updated nav; examples use github.com/usesend/usesend-go with API key init, self-hosted base URL, and emails/contacts.

Written for commit 67c7e70. Summary will update on new commits.

Summary by CodeRabbit

  • Documentation
    • Added a new Go "Getting Started" guide covering installation, client setup, sending emails, error handling, and contact management (including self-hosting notes).
    • Removed the old Go community SDK page.
    • Updated site navigation to place Go docs under "Getting Started" and remove the "Community SDKs" group.

Updated description to reference the useSend API instead of Unsend API.
Copilot AI review requested due to automatic review settings February 12, 2026 04:50
@vercel
Copy link

vercel bot commented Feb 12, 2026

@rubixvi is attempting to deploy a commit to the kmkoushik's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 12, 2026

Walkthrough

Removed the community SDK Go doc at apps/docs/community-sdk/go.mdx. Added a new Getting Started Go page at apps/docs/get-started/go.mdx with installation, initialization, sending emails, and contacts examples for the useSend Go SDK. Updated apps/docs/docs.json to add get-started/go under Getting Started and removed the "Community SDKs" group (including its Python and Go pages).

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Title check ⚠️ Warning The title refers to correcting API references in Go documentation, but the actual changes include restructuring documentation (moving Go from community-sdk to get-started) and removing community sections entirely. Revise the title to accurately reflect the primary changes, such as 'fix(docs): Move Go SDK to get-started and remove community section' or 'refactor(docs): Restructure Go SDK documentation and remove community pages'.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR attempts to correct documentation by changing "Unsend API" to "useSend API" in the Go SDK documentation. However, this change introduces an inconsistency rather than fixing one. The community-maintained Go package is called "Unsend" (not "useSend"), and the description should reference the "Unsend API" provided by this Go package wrapper, not the "useSend API" of the main product.

Changes:

  • Updated the description field in the Go SDK documentation frontmatter to change "Unsend API" to "useSend API"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

---
title: Go
description: "The Unsend Go package lets you interact with the Unsend API to send and manage emails as well as domains. This is a quick guide on using the package to send emails and retrieve email information."
description: "The Unsend Go package lets you interact with the useSend API to send and manage emails as well as domains. This is a quick guide on using the package to send emails and retrieve email information."
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

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

This change introduces an inconsistency. The Go package being documented is called "Unsend" (not "useSend"), as evidenced by the package name "github.com/QGeeDev/unsend-go", the environment variables "UNSEND_API_KEY" and "UNSEND_API_URL", and references throughout the documentation to "Unsend package". The description should reference "Unsend API" (the API provided by this Go package) rather than "useSend API" (the main product's API). While the main product is "useSend", this community package is named "Unsend" and provides its own API wrapper. The original text "Unsend API" was correct.

Suggested change
description: "The Unsend Go package lets you interact with the useSend API to send and manage emails as well as domains. This is a quick guide on using the package to send emails and retrieve email information."
description: "The Unsend Go package lets you interact with the Unsend API to send and manage emails as well as domains. This is a quick guide on using the package to send emails and retrieve email information."

Copilot uses AI. Check for mistakes.
@greptile-apps
Copy link

greptile-apps bot commented Feb 12, 2026

Greptile Overview

Greptile Summary

Partially corrected API reference from "Unsend API" to "useSend API" in the Go package description. However, the change is incomplete and creates inconsistencies:

  • The description now mixes "Unsend Go package" with "useSend API" in the same sentence
  • Multiple other references to "Unsend" throughout the file remain unchanged (line 8, example URLs)
  • Incorrect domain URLs (unsend.dev and app.unsend.dev) should be updated to usesend.com and app.usesend.com

Confidence Score: 4/5

  • This PR is safe to merge - it's a documentation-only change with no functional impact
  • The change is a simple documentation update that partially fixes branding inconsistencies. While incomplete (other references to old branding and incorrect URLs remain), it doesn't introduce any functional bugs or breaking changes. The score reflects that the change is in the right direction but could be more thorough.
  • No files require special attention - this is a straightforward documentation update

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

---
title: Go
description: "The Unsend Go package lets you interact with the Unsend API to send and manage emails as well as domains. This is a quick guide on using the package to send emails and retrieve email information."
description: "The Unsend Go package lets you interact with the useSend API to send and manage emails as well as domains. This is a quick guide on using the package to send emails and retrieve email information."
Copy link

Choose a reason for hiding this comment

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

Inconsistent branding within the same sentence - "Unsend Go package" refers to the community package name (unsend-go), while "useSend API" refers to the API. Consider either keeping both as "Unsend" for consistency with the package name throughout the doc, or changing both to "useSend" and noting that the package name differs.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@greptile-apps
Copy link

greptile-apps bot commented Feb 12, 2026

Additional Comments (3)

apps/docs/community-sdk/go.mdx
Should be "useSend" for consistency (matching the change made to line 3)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!


apps/docs/community-sdk/go.mdx
URL should be https://usesend.com instead of https://unsend.dev to match the correct domain

    Html: "<p>hello,</p><p>useSend is the best open source sending platform</p><p>check out <a href='https://usesend.com'>usesend.com</a></p>",

apps/docs/community-sdk/go.mdx
URL should be https://app.usesend.com instead of https://app.unsend.dev to match the correct domain

export UNSEND_API_URL="https://app.usesend.com" # or your self-hosted URL

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@apps/docs/community-sdk/go.mdx`:
- Line 3: The document still uses the old brand "Unsend" in multiple places
(e.g., the header string "The Unsend Go package" and occurrences on lines
referencing examples and descriptions), causing inconsistent branding versus
"useSend"; update every literal occurrence of the product name "Unsend" to
"useSend" in apps/docs/community-sdk/go.mdx (search for and replace strings like
"The Unsend Go package", any other "Unsend" mentions at lines
~8,11,15,27,37,44,52,56,60) while leaving host-controlled identifiers unchanged
(do NOT alter the community package name "unsend-go" or any environment variable
names). Ensure capitalization matches the official product name "useSend"
consistently across the file.

Added a issue to the package maintainer.

If maintainer isn't actively maintaining the package. Will fork it.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/docs/community-sdk/go.mdx (1)

32-33: ⚠️ Potential issue | 🟡 Minor

Update the default API URL to the current domain.

Line 33 uses the outdated https://app.unsend.dev endpoint. The official useSend API base URL is now https://app.usesend.com/api/. Update the default value to reflect this change:

export UNSEND_API_URL="https://app.usesend.com/api" # or your self-hosted URL

The environment variable name UNSEND_API_URL is correct and can remain unchanged; only the default value needs updating.

🤖 Fix all issues with AI agents
In `@apps/docs/community-sdk/go.mdx`:
- Around line 57-63: The Go example has mixed tabs and spaces in the
SendEmailRequest literal (fields To, From, Subject, Text, Html) causing
misalignment; update the block so all indentation uses tabs consistently
(replace the space-indented lines for Subject and Html with tab indentation to
match the other lines) ensuring the struct literal formatting for
&unsend.SendEmailRequest{ ... } is uniformly tab-indented.
- Line 8: The sentence "This is a community-maintained package and not
maintained by the useSend." contains an extra article; remove "the" so it reads
"This is a community-maintained package and not maintained by useSend." Update
the line in apps/docs/community-sdk/go.mdx accordingly to reference "useSend"
without an article.


<Warning>
This is a community-maintained package and not maintained by the Unsend.
This is a community-maintained package and not maintained by the useSend.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Grammar: drop "the" before "useSend".

"by the useSend" is grammatically incorrect — "useSend" is a proper noun used without an article.

Proposed fix
-  This is a community-maintained package and not maintained by the useSend.
+  This is a community-maintained package and not maintained by useSend.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
This is a community-maintained package and not maintained by the useSend.
This is a community-maintained package and not maintained by useSend.
🤖 Prompt for AI Agents
In `@apps/docs/community-sdk/go.mdx` at line 8, The sentence "This is a
community-maintained package and not maintained by the useSend." contains an
extra article; remove "the" so it reads "This is a community-maintained package
and not maintained by useSend." Update the line in
apps/docs/community-sdk/go.mdx accordingly to reference "useSend" without an
article.

Comment on lines 57 to 63
request := &unsend.SendEmailRequest{
To: []string{"youremail@gmail.com"},
From: "hello@yourdomain.com",
Subject: "Unsend test email",
Text: "hello,\n\nUnsend is the best open source sending platform",
Html: "<p>hello,</p><p>Unsend is the best open source sending platform</p><p>check out <a href='https://unsend.dev'>unsend.dev</a></p>",
Subject: "useSend test email",
Text: "hello,\n\nuseSend is the best open source sending platform",
Html: "<p>hello,</p><p>useSend is the best open source sending platform</p><p>check out <a href='https://usesend.com'>usesend.com</a></p>",
}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Inconsistent indentation: mixed tabs and spaces in the Go code example.

Lines 60 and 62 use spaces while the surrounding lines (58–59, 61, 63) use tabs. Go conventionally uses tabs, and the visual misalignment will be noticeable in rendered docs.

Proposed fix — use tabs consistently
 	request := &unsend.SendEmailRequest{
 		To: []string{"youremail@gmail.com"},
 		From: "hello@yourdomain.com",
-    Subject: "useSend test email",
+		Subject: "useSend test email",
 		Text: "hello,\n\nuseSend is the best open source sending platform",
-    Html: "<p>hello,</p><p>useSend is the best open source sending platform</p><p>check out <a href='https://usesend.com'>usesend.com</a></p>",
+		Html: "<p>hello,</p><p>useSend is the best open source sending platform</p><p>check out <a href='https://usesend.com'>usesend.com</a></p>",
 	}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
request := &unsend.SendEmailRequest{
To: []string{"youremail@gmail.com"},
From: "hello@yourdomain.com",
Subject: "Unsend test email",
Text: "hello,\n\nUnsend is the best open source sending platform",
Html: "<p>hello,</p><p>Unsend is the best open source sending platform</p><p>check out <a href='https://unsend.dev'>unsend.dev</a></p>",
Subject: "useSend test email",
Text: "hello,\n\nuseSend is the best open source sending platform",
Html: "<p>hello,</p><p>useSend is the best open source sending platform</p><p>check out <a href='https://usesend.com'>usesend.com</a></p>",
}
request := &unsend.SendEmailRequest{
To: []string{"youremail@gmail.com"},
From: "hello@yourdomain.com",
Subject: "useSend test email",
Text: "hello,\n\nuseSend is the best open source sending platform",
Html: "<p>hello,</p><p>useSend is the best open source sending platform</p><p>check out <a href='https://usesend.com'>usesend.com</a></p>",
}
🤖 Prompt for AI Agents
In `@apps/docs/community-sdk/go.mdx` around lines 57 - 63, The Go example has
mixed tabs and spaces in the SendEmailRequest literal (fields To, From, Subject,
Text, Html) causing misalignment; update the block so all indentation uses tabs
consistently (replace the space-indented lines for Subject and Html with tab
indentation to match the other lines) ensuring the struct literal formatting for
&unsend.SendEmailRequest{ ... } is uniformly tab-indented.

Copy link
Member

@KMKoushik KMKoushik left a comment

Choose a reason for hiding this comment

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

@rubixvi we now have our i-house sdk, will be nice to add it https://github.com/usesend/usesend-go

- Remove community section until content is ready.
- Update Go SDK docs to useSend implementation.
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In `@apps/docs/get-started/go.mdx`:
- Around line 106-126: The example in the client.Contacts.Create call uses a
real personal email ("hey@koushik.dev"); update the usesend.CreateContactPayload
Email field to a clearly fictional placeholder (e.g., "user@example.com") in the
Create invocation so the snippet no longer contains real personal contact data
while leaving client.Contacts.Create, usesend.CreateContactPayload, and the
surrounding error handling (err, apiErr) unchanged.
- Around line 44-53: The example uses the SaaS production URL which is
misleading; update the self-hosted example in the usesend.NewClient call to use
a clearly fictional placeholder (e.g., replace "https://app.usesend.com" with
something like "https://your-usesend.example" or
"https://self-hosted.example.com") so readers know to substitute their own
instance when using usesend.WithBaseURL.
- Line 16: The docs currently reference a non-existent Go package
`github.com/usesend/usesend-go`; update the get-started Go section to either (A)
replace the broken `go get github.com/usesend/usesend-go` line with the
community-maintained alternative `github.com/QGeeDev/unsend-go` and add a short
disclaimer that it is community-maintained (not official), or (B) remove the Go
install instruction entirely and add a one-sentence clarification that only
official TypeScript and Python SDKs are supported; ensure you update any
mentions of `usesend-go` accordingly (search for usesend-go / unsend-go in the
file and adjust text to match the chosen option).


Install the useSend Go SDK:
```bash
go get github.com/usesend/usesend-go
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if the Go module exists on GitHub and pkg.go.dev
echo "Checking GitHub repository:"
curl -s -L -o /dev/null -w "HTTP Status: %{http_code}\n" "https://github.com/usesend/usesend-go"

echo "Checking pkg.go.dev:"
curl -s -L -o /dev/null -w "HTTP Status: %{http_code}\n" "https://pkg.go.dev/github.com/usesend/usesend-go"

Repository: usesend/useSend

Length of output: 141


🌐 Web query:

usesend-go GitHub Go package

💡 Result:

There doesn’t appear to be an official Go module named usesend-go. The Go SDK documented for useSend/Unsend is a community-maintained package:

  • Repo / module: github.com/QGeeDev/unsend-go (community SDK; not maintained by Unsend/useSend) [1]
  • Install: go get github.com/QGeeDev/unsend-go [1]
  • Config: set UNSEND_API_KEY and (optionally) UNSEND_API_URL, then unsend.NewClient() and use methods like SendEmail [1]

If you meant the useSend official SDKs, their open-source repo includes a TypeScript SDK (not Go) [2], and there’s also a Python SDK published as usesend on PyPI [3].


The referenced Go package does not exist in the Go module registry.

The docs reference github.com/usesend/usesend-go, but this package is not published to pkg.go.dev (returns 404) and cannot be installed via go get. useSend does not provide an official Go SDK. If a Go SDK is needed, the community-maintained alternative is github.com/QGeeDev/unsend-go, though this is not officially maintained by useSend. Consider either updating the docs to reference the community package with appropriate disclaimers, or clarifying that only TypeScript and Python SDKs are officially supported.

🤖 Prompt for AI Agents
In `@apps/docs/get-started/go.mdx` at line 16, The docs currently reference a
non-existent Go package `github.com/usesend/usesend-go`; update the get-started
Go section to either (A) replace the broken `go get
github.com/usesend/usesend-go` line with the community-maintained alternative
`github.com/QGeeDev/unsend-go` and add a short disclaimer that it is
community-maintained (not official), or (B) remove the Go install instruction
entirely and add a one-sentence clarification that only official TypeScript and
Python SDKs are supported; ensure you update any mentions of `usesend-go`
accordingly (search for usesend-go / unsend-go in the file and adjust text to
match the chosen option).

Comment on lines +44 to +53
If you are running a self-hosted version of useSend, provide the base URL using `WithBaseURL`.
```go
client, err := usesend.NewClient(
"us_12345",
usesend.WithBaseURL("https://app.usesend.com"),
)
if err != nil {
log.Fatal(err)
}
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Self-hosted example URL is the SaaS production URL.

Line 48 uses https://app.usesend.com as the self-hosted base URL example, but that's the production SaaS dashboard URL. This will confuse readers into thinking they should point their self-hosted instance at the hosted service.

Use a clearly fictional placeholder instead.

Proposed fix
-    usesend.WithBaseURL("https://app.usesend.com"),
+    usesend.WithBaseURL("https://your-usesend-instance.example.com"),
🤖 Prompt for AI Agents
In `@apps/docs/get-started/go.mdx` around lines 44 - 53, The example uses the SaaS
production URL which is misleading; update the self-hosted example in the
usesend.NewClient call to use a clearly fictional placeholder (e.g., replace
"https://app.usesend.com" with something like "https://your-usesend.example" or
"https://self-hosted.example.com") so readers know to substitute their own
instance when using usesend.WithBaseURL.

Comment on lines +106 to +126
```go
contact, apiErr, err := client.Contacts.Create(
context.Background(),
"contactBook_123",
usesend.CreateContactPayload{
Email: "hey@koushik.dev",
FirstName: "Koushik",
LastName: "KM",
},
)

if err != nil {
log.Fatal(err) // transport error
}

if apiErr != nil {
log.Fatalf("API error: %s", apiErr.Message)
}

log.Printf("Contact ID: %s", contact.ContactID)
```
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Replace what appears to be a real personal email with a generic placeholder.

hey@koushik.dev (Line 111) looks like a real person's email address carried over from the previous community SDK docs. Documentation examples should use clearly fictional addresses (e.g., user@example.com) to avoid privacy concerns and accidental contact.

Proposed fix
     usesend.CreateContactPayload{
-        Email:     "hey@koushik.dev",
-        FirstName: "Koushik",
-        LastName:  "KM",
+        Email:     "user@example.com",
+        FirstName: "Jane",
+        LastName:  "Doe",
     },
🤖 Prompt for AI Agents
In `@apps/docs/get-started/go.mdx` around lines 106 - 126, The example in the
client.Contacts.Create call uses a real personal email ("hey@koushik.dev");
update the usesend.CreateContactPayload Email field to a clearly fictional
placeholder (e.g., "user@example.com") in the Create invocation so the snippet
no longer contains real personal contact data while leaving
client.Contacts.Create, usesend.CreateContactPayload, and the surrounding error
handling (err, apiErr) unchanged.

@KMKoushik KMKoushik merged commit ed4a429 into usesend:main Feb 16, 2026
5 of 6 checks passed
KMKoushik pushed a commit that referenced this pull request Feb 24, 2026
* Correct API reference in Go package documentation

Updated description to reference the useSend API instead of Unsend API.

* Update documentation to reflect useSend branding

Added a issue to the package maintainer.

If maintainer isn't actively maintaining the package. Will fork it.

* fix(docs): remove community section and update Go SDK documentation

- Remove community section until content is ready.
- Update Go SDK docs to useSend implementation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants