Skip to main content
POST
/
api
/
activities
Start an activity
curl --request POST \
  --url https://platform.kodexa.ai/api/activities \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{}'
import requests

url = "https://platform.kodexa.ai/api/activities"

payload = {}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};

fetch('https://platform.kodexa.ai/api/activities', 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://platform.kodexa.ai/api/activities",
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([

]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$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://platform.kodexa.ai/api/activities"

payload := strings.NewReader("{}")

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

req.Header.Add("x-api-key", "<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.post("https://platform.kodexa.ai/api/activities")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://platform.kodexa.ai/api/activities")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
{
  "activityPlanId": "<string>",
  "badges": "<unknown>",
  "changeSequence": 123,
  "completedOn": "2023-11-07T05:31:56Z",
  "completedWorkUnits": 123,
  "createdOn": "2023-11-07T05:31:56Z",
  "currentSequence": 123,
  "deleteUserEmail": "<string>",
  "deleteUserId": "<string>",
  "deleted": true,
  "deletedDate": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "errorDetails": "<string>",
  "failedWorkUnits": 123,
  "id": "<string>",
  "inputs": "<unknown>",
  "lifecycleState": "<string>",
  "metadata": "<unknown>",
  "organization": {
    "archived": true,
    "authGroupLink": {
      "authGroup": "<string>"
    },
    "changeSequence": 123,
    "createdOn": "2023-11-07T05:31:56Z",
    "defaultToPrivateTemplates": true,
    "description": "Document processing organization for Acme Corp.",
    "enterpriseOrganization": true,
    "features": {},
    "hasImage": true,
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "memory": {
      "orderedDashboards": [
        "<string>"
      ]
    },
    "name": "Acme Corp",
    "organizationStatus": "ACTIVE",
    "properties": {},
    "publicAccess": true,
    "searchText": "<string>",
    "slug": "acme-corp",
    "stripeCustomerId": "<string>",
    "supportAccess": true,
    "supportAccessExpiresAt": "2023-11-07T05:31:56Z",
    "updatedOn": "2023-11-07T05:31:56Z",
    "uuid": "550e8400e29b41d4a716446655440000"
  },
  "organizationId": "<string>",
  "parentActivityId": "<string>",
  "priority": 123,
  "projectId": "<string>",
  "replacedByActivityId": "<string>",
  "runningWorkUnits": 123,
  "startedByIntakeId": "<string>",
  "startedByTriggerId": "<string>",
  "startedOn": "2023-11-07T05:31:56Z",
  "steps": [
    {
      "activityId": "<string>",
      "agentId": "<string>",
      "agentRuntimeId": "<string>",
      "agentSessionId": "<string>",
      "approvalCriteria": "<unknown>",
      "approvalOutcome": "<string>",
      "approverRole": "<string>",
      "bridgeActions": "<unknown>",
      "bridgeResult": "<unknown>",
      "bypass": true,
      "changeSequence": 123,
      "childTaskId": "<string>",
      "completedActionUuid": "<string>",
      "completedDocFamilyIds": "<unknown>",
      "completedOn": "2023-11-07T05:31:56Z",
      "conditionExpression": "<unknown>",
      "createdOn": "2023-11-07T05:31:56Z",
      "currentDocFamilyId": "<string>",
      "description": "<string>",
      "disableCache": true,
      "endpointName": "<string>",
      "enrichment": "<unknown>",
      "errorDetails": "<unknown>",
      "executionId": "<string>",
      "id": "<string>",
      "includeDocument": "<unknown>",
      "insertedAt": "2023-11-07T05:31:56Z",
      "insertedById": "<string>",
      "joinPolicy": "<string>",
      "llmModelName": "<string>",
      "logGroup": "<string>",
      "logStream": "<string>",
      "mappedOutput": "<unknown>",
      "maxParallel": 123,
      "maxStepsToInsert": 123,
      "moduleRef": "<string>",
      "moduleRefs": "<unknown>",
      "name": "<string>",
      "options": "<unknown>",
      "organization": {
        "archived": true,
        "authGroupLink": {
          "authGroup": "<string>"
        },
        "changeSequence": 123,
        "createdOn": "2023-11-07T05:31:56Z",
        "defaultToPrivateTemplates": true,
        "description": "Document processing organization for Acme Corp.",
        "enterpriseOrganization": true,
        "features": {},
        "hasImage": true,
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "memory": {
          "orderedDashboards": [
            "<string>"
          ]
        },
        "name": "Acme Corp",
        "organizationStatus": "ACTIVE",
        "properties": {},
        "publicAccess": true,
        "searchText": "<string>",
        "slug": "acme-corp",
        "stripeCustomerId": "<string>",
        "supportAccess": true,
        "supportAccessExpiresAt": "2023-11-07T05:31:56Z",
        "updatedOn": "2023-11-07T05:31:56Z",
        "uuid": "550e8400e29b41d4a716446655440000"
      },
      "organizationId": "<string>",
      "outputMapping": "<unknown>",
      "perDocument": true,
      "plannerContext": "<unknown>",
      "prompt": "<string>",
      "promptActions": "<unknown>",
      "promptBody": "<string>",
      "promptRendered": "<string>",
      "promptResult": "<unknown>",
      "promptTemplateRef": "<string>",
      "promptVariables": "<unknown>",
      "requestBody": "<unknown>",
      "requestHeaders": "<unknown>",
      "requestPath": "<unknown>",
      "requestQuery": "<unknown>",
      "requestScript": "<string>",
      "result": "<unknown>",
      "scriptActions": "<unknown>",
      "scriptBody": "<string>",
      "scriptResult": "<unknown>",
      "scriptSidecars": "<unknown>",
      "sequence": 123,
      "serviceBridgeRef": "<string>",
      "skipReason": "<string>",
      "slug": "<string>",
      "startedOn": "2023-11-07T05:31:56Z",
      "status": "<string>",
      "taskData": "<unknown>",
      "taskStatusSlug": "<string>",
      "taskTemplateRef": "<string>",
      "timeoutSeconds": 123,
      "treatAsError": "<string>",
      "type": "<string>",
      "updatedOn": "2023-11-07T05:31:56Z",
      "uuid": "<string>",
      "waitForCompletion": true
    }
  ],
  "title": "<string>",
  "totalWorkUnits": 123,
  "triggerKind": "<string>",
  "triggerMetadata": "<unknown>",
  "updatedOn": "2023-11-07T05:31:56Z",
  "uuid": "<string>",
  "version": 123
}

Authorizations

x-api-key
string
header
required

API key for authentication. Create one from the Kodexa platform UI under Settings > Access Tokens.

Body

application/json

The body is of type object.

Response

Activity started

activityPlanId
string | null
badges
any
changeSequence
integer<int32>
completedOn
string<date-time> | null
completedWorkUnits
integer<int32> | null
createdOn
string<date-time>
currentSequence
integer<int32> | null
deleteUserEmail
string
deleteUserId
string
deleted
boolean
deletedDate
string<date-time> | null
description
string | null
errorDetails
string | null
failedWorkUnits
integer<int32> | null
id
string
inputs
any
lifecycleState
string
metadata
any
organization
object | null

An organization is the top-level tenant in Kodexa. All projects, stores, and resources belong to an organization.

organizationId
string | null
parentActivityId
string | null
priority
integer<int32>
projectId
string | null
replacedByActivityId
string | null
runningWorkUnits
integer<int32> | null
startedByIntakeId
string | null
startedByTriggerId
string | null
startedOn
string<date-time> | null
steps
object[]
title
string | null
totalWorkUnits
integer<int32> | null
triggerKind
string
triggerMetadata
any
updatedOn
string<date-time>
uuid
string
version
integer<int32> | null