Create Workflow
curl --request POST \
--url https://api.getmaxim.ai/v1/workflows \
--header 'Content-Type: application/json' \
--header 'x-maxim-api-key: <api-key>' \
--data '
{
"workspaceId": "<string>",
"name": "<string>",
"folderId": "<string>",
"description": "<string>",
"environmentId": "<string>",
"config": {
"language": "<string>"
}
}
'import requests
url = "https://api.getmaxim.ai/v1/workflows"
payload = {
"workspaceId": "<string>",
"name": "<string>",
"folderId": "<string>",
"description": "<string>",
"environmentId": "<string>",
"config": { "language": "<string>" }
}
headers = {
"x-maxim-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-maxim-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspaceId: '<string>',
name: '<string>',
folderId: '<string>',
description: '<string>',
environmentId: '<string>',
config: {language: '<string>'}
})
};
fetch('https://api.getmaxim.ai/v1/workflows', 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://api.getmaxim.ai/v1/workflows",
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([
'workspaceId' => '<string>',
'name' => '<string>',
'folderId' => '<string>',
'description' => '<string>',
'environmentId' => '<string>',
'config' => [
'language' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-maxim-api-key: <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://api.getmaxim.ai/v1/workflows"
payload := strings.NewReader("{\n \"workspaceId\": \"<string>\",\n \"name\": \"<string>\",\n \"folderId\": \"<string>\",\n \"description\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"config\": {\n \"language\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-maxim-api-key", "<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://api.getmaxim.ai/v1/workflows")
.header("x-maxim-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"workspaceId\": \"<string>\",\n \"name\": \"<string>\",\n \"folderId\": \"<string>\",\n \"description\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"config\": {\n \"language\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmaxim.ai/v1/workflows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-maxim-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspaceId\": \"<string>\",\n \"name\": \"<string>\",\n \"folderId\": \"<string>\",\n \"description\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"config\": {\n \"language\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"workspaceId": "<string>",
"accountId": "<string>",
"name": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"description": "<string>",
"folderId": "<string>",
"config": null
}
}Workflow
Create Workflow
Create a new workflow. Only minimal metadata is set at creation time — name, type, optional folderId, description, environmentId, and config.language. To set HTTP fields (method, url, headers, scripts, authentication) or VOICE fields (phoneNumber, dialCode, countryCode), follow up with PUT /v1/workflows.
POST
/
v1
/
workflows
Create Workflow
curl --request POST \
--url https://api.getmaxim.ai/v1/workflows \
--header 'Content-Type: application/json' \
--header 'x-maxim-api-key: <api-key>' \
--data '
{
"workspaceId": "<string>",
"name": "<string>",
"folderId": "<string>",
"description": "<string>",
"environmentId": "<string>",
"config": {
"language": "<string>"
}
}
'import requests
url = "https://api.getmaxim.ai/v1/workflows"
payload = {
"workspaceId": "<string>",
"name": "<string>",
"folderId": "<string>",
"description": "<string>",
"environmentId": "<string>",
"config": { "language": "<string>" }
}
headers = {
"x-maxim-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-maxim-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workspaceId: '<string>',
name: '<string>',
folderId: '<string>',
description: '<string>',
environmentId: '<string>',
config: {language: '<string>'}
})
};
fetch('https://api.getmaxim.ai/v1/workflows', 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://api.getmaxim.ai/v1/workflows",
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([
'workspaceId' => '<string>',
'name' => '<string>',
'folderId' => '<string>',
'description' => '<string>',
'environmentId' => '<string>',
'config' => [
'language' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-maxim-api-key: <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://api.getmaxim.ai/v1/workflows"
payload := strings.NewReader("{\n \"workspaceId\": \"<string>\",\n \"name\": \"<string>\",\n \"folderId\": \"<string>\",\n \"description\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"config\": {\n \"language\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-maxim-api-key", "<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://api.getmaxim.ai/v1/workflows")
.header("x-maxim-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"workspaceId\": \"<string>\",\n \"name\": \"<string>\",\n \"folderId\": \"<string>\",\n \"description\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"config\": {\n \"language\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmaxim.ai/v1/workflows")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-maxim-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspaceId\": \"<string>\",\n \"name\": \"<string>\",\n \"folderId\": \"<string>\",\n \"description\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"config\": {\n \"language\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"workspaceId": "<string>",
"accountId": "<string>",
"name": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"description": "<string>",
"folderId": "<string>",
"config": null
}
}Authorizations
API key for authentication
Body
application/json
Unique identifier for the workspace
Minimum string length:
1Name of the workflow
Minimum string length:
1Type of workflow (HTTP or VOICE)
Available options:
HTTP, VOICE Unique identifier for the folder
Description of the workflow
Default environment identifier for the workflow
Optional workflow configuration overrides
Show child attributes
Show child attributes
Response
Workflow created successfully
Show child attributes
Show child attributes
Was this page helpful?
⌘I