cloudwi.re SMS API

Keyword Creation & Management

The cloudwi.re SMS API allows the developer to create two types of keywords on the marketing short codes. For opt-in keywords, responses are automated by default. For Responder keywords, content must be added to the keyword for cloudwi.re to automate the response. Keywords must be unique and are limited to a length of 2-30 characters. You may use spaces as well to account for auto-correct. We certainly highly recommend if you reserve a keyword that is two or more words, you should reserve the keyword with it's natural spaces. For example, CLOUDWIRE and CLOUD WIRE should be reserved.

The keyword resource gives the developer the ability to search, create, delete and edit responder content for responder type keywords.

Is Keyword Available

Open in API Explorer
POST /keyword/iskeywordavailable

This method allows the developer to check if a keyword is available on the cloudwi.re marketing/opt-in short codes. Keywords must be unique in order for cloudwi.re to know what store the opt-in or responder belongs too. As such, other cloudwi.re Clients may be using a keyword that you want. See the considerations below for other important limitations on keywords.

If the keyword is available, then you may use CreateKeyword to lock it into the store you are calling with your authentication. Keyword charges apply.

Other Considerations

  • The character limit for keywords are 2-30.
  • You may uses spaces as you wish for potential auto-correct issues.
  • case sensitivity is not enforced for keywords.
  • Special characters are not allowed. Please use only alpha or numeric keywords or a blend of both.

Example Request

Format:
curl --request POST \
  --url https://moonbeamapi.cloudwi.re/keyword/iskeywordavailable \
  --header 'accept: application/json' \
  --header 'authorization: Bearer SOME.JWT.TOKEN' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --form keyword=buckeyes \
  --form shortCode=444999
require 'uri'
require 'net/http'

url = URI("https://moonbeamapi.cloudwi.re/keyword/iskeywordavailable")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer SOME.JWT.TOKEN'
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keyword\"\r\n\r\nbuckeyes\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"shortCode\"\r\n\r\n444999\r\n-----011000010111000001101001--\r\n"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "moonbeamapi.cloudwi.re",
  "port": null,
  "path": "/keyword/iskeywordavailable",
  "headers": {
    "accept": "application/json",
    "authorization": "Bearer SOME.JWT.TOKEN",
    "content-type": "multipart/form-data; boundary=---011000010111000001101001"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keyword\"\r\n\r\nbuckeyes\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"shortCode\"\r\n\r\n444999\r\n-----011000010111000001101001--\r\n");
req.end();
import http.client

conn = http.client.HTTPSConnection("moonbeamapi.cloudwi.re")

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keyword\"\r\n\r\nbuckeyes\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"shortCode\"\r\n\r\n444999\r\n-----011000010111000001101001--\r\n"

headers = {
    'accept': "application/json",
    'authorization': "Bearer SOME.JWT.TOKEN",
    'content-type': "multipart/form-data; boundary=---011000010111000001101001"
    }

conn.request("POST", "/keyword/iskeywordavailable", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://moonbeamapi.cloudwi.re/keyword/iskeywordavailable",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keyword\"\r\n\r\nbuckeyes\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"shortCode\"\r\n\r\n444999\r\n-----011000010111000001101001--\r\n",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer SOME.JWT.TOKEN",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://moonbeamapi.cloudwi.re/keyword/iskeywordavailable"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keyword\"\r\n\r\nbuckeyes\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"shortCode\"\r\n\r\n444999\r\n-----011000010111000001101001--\r\n")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Bearer SOME.JWT.TOKEN")
	req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Form Data Parameters

Name Type Required Description Example
keyword String Required

The keyword you wish to use. This can be a responder or opt-in keyword. They both must be unique.

buckeyes
shortCode String Required

The short code you want the keyword for. Either '444999' or '345345'

444999

Responses

200 Fail

The Keyword is not available

Keyword Creation & Management Keyword unavailable
{
  "status": "fail",
String
  "code": 200,
Integer
  "message": "Keyword Already In Use",
String
  "results": [
    "foo",
    "foo",
    "foo"
  ]
Array
}
200 Pass

Keyword Available

Keyword Creation & Management Keyword available
{
  "status": "pass",
String
  "code": 200,
Integer
  "message": "Keyword Available",
String
  "results": [
    "foo",
    "foo",
    "foo"
  ]
Array
}
400 Invalid Keyword Characters

Keywords can only be 2-30 characters. Please try again.

(Empty Response)
400 Invalid Short Code

Either '444999' or '345345'

(Empty Response)

Create Keyword

Open in API Explorer
POST /account/store/keyword/create

This method allows the developer to add a keyword to the store you assign it to with your auth string. When you make a call to this method, the cloudwi.re SMS API will approve your keyword instantly as long as it meets the considerations listed below. Although not required, we'd advise checking keyword availability first using IsKeywordAvailable. Additionally, in order to edit responder keyword content or delete keywords, make sure you store the keyword ID returned to you in this method.

There are two types of keywords within the cloudwi.re SMS API.

Opt-In Keyword The opt-in keyword, which will opt the mobile subscriber into the store. From there, ongoing 2-way SMS communications can be implemented for as long as the subscriber remains opted-in.

Responder Keyword The Responder keyword, which will only allow one response text message back to the mobile subscriber. It’s generally used for coupons or informational tips. This keyword type does not change the opt-in status of the mobile subscriber.

Other Considerations

  • The character limit for keywords are 2-30.
  • You can wild card keywords if you like
  • case sensitivity is not enforced for keywords.
  • You may uses spaces as you wish for potential auto-correct issues
  • Special characters are not allowed. Please use only alpha or numeric keywords or a blend of both.
  • An opt-in keyword will utilize the default store opt-in template unless you have keyword automation turned off.

Example Request

Format:
curl --request POST \
  --url https://moonbeamapi.cloudwi.re/account/store/keyword/create \
  --header 'accept: application/json' \
  --header 'authorization: Bearer SOME.JWT.TOKEN' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --form storeId=2ou2e23oi23ln23lkn \
  --form keywordType=Responder \
  --form shortCode=444999 \
  --form keyword=buckeyes
require 'uri'
require 'net/http'

url = URI("https://moonbeamapi.cloudwi.re/account/store/keyword/create")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer SOME.JWT.TOKEN'
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordType\"\r\n\r\nResponder\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"shortCode\"\r\n\r\n444999\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keyword\"\r\n\r\nbuckeyes\r\n-----011000010111000001101001--\r\n"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "moonbeamapi.cloudwi.re",
  "port": null,
  "path": "/account/store/keyword/create",
  "headers": {
    "accept": "application/json",
    "authorization": "Bearer SOME.JWT.TOKEN",
    "content-type": "multipart/form-data; boundary=---011000010111000001101001"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordType\"\r\n\r\nResponder\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"shortCode\"\r\n\r\n444999\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keyword\"\r\n\r\nbuckeyes\r\n-----011000010111000001101001--\r\n");
req.end();
import http.client

conn = http.client.HTTPSConnection("moonbeamapi.cloudwi.re")

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordType\"\r\n\r\nResponder\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"shortCode\"\r\n\r\n444999\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keyword\"\r\n\r\nbuckeyes\r\n-----011000010111000001101001--\r\n"

headers = {
    'accept': "application/json",
    'authorization': "Bearer SOME.JWT.TOKEN",
    'content-type': "multipart/form-data; boundary=---011000010111000001101001"
    }

conn.request("POST", "/account/store/keyword/create", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://moonbeamapi.cloudwi.re/account/store/keyword/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordType\"\r\n\r\nResponder\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"shortCode\"\r\n\r\n444999\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keyword\"\r\n\r\nbuckeyes\r\n-----011000010111000001101001--\r\n",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer SOME.JWT.TOKEN",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://moonbeamapi.cloudwi.re/account/store/keyword/create"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordType\"\r\n\r\nResponder\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"shortCode\"\r\n\r\n444999\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keyword\"\r\n\r\nbuckeyes\r\n-----011000010111000001101001--\r\n")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Bearer SOME.JWT.TOKEN")
	req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Form Data Parameters

Name Type Required Description Example
storeId String Required

The Store ID of the store you wish to create the keyword for.

2ou2e23oi23ln23lkn
keywordType String Required

Either an "Opt-In" or "Responder" keyword.

Responder
shortCode String Required

Either '444999' or '345345'

444999
keyword String Required

The keyword. Spaces are allowed. 2-32 characters only.

buckeyes

Responses

200 FAIL

The keyword is not available.

Keyword Creation & Management Keyword unavailable
{
  "status": "fail",
String
  "code": 200,
Integer
  "message": "Keyword Already In Use",
String
  "results": [
    "foo",
    "foo",
    "foo"
  ]
Array
}
200 Pass

The keyword has been created.

Keyword Creation & Management Keyword created
{
  "status": "pass",
String
  "code": 200,
Integer
  "message": "Your keyword has been created",
String
  "results": {
  "results": { ... }
Object
    "keywordType": "responder",
String
    "shortCode": "+444999",
String
    "keyword": "buckeyes",
String
    "mCreated": {
    "mCreated": { ... }
Object
      "sec": 1474439832,
Integer
      "usec": 0
Integer
    },
    "created": "3/21/2017 06:37:12",
String
    "_id": {
    "_id": { ... }
Object
      "$id": "2l32evcewer3k23359082335235k3"
String
    },
    "storeName": "Jim's Pizza"
String
  }
}
400 Keyword Length Invalid

The keyword length must be 2-30 characters

(Empty Response)
400 Keyword Type Invalid

Use either 'Opt-In' or 'Responder'

(Empty Response)
400 Invalid Short Code

Please select only '444999' or '345345'

(Empty Response)

Delete Keyword

Open in API Explorer
POST /account/store/keyword/delete

This method allows the developer delete a keyword from a store and remove it from any future billing to your cloudwi.re account. Subscribers who used the keyword will see no change in their opt-in status. As for what happens when you delete the keyword and a subscriber sends it in? cloudwi.re will not know where to route the keyword and respond to the subscriber with a keyword unrecognized message.

If you forget or did not store the keyword ID, head over to Get Store Details.

If you have a lot of stores and are completely lost in the sauce (It happens to us all the time!) as to where the keyword you want to remove is, then head over to Get Account Details.

Example Request

Format:
curl --request POST \
  --url https://moonbeamapi.cloudwi.re/account/store/keyword/delete \
  --header 'accept: application/json' \
  --header 'authorization: Bearer SOME.JWT.TOKEN' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --form storeId=2ou2e23oi23ln23lkn \
  --form keywordId=2l32evcewer3k23359082335235k3
require 'uri'
require 'net/http'

url = URI("https://moonbeamapi.cloudwi.re/account/store/keyword/delete")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer SOME.JWT.TOKEN'
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordId\"\r\n\r\n2l32evcewer3k23359082335235k3\r\n-----011000010111000001101001--\r\n"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "moonbeamapi.cloudwi.re",
  "port": null,
  "path": "/account/store/keyword/delete",
  "headers": {
    "accept": "application/json",
    "authorization": "Bearer SOME.JWT.TOKEN",
    "content-type": "multipart/form-data; boundary=---011000010111000001101001"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordId\"\r\n\r\n2l32evcewer3k23359082335235k3\r\n-----011000010111000001101001--\r\n");
req.end();
import http.client

conn = http.client.HTTPSConnection("moonbeamapi.cloudwi.re")

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordId\"\r\n\r\n2l32evcewer3k23359082335235k3\r\n-----011000010111000001101001--\r\n"

headers = {
    'accept': "application/json",
    'authorization': "Bearer SOME.JWT.TOKEN",
    'content-type': "multipart/form-data; boundary=---011000010111000001101001"
    }

conn.request("POST", "/account/store/keyword/delete", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://moonbeamapi.cloudwi.re/account/store/keyword/delete",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordId\"\r\n\r\n2l32evcewer3k23359082335235k3\r\n-----011000010111000001101001--\r\n",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer SOME.JWT.TOKEN",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://moonbeamapi.cloudwi.re/account/store/keyword/delete"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordId\"\r\n\r\n2l32evcewer3k23359082335235k3\r\n-----011000010111000001101001--\r\n")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Bearer SOME.JWT.TOKEN")
	req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Form Data Parameters

Name Type Required Description Example
storeId String Required

The Store ID where the keyword resides.

2ou2e23oi23ln23lkn
keywordId String Required

The Keyword ID of the keyword you wish to delete.

2l32evcewer3k23359082335235k3

Responses

200 Pass

The Keyword has been deleted.

Keyword Creation & Management Keyword deleted
{
  "status": "pass",
String
  "code": 200,
Integer
  "message": "The keyword has been deleted.",
String
  "results": [
    "foo",
    "foo",
    "foo"
  ]
Array
}
400 Invalid Keyword ID

Check the Keyword ID.

(Empty Response)

Edit Responder Keyword Content

Open in API Explorer
POST /keyword/editresponderkeywordcontent/?token=

This method allows the developer to either add content or overwrite responder keyword content of an established keyword. You should only need this method if cloudwi.re keyword automation is turned on. If keyword automation is turned off for responder keywords, you will need a special unpublished parameter for sending a message from the marketing short code. Contact support@cloudwi.re and we'll get you hooked up.

Other Considerations

  • Messages are limited to 1600 characters, but we advise 160 because of this.
  • The URL must begin with either HTTP or HTTPS
  • MMS is limited to 5mb for pictures and 455kb for audio/video. Refer to our MMS supported media for more info on supported URL types for MMS.
  • MMS to carriers who do not support it will be sent as a URL.
  • You may set up responderContent or a mediaUrl or both together. One or the other is required though.
  • If you want to create line breaks, click here.
  • Be weary of special characters...make sure you test.
  • Your content and offer are important. The mobile subscriber is taking time to text you. Give them something good and you’ll be rewarded with high response rates.

Example Request

Format:
curl --request POST \
  --url 'https://moonbeamapi.cloudwi.re/keyword/editresponderkeywordcontent/?token=' \
  --header 'accept: application/json' \
  --header 'authorization: Bearer SOME.JWT.TOKEN' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --form storeId=2ou2e23oi23ln23lkn \
  --form keywordId=2l32evcewer3k23359082335235k3 \
  --form 'responderContent=Buckeye Football Tailgate.  Half off drinks, band, party @ the Shoe!' \
  --form mediaUrl=http://cloudwi.re/image/23ab.png
require 'uri'
require 'net/http'

url = URI("https://moonbeamapi.cloudwi.re/keyword/editresponderkeywordcontent/?token=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["accept"] = 'application/json'
request["authorization"] = 'Bearer SOME.JWT.TOKEN'
request["content-type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordId\"\r\n\r\n2l32evcewer3k23359082335235k3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"responderContent\"\r\n\r\nBuckeye Football Tailgate.  Half off drinks, band, party @ the Shoe!\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mediaUrl\"\r\n\r\nhttp://cloudwi.re/image/23ab.png\r\n-----011000010111000001101001--\r\n"

response = http.request(request)
puts response.read_body
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "moonbeamapi.cloudwi.re",
  "port": null,
  "path": "/keyword/editresponderkeywordcontent/?token=",
  "headers": {
    "accept": "application/json",
    "authorization": "Bearer SOME.JWT.TOKEN",
    "content-type": "multipart/form-data; boundary=---011000010111000001101001"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordId\"\r\n\r\n2l32evcewer3k23359082335235k3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"responderContent\"\r\n\r\nBuckeye Football Tailgate.  Half off drinks, band, party @ the Shoe!\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mediaUrl\"\r\n\r\nhttp://cloudwi.re/image/23ab.png\r\n-----011000010111000001101001--\r\n");
req.end();
import http.client

conn = http.client.HTTPSConnection("moonbeamapi.cloudwi.re")

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordId\"\r\n\r\n2l32evcewer3k23359082335235k3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"responderContent\"\r\n\r\nBuckeye Football Tailgate.  Half off drinks, band, party @ the Shoe!\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mediaUrl\"\r\n\r\nhttp://cloudwi.re/image/23ab.png\r\n-----011000010111000001101001--\r\n"

headers = {
    'accept': "application/json",
    'authorization': "Bearer SOME.JWT.TOKEN",
    'content-type': "multipart/form-data; boundary=---011000010111000001101001"
    }

conn.request("POST", "/keyword/editresponderkeywordcontent/?token=", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://moonbeamapi.cloudwi.re/keyword/editresponderkeywordcontent/?token=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordId\"\r\n\r\n2l32evcewer3k23359082335235k3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"responderContent\"\r\n\r\nBuckeye Football Tailgate.  Half off drinks, band, party @ the Shoe!\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mediaUrl\"\r\n\r\nhttp://cloudwi.re/image/23ab.png\r\n-----011000010111000001101001--\r\n",
  CURLOPT_HTTPHEADER => array(
    "accept: application/json",
    "authorization: Bearer SOME.JWT.TOKEN",
    "content-type: multipart/form-data; boundary=---011000010111000001101001"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://moonbeamapi.cloudwi.re/keyword/editresponderkeywordcontent/?token="

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storeId\"\r\n\r\n2ou2e23oi23ln23lkn\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"keywordId\"\r\n\r\n2l32evcewer3k23359082335235k3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"responderContent\"\r\n\r\nBuckeye Football Tailgate.  Half off drinks, band, party @ the Shoe!\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"mediaUrl\"\r\n\r\nhttp://cloudwi.re/image/23ab.png\r\n-----011000010111000001101001--\r\n")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("accept", "application/json")
	req.Header.Add("authorization", "Bearer SOME.JWT.TOKEN")
	req.Header.Add("content-type", "multipart/form-data; boundary=---011000010111000001101001")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}

Form Data Parameters

Name Type Required Description Example
storeId String Required

The Store ID where the keyword you are editing resides.

2ou2e23oi23ln23lkn
keywordId String Required

The Keyword ID of the Responder Keyword you are editing.

2l32evcewer3k23359082335235k3
responderContent String Optional

The content of the outbound SMS to the subscriber after the keyword is received. 160 characters or less is recommended. Not required if mediaUrl is added.

Buckeye Football Tailgate. Half off drinks, band, party @ the Shoe!
mediaUrl String Optional

The URL of the MMS you wish to send to the subscriber after the keyword is received. Not required if responderContent is added.

http://cloudwi.re/image/23ab.png

Responses

200 Pass

Your responder content is updated.

Keyword Creation & Management Responder content updated
{
  "status": "pass",
String
  "code": 200,
Integer
  "message": "Keyword content updated",
String
  "results": {
  "results": { ... }
Object
    "keywordType": "responder",
String
    "shortCode": "444999",
String
    "keyword": "buckeyes",
String
    "mCreated": {
    "mCreated": { ... }
Object
      "sec": 1481090000,
Integer
      "usec": 0
Integer
    },
    "created": "12/07/2016 06:50:46",
String
    "_id": {
    "_id": { ... }
Object
      "$id": "2l32evcewer3k23359082335235k3"
String
    },
    "mediaUrl": "http://cloudwi.re/image/23ab.png",
String
    "responderContent": "Buckeye Football Tailgate.  Half off drinks, band, party @ the Shoe!"
String
  }
}
400 Invalid Media URL

Must start with HTTP:// or HTTPS://

(Empty Response)
400 Character Count Exceeded

Your message exceeds 1600 characters.

(Empty Response)
400 Invalid Keyword ID

Check the Keyword ID.

(Empty Response)