cURL
curl -X PATCH "$EXSITED_BASE_URL/api/v4/workflows/wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"workflow": {
"display_name": "Account onboarding (revised)"
}
}'from exsited import build_client
client = build_client()
response = client.workflows.update_workflow(
"wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b",
{"workflow": {"display_name": "Account onboarding (revised)"}},
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.workflows.updateWorkflow('wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b', {
workflow: {display_name: 'Account onboarding (revised)'},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->workflows->updateWorkflow('wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b', [
'workflow' => ['display_name' => 'Account onboarding (revised)'],
]);
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().updateWorkflow(
"wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b",
Map.of("workflow", Map.of("display_name", "Account onboarding (revised)")));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Workflows.UpdateWorkflowAsync(
"wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b",
new Dictionary<string, object?>
{
["workflow"] = new Dictionary<string, object?>
{
["display_name"] = "Account onboarding (revised)",
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.workflows.updateWorkflow(
'wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b',
{
'workflow': {'display_name': 'Account onboarding (revised)'},
},
);
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().UpdateWorkflow(context.Background(), "wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b", map[string]any{
"workflow": map[string]any{
"display_name": "Account onboarding (revised)",
},
}, 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
Update a workflow
Changes a workflow’s fields or moves its status, and returns the workflow.
PATCH
/
workflows
/
{workflow_id}
cURL
curl -X PATCH "$EXSITED_BASE_URL/api/v4/workflows/wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"workflow": {
"display_name": "Account onboarding (revised)"
}
}'from exsited import build_client
client = build_client()
response = client.workflows.update_workflow(
"wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b",
{"workflow": {"display_name": "Account onboarding (revised)"}},
)
print(response.data)
import {buildClient} from 'exsited';
const client = await buildClient();
const response = await client.workflows.updateWorkflow('wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b', {
workflow: {display_name: 'Account onboarding (revised)'},
});
console.log(response.data);
use Exsited\Client\ClientRegistry;
$client = ClientRegistry::buildClient();
$response = $client->workflows->updateWorkflow('wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b', [
'workflow' => ['display_name' => 'Account onboarding (revised)'],
]);
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().updateWorkflow(
"wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b",
Map.of("workflow", Map.of("display_name", "Account onboarding (revised)")));
System.out.println(response.getMap());
using Exsited.Client;
await using var client = ExsitedClient.BuildClient();
var response = await client.Workflows.UpdateWorkflowAsync(
"wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b",
new Dictionary<string, object?>
{
["workflow"] = new Dictionary<string, object?>
{
["display_name"] = "Account onboarding (revised)",
},
});
Console.WriteLine(response.Json);
import 'package:exsited/exsited.dart';
final client = buildClient();
final response = await client.workflows.updateWorkflow(
'wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b',
{
'workflow': {'display_name': 'Account onboarding (revised)'},
},
);
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().UpdateWorkflow(context.Background(), "wf_6f1c2a9e4b3d4c8e9a7b5d2f0e1c3a4b", map[string]any{
"workflow": map[string]any{
"display_name": "Account onboarding (revised)",
},
}, 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 fields to change wrapped in
workflow. A draft can move to active, and an active workflow can move to inactive and back. The updated workflow 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.
Path Parameters
The workflow's wf_ id.
Body
application/json
The fields to change.
Show child attributes
Show child attributes
Response
200 - application/json
The updated workflow, under workflow.
Show child attributes
Show child attributes