Skip to content

Getting Started

Developing against PureSMS couldn’t be simpler with our REST API or official client libraries.

PureSMS is built directly on top of divergent Connect, so you’ll be using the Connect API directly to interact with the platform. We’ve done this so that as your application grows, you won’t have to change too much to migrate over to Connect and use more advanced functionality.

To get started, you’ll need to set up Connect properly.

  1. Create a Workspace at PureSMS.

    Open PureSMS
  2. If you’re not live, make sure you’ve verified your Test Number so that you can send from “ConnectTest”.

    Please note that only UK numbers are currently supported in Test Mode.

    Where do I do this?

    Within PureSMS, click “Settings” in the top navigation and then “Test Mode” down the left.

  3. If you’re live (or want to go live soon), add at least one Sender name to your Workspace and the Country that you’ll be sending to.

    Where do I do this?

    Within PureSMS, click “Senders” in the top navigation and then “Create a Sender” at the top right.

    You’ll be asked for a Sender Name, Sample Content and at least 1 Country to register the Sender in.

  4. Add a new API Key to your Workspace.

    Where do I do this?

    Within PureSMS, click “Settings” in the top navigation and then “API Keys” down the left. You can then click “Add API Key” at the top right.

  5. 🎉 Ready to go.

Choose your preferred method to send your first SMS.

Install the Divergent.Connect package from NuGet:

Terminal window
dotnet add package Divergent.Connect

Choose the setup method that works best for your application:

Program.cs
var builder = WebApplication.CreateBuilder(args);
// Add Connect client
builder.AddDivergentConnect();
var app = builder.Build();

Add your configuration to appsettings.json:

appsettings.json
{
"Divergent": {
"Connect": {
"ApiKey": "your-api-key",
"DefaultSmsSender": "YourSender"
}
}
}
// Inject IConnectSms into your service/controller (or use the manually built client)
public class MyService(IConnectSms smsClient)
{
public async Task SendWelcomeSms(string phoneNumber)
{
await smsClient.SendSmsAsync(new ConnectSmsMessage
{
To = phoneNumber, // E.164 format, e.g. "+447700900123"
Content = "Hello world, from PureSMS!"
});
}
}