Setting The Host

IronMQ v3 public clusters are available in 2 locations. To use on another cloud (private or public) please reach out to and we can assist.

Our public cluster options are:

This will get set in a number of different ways, but here is a selection of examples for posting a single message to a pull queue.

Table of Contents

he basic format is very similar for most major languages. These examples are using the cluster, but that should be changed for your needs:


curl -X POST -H "Authorization: OAuth <$token>" -H "Content-Type: application/json" -H   -d '{
  "messages": [
      "body": "This is my message 1.",
      "delay": 0
}' ""


require 'uri'
require 'net/http'

url = URI("")

http =, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request =
request["authorization"] = 'OAuth <$token>'
request["content-type"] = 'application/json'
request.body = "{\n  \"messages\": [\n    {\n      \"body\": \"This is my message 1.\",\n      \"delay\": 0\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body


package main

import (

func main() {

  url := ""

  payload := strings.NewReader("{\n  \"messages\": [\n    {\n      \"body\": \"This is my message 1.\",\n      \"delay\": 0\n    }\n  ]\n}")

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

  req.Header.Add("authorization", "OAuth <$token>")
  req.Header.Add("content-type", "application/json")

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

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




OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"messages\": [\n    {\n      \"body\": \"This is my message 1.\",\n      \"delay\": 0\n    }\n  ]\n}");
Request request = new Request.Builder()
  .addHeader("authorization", "OAuth <$token>")
  .addHeader("content-type", "application/json")

Response response = client.newCall(request).execute();


url = ""

payload = "{\n  \"messages\": [\n    {\n      \"body\": \"This is my message 1.\",\n      \"delay\": 0\n    }\n  ]\n}"
headers = {
    'authorization': "OAuth <$token>",
    'content-type': "application/json",

response = requests.request("POST", url, data=payload, headers=headers)




$request = new HttpRequest();

  'content-type' => 'application/json',
  'authorization' => 'OAuth <$token>'

  "messages": [
      "body": "This is my message 1.",
      "delay": 0

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;


var request = require("request");

var options = { method: 'POST',
  url: '',
     'content-type': 'application/json',
     authorization: 'OAuth <$token>' },
  body: { messages: [ { body: 'This is my message 1.', delay: 0 } ] },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);



var client = new RestClient("");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "OAuth <$token>");
request.AddParameter("application/json", "{\n  \"messages\": [\n    {\n      \"body\": \"This is my message 1.\",\n      \"delay\": 0\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);