POST

https://emailoctopus.com/api/1.6/automations/:automationId/queue

Start an automation for a list contact. The automation must have the 'Started via API' trigger type. Configure in the dashboard your automation settings and whether a contact can re-enter an automation.

Parameters
api_key (string)
list_member_id (string)
200 (success) returns
Non-200 (error) returns
Details of the error:
code (string) The error code.
message (string) A description of the error.
Method-specific error codes
CONTACT_NOT_FOUND
AUTOMATION_NOT_FOUND
ALREADY_STARTED
API-wide error codes
INVALID_PARAMETERS
API_KEY_INVALID
UNAUTHORISED
NOT_FOUND
UNKNOWN
Example request
```js
{
"api_key": "00000000-0000-0000-0000-000000000000",
"list_member_id": "11111111-1111-1111-1111-111111111111"

}


| Example response |
| --- |
| ```js
{}
``` |

| Code sample<br> [copy](/content/api-documentation/automations/queue#/index.html) |
| --- |
| ```
curl -X POST \
    -d '{"api_key":"00000000-0000-0000-0000-000000000000","list_member_id":"00000000-0000-0000-0000-000000000000"}' \
    https://emailoctopus.com/api/1.6/automations/00000000-0000-0000-0000-000000000000/queue
``` |
| ```
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://emailoctopus.com/api/1.6/automations/00000000-0000-0000-0000-000000000000/queue');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"api_key":"00000000-0000-0000-0000-000000000000","list_member_id":"00000000-0000-0000-0000-000000000000"}');
$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);
``` |
| ```
import requests
data = '{"api_key":"00000000-0000-0000-0000-000000000000","list_member_id":"00000000-0000-0000-0000-000000000000"}'
response = requests.post('https://emailoctopus.com/api/1.6/automations/00000000-0000-0000-0000-000000000000/queue', data=data)
``` |
| ```
var https = require('https');
var postData = '{"api_key":"00000000-0000-0000-0000-000000000000","list_member_id":"00000000-0000-0000-0000-000000000000"}' ;
var options = {
    hostname: 'emailoctopus.com',
    port: 443,
    path: '/api/1.6/automations/00000000-0000-0000-0000-000000000000/queue',
    method: 'POST',
};
var req = https.request(options);
req.write(postData);
req.end();
``` |
| ```
package main
import (
    "io/ioutil"
    "log"
    "net/http"
    "strings"
)
func main() {
    client := &http.Client{}
    
    var data = strings.NewReader(`{"api_key":"00000000-0000-0000-0000-000000000000","list_member_id":"00000000-0000-0000-0000-000000000000"}`)
    req, err := http.NewRequest("POST", "https://emailoctopus.com/api/1.6/automations/00000000-0000-0000-0000-000000000000/queue", data)
    if err != nil {
        log.Fatal(err)
    }
    
    resp, err := client.Do(req)
    if err != nil {
        log.Fatal(err)
    }
    bodyText, err := ioutil.ReadAll(resp.Body)
    if err != nil {
        log.Fatal(err)
    }
}
``` |