Record a manual activation step event
Only tasks with the returned can_complete_manually, can_skip or can_reopen capability accept the corresponding event. Submit current projection/task identities and a stable idempotency key; replay requires the same command. Stale projection, task version or digest returns 409. Automatic or unavailable tasks cannot be completed manually. Returns the refreshed projection after recording the event.
curl --request POST \
--url https://api.gratona.com/v1/admin/workspace-activation/tasks/{taskKey} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason_code": "starter_reviewed",
"expected_projection_id": "<string>",
"expected_task_version": "v1",
"expected_task_definition_digest": "<string>",
"idempotency_key": "activation-step-123"
}
'import requests
url = "https://api.gratona.com/v1/admin/workspace-activation/tasks/{taskKey}"
payload = {
"reason_code": "starter_reviewed",
"expected_projection_id": "<string>",
"expected_task_version": "v1",
"expected_task_definition_digest": "<string>",
"idempotency_key": "activation-step-123"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reason_code: 'starter_reviewed',
expected_projection_id: '<string>',
expected_task_version: 'v1',
expected_task_definition_digest: '<string>',
idempotency_key: 'activation-step-123'
})
};
fetch('https://api.gratona.com/v1/admin/workspace-activation/tasks/{taskKey}', 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.gratona.com/v1/admin/workspace-activation/tasks/{taskKey}",
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([
'reason_code' => 'starter_reviewed',
'expected_projection_id' => '<string>',
'expected_task_version' => 'v1',
'expected_task_definition_digest' => '<string>',
'idempotency_key' => 'activation-step-123'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.gratona.com/v1/admin/workspace-activation/tasks/{taskKey}"
payload := strings.NewReader("{\n \"reason_code\": \"starter_reviewed\",\n \"expected_projection_id\": \"<string>\",\n \"expected_task_version\": \"v1\",\n \"expected_task_definition_digest\": \"<string>\",\n \"idempotency_key\": \"activation-step-123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.gratona.com/v1/admin/workspace-activation/tasks/{taskKey}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason_code\": \"starter_reviewed\",\n \"expected_projection_id\": \"<string>\",\n \"expected_task_version\": \"v1\",\n \"expected_task_definition_digest\": \"<string>\",\n \"idempotency_key\": \"activation-step-123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/workspace-activation/tasks/{taskKey}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason_code\": \"starter_reviewed\",\n \"expected_projection_id\": \"<string>\",\n \"expected_task_version\": \"v1\",\n \"expected_task_definition_digest\": \"<string>\",\n \"idempotency_key\": \"activation-step-123\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"version": "workspace_activation.v1",
"mode": "v2",
"status": "<string>",
"activation_reached": true,
"activation_reached_at": "2023-11-07T05:31:56Z",
"profile": {
"key": "<string>",
"primary_goal": "<string>",
"starting_point": "<string>"
},
"track_availability": {
"activation_available": true,
"reason_code": "<string>",
"blocked_reason": "<string>"
},
"progress": {
"completed_milestones": 123,
"total_milestones": 123,
"percentage": 123
},
"next_action": {
"task_key": "<string>",
"title": "<string>",
"description": "<string>",
"cta_label": "<string>",
"cta_path": "<string>"
},
"tasks": [
{
"key": "<string>",
"version": "<string>",
"definition_digest": "<string>",
"title": "<string>",
"description": "<string>",
"completion_mode": "<string>",
"counts_toward_activation": true,
"can_complete_manually": true,
"can_skip": true,
"can_reopen": true,
"completion": {
"status": "<string>",
"reason_code": "<string>",
"reason": "<string>"
},
"availability": {
"status": "<string>",
"reason_code": "<string>",
"reason": "<string>"
},
"action": {
"available": true,
"cta_label": "<string>",
"cta_path": "<string>"
}
}
],
"background_work": {
"status": "<string>"
},
"projection_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Path Parameters
Taskkey. Task key returned by the current activation projection.
"fundraising.review_general_campaign"
Body
Request fields accepted by this operation. Omitted optional properties retain the behavior described above.
Validation: required|in:completed,skipped,reopened.
completed, skipped, reopened Reason allowed for the event: completed → starter_reviewed; skipped → not_relevant_now, already_have_workflow or will_return_later; reopened → continue_setup.
64"starter_reviewed"
Current projection_id from the guide.
64^[a-f0-9]{64}$32^[a-z0-9][a-z0-9._-]{0,31}$"v1"
64^[a-f0-9]{64}$8 - 128^[A-Za-z0-9._:-]{8,128}$"activation-step-123"
curl --request POST \
--url https://api.gratona.com/v1/admin/workspace-activation/tasks/{taskKey} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason_code": "starter_reviewed",
"expected_projection_id": "<string>",
"expected_task_version": "v1",
"expected_task_definition_digest": "<string>",
"idempotency_key": "activation-step-123"
}
'import requests
url = "https://api.gratona.com/v1/admin/workspace-activation/tasks/{taskKey}"
payload = {
"reason_code": "starter_reviewed",
"expected_projection_id": "<string>",
"expected_task_version": "v1",
"expected_task_definition_digest": "<string>",
"idempotency_key": "activation-step-123"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
reason_code: 'starter_reviewed',
expected_projection_id: '<string>',
expected_task_version: 'v1',
expected_task_definition_digest: '<string>',
idempotency_key: 'activation-step-123'
})
};
fetch('https://api.gratona.com/v1/admin/workspace-activation/tasks/{taskKey}', 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.gratona.com/v1/admin/workspace-activation/tasks/{taskKey}",
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([
'reason_code' => 'starter_reviewed',
'expected_projection_id' => '<string>',
'expected_task_version' => 'v1',
'expected_task_definition_digest' => '<string>',
'idempotency_key' => 'activation-step-123'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.gratona.com/v1/admin/workspace-activation/tasks/{taskKey}"
payload := strings.NewReader("{\n \"reason_code\": \"starter_reviewed\",\n \"expected_projection_id\": \"<string>\",\n \"expected_task_version\": \"v1\",\n \"expected_task_definition_digest\": \"<string>\",\n \"idempotency_key\": \"activation-step-123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.gratona.com/v1/admin/workspace-activation/tasks/{taskKey}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason_code\": \"starter_reviewed\",\n \"expected_projection_id\": \"<string>\",\n \"expected_task_version\": \"v1\",\n \"expected_task_definition_digest\": \"<string>\",\n \"idempotency_key\": \"activation-step-123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/workspace-activation/tasks/{taskKey}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"reason_code\": \"starter_reviewed\",\n \"expected_projection_id\": \"<string>\",\n \"expected_task_version\": \"v1\",\n \"expected_task_definition_digest\": \"<string>\",\n \"idempotency_key\": \"activation-step-123\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"version": "workspace_activation.v1",
"mode": "v2",
"status": "<string>",
"activation_reached": true,
"activation_reached_at": "2023-11-07T05:31:56Z",
"profile": {
"key": "<string>",
"primary_goal": "<string>",
"starting_point": "<string>"
},
"track_availability": {
"activation_available": true,
"reason_code": "<string>",
"blocked_reason": "<string>"
},
"progress": {
"completed_milestones": 123,
"total_milestones": 123,
"percentage": 123
},
"next_action": {
"task_key": "<string>",
"title": "<string>",
"description": "<string>",
"cta_label": "<string>",
"cta_path": "<string>"
},
"tasks": [
{
"key": "<string>",
"version": "<string>",
"definition_digest": "<string>",
"title": "<string>",
"description": "<string>",
"completion_mode": "<string>",
"counts_toward_activation": true,
"can_complete_manually": true,
"can_skip": true,
"can_reopen": true,
"completion": {
"status": "<string>",
"reason_code": "<string>",
"reason": "<string>"
},
"availability": {
"status": "<string>",
"reason_code": "<string>",
"reason": "<string>"
},
"action": {
"available": true,
"cta_label": "<string>",
"cta_path": "<string>"
}
}
],
"background_work": {
"status": "<string>"
},
"projection_id": "<string>",
"generated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}