Package com.sendly

Class Sendly

java.lang.Object
com.sendly.Sendly

public class Sendly extends Object
Sendly API Client

Official Java SDK for the Sendly SMS API.


 Sendly client = new Sendly("sk_live_v1_xxx");
 Message message = client.messages().send("+15551234567", "Hello!");
 
  • Field Details

  • Constructor Details

    • Sendly

      public Sendly(String apiKey)
      Create a new Sendly client with default settings.
      Parameters:
      apiKey - Your Sendly API key
    • Sendly

      public Sendly(String apiKey, Sendly.Builder builder)
      Create a new Sendly client with custom configuration.
      Parameters:
      apiKey - Your Sendly API key
      builder - Configuration builder
  • Method Details

    • messages

      public Messages messages()
      Get the Messages resource.
      Returns:
      Messages resource
    • webhooks

      public WebhooksResource webhooks()
      Get the Webhooks resource.
      Returns:
      Webhooks resource
    • account

      public AccountResource account()
      Get the Account resource.
      Returns:
      Account resource
    • get

      public com.google.gson.JsonObject get(String path, Map<String,String> params) throws SendlyException
      Make a GET request.
      Parameters:
      path - API endpoint path
      params - Query parameters
      Returns:
      Response as JsonObject
      Throws:
      SendlyException - if the request fails
    • post

      public com.google.gson.JsonObject post(String path, Object body) throws SendlyException
      Make a POST request.
      Parameters:
      path - API endpoint path
      body - Request body
      Returns:
      Response as JsonObject
      Throws:
      SendlyException - if the request fails
    • patch

      public com.google.gson.JsonObject patch(String path, Object body) throws SendlyException
      Make a PATCH request.
      Parameters:
      path - API endpoint path
      body - Request body
      Returns:
      Response as JsonObject
      Throws:
      SendlyException - if the request fails
    • delete

      public com.google.gson.JsonObject delete(String path) throws SendlyException
      Make a DELETE request.
      Parameters:
      path - API endpoint path
      Returns:
      Response as JsonObject
      Throws:
      SendlyException - if the request fails
    • getGson

      public com.google.gson.Gson getGson()
      Get the Gson instance.