https://github.com/trycourier/courier-java
Java SDK for communicating with the Courier REST API.
https://github.com/trycourier/courier-java
Last synced: 4 months ago
JSON representation
Java SDK for communicating with the Courier REST API.
- Host: GitHub
- URL: https://github.com/trycourier/courier-java
- Owner: trycourier
- License: apache-2.0
- Created: 2021-02-10T23:54:20.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2026-04-13T17:02:53.000Z (4 months ago)
- Last Synced: 2026-04-13T18:27:11.956Z (4 months ago)
- Language: Kotlin
- Size: 3.27 MB
- Stars: 8
- Watchers: 13
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Security: SECURITY.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# Courier Java SDK
The Courier Java SDK provides typed access to the Courier REST API from applications written in Java 8+. It uses builder-pattern request construction, OkHttp for transport, and returns strongly typed response objects.
## Installation
### Gradle
```kotlin
implementation("com.courier:courier-java:LATEST_VERSION")
```
### Maven
```xml
com.courier
courier-java
LATEST_VERSION
```
Find the latest version on [Maven Central](https://central.sonatype.com/artifact/com.courier/courier-java).
## Quick Start
```java
import com.courier.client.CourierClient;
import com.courier.client.okhttp.CourierOkHttpClient;
import com.courier.core.JsonValue;
import com.courier.models.UserRecipient;
import com.courier.models.send.SendMessageParams;
CourierClient client = CourierOkHttpClient.fromEnv();
SendMessageParams params = SendMessageParams.builder()
.message(SendMessageParams.Message.builder()
.to(UserRecipient.builder().userId("your_user_id").build())
.template("your_template_id")
.data(SendMessageParams.Message.Data.builder()
.putAdditionalProperty("foo", JsonValue.from("bar"))
.build())
.build())
.build();
var response = client.send().message(params);
System.out.println(response.requestId());
```
The client reads `COURIER_API_KEY` from your environment (or `courier.apiKey` system property) automatically.
## Documentation
Full documentation: **[courier.com/docs/sdk-libraries/java](https://www.courier.com/docs/sdk-libraries/java/)**
- [Quickstart](https://www.courier.com/docs/getting-started/quickstart/)
- [Send API](https://www.courier.com/docs/platform/sending/send-message/)
- [API Reference](https://www.courier.com/docs/reference/get-started/)
- [Javadocs](https://javadoc.io/doc/com.courier/courier-java/)