Skip to main content
POST
/
v1
/
runs
/
{workflow_run_id}
/
tags
Apply run tags
curl --request POST \
  --url https://api.skyvern.com/v1/runs/{workflow_run_id}/tags \
  --header 'Content-Type: application/json' \
  --data '
{
  "tags": [
    {
      "value": "<string>",
      "key": "<string>"
    }
  ],
  "tags_to_delete": [
    {
      "key": "<string>",
      "value": "<string>"
    }
  ],
  "colors": {}
}
'
import requests

url = "https://api.skyvern.com/v1/runs/{workflow_run_id}/tags"

payload = {
"tags": [
{
"value": "<string>",
"key": "<string>"
}
],
"tags_to_delete": [
{
"key": "<string>",
"value": "<string>"
}
],
"colors": {}
}
headers = {"Content-Type": "application/json"}

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

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
tags: [{value: '<string>', key: '<string>'}],
tags_to_delete: [{key: '<string>', value: '<string>'}],
colors: {}
})
};

fetch('https://api.skyvern.com/v1/runs/{workflow_run_id}/tags', 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.skyvern.com/v1/runs/{workflow_run_id}/tags",
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([
'tags' => [
[
'value' => '<string>',
'key' => '<string>'
]
],
'tags_to_delete' => [
[
'key' => '<string>',
'value' => '<string>'
]
],
'colors' => [

]
]),
CURLOPT_HTTPHEADER => [
"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://api.skyvern.com/v1/runs/{workflow_run_id}/tags"

payload := strings.NewReader("{\n \"tags\": [\n {\n \"value\": \"<string>\",\n \"key\": \"<string>\"\n }\n ],\n \"tags_to_delete\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"colors\": {}\n}")

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

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.skyvern.com/v1/runs/{workflow_run_id}/tags")
.header("Content-Type", "application/json")
.body("{\n \"tags\": [\n {\n \"value\": \"<string>\",\n \"key\": \"<string>\"\n }\n ],\n \"tags_to_delete\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"colors\": {}\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.skyvern.com/v1/runs/{workflow_run_id}/tags")

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

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"tags\": [\n {\n \"value\": \"<string>\",\n \"key\": \"<string>\"\n }\n ],\n \"tags_to_delete\": [\n {\n \"key\": \"<string>\",\n \"value\": \"<string>\"\n }\n ],\n \"colors\": {}\n}"

response = http.request(request)
puts response.read_body
{
  "workflow_run_id": "<string>",
  "tags": [
    {
      "value": "<string>",
      "source": "<string>",
      "set_at": "2023-11-07T05:31:56Z",
      "set_by": "<string>",
      "key": "<string>"
    }
  ]
}

Headers

x-api-key
string | null

Skyvern API key for authentication. API key can be found at https://app.skyvern.com/settings.

Path Parameters

workflow_run_id
string
required

Workflow run ID

Example:

"wr_123"

Body

application/json

Body for POST /v1/workflows/{wpid}/tags. Either field may be empty (both empty is a no-op). On a same-identity collision, set wins over delete.

tags
TagInput · object[]

Tags to set (overwrite). List of {key?, value} objects.

tags_to_delete
TagDeleteInput · object[]

Tags to soft-delete. List of {key?, value?} targets.

colors
Colors · object | null

Optional map of grouped tag key to palette color name for the value being set. Keys absent from this map keep their existing color or receive a random palette color.

Response

Successfully applied tag changes

Current tags for a workflow run.

workflow_run_id
string
required
tags
TagResponse · object[]
required