---
title: "ActivityKPIs.create"
method: POST
path: "/entities/ActivityKPIs"
tags: ["Activity"]
---

# ActivityKPIs.create

`POST /entities/ActivityKPIs`

Creates new ActivityKPI

## Query parameters

- `validation-level` integer

## Response `201`

Creation confirmation. Returns created ActivityKPI

- object
  - `success` boolean — True when response succeeded, false on error.
  - `data` ActivityKPI
    - `is_delete_protected` boolean, required — Tells if the entity instance is protected against delete (Entities that need to be present in the system at any time). Delete action still may fail if entity is deletable, due some other additional validations.
    - `id` string, uuid, required — Unique identifier of entity.
    - `is_deleted` boolean — Specifies if the entity is considered deleted.
    - `modified` string, date-time — Last modification time.
    - `created` string, date-time — Creation time.
    - `appointment` string, uri — Appointment this KPI event relates to. Set when activity_id resolves to an Appointment; otherwise empty. Relation to Appointment. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Appointment' object for properties.
    - `task` string, uri — Task this KPI event relates to. Set when activity_id resolves to a Task; otherwise empty. Relation to Task. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Task' object for properties.
    - `client` string, uri — User who triggered the KPI event (e.g. created or completed the activity). Relation to Client. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Client' object for properties.
    - `owner` string, uri — Activity owner at the time the KPI event occurred. Relation to Client. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'Client' object for properties.
    - `unit` string, uri, required — Sales unit the triggering user belonged to at the time of the event. Relation to SalesUnit. By default it is returned as URI to related resource. Using parameter 'expand', it will return full entity. See: 'SalesUnit' object for properties.
    - `activity_id` string, uuid, required — Id of the appointment or task the KPI event relates to.
    - `application_id` string, uuid — Application context in which the KPI event was triggered (e.g. browser, automation, third-party integration).
    - `client_id` string, uuid — Id of the user who triggered the event.
    - `kpi` 1 | 2, required — KPI metric this event represents: ActivityCreate, ActivityCompleted. Integer enum value: 1 - ActivityCreate, 2 - ActivityCompleted
    - `owner_id` string, uuid — Id of the activity owner at the time of the event.
    - `unit_id` string, uuid, required — Id of the sales unit.
    - `revision` integer — Revision when entity was lastly changed.

## Other responses

- `500` — unexpected error

---

[API](https://skmtc.net/aws/apis/pipeliner-cloud-api.md) · [All operations](https://skmtc.net/aws/apis/pipeliner-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/pipeliner-cloud-api/versions/e8c12ae60aca/schema)
