---slug: /guides/messaging/sending-your-first-smssidebar_position: 0---# Sending Your First SMSimport Tabs from @theme/Tabs;import TabItem from @theme/TabItem;Lets get you started by sending your first SMS. In this guide we are going touse [Compatibility APIs](pathname:///compatibility-api/rest): if you aremigrating from a different provider, these APIs will likely be very similar. Incase you need more advanced features, check out our [RealtimeAPIs](guides/messaging-api/guides/realtime-api/first-steps-with-messaging.mdx).## Your API CredentialsTo send messages, make phone calls, and programmatically control video rooms,you need API credentials. Find these in your [SignalWireSpace](https://signalwire.com/signin), within the API tab on the left sidebar.If this is the first time you are using API credentials, you will need to createan API token. You can find your Project ID, Space URL, and API Token from the API tab in your SignalWire Space. Make sure your token has the necessary scopes enabled. In the API section you will find all the information youll need. In particular:- Your Project ID (e.g., 7b981d06-fa9e-XXXX-XXXX-XXXXXXXXXXXX)- Your Space URL (e.g., yourname.signalwire.com)- Your API Token (e.g., PTda745ebXXXXXXXXXXXXXXXXXXXXXX)The API Token is confidential: keep it private.## Obtaining a number[Log in](https://signalwire.com/signin) to your SignalWire Space. From the PhoneNumbers section, you can [buy a new phonenumber](guides/numbers-api/getting-started/buying-a-phone-number/index.mdx) ifyou dont have one already. You will need at least one number to send andreceive messages.Make sure the number you are buying supports SMS messaging, and youre good.## Sending a messageLets see how to send your first message. You have a few different options: youcan trigger an HTTP request yourself (using cURL or the dedicated functions inyour preferred programming language), or you can use [one of ourSDKs](pathname:///sdks). Well show examples for both methods.### Installation> Refer to https://everything.curl.dev/get.bashnpm install @signalwire/compatibility-apibashpip install signalwirebashcomposer require signalwire-community/signalwireOnce your environment is set up, you can proceed with your first API call.### SendingTo send a message, you can use the [Create a Message](pathname:///compatibility-api/rest/create-a-message) endpoint from our[Compatibility APIs](https://developer.signalwire.com/compatibility-api/).:::info Ensuring message deliveryIf you are sending messages to the US from a 10DLC number, you _must_ registeryour traffic with the Campaign Registry. Otherwise, the carriers will notdeliver your messages. Please see [**Campaign Registry - Everything You Need ToKnow**](pathname:///guides/campaign-registry-all-you-need-to-know) for more information.:::Lets see how to send a message with a REST API call:bashcurl https://$SPACE_URL/api/laml/2010-04-01/Accounts/$PROJECT_ID/Messages \ -X POST \ -u $PROJECT_ID:$API_TOKEN \ --data-urlencode From=$FROM_NUMBER \ --data-urlencode To=$TO_NUMBER \ --data-urlencode Body=Hellojsconst { RestClient } = require(@signalwire/compatibility-api);const client = RestClient(PROJECT_ID, API_TOKEN, { signalwireSpaceUrl: SPACE_URL });client.messages .create({ from: FROM_NUMBER, to: TO_NUMBER, body: Hello }) .then((message) => console.log(message.sid)) .done();pythonfrom signalwire.rest import Client as signalwire_clientclient = signalwire_client(PROJECT_ID, API_TOKEN, signalwire_space_url = SPACE_URL)message = client.messages.create( from_=FROM_NUMBER, to=TO_NUMBER, body=Hello )print(message.sid)php $SPACE_URL)); $message = $client->messages ->create($TO_NUMBER, // to array(from => $FROM_NUMBER, body => Hello) ); print($message->sid);?>Make sure to replace all placeholders with your own values.This example used the [Compatibility API](pathname:///compatibility-api), and inparticular the [Compatibility REST API](pathname:///compatibility-api/rest), tosend a message. For more advanced, real-time applications, youll want to checkout our [Realtime SDK](sdks/reference/realtime-sdk/00-realtime-sdk-reference.mdx).