---
title: "Quickstart"
description: "Create an API key and send your first SMS with curl in a few minutes."
---

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

# Quickstart

This guide takes you from a new API key to a sent message. You need a MessagePort account and a terminal with `curl`.

1. **Create an API key**

   Sign in to [MessagePort](https://app.messageport.com.au), open **Settings** in the sidebar, then **API Keys**. Click **Create API Key** and give it a name.

   The key has two parts: an **Access Token** (the username) and a **Token ID** (the password). Keep both somewhere safe. See [Authentication](/get-started/authentication/) for details.
2. **Check your credentials**

   Call the account endpoint. It returns your account details and doesn't send anything.

   ```sh
   curl -u "ACCESS_TOKEN:TOKEN_ID" https://app.messageport.com.au/api/v2/account
   ```

   A `401` response means the key is wrong or disabled. See [Get account details](/api/account/get/).
3. **Find a sender ID**

   Every message needs a `from` value your account is allowed to use. List them with:

   ```sh
   curl -u "ACCESS_TOKEN:TOKEN_ID" https://app.messageport.com.au/api/v2/account/sender-ids
   ```

   To send from the shared number pool, use `SHARED_NUMBER`.
4. **Send a message**

   Send to the [test number](/get-started/testing/) `+61491578888` first. It behaves like a real send but no SMS goes out.

   ```sh
   curl -u "ACCESS_TOKEN:TOKEN_ID" \
     -H "Content-Type: application/json" \
     -H "Accept: application/json" \
     -X POST https://app.messageport.com.au/api/v2/sms \
     -d '{
       "messages": [
         {
           "to": "+61491578888",
           "from": "SHARED_NUMBER",
           "body": "Hello from the MessagePort API"
         }
       ]
     }'
   ```

   When that works, replace `to` with your own mobile number in E.164 format.
5. **Check the result**

   The response lists accepted messages in `data.messages` and rejected ones in `data.errors`:

   ```json
   {
     "data": {
       "messages": [
         {
           "status": "VALID",
           "to": "61491578888",
           "from": "SHARED_NUMBER",
           "body": "Hello from the MessagePort API",
           "meta": { "parts": 1, "is_unicode": false, "cost": 1, "country": "AU" }
         }
       ],
       "errors": []
     }
   }
   ```

   A message in `errors` has an `error_code` and an `error_help` explaining what to fix. Accepted messages are queued for sending. To find out whether they were delivered, subscribe to the `message_dlr` [webhook](/guides/webhooks/).

## Next steps

- [Sending messages](/guides/sending-messages/): batching, scheduling, metadata and MMS.
- [Webhooks](/guides/webhooks/): receive replies and delivery receipts.
- [API reference](/api/): every endpoint and field.

> **Use Postman or Insomnia**
>
> The OpenAPI spec for this API is at [`/api/openapi.json`](/api/openapi.json). Import it into Postman, Insomnia or any OpenAPI-aware tool to get every request ready to run.

Source: https://dev.messageport.com.au/get-started/quickstart/index.mdx
