Sending Locations

Sending locations allow you to message your contacts from localized numbers, giving the conversation a more personal touch. Each sending location is defined by a zip code and has several associated area codes. When a texter messages a contact, Spoke Rewired automatically uses the sending location closest to that contact to send the message. Once a contact has been mapped to a particular sending number, this relationship is not broken unless you ask for it to be; your contacts will continue receiving messages from a single sending number across multiple campaigns that you send.

For most clients, the one or two sending locations pre-configured when you sign up will be all you need. Sending locations can be added on the fly, however, if you are texting in many locations or otherwise need more granular control over sending locations. Keep in mind that the more sending locations you have, the more numbers you need to purchase, and the higher the cost.

To create and manage sending locations, contact us at info@politicsrewired.com.

Optional — Self-Managing Sending Locations

If you need to create and manage a large number of sending locations, we can give you an API token that will allow you to create sending locations yourself.

To do this, you will need to make a GraphQL request to https://numbers.assemble.live, with a "token" header that is the API token we provide over email. If you are not familiar with GraphQL, check out this getting started guide. You will also need to know your profile id, which we can provide over email as well. We recommend using Postman, Insomnia, or GraphiQL to make these API requests.

To get all currently active sending locations, use the following query:

query activeSendingLocations {
    sendingLocations(condition: { decomissionedAt: null }) {
        nodes {
            referenceName
            center
        }
    }
}

To get all sending locations, even ones that have been discarded, simply remove the condition:

query allSendingLocations {
    sendingLocations {
        nodes {
            referenceName
            center
        }
    }
}

You could also, for example, look at sending locations by state:

query getSendingLocationsForState($state: String!) {
    sendingLocations(condition: { decomissionedAt: null, state: $state }) {
        nodes {
            referenceName
            center
        }
    }
}

With the variables:

{
	"state": "NY"
}

To create a sending location, use the following mutation, providing the zip code to use as the center point for the sending location you would like to create. This will return additional information about the sending location including the area codes from which it will begin purchasing numbers.

mutation createSendingLocation($center: ZipCode!, $referenceName: String!, $profileId: UUID!) {
    createSendingLocation(input: {sendingLocation: {center: $center, referenceName: $referenceName, profileId: $profileId, purchasingStrategy: SAME_STATE_BY_DISTANCE}}) {
        sendingLocation {
            referenceName
            center
            state
            location {
                x
                y
            }
            areaCodes
        }
    }
}

And include something like the following payload as variables:

{
	"profileId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx",
	"center": "11206",
	"referenceName": "My Special Sending Location"
}
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us