---
title: "attachActivity"
method: POST
path: "/v1/entity/activity/{id}:attach"
tags: ["Activity"]
---

# attachActivity

`POST /v1/entity/activity/{id}:attach`

Attach existing activity to entity activity feeds

## Path parameters

- `id` string, ulid, required — See https://github.com/ulid/spec

## Query parameters

- `entities` EntityId[]

## Response `200`

Success

- BaseActivityItem
  - `_id` string, ulid — See https://github.com/ulid/spec
  - `timestamp` string, date-time
  - `type` string, required — A type for the activity. Used to categorize activities in the activity feed and for event subscriptions. Built-in entity activity types (custom activities can be defined as well): - EntityCreated - EntityUpdated - EntityDeleted - EntitySoftDeleted - EntityRestored - RelationsAdded - RelationsRemoved - RelationsSoftDeleted - RelationsRestored - RelationsDeleted - ChangesetCreated - ChangesetAutoCleared - ChangesetApplied - ChangesetDismissed
  - `title` string, required — Title for activity. Supports handlebars syntax.
  - `message` string, required — Message for activity. Supports handlebars syntax.
  - `payload` object
  - `pending` boolean — Indicates whether the activity is in the pending state. Pending activities are not yet visible in the activity feed and events are not yet dispatched.
  - `caller` ActivityCallerContext
    - `EpilotAuth` object
      - `token` object
        - `sub` string
        - `email` string
        - `cognito:username` string
        - `custom:ivy_user_id` string

## Other responses

- `404` — The requested resource was not found
- `429` — Too many requests

---

[API](https://skmtc.net/epilot/apis/entity-api.md) · [All operations](https://skmtc.net/epilot/apis/entity-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/epilot/entity-api/revisions/3020984570dc/schema)
