Set a user's action states
curl --request PUT \
--url https://api.katilyst.com/v1/projects/{projectId}/users/{userId}/action-states \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"availableActionId": "1111-111-11111-example",
"state": "ENABLED",
"dateTime": "2025-03-17T17:45:10Z",
"creator": "Account API",
"details": "Account API updated action state."
}
'import requests
url = "https://api.katilyst.com/v1/projects/{projectId}/users/{userId}/action-states"
payload = {
"availableActionId": "1111-111-11111-example",
"state": "ENABLED",
"dateTime": "2025-03-17T17:45:10Z",
"creator": "Account API",
"details": "Account API updated action state."
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
availableActionId: '1111-111-11111-example',
state: 'ENABLED',
dateTime: '2025-03-17T17:45:10Z',
creator: 'Account API',
details: 'Account API updated action state.'
})
};
fetch('https://api.katilyst.com/v1/projects/{projectId}/users/{userId}/action-states', 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.katilyst.com/v1/projects/{projectId}/users/{userId}/action-states",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'availableActionId' => '1111-111-11111-example',
'state' => 'ENABLED',
'dateTime' => '2025-03-17T17:45:10Z',
'creator' => 'Account API',
'details' => 'Account API updated action state.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.katilyst.com/v1/projects/{projectId}/users/{userId}/action-states"
payload := strings.NewReader("{\n \"availableActionId\": \"1111-111-11111-example\",\n \"state\": \"ENABLED\",\n \"dateTime\": \"2025-03-17T17:45:10Z\",\n \"creator\": \"Account API\",\n \"details\": \"Account API updated action state.\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.put("https://api.katilyst.com/v1/projects/{projectId}/users/{userId}/action-states")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"availableActionId\": \"1111-111-11111-example\",\n \"state\": \"ENABLED\",\n \"dateTime\": \"2025-03-17T17:45:10Z\",\n \"creator\": \"Account API\",\n \"details\": \"Account API updated action state.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.katilyst.com/v1/projects/{projectId}/users/{userId}/action-states")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"availableActionId\": \"1111-111-11111-example\",\n \"state\": \"ENABLED\",\n \"dateTime\": \"2025-03-17T17:45:10Z\",\n \"creator\": \"Account API\",\n \"details\": \"Account API updated action state.\"\n}"
response = http.request(request)
puts response.read_bodyLogging Work
Set a user's action states
PUT
/
v1
/
projects
/
{projectId}
/
users
/
{userId}
/
action-states
Set a user's action states
curl --request PUT \
--url https://api.katilyst.com/v1/projects/{projectId}/users/{userId}/action-states \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"availableActionId": "1111-111-11111-example",
"state": "ENABLED",
"dateTime": "2025-03-17T17:45:10Z",
"creator": "Account API",
"details": "Account API updated action state."
}
'import requests
url = "https://api.katilyst.com/v1/projects/{projectId}/users/{userId}/action-states"
payload = {
"availableActionId": "1111-111-11111-example",
"state": "ENABLED",
"dateTime": "2025-03-17T17:45:10Z",
"creator": "Account API",
"details": "Account API updated action state."
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
availableActionId: '1111-111-11111-example',
state: 'ENABLED',
dateTime: '2025-03-17T17:45:10Z',
creator: 'Account API',
details: 'Account API updated action state.'
})
};
fetch('https://api.katilyst.com/v1/projects/{projectId}/users/{userId}/action-states', 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.katilyst.com/v1/projects/{projectId}/users/{userId}/action-states",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'availableActionId' => '1111-111-11111-example',
'state' => 'ENABLED',
'dateTime' => '2025-03-17T17:45:10Z',
'creator' => 'Account API',
'details' => 'Account API updated action state.'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.katilyst.com/v1/projects/{projectId}/users/{userId}/action-states"
payload := strings.NewReader("{\n \"availableActionId\": \"1111-111-11111-example\",\n \"state\": \"ENABLED\",\n \"dateTime\": \"2025-03-17T17:45:10Z\",\n \"creator\": \"Account API\",\n \"details\": \"Account API updated action state.\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.put("https://api.katilyst.com/v1/projects/{projectId}/users/{userId}/action-states")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"availableActionId\": \"1111-111-11111-example\",\n \"state\": \"ENABLED\",\n \"dateTime\": \"2025-03-17T17:45:10Z\",\n \"creator\": \"Account API\",\n \"details\": \"Account API updated action state.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.katilyst.com/v1/projects/{projectId}/users/{userId}/action-states")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"availableActionId\": \"1111-111-11111-example\",\n \"state\": \"ENABLED\",\n \"dateTime\": \"2025-03-17T17:45:10Z\",\n \"creator\": \"Account API\",\n \"details\": \"Account API updated action state.\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Your full Authorization header value, including the prefix: API-Key katilyst_xxxx_yourkey
Body
application/json
Unique id of the stateful available action to log.
Example:
"1111-111-11111-example"
State of the available action ('ENABLED' | 'DISABLED')
Available options:
ENABLED, DISABLED Example:
"ENABLED"
Optional Property - ISO Date String.
Example:
"2025-03-17T17:45:10Z"
Optional Property - String value identifying 'creator' of mutated action state.
Example:
"Account API"
Optional Property - Additional details.
Example:
"Account API updated action state."
