Alpha Names Requests
API routes to create and list Alpha names (verified business names used as a message sender).
1. Create Organization Alpha Name
This POST request is used to create a new Alpha Name associated with an organization. The request requires an organization authorization key in the headers.
Request
- URL:
https://restapi.smsbat.com/organizations/alpha_name - Method: POST
- Headers:
Accept: application/jsonX-Authorization-Key: {organization_token}(Created in the User Profile section).
Body:
{
"name": "testName",
"companyCode": "88888888"
}
Body Parameters:
name(String): The proposed Alpha Name.- Requirement: Length should be less than 12 characters.
companyCode(String): The company registration code associated with the Alphaname (ERPOU/IPN for Ukraine).
Possible Responses:
- 200 OK: Alpha Name was successfully sent for moderation/creation.
- 400 Bad Request: Validation error (e.g., name is too long).
- 401 Unauthorized: Invalid or missing
X-Authorization-Key.
2. Fetch AlphaName List
Retrieves an up-to-date list of Alpha Names, including their current moderation statuses.
Request
- URL:
https://restapi.smsbat.com/organizations/alpha_name/list - Method: GET
- Headers:
X-Authorization-Key: {organization_token}
Response (200 OK):
[
{
"name": "test1",
"status": "Pending Approval",
"statusCode": "PA",
"statusUpdateDate": "2024-07-24T16:34:40.137432Z"
},
{
"name": "test2",
"status": "Approved",
"statusCode": "A",
"statusUpdateDate": "2024-07-24T15:46:50.494443Z"
}
]
Alpha Name Statuses (statusCode):
PA- Pending ApprovalA- ApprovedD- Declined