Shipeasy
APIOperations

Create a tag automation rule

Appends one rule after the existing ones; existing rules are untouched. The rule fires on a newly filed item carrying any of tags (or whose type is in…

Appends one rule after the existing ones; existing rules are untouched. The rule fires on a newly filed item carrying any of tags (or whose type is in types) and applies its actions: user assigns a person, connector hands the item to a connected coding agent (launching a run, steered by agentPrompt), status / priority set triage fields, and subscribers emails people. Tags are created on first use.

Returns 400 when the rule has no tag or type, or no action. Returns the full rule list after the append.

Use cases
  • Auto-fix — tag ai-fix hands the item to a connected agent with a steering prompt.
  • Triage — every error ticket goes to high priority and an on-call email.
POST
/api/admin/ops/routing-rules

Authorization

bearerSdkKey
AuthorizationBearer <token>

Pass an admin SDK key as Authorization: Bearer sdk_admin_…. Mint via POST /api/admin/keys with type: "admin".

In: header

Header Parameters

X-Project-Id?string

Project the request operates on. Optional — defaults to the project the SDK key belongs to; pass it only to scope a multi-project key (the generated client sets it once from its configuration, so per-call callers never thread it).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://shipeasy.ai/api/admin/ops/routing-rules" \  -H "Content-Type: application/json" \  -d '{    "types": [      "error"    ],    "priority": "high",    "subscribers": [      "oncall@example.com"    ]  }'
[
  {
    "tags": [
      "string"
    ],
    "types": [
      "error"
    ],
    "enabled": true,
    "user": "string",
    "connector": "string",
    "agentPrompt": "string",
    "status": "open",
    "priority": "nice_to_have",
    "subscribers": [
      "user@example.com"
    ],
    "skipApproval": true,
    "triage": true,
    "triageAgent": "string",
    "triageAutoApprove": true
  }
]
{
  "error": "Malformed request (bad JSON, missing project scope).",
  "code": "BAD_REQUEST"
}
{
  "error": "Missing or invalid admin SDK key.",
  "code": "UNAUTHORIZED"
}

{
  "error": "Key is valid but not allowed to act on this project.",
  "code": "FORBIDDEN"
}

{
  "error": "The request body failed structural (schema) validation.",
  "code": "VALIDATION"
}

Was this page helpful?