add_product #

View this page as Markdown

Generated automatically from the published contract sources.

A script calls this action over HTTPS at POST https://turnzero.ai/api/v1/actions/add_product, with a bearer credential and the action's payload as the JSON body.

Build metadata: Registered in this build. Registration describes the default dispatcher in this build. It does not guarantee that a caller has the required credential or grant, that a tool is listed for that connection, or that the required service is configured.

Contract description #

Add the tztrack product profile to one account, removing the account from that product's revocation list. Super-admin (platform operator) only. An account already holding the row gets no second one, and the call returns held_before: true, but the account still leaves that product's revocation list. With dry_run: true, nothing is written and the result says whether a real call would add the profile.

Access and action metadata #

{
  "name": "add_product",
  "resource": "account",
  "tier": "reversible",
  "grant": "super_admin",
  "summary": "Super-admin: add the `tztrack` product profile to one account, removing the account from that product's revocation list. It is the way back after revoke_product removes the profile, and the opening's act over every existing account. An account already holding the row gets no second one, and the call returns `held_before: true`, but the account still leaves that product's revocation list. `dry_run` counts without writing. Any other product is refused `invalid_request`, an unknown account `not_found`.",
  "annotations": {
    "readOnlyHint": false,
    "destructiveHint": false,
    "openWorldHint": false
  }
}

MCP catalog entry #

{
  "name": "add_product",
  "title": "Add product",
  "tier": "reversible",
  "scenario": "API-L0-12",
  "summary": "Add the `tztrack` product profile to one account, removing the account from that product's revocation list. Super-admin (platform operator) only. An account already holding the row gets no second one, and the call returns `held_before: true`, but the account still leaves that product's revocation list. With `dry_run: true`, nothing is written and the result says whether a real call would add the profile.",
  "owners": [
    "API-L0-12",
    "MAPI-09",
    "ACB-L0-76"
  ]
}

request #

JSON pointer Description and constraints
"" (root) Type: object
Required fields: ["subject_account","product"]
Additional properties: false
/properties/subject_account The account id, from list_accounts.

Type: string
/properties/product The product profile to add, as read_account lists it under profiles[].product: tztrack, a row of the plane's product table. cloud comes by creation or join_product, and tzteam by invitation alone; if you pass either, it is refused invalid_request.

Allowed values: ["tztrack"]
/properties/dry_run true counts without writing: you get back whether a run would add the row; leave it out or pass false to write the row where lacking.

Type: boolean

response #

JSON pointer Description and constraints
"" (root) Type: object
Required fields: ["contract_version","account","product","dry_run","held_before","added","detail"]
Additional properties: false
/properties/contract_version Required value: 1
/properties/account Type: object
Required fields: ["id","created_at","standing","synthetic"]
Additional properties: false
/properties/account/properties/id Type: string
/properties/account/properties/created_at Type: string
/properties/account/properties/standing Allowed values: ["active","suspended"]
/properties/account/properties/synthetic Type: boolean
/properties/product Allowed values: ["tztrack"]
/properties/dry_run whether the call counted without writing

Type: boolean
/properties/held_before whether the account held the row before the call

Type: boolean
/properties/added whether this call wrote the row; false on a dry run and on a held row

Type: boolean
/properties/detail Type: string

Complete payload contract #

{
  "request": {
    "type": "object",
    "required": [
      "subject_account",
      "product"
    ],
    "properties": {
      "subject_account": {
        "type": "string",
        "description": "The account id, from `list_accounts`."
      },
      "product": {
        "enum": [
          "tztrack"
        ],
        "description": "The product profile to add, as `read_account` lists it under `profiles[].product`: `tztrack`, a row of the plane's product table. `cloud` comes by creation or `join_product`, and `tzteam` by invitation alone; if you pass either, it is refused invalid_request."
      },
      "dry_run": {
        "type": "boolean",
        "description": "true counts without writing: you get back whether a run would add the row; leave it out or pass false to write the row where lacking."
      }
    },
    "additionalProperties": false
  },
  "response": {
    "type": "object",
    "required": [
      "contract_version",
      "account",
      "product",
      "dry_run",
      "held_before",
      "added",
      "detail"
    ],
    "properties": {
      "contract_version": {
        "const": 1
      },
      "account": {
        "type": "object",
        "required": [
          "id",
          "created_at",
          "standing",
          "synthetic"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          },
          "standing": {
            "enum": [
              "active",
              "suspended"
            ]
          },
          "synthetic": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "product": {
        "enum": [
          "tztrack"
        ]
      },
      "dry_run": {
        "type": "boolean",
        "description": "whether the call counted without writing"
      },
      "held_before": {
        "type": "boolean",
        "description": "whether the account held the row before the call"
      },
      "added": {
        "type": "boolean",
        "description": "whether this call wrote the row; false on a dry run and on a held row"
      },
      "detail": {
        "type": "string"
      }
    },
    "additionalProperties": false
  }
}

Shared contracts #