ONE groups:delete
← Receivers

groups:delete

groups family

Delete groups you own, one or many (at most 25 to look at, a handful to delete in one call), after archiving what they hold. Dry by default: dryRun answers, per group, how many rows each table holds, the groups below it, paid orders and public wallet addresses, and says which groups would be REFUSED and why. A real delete (dryRun false) needs `confirm` to equal the slugs joined by commas, or their count. Refused always: group `one`, the owner of the platform group, every root owner, your own home group, anything outside your tree, a group with a group below it that is not in the same selection (delete the deepest first), a group that made another group (an agent that is a group of its own) which is not in the same selection, and a group with a live paid order (named). Everything the group holds goes in ONE batch together with a `deleted_groups` row that keeps the rows (never a credential), so the delete is recorded and not undone by a half-finished write. Only a signed-in web session proceeds after confirm; an agent, a key (a person's own key too) or a workflow step is ASKED for the fingerprint of the person who owns the groups (fingerprint_required with approve.url, then call again with fingerprint_code), and groups that answer to different people are refused as mixed_owners. Not undone here: the archive keeps the rows, but nothing puts a group back, and the graph edge is cut after the answer.

Effect
ask
Awaits an outcome — the call returns the response below.
Caller
update_group
The class of authority the caller must already hold, decided from the attested context with no round trip.
Authority action
delete_group
Also gated per node — the caller must be permitted this action over the workspace it names.
Cost
free
What one call costs, so you can budget before acting.
Reversible
no
This cannot be undone. Dry-run it first where the contract allows.
Idempotent
no
Not safe to blind-retry — dedupe on the envelope idempotencyKey.

Send it with your agent

One click hands your coding agent a prompt that registers the substrate, reads this contract, and makes the call. Launch opens the app; the others copy the prompt.

Claude Code
Codex
Cursor
Gemini CLI
Claude Desktop
ChatGPT
curl -X POST https://one.ie/api/ask/groups:delete \
  -H "Authorization: Bearer $ONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"data": { "slugs": [ "test-group-1", "test-group-2" ] }}'

The key is never in a link. npx -y @oneie/cli login writes it to ~/.config/oneie/key on your machine.

Request

Validated before dispatch — an invalid payload is refused with the fix, never half-applied.

  • slugs string[] required The groups to delete, by slug. Duplicates are ignored.
  • dryRun boolean optional Default true: plan only, nothing changes. Send false to delete.
  • confirm string optional With dryRun false: the slugs joined by commas in the order sent, or their count as a string. Anything else is refused.
  • fingerprint any optional The approval for this exact request, once the owner has pressed: send the proof from the ask on the retry.

Response

What comes back from the call.

  • ask any error fingerprint_required: the ask the person answers (action, what, challenge, expiresAt, methods)
  • approve object error fingerprint_required: the link the person opens to approve, and the code to retry with (fingerprint_code)
  • approver string error fingerprint_required: the workspace's person the ask is for
  • next string error fingerprint_required: what to tell the person and how to call again
  • reason string Why, in plain words, when the answer is a fingerprint ask or a refusal
  • closed string dissolve on a fingerprint ask (nothing changed), warn on a refusal
  • ok boolean
  • dryRun boolean
  • groups object[] Groups in your scope, in the order a delete runs them (deepest first).
  • refused object[] Groups that would not be deleted, each with a code: platform_group, platform_owner, root_owner, own_home, forbidden, not_found, has_children, made_groups, live_orders, too_many_agents, cycle.
  • deletable string[] Slugs a real run would delete, in order.
  • confirmWith string What `confirm` must equal for a real run of this exact request.
  • maxPerCall number Most groups one real delete takes: one batch, under the database's statement limit.
  • deleted object[]
  • batchId string One id for the whole call; every deleted_groups row it wrote carries it.
  • drift object[] A table whose delete removed a different number of rows than the archive counted (a row landed between the read and the batch).
  • left string[] What this call did not remove, in words: the graph edge (cut after the answer) and caches that expire by themselves.
  • notes string[]
  • error string bad_request, confirm_required, nothing_to_delete, too_many_for_one_call, batch_failed, mixed_owners, no_group, no_db, fingerprint_required, fingerprint_unavailable, no_approver

Traffic

Every call to groups:delete, counted where it is dispatched — over HTTP or in-process alike. Aggregate only — no actor, no payload, no workspace.

Counting…

Wiring

Every place in the open source that names groups:delete, and the file that answers it. Read from the tree at build time — a receiver is reached by NAME through one door, so there is no import edge to follow and a grep is the honest shape of the question. Structure, not volume — the count is in Traffic above.

Called from

UI 1
  • one.ie/web/src/components/groups/DeleteDialog.tsx:41
API route 3
  • one.ie/web/src/lib/auth-plugins/fingerprint-ask.ts:334
  • one.ie/web/src/lib/receiver-index.generated.ts:227
  • one.ie/web/src/lib/resolvers/groups-delete.ts:23
CLI 3
  • packages/cli/src/group.ts:290
  • packages/cli/src/lib/receivers-index.generated.ts:230
  • packages/cli/src/lib/receivers.generated.ts:230
→

Answered by

groups:delete one.ie/web/src/lib/resolvers/groups-delete.ts:446 Dispatched through POST /api/ask/groups:delete, after the envelope validates the payload.
JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "slugs": {
      "minItems": 1,
      "maxItems": 25,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 80
      },
      "description": "The groups to delete, by slug. Duplicates are ignored."
    },
    "dryRun": {
      "description": "Default true: plan only, nothing changes. Send false to delete.",
      "type": "boolean"
    },
    "confirm": {
      "description": "With dryRun false: the slugs joined by commas in the order sent, or their count as a string. Anything else is refused.",
      "type": "string",
      "maxLength": 2000
    },
    "fingerprint": {
      "description": "The approval for this exact request, once the owner has pressed: send the proof from the ask on the retry."
    }
  },
  "required": [
    "slugs"
  ]
}
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "ask": {
      "description": "error fingerprint_required: the ask the person answers (action, what, challenge, expiresAt, methods)"
    },
    "approve": {
      "description": "error fingerprint_required: the link the person opens to approve, and the code to retry with (fingerprint_code)",
      "type": "object",
      "properties": {
        "url": {
          "type": "string"
        },
        "code": {
          "type": "string"
        },
        "expiresAt": {
          "type": "number"
        }
      },
      "required": [
        "url",
        "code",
        "expiresAt"
      ]
    },
    "approver": {
      "description": "error fingerprint_required: the workspace's person the ask is for",
      "type": "string"
    },
    "next": {
      "description": "error fingerprint_required: what to tell the person and how to call again",
      "type": "string"
    },
    "reason": {
      "description": "Why, in plain words, when the answer is a fingerprint ask or a refusal",
      "type": "string"
    },
    "closed": {
      "description": "dissolve on a fingerprint ask (nothing changed), warn on a refusal",
      "type": "string"
    },
    "ok": {
      "type": "boolean"
    },
    "dryRun": {
      "type": "boolean"
    },
    "groups": {
      "description": "Groups in your scope, in the order a delete runs them (deepest first).",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "parent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "person",
              "agent"
            ]
          },
          "children": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Groups directly below it."
          },
          "tables": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "table": {
                  "type": "string"
                },
                "rows": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "table",
                "rows"
              ]
            },
            "description": "Rows each table holds for this group; tables with none are left out."
          },
          "totalRows": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "createdAgents": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "orders": {
            "type": "object",
            "properties": {
              "paidLive": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "paidUnknown": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "other": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "paidLive",
              "paidUnknown",
              "other"
            ]
          },
          "wallets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "actor": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "sui": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "evm": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "solana": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "btc": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "actor",
                "kind",
                "sui",
                "evm",
                "solana",
                "btc"
              ]
            },
            "description": "Public addresses only. Balances are not read here: look before you delete."
          },
          "deletable": {
            "type": "boolean"
          }
        },
        "required": [
          "slug",
          "name",
          "parent",
          "kind",
          "children",
          "tables",
          "totalRows",
          "createdAgents",
          "orders",
          "wallets",
          "deletable"
        ]
      }
    },
    "refused": {
      "description": "Groups that would not be deleted, each with a code: platform_group, platform_owner, root_owner, own_home, forbidden, not_found, has_children, made_groups, live_orders, too_many_agents, cycle.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "slug",
          "code",
          "reason"
        ]
      }
    },
    "deletable": {
      "description": "Slugs a real run would delete, in order.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "confirmWith": {
      "description": "What `confirm` must equal for a real run of this exact request.",
      "type": "string"
    },
    "maxPerCall": {
      "description": "Most groups one real delete takes: one batch, under the database's statement limit.",
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "deleted": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "archiveId": {
            "type": "string"
          },
          "rows": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "number"
            }
          },
          "totalRows": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "slug",
          "archiveId",
          "rows",
          "totalRows"
        ]
      }
    },
    "batchId": {
      "description": "One id for the whole call; every deleted_groups row it wrote carries it.",
      "type": "string"
    },
    "drift": {
      "description": "A table whose delete removed a different number of rows than the archive counted (a row landed between the read and the batch).",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "slug": {
            "type": "string"
          },
          "table": {
            "type": "string"
          },
          "archived": {
            "type": "number"
          },
          "removed": {
            "type": "number"
          }
        },
        "required": [
          "slug",
          "table",
          "archived",
          "removed"
        ]
      }
    },
    "left": {
      "description": "What this call did not remove, in words: the graph edge (cut after the answer) and caches that expire by themselves.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "notes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "error": {
      "description": "bad_request, confirm_required, nothing_to_delete, too_many_for_one_call, batch_failed, mixed_owners, no_group, no_db, fingerprint_required, fingerprint_unavailable, no_approver",
      "type": "string"
    }
  },
  "required": [
    "ok"
  ]
}