Automation

Set a script tag

Point a distribution tag at an existing exact version; tags cannot be versions or version ranges.

Point a distribution tag at an existing exact version; tags cannot be versions or version ranges. Moving latest can roll back a release and synchronizes workflow schedules.

PUT /automation/v1/scripts/{ns}/{name}/dist-tags/{tag}

Authentication

Authorization: Bearer $PRAXIS_API_KEY

Request fields

ParameterTypeDescription
path: nsstringrequired; Namespace, folded to lowercase; matches [a-z0-9][a-z0-9._-]{0,63}. praxis is read-only.
path: namestringrequired; Name, folded to lowercase; matches [a-z0-9][a-z0-9._-]{0,63}.
path: tagstringrequired; Distribution tag. A prerelease (such as 1.3.0-beta.1) requires a tag and it cannot be latest; a tag may only use URL-safe characters (letters, digits and - _ . ! ~ * ' ( )), no spaces or / ? # and no leading or trailing whitespace; it cannot be a version or a version range (such as 1.2.3, ^1, 1.x, *); any other name such as beta, next or debug is allowed. Violations return TAG_INVALID or TAG_REQUIRED with the complete rules in hint.

application/json

no additional fields.

FieldTypeDescription
versionstringrequired; An exact canonical semantic version, such as 1.2.0 or 1.3.0-beta.1, not a range.

Examples

Set these environment variables to your own resources:

VariableSource
SCRIPT_NAMEname returned by creating a script
: "${SCRIPT_NAME:?Set SCRIPT_NAME}"
curl --fail-with-body -X PUT "https://api.deepraxis.ai/automation/v1/scripts/docs-samples/${SCRIPT_NAME}/dist-tags/sample" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "version": "1.0.0"
}'
import { createAutomationClient } from '@deepraxis/sdk/automation';

function env(name: string): string {
  const value = process.env[name];
  if (!value) throw new Error(`Set ${name}`);
  return value;
}
const automation = createAutomationClient({
  apiKey: env('PRAXIS_API_KEY'),
  baseUrl: 'https://api.deepraxis.ai',
  maxRetries: 0,
  timeoutMs: 90_000,
});
const result = await automation.scripts.distTags.set({
  "path": {
    "ns": "docs-samples",
    "name": env("SCRIPT_NAME"),
    "tag": "sample"
  },
  "body": {
    "version": "1.0.0"
  }
});
console.log(result);

Response

HTTP 200

Success

application/json

FieldTypeDescription
.*.versionstringrequired; Exact version the tag currently points to.
.*.updated_atstringrequired; Time the tag was last moved (RFC 3339 UTC).
.*.updated_byobjectrequired; Principal {type, id} injected by the gateway that says who initiated or acted. This service does not resolve names; the console resolves them in batches. no additional fields.
.*.updated_by.type"user" / "api_key" / "agent" / "run" / "trigger"required; Principal type. user is a signed-in user; api_key is a platform API key; agent is an agent; run is an action performed by a run itself (for example a parent run); trigger is a trigger.
.*.updated_by.idstringrequired; Principal identifier whose meaning follows type: a user, API key, agent, run or trigger id. Treat it as an opaque string.

Measured response

HTTP 200

{
  "latest": {
    "version": "1.0.0",
    "updated_at": "2026-10-13T04:57:22.398Z",
    "updated_by": {
      "type": "api_key",
      "id": "key_3e00b8984967"
    }
  },
  "sample": {
    "version": "1.0.0",
    "updated_at": "2026-10-13T04:57:26.232Z",
    "updated_by": {
      "type": "api_key",
      "id": "key_3e00b8984967"
    }
  }
}

Errors

HTTPCodes and description
400INVALID_PARAMS: Invalid request parameters, path, cursor, or body format. TAG_INVALID: The tag is invalid: a prerelease cannot use latest; a tag may only use URL-safe characters (no spaces or / ? #); it cannot be a version or range; latest cannot be deleted. The response hint lists the complete rules.
403NAMESPACE_FORBIDDEN: The namespace is read-only, or the run token does not permit this call.
404TARGET_NOT_FOUND: The target does not exist or has an incompatible type. VERSION_NOT_FOUND: The requested version or revision does not exist.
409TARGET_ARCHIVED: The target is archived and cannot be used for this operation; action execution error detail includes ns/name.
412PRECONDITION_FAILED: The revision, source digest, or concurrent write precondition does not match.
defaultRFC 9457 automation problem. 429 includes Retry-After.

Authentication and common errors · Retain the X-Request-Id response header for troubleshooting.

Export

On this page