> ## Documentation Index
> Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Send SMS Notifications

> Send transactional SMS notifications and updates to your users

## Overview

This guide shows how to send an SMS notification or alert to any phone number.

You can send SMS notifications and alerts either by using our PHLO visual workflow builder or our APIs. Follow the instructions in one of the tabs below.

<Tabs>
  <Tab title="Using API">
    Here’s how to use Plivo APIs to send SMS notifications.

    <h2 id="api-prerequisites">Prerequisites</h2>

    To get started, you need a Plivo account —  [sign up](https://cx.plivo.com/signup) with your work email address if you don’t have one already. To send messages to the United States and Canada, you must have a Plivo phone number that supports SMS; you can rent numbers from the [Numbers](https://cx.plivo.com/phone-numbers) page of the Plivo console or by using the [Numbers API](/numbers/). If this is your first time using Plivo APIs, follow our instructions to [set up a Java development environment](/sdk/server/set-up-java-dev-environment-api-messaging/).

    <h2 id="api-create-the-send-sms-application">Create the send SMS application</h2>

    Create a Java class in the project called `SendSMS` and paste into it this code.

    ```java theme={null}
    import java.io.IOException;
    import java.net.URL;
    import java.util.Collections;

    import com.plivo.api.Plivo;
    import com.plivo.api.exceptions.PlivoRestException;
    import com.plivo.api.models.message.Message;
    import com.plivo.api.models.message.MessageCreateResponse;

    class SendSMS
    {
        public static void main(String [] args)
        {
            Plivo.init("<auth_id>","<auth_token>");
            
                MessageCreateResponse response = Message.creator("<sender_id>",Collections.singletonList("<destination_number>"),
                        "Appointment reminder: 12:00 noon tomorrow. Please reply to this message if you need to make a change")
                        .create();
                System.out.println(response);
        }
    }
    ```

    Replace the auth placeholders with your authentication credentials from the [Plivo console](https://cx.plivo.com/home). Replace the phone number placeholders with actual phone numbers in [E.164 format](https://en.wikipedia.org/wiki/E.164) (for example, +12025551234). In countries other than the US and Canada you can use a [sender ID](/messaging/concepts/sender-id-usage/) for the message source. You must have a Plivo phone number to send messages to the US or Canada; you can buy a Plivo number from Phone Numbers > [Buy Numbers](https://cx.plivo.com/phone-numbers) on the Plivo console or via the [Numbers API](/numbers/api/phone-number/#buy-a-phone-number).

    <Note>
      <strong>Note:</strong>
      We recommend that you store your credentials in the `auth_id` and `auth_token` environment variables to avoid the possibility of accidentally committing them to source control. If you do this, you can initialize the client with no arguments and Plivo will automatically fetch the values from the environment variables. You can use `System.getenv()` to store and retrieve environment variables when initializing the client.
    </Note>

    <h2 id="api-test">Test</h2>

    Save the file and run it. Your application triggers an outbound SMS API request, and Plivo delivers your message to the destination number you specified.
  </Tab>
</Tabs>
