cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/workflows" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"workflow": {
"name": "Account onboarding",
"entity": "account"
}
}'from exsited import build_client
client = build_client()
response = client.workflows.create_workflow(
{"workflow": {"name": "Account onboarding", "entity": "account"}}
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.workflows.createWorkflow({workflow: {name: 'Account onboarding', entity: 'account'}});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->workflows->createWorkflow([
'workflow' => ['name' => 'Account onboarding', 'entity' => 'account'],
]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.workflows.workflows_dto.WorkflowsDto.WorkflowView;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<WorkflowView> response = client.workflows().createWorkflow(
Map.of("workflow", Map.of("name", "Account onboarding", "entity", "account")));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Workflows.CreateWorkflowAsync(new Dictionary<string, object?>
{
["workflow"] = new Dictionary<string, object?>
{
["name"] = "Account onboarding",
["entity"] = "account",
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.workflows.createWorkflow({
'workflow': {'name': 'Account onboarding', 'entity': 'account'},
});
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Workflows().CreateWorkflow(context.Background(), map[string]any{
"workflow": map[string]any{
"name": "Account onboarding",
"entity": "account",
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"workflow": {
"object": "<string>",
"id": "<string>",
"status": "<string>",
"code": "<unknown>",
"name": "<string>",
"display_name": "<string>",
"description": "<unknown>",
"entity": "<string>",
"entity_id": 123,
"event": "<string>",
"is_pre_built": true,
"enable_stage": true,
"current_version": {
"id": "<string>",
"name": "<string>",
"object": "<string>"
},
"custom_form": "<unknown>",
"created_on": "<string>",
"last_updated_on": "<string>",
"created_by": {
"name": "<string>",
"object": "<string>"
},
"last_updated_by": {
"name": "<string>",
"object": "<string>"
},
"href": "<string>"
}
}Workflows
Create a workflow
Creates a workflow as a draft and returns it.
POST
/
workflows
cURL
curl -X POST "$EXSITED_BASE_URL/api/v4/workflows" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"workflow": {
"name": "Account onboarding",
"entity": "account"
}
}'from exsited import build_client
client = build_client()
response = client.workflows.create_workflow(
{"workflow": {"name": "Account onboarding", "entity": "account"}}
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.workflows.createWorkflow({workflow: {name: 'Account onboarding', entity: 'account'}});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->workflows->createWorkflow([
'workflow' => ['name' => 'Account onboarding', 'entity' => 'account'],
]);
print_r($response->data);
import com.exsited.client.ApiResponse;
import com.exsited.client.ClientRegistry;
import com.exsited.client.ExsitedClient;
import com.exsited.resources.workflows.workflows_dto.WorkflowsDto.WorkflowView;
import java.util.Map;
ExsitedClient client = ClientRegistry.buildClient();
ApiResponse<WorkflowView> response = client.workflows().createWorkflow(
Map.of("workflow", Map.of("name", "Account onboarding", "entity", "account")));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Workflows.CreateWorkflowAsync(new Dictionary<string, object?>
{
["workflow"] = new Dictionary<string, object?>
{
["name"] = "Account onboarding",
["entity"] = "account",
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.workflows.createWorkflow({
'workflow': {'name': 'Account onboarding', 'entity': 'account'},
});
print(response.map);
import (
"context"
"fmt"
"log"
exsited "github.com/exsited/exsited-sdk-go/v4"
)
client, err := exsited.BuildClient(nil)
if err != nil {
log.Fatal(err)
}
defer client.Close()
response, err := client.Workflows().CreateWorkflow(context.Background(), map[string]any{
"workflow": map[string]any{
"name": "Account onboarding",
"entity": "account",
},
}, nil)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Map)
{
"workflow": {
"object": "<string>",
"id": "<string>",
"status": "<string>",
"code": "<unknown>",
"name": "<string>",
"display_name": "<string>",
"description": "<unknown>",
"entity": "<string>",
"entity_id": 123,
"event": "<string>",
"is_pre_built": true,
"enable_stage": true,
"current_version": {
"id": "<string>",
"name": "<string>",
"object": "<string>"
},
"custom_form": "<unknown>",
"created_on": "<string>",
"last_updated_on": "<string>",
"created_by": {
"name": "<string>",
"object": "<string>"
},
"last_updated_by": {
"name": "<string>",
"object": "<string>"
},
"href": "<string>"
}
}Send the workflow wrapped in
workflow. name is required. Unknown keys are refused. The new workflow starts with the status draft and comes back under workflow.
The SDK samples get their client from credentials your app registers once when it starts, as shown in Authentication. To try the call here, click Try it, set
host to your Exsited API host name and paste an access token from Get an access token. To send a raw JSON body instead of filling in fields, copy the cURL sample and edit its -d payload.Authorizations
An access token from POST /api/v4/oauth2/token. The SDKs get and renew it for you.
Body
application/json
The new workflow. Keys the API does not read are refused.
Show child attributes
Show child attributes
Response
201 - application/json
The new workflow, under workflow.
Show child attributes
Show child attributes