---
title: "Run Artifact Operation"
method: POST
path: "/artifacts/{artifact_id}/op/{op_name}"
tags: ["Artifacts"]
---

# Run Artifact Operation

`POST /artifacts/{artifact_id}/op/{op_name}`

Generic operation-dispatch endpoint.

Dispatches the operation declared in the artifact's `type.json`
`operations.{op_name}` block through `operation_dispatcher.dispatch`.

Reserved op names (`create`, `read`, `update`, `delete`, `add`, `search`)
are handled by their dedicated CRUD routes above and are **not** accepted
here. `invoke` is accepted here — it carries an extra body-merge pass
(workspace_id / artifacts / resources binding injection) that the
dispatched handler can consume; see `_build_invoke_dispatch_body`.

The dispatcher enforces the grant check (`requires_grant`), runs the
declared handler (`dispatch.kind`), and emits every event in
`operations.{op_name}.emits` around the call.

## Path parameters

- `artifact_id` string, required
- `op_name` string, required

## Request body

- object

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/agience/apis/agience-platform-api.md) · [All operations](https://skmtc.net/agience/apis/agience-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/agience/agience-platform-api/versions/187bad270c94/schema)
