Keywords¶
You can use this API to programmatically add new keywords to your account, for use with value added services (VAS).
Access to this API requires a separate agreement with GatewayAPI, intended for resellers and/or accounts with large needs for two-way messaging.
List Keywords¶
GET /api/vas
¶
Get a list of keywords
Request Headers:
- Authorization - API Token or OAuth bearer token
1 2 3 4 5 |
|
Example response:
1 2 3 4 5 6 7 8 9 10 11 |
|
Add Keyword¶
POST /api/vas/check
¶
Check if a keyword is available
Request JSON Object:
- keyword (string) - Keyword to search for
- shortcode (integer) - ie. 451204
Response JSON Object:
- system (string) - System using the keyword (gatewayapi)
- available (boolean) - Is the keyword available
Request Headers:
- Authorization - API Token or OAuth bearer token
Status Codes:
- 200 OK - no error, see JSON output
- 422 Unprocessable Entity - input validation error
1 2 3 4 5 6 7 8 9 10 |
|
Example response:
1 2 3 4 5 6 7 |
|
POST /api/vas
¶
Add a new keyword
Please note that the price for the keyword will be deducted from your GatewayAPI Credit immediately upon adding the keyword.
When adding a new keyword you are charged the full price, regardless how many days are left in the month until the next invoice period.
If you want to assign the new keyword to a webhook right away, set the optional field pushsetting_reference to the “unique label” of the webhook.
Request JSON Object:
- keyword (string) - Keyword to add
- shortcode (integer) - i.e. 451204
- pushsetting_reference (string) - Optional webhook to assign to
Request Headers:
- Authorization - API Token or OAuth bearer token
Status Codes:
- 201 Created - created
- 422 Unprocessable Entity - input validation error
1 2 3 4 5 6 7 8 9 10 |
|
Example response:
1 2 3 4 5 6 7 8 9 |
|
DELETE /api/vas/{shortcode:int}/(keyword)
¶
Cancel the keyword.
Note that your keyword will remain active on your account until the end of the subscription period.
Query Parameters:
- shortcode - ie. 451204
- keyword - The keyword to delete
Request Headers:
- Authorization - API Token or OAuth bearer token
Status Codes:
- 202 Accepted - Accepted for deletion at the end of payment period.
- 404 Not Found - Could not find the keyword
- 422 Unprocessable Entity - Input validation error
1 2 3 4 |
|
Example response:
1 2 |
|