Get Started with Hosted Messaging

    If you want to use Plivo to send SMS messages, you have three options: You can rent a number from Plivo, port one of your current numbers to Plivo, or use your current number for hosted messaging. Hosted messaging lets you use Plivo’s messaging API to send and receive messages on voice-enabled numbers you already own with other providers. If you have an existing voice connection for your number, using hosted messaging will not affect it. Once your number is hosted with Plivo, you can use it like any other number rented with Plivo and map it to an application.

    Eligibility criteria for numbers

    To use Plivo’s Hosted Messaging APIs, you must have a Plivo Standard account.

    Hosted messaging is available for US and Canada local numbers. If you’re not sure whether the number you use falls into those categories, ask your existing provider or use Plivo’s Lookup API or console to check the country of origin and type for any number.

    Host your number with Plivo

    To begin hosting your number with Plivo, you must create a Letter of Authorization (LOA), then create a hosted messaging number order.

    Create a Letter of Authorization (LOA)

    An Letter of Authorization (LOA) is a legal document in which the executing party makes certain assertions to a service provider about their authorization to switch (port) services and telephone numbers from one provider to another. Traditionally, this would be a paper document requiring an actual signature. However, the industry currently supports LOAs which may be generated from a variety of electronic methods.

    To use Plivo’s Hosted Messaging product, you must obtain a valid LOA from the umber provider. The Hosted Messaging API lets you submit an LOA to Plivo, which we will use to process your hosted messaging number order. You must create an LOA before you create a hosted messaging number order. The API call returns an LOA object.

    POST https://api.plivo.com/v1/Account/{auth_id}/HostedMessagingNumber/LOA/

    Code

    curl -i --user AUTH_ID:AUTH_TOKEN \
      -H "Content-Type: multipart/form-data" \
      --form 'alias=”testing”'\
      --form 'file=@local_path_of_image'\
      https://api.plivo.com/v1/Account/{auth_id}/HostedMessagingNumber/LOA/
    

    The API also lets you list all LOAs created by you, fetch a particular LOA object by ID, and delete a particular LOA.

    Create a hosted messaging number order

    The hosted messaging number order product allows an account to request for their phone numbers to be hosted on Plivo for SMS. The API lets you create a hosted messaging number order for the number that you want to host with Plivo. Once the order is successfully completed, the number is added to your account and you can manage it on console.

    POST https://api.plivo.com/v1/Account/{auth_id}/HostedMessagingNumber/

    Code

    curl -i --user AUTH_ID:AUTH_TOKEN \
        -H "Content-Type: application/json" \
        -d '{"alias": "Testing", "loa_id": "b855aaf1-1b1d-443c-8a35-4cf65102e2ef","application_id": "43598296806979568","number": "12142292275"}' \
        https://api.plivo.com/v1/Account/{auth_id}/HostedMessagingNumber/
    

    The API also lets you list all hosted messaging number orders that you submitted and fetch a particular hosted messaging number order object by ID.