Skip to main content
POST
/
v1
/
flows
/
{id}
cURL
curl --request POST \
  --url https://cloud.nrai.io/api/v1/flows/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "type": "MOVE_ACTION",
  "request": {
    "name": "<string>",
    "newParentStep": "<string>",
    "stepLocationRelativeToNewParent": "AFTER",
    "branchIndex": 123
  }
}
'
import requests

url = "https://cloud.nrai.io/api/v1/flows/{id}"

payload = {
    "type": "MOVE_ACTION",
    "request": {
        "name": "<string>",
        "newParentStep": "<string>",
        "stepLocationRelativeToNewParent": "AFTER",
        "branchIndex": 123
    }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    type: 'MOVE_ACTION',
    request: {
      name: '<string>',
      newParentStep: '<string>',
      stepLocationRelativeToNewParent: 'AFTER',
      branchIndex: 123
    }
  })
};

fetch('https://cloud.nrai.io/api/v1/flows/{id}', 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://cloud.nrai.io/api/v1/flows/{id}",
  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([
    'type' => 'MOVE_ACTION',
    'request' => [
        'name' => '<string>',
        'newParentStep' => '<string>',
        'stepLocationRelativeToNewParent' => 'AFTER',
        'branchIndex' => 123
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/json"
  ],
]);

$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://cloud.nrai.io/api/v1/flows/{id}"

	payload := strings.NewReader("{\n  \"type\": \"MOVE_ACTION\",\n  \"request\": {\n    \"name\": \"<string>\",\n    \"newParentStep\": \"<string>\",\n    \"stepLocationRelativeToNewParent\": \"AFTER\",\n    \"branchIndex\": 123\n  }\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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://cloud.nrai.io/api/v1/flows/{id}")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"type\": \"MOVE_ACTION\",\n  \"request\": {\n    \"name\": \"<string>\",\n    \"newParentStep\": \"<string>\",\n    \"stepLocationRelativeToNewParent\": \"AFTER\",\n    \"branchIndex\": 123\n  }\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://cloud.nrai.io/api/v1/flows/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"type\": \"MOVE_ACTION\",\n  \"request\": {\n    \"name\": \"<string>\",\n    \"newParentStep\": \"<string>\",\n    \"stepLocationRelativeToNewParent\": \"AFTER\",\n    \"branchIndex\": 123\n  }\n}"

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

Authorizations

Authorization
string
header
required

Use your api key generated from the admin console

Path Parameters

id
string
required
Pattern: ^[0-9a-zA-Z]{21}$

Body

application/json
type
enum<string>
required
Available options:
MOVE_ACTION
request
object
required

Response

200

Default Response