Resend API vs SDK
For most use cases, the Resend SDK offers a better developer experience than calling the raw HTTP API directly. Resend maintains official, open source SDKs for Node.js, PHP, Python, Ruby, Go, Rust, Java, and .NET.
Choosing between the SDK and API
Section titled “Choosing between the SDK and API”Reach for the SDK unless you have a specific reason not to. It handles
authentication, the required User-Agent header, request serialization, typed
responses, and error handling for you. That leaves less boilerplate to get
wrong.
| Resend SDK (recommended) | Raw HTTP API | |
|---|---|---|
| Auth & headers | Handled automatically | Set Authorization and User-Agent manually |
| Types & autocomplete | Built in | None |
| Errors | Structured error objects | Parse status codes and JSON yourself |
| Maintained by | Resend | You |
When to use the raw API directly
Section titled “When to use the raw API directly”Calling the API directly is a good fit when:
- There's no official SDK for your language or runtime.
- You're making a one-off request and don't want to add a dependency.
- You're building your own integration or wrapper.
If you do call the API directly, remember to set the required
User-Agent header.