Short Code Submission (Order)
Last updated
Was this helpful?
Last updated
Was this helpful?
This form allows you to order short code numbers for your messaging campaigns.
This function is available via our new GraphQL API. You can read more about how to authenticate to this API .
Using a GraphQL mutation you can submit the form, the example command is below. This creates an order which will be verified and the short code numbers will be ordered based on the submitted data.
mutation (
$businessName: String!
$businessRegisteredAddress: String!
$businessRegisteredCity: String!
$businessRegisteredState: String!
$businessRegisteredZip: String!
$businessContactFirstName: String!
$businessContactLastName: String!
$businessContactEmail: String!
$businessContactPhone: String!
$useCase: String!
$termsAndConditionsWebsite: String!
$privacyPolicyWebsite: String!
$callToActionLocations: String!
$callToActionLanguage: String!
$optInKeywords: String!
$optInConfirmation: String!
$welcomeMessage: String!
$exampleAlerts: String!
$helpResponseText: String!
$stopResponseText: String!
$customerSupportContactEmail: String!
$customerSupportContactPhone: String!
$customerSupportUrl: String!
$attachments: [String!]!
) {
submitShortcodeForm(
businessName: $businessName,
businessRegisteredAddress: $businessRegisteredAddress,
businessRegisteredCity: $businessRegisteredCity,
businessRegisteredState: $businessRegisteredState,
businessRegisteredZip: $businessRegisteredZip,
businessContactFirstName: $businessContactFirstName,
businessContactLastName: $businessContactLastName,
businessContactEmail: $businessContactEmail,
businessContactPhone: $businessContactPhone,
useCase: $useCase,
termsAndConditionsWebsite: $termsAndConditionsWebsite,
privacyPolicyWebsite: $privacyPolicyWebsite,
callToActionLocations: $callToActionLocations,
callToActionLanguage: $callToActionLanguage,
optInKeywords: $optInKeywords,
optInConfirmation: $optInConfirmation,
welcomeMessage: $welcomeMessage,
exampleAlerts: $exampleAlerts,
helpResponseText: $helpResponseText,
stopResponseText: $stopResponseText,
customerSupportContactEmail: $customerSupportContactEmail,
customerSupportContactPhone: $customerSupportContactPhone,
customerSupportUrl: $customerSupportUrl,
attachments: $attachments,
) {
id
publicId
insertedAt
name
status
statusNote
finishedAt
data {
...ShortcodeFormFields
}
}
}
fragment ShortcodeFormFields on ShortcodeFormOrderData {
type
businessName
businessRegisteredAddress
businessRegisteredCity
businessRegisteredState
businessRegisteredZip
businessContactFirstName
businessContactLastName
businessContactEmail
businessContactPhone
useCase
termsAndConditionsWebsite
privacyPolicyWebsite
callToActionLocations
callToActionLanguage
optInKeywords
optInConfirmation
welcomeMessage
exampleAlerts
helpResponseText
stopResponseText
customerSupportContactEmail
customerSupportContactPhone
customerSupportUrl
attachments
}
The payload should be formatted like this, do note that the attachments is an array of base64 encoded images and/or docs.
{
"businessName": "ACME Inc.",
"businessRegisteredAddress": "Street 1B",
"businessRegisteredCity": "Denver",
"businessRegisteredState": "Colorado",
"businessRegisteredZip": "123467",
"businessContactFirstName": "John",
"businessContactLastName": "Doe",
"businessContactEmail": "john.doe@acme.org",
"businessContactPhone": "12345678910",
"useCase": "We'll be sending promo messages using short code numbers",
"termsAndConditionsWebsite": "terms_and_conditions.acme.com",
"privacyPolicyWebsite": "privacy_policy.acme.com",
"callToActionLocations": "top and bottom of the page at acme.com",
"callToActionLanguage": "JOIN NOW, SAVE MONEY, etc.",
"optInKeywords": "JOIN",
"optInConfirmation": "YES",
"welcomeMessage": "Welcome to our shortcode campaign!",
"exampleAlerts": "New offers available! Join now to save 20%.",
"helpResponseText": "This is the HELP menu:\n\nSend STOP to stop all messages.",
"stopResponseText":
"You used STOP to stop all messages, you'll no longer recieve any promo messages from us.",
"customerSupportContactEmail": "our_support@company.com",
"customerSupportContactPhone": "18881231234",
"customerSupportUrl": "www.our_support.com",
"attachments": [
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg=="
]
}
To retrieve the status of the request, and to list your short code orders you can use the query bellow.
query($page: Int, $publicId: String, $type: String, $addedStartDate: DateTime, $addedEndDate: DateTime) {
orders(page: $page, publicId: $publicId, type: $type, addedStartDate: $addedStartDate, addedEndDate: $addedEndDate) {
page
pageSize
totalPages
orders {
id
publicId
name
insertedAt
data {
...ShortcodeFormFields
}
}
}
}
fragment ShortcodeFormFields on ShortcodeFormOrderData {
type
businessName
businessRegisteredAddress
businessRegisteredCity
businessRegisteredState
businessRegisteredZip
businessContactFirstName
businessContactLastName
businessContactEmail
businessContactPhone
useCase
termsAndConditionsWebsite
privacyPolicyWebsite
callToActionLocations
callToActionLanguage
optInKeywords
optInConfirmation
welcomeMessage
exampleAlerts
helpResponseText
stopResponseText
customerSupportContactEmail
customerSupportContactPhone
customerSupportUrl
attachments
}
And the variables look like this.
{
"page": 1,
"publicId": "SCF",
"type": "shortcode_form"
}
You can do a more detailed search, e.g. by using the full publicId.
{
"page": 1,
"publicId": "SCF-5XXY1YJHLK",
"type": "shortcode_form"
}
You can also specify a date range
{
"page": 1,
"publicId": "SCF",
"type": "shortcode_form",
"addedStartDate": "2022-01-01T12:00:00Z",
"addedEndDate": "2022-12-01T12:00:00Z"
}