cURL
curl -X PATCH \
-H 'Authorization: Bearer $API_KEY' \
-H 'x-api-key: $API_KEY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"name": "Updated Workflow #4", "team_id": "41480ee5-14ff-4f9e-89bf-91b0a8e50e77", "owner_id": "ab7dafe2-4f19-4570-bad0-a88e70ad2c11", "is_external": false, "canvas_type": 0}' \
'$BASE_URL/workflows/$workflow_id'import requests
headers = {
'x-api-key': '<YOUR_API_KEY>',
'Authorization': 'Bearer <YOUR_JWT_TOKEN>',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
data = {
'name': 'Updated Workflow #4',
'team_id': '41480ee5-14ff-4f9e-89bf-91b0a8e50e77',
'owner_id': 'ab7dafe2-4f19-4570-bad0-a88e70ad2c11',
'is_external': False,
'canvas_type': 0
}
resp = requests.patch(f"https://accounts.playbook3d.com/workflows/{{workflow_id}}", json=data, headers=headers)
print(resp.status_code, resp.json())fetch(`https://accounts.playbook3d.com/workflows/${workflow_id}`, {
method: 'PATCH',
headers: {
'x-api-key': '<YOUR_API_KEY>',
'Authorization': 'Bearer <YOUR_JWT_TOKEN>',
'Content-Type': 'application/json',
'Accept': 'application/json'
},
body: JSON.stringify({
name: 'Updated Workflow #4',
team_id: '41480ee5-14ff-4f9e-89bf-91b0a8e50e77',
owner_id: 'ab7dafe2-4f19-4570-bad0-a88e70ad2c11',
is_external: false,
canvas_type: 0
})
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));// Using HttpClient
HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "<YOUR_API_KEY>");
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "<YOUR_JWT_TOKEN>");
var updateFields = new {
name = "Updated Workflow #4",
team_id = "41480ee5-14ff-4f9e-89bf-91b0a8e50e77",
owner_id = "ab7dafe2-4f19-4570-bad0-a88e70ad2c11",
is_external = false,
canvas_type = 0
};
var content = new StringContent(
JsonConvert.SerializeObject(updateFields), Encoding.UTF8, "application/json");
var response = await client.PatchAsync($"https://accounts.playbook3d.com/workflows/{workflow_id}", content);
string respContent = await response.Content.ReadAsStringAsync();
Console.WriteLine(response.StatusCode);
Console.WriteLine(respContent);{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Updated Workflow #4",
"team_id": "41480ee5-14ff-4f9e-89bf-91b0a8e50e77",
"owner_id": "ab7dafe2-4f19-4570-bad0-a88e70ad2c11",
"canvas_type": 0,
"is_external": false
}{
"description": "Bad Request. Possibly invalid JSON or missing fields."
}{
"description": "Unauthorized. The Bearer token or API key is invalid or missing."
}{
"description": "Forbidden. The user does not have permission."
}{
"description": "Not Found. The workflow ID does not exist."
}{
"description": "Internal Server Error. Something went wrong on the server."
}Workflows
Patch Workflows by ID
Updates fields of a workflow specified by workflow_id. Requires JWT and x-api-key.
PATCH
/
workflows
/
{workflow_id}
cURL
curl -X PATCH \
-H 'Authorization: Bearer $API_KEY' \
-H 'x-api-key: $API_KEY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"name": "Updated Workflow #4", "team_id": "41480ee5-14ff-4f9e-89bf-91b0a8e50e77", "owner_id": "ab7dafe2-4f19-4570-bad0-a88e70ad2c11", "is_external": false, "canvas_type": 0}' \
'$BASE_URL/workflows/$workflow_id'import requests
headers = {
'x-api-key': '<YOUR_API_KEY>',
'Authorization': 'Bearer <YOUR_JWT_TOKEN>',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
data = {
'name': 'Updated Workflow #4',
'team_id': '41480ee5-14ff-4f9e-89bf-91b0a8e50e77',
'owner_id': 'ab7dafe2-4f19-4570-bad0-a88e70ad2c11',
'is_external': False,
'canvas_type': 0
}
resp = requests.patch(f"https://accounts.playbook3d.com/workflows/{{workflow_id}}", json=data, headers=headers)
print(resp.status_code, resp.json())fetch(`https://accounts.playbook3d.com/workflows/${workflow_id}`, {
method: 'PATCH',
headers: {
'x-api-key': '<YOUR_API_KEY>',
'Authorization': 'Bearer <YOUR_JWT_TOKEN>',
'Content-Type': 'application/json',
'Accept': 'application/json'
},
body: JSON.stringify({
name: 'Updated Workflow #4',
team_id: '41480ee5-14ff-4f9e-89bf-91b0a8e50e77',
owner_id: 'ab7dafe2-4f19-4570-bad0-a88e70ad2c11',
is_external: false,
canvas_type: 0
})
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));// Using HttpClient
HttpClient client = new HttpClient();
client.DefaultRequestHeaders.Add("x-api-key", "<YOUR_API_KEY>");
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "<YOUR_JWT_TOKEN>");
var updateFields = new {
name = "Updated Workflow #4",
team_id = "41480ee5-14ff-4f9e-89bf-91b0a8e50e77",
owner_id = "ab7dafe2-4f19-4570-bad0-a88e70ad2c11",
is_external = false,
canvas_type = 0
};
var content = new StringContent(
JsonConvert.SerializeObject(updateFields), Encoding.UTF8, "application/json");
var response = await client.PatchAsync($"https://accounts.playbook3d.com/workflows/{workflow_id}", content);
string respContent = await response.Content.ReadAsStringAsync();
Console.WriteLine(response.StatusCode);
Console.WriteLine(respContent);{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Updated Workflow #4",
"team_id": "41480ee5-14ff-4f9e-89bf-91b0a8e50e77",
"owner_id": "ab7dafe2-4f19-4570-bad0-a88e70ad2c11",
"canvas_type": 0,
"is_external": false
}{
"description": "Bad Request. Possibly invalid JSON or missing fields."
}{
"description": "Unauthorized. The Bearer token or API key is invalid or missing."
}{
"description": "Forbidden. The user does not have permission."
}{
"description": "Not Found. The workflow ID does not exist."
}{
"description": "Internal Server Error. Something went wrong on the server."
}Headers
Your API key. This is required by most endpoints to access the API programmatically. You can view your x-api-key using the 'Profile' tab on the website.
Bearer token for authentication (JWT).
Path Parameters
The UUID of the workflow to update.
Body
application/json
JSON fields to update on the specified workflow.
New workflow name.
UUID of the team to which the workflow will be reassigned.
UUID of the new owner of this workflow (if your code allows updating ownership).
Whether this workflow is marked as external.
Canvas type (0 for basic, etc.).