---
title: "Create Activity With Staged Changes"
method: POST
path: "/public/catalogs/{catalog_id}/activities"
tags: ["Catalog Activities"]
---

# Create Activity With Staged Changes

`POST /public/catalogs/{catalog_id}/activities`

## Request

- Base URL: `https://catalogapi.rastro.ai/api`
- URL: `https://catalogapi.rastro.ai/api/public/catalogs/{catalog_id}/activities`
- Auth: HTTP bearer

Create an activity with optional staged changes for a catalog.

This endpoint allows programmatic creation of review activities (e.g., from an MCP tool server).
Staged changes represent proposed modifications to catalog items that can be reviewed and applied.

## Path parameters

- `catalog_id` string, required

## Headers

- `X-Organization-Id` string, nullable

## Request body

- CreateActivityRequest: Request to create an activity with staged changes
  - `type` string: Activity type (e.g., smart_import, custom_transform)
  - `description` string, nullable: Human-readable description of the activity
  - `input_data` object, nullable: Optional full activity input data for audit context and apply-time hooks
  - `staged_changes` PublicStagedChangeInput[]: Staged changes to attach to the activity
    - `catalog_item_id` string, nullable
    - `catalog_item_entity_type` string, nullable
    - `before_data` object, nullable
    - `after_data` object, required
    - `source_data` object, nullable
    - `is_new_item` boolean
    - `row_index` integer, nullable
    - `status` 'draft' | 'pending' | 'approved' | 'rejected' | 'partially_accepted' | 'error': Status for individual staged changes
  - `metadata` object, nullable
  - `status` string, nullable: Initial activity status (defaults to 'pending_review' if staged_changes provided, else 'created')

## Response `200`

Successful Response

- CreateActivityResponse: Response after creating an activity
  - `activity_id` string, required
  - `status` string, required
  - `staged_changes_count` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/rastro-ai/apis/rastro-public-api.md) - [All operations](https://skmtc.dev/rastro-ai/apis/rastro-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rastro-ai/apis/rastro-public-api/revisions/57c8ed4854bb?raw)
