Create a new n8n bot instance
curl --request POST \
--url https://{server-url}/n8n/create/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"enabled": true,
"webhookUrl": "<string>",
"basicAuthUser": "<string>",
"basicAuthPassword": "<string>",
"triggerValue": "<string>",
"expire": 123,
"keywordFinish": "<string>",
"delayMessage": 123,
"unknownMessage": "<string>",
"listeningFromMe": true,
"stopBotFromMe": true,
"keepOpen": true,
"debounceTime": 123,
"ignoreJids": [
"<string>"
]
}
'import requests
url = "https://{server-url}/n8n/create/{instance}"
payload = {
"enabled": True,
"webhookUrl": "<string>",
"basicAuthUser": "<string>",
"basicAuthPassword": "<string>",
"triggerValue": "<string>",
"expire": 123,
"keywordFinish": "<string>",
"delayMessage": 123,
"unknownMessage": "<string>",
"listeningFromMe": True,
"stopBotFromMe": True,
"keepOpen": True,
"debounceTime": 123,
"ignoreJids": ["<string>"]
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
webhookUrl: '<string>',
basicAuthUser: '<string>',
basicAuthPassword: '<string>',
triggerValue: '<string>',
expire: 123,
keywordFinish: '<string>',
delayMessage: 123,
unknownMessage: '<string>',
listeningFromMe: true,
stopBotFromMe: true,
keepOpen: true,
debounceTime: 123,
ignoreJids: ['<string>']
})
};
fetch('https://{server-url}/n8n/create/{instance}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{server-url}/n8n/create/{instance}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'webhookUrl' => '<string>',
'basicAuthUser' => '<string>',
'basicAuthPassword' => '<string>',
'triggerValue' => '<string>',
'expire' => 123,
'keywordFinish' => '<string>',
'delayMessage' => 123,
'unknownMessage' => '<string>',
'listeningFromMe' => true,
'stopBotFromMe' => true,
'keepOpen' => true,
'debounceTime' => 123,
'ignoreJids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$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"
)
func main() {
url := "https://{server-url}/n8n/create/{instance}"
payload := strings.NewReader("{\n \"enabled\": true,\n \"webhookUrl\": \"<string>\",\n \"basicAuthUser\": \"<string>\",\n \"basicAuthPassword\": \"<string>\",\n \"triggerValue\": \"<string>\",\n \"expire\": 123,\n \"keywordFinish\": \"<string>\",\n \"delayMessage\": 123,\n \"unknownMessage\": \"<string>\",\n \"listeningFromMe\": true,\n \"stopBotFromMe\": true,\n \"keepOpen\": true,\n \"debounceTime\": 123,\n \"ignoreJids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{server-url}/n8n/create/{instance}")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"webhookUrl\": \"<string>\",\n \"basicAuthUser\": \"<string>\",\n \"basicAuthPassword\": \"<string>\",\n \"triggerValue\": \"<string>\",\n \"expire\": 123,\n \"keywordFinish\": \"<string>\",\n \"delayMessage\": 123,\n \"unknownMessage\": \"<string>\",\n \"listeningFromMe\": true,\n \"stopBotFromMe\": true,\n \"keepOpen\": true,\n \"debounceTime\": 123,\n \"ignoreJids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{server-url}/n8n/create/{instance}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"webhookUrl\": \"<string>\",\n \"basicAuthUser\": \"<string>\",\n \"basicAuthPassword\": \"<string>\",\n \"triggerValue\": \"<string>\",\n \"expire\": 123,\n \"keywordFinish\": \"<string>\",\n \"delayMessage\": 123,\n \"unknownMessage\": \"<string>\",\n \"listeningFromMe\": true,\n \"stopBotFromMe\": true,\n \"keepOpen\": true,\n \"debounceTime\": 123,\n \"ignoreJids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "n8n bot instance created successfully"
}n8n
Create n8n Bot
Creates a new n8n bot with the provided configuration
POST
/
n8n
/
create
/
{instance}
Create a new n8n bot instance
curl --request POST \
--url https://{server-url}/n8n/create/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"enabled": true,
"webhookUrl": "<string>",
"basicAuthUser": "<string>",
"basicAuthPassword": "<string>",
"triggerValue": "<string>",
"expire": 123,
"keywordFinish": "<string>",
"delayMessage": 123,
"unknownMessage": "<string>",
"listeningFromMe": true,
"stopBotFromMe": true,
"keepOpen": true,
"debounceTime": 123,
"ignoreJids": [
"<string>"
]
}
'import requests
url = "https://{server-url}/n8n/create/{instance}"
payload = {
"enabled": True,
"webhookUrl": "<string>",
"basicAuthUser": "<string>",
"basicAuthPassword": "<string>",
"triggerValue": "<string>",
"expire": 123,
"keywordFinish": "<string>",
"delayMessage": 123,
"unknownMessage": "<string>",
"listeningFromMe": True,
"stopBotFromMe": True,
"keepOpen": True,
"debounceTime": 123,
"ignoreJids": ["<string>"]
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
webhookUrl: '<string>',
basicAuthUser: '<string>',
basicAuthPassword: '<string>',
triggerValue: '<string>',
expire: 123,
keywordFinish: '<string>',
delayMessage: 123,
unknownMessage: '<string>',
listeningFromMe: true,
stopBotFromMe: true,
keepOpen: true,
debounceTime: 123,
ignoreJids: ['<string>']
})
};
fetch('https://{server-url}/n8n/create/{instance}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{server-url}/n8n/create/{instance}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'webhookUrl' => '<string>',
'basicAuthUser' => '<string>',
'basicAuthPassword' => '<string>',
'triggerValue' => '<string>',
'expire' => 123,
'keywordFinish' => '<string>',
'delayMessage' => 123,
'unknownMessage' => '<string>',
'listeningFromMe' => true,
'stopBotFromMe' => true,
'keepOpen' => true,
'debounceTime' => 123,
'ignoreJids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$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"
)
func main() {
url := "https://{server-url}/n8n/create/{instance}"
payload := strings.NewReader("{\n \"enabled\": true,\n \"webhookUrl\": \"<string>\",\n \"basicAuthUser\": \"<string>\",\n \"basicAuthPassword\": \"<string>\",\n \"triggerValue\": \"<string>\",\n \"expire\": 123,\n \"keywordFinish\": \"<string>\",\n \"delayMessage\": 123,\n \"unknownMessage\": \"<string>\",\n \"listeningFromMe\": true,\n \"stopBotFromMe\": true,\n \"keepOpen\": true,\n \"debounceTime\": 123,\n \"ignoreJids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://{server-url}/n8n/create/{instance}")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"webhookUrl\": \"<string>\",\n \"basicAuthUser\": \"<string>\",\n \"basicAuthPassword\": \"<string>\",\n \"triggerValue\": \"<string>\",\n \"expire\": 123,\n \"keywordFinish\": \"<string>\",\n \"delayMessage\": 123,\n \"unknownMessage\": \"<string>\",\n \"listeningFromMe\": true,\n \"stopBotFromMe\": true,\n \"keepOpen\": true,\n \"debounceTime\": 123,\n \"ignoreJids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{server-url}/n8n/create/{instance}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"webhookUrl\": \"<string>\",\n \"basicAuthUser\": \"<string>\",\n \"basicAuthPassword\": \"<string>\",\n \"triggerValue\": \"<string>\",\n \"expire\": 123,\n \"keywordFinish\": \"<string>\",\n \"delayMessage\": 123,\n \"unknownMessage\": \"<string>\",\n \"listeningFromMe\": true,\n \"stopBotFromMe\": true,\n \"keepOpen\": true,\n \"debounceTime\": 123,\n \"ignoreJids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "n8n bot instance created successfully"
}Authorizations
Your authorization key header
Path Parameters
Name of the instance
Body
application/json
Configuration for the n8n bot instance
Available options:
all, keyword Available options:
contains, equals, startsWith, endsWith, regex, none Response
n8n bot instance created successfully
Example:
"n8n bot instance created successfully"

