---
title: "Create sync action"
method: POST
path: "/api/{cloudId}/v1/syncs/{syncId}/actions"
tags: ["Sync actions"]
---

# Create sync action

`POST /api/{cloudId}/v1/syncs/{syncId}/actions`

Creates a sync action

## Path parameters

- `syncId` string, required — Id of the sync.

## Request body

- CreateSyncActionRequest
  - `type` string, required — Type of the action. It can be *create*, *close*, *acknowledge* or *addNote* for incoming actions. Types of outgoing actions can be change according to integration types such as *addComment* or *closeIssue* etc.
  - `name` string, required — Name of the action.
  - `direction` 'incoming' | 'outgoing', required — Direction of the action. It can be *incoming* or *outgoing*
  - `actionGroupType` 'forwarding' | 'updating' | 'checkbox' — Group type of the action. It can be *forwarding*, *updating* or *checkbox*. It must be provided for outgoing actions
  - `actionMapping` ActionMappingDto — Action mapping of the action.
    - `type` string, required
    - `parameter` object
  - `enabled` boolean — Enabled status of the action.
  - `filter` FilterDto, required — Filter of the action.
    - `conditionsEmpty` boolean
    - `conditionMatchType` 'match-all' | 'match-any-condition' | 'match-all-conditions'
    - `conditions` IntegrationConditionDto[]
      - `order` integer
      - `field` string, required
      - `expectedValue` string
      - `not` boolean
      - `operation` 'matches' | 'contains' | 'starts-with' | 'ends-with' | 'equals' | 'contains-key' | 'contains-value' | 'greater-than' | 'less-than' | 'is-empty' | 'equals-ignore-whitespace', required
      - `key` string
      - `systemCondition` boolean
  - `properties` object — Action specific properties of the action.
  - `fieldMappings` object — The fields mapping between payload and alert fields.

## Response `200`

Returned if the request is successful

- SyncAction — Update actions of the action group.
  - `id` string — Id of the action.
  - `name` string — Name of the action.
  - `type` string — Type of the action.
  - `enabled` boolean — Enabled status of the action.
  - `order` number, float — Order of the action.
  - `direction` 'incoming' | 'outgoing' — Direction of the action.
  - `actionGroupId` string — Id of the action group that the action belongs to.
  - `actionMapping` ActionMappingDto — Action mapping of the action.
    - `type` string, required
    - `parameter` object
  - `filter` FilterDto — Filter of the action.
    - `conditionsEmpty` boolean
    - `conditionMatchType` 'match-all' | 'match-any-condition' | 'match-all-conditions'
    - `conditions` IntegrationConditionDto[]
      - `order` integer
      - `field` string, required
      - `expectedValue` string
      - `not` boolean
      - `operation` 'matches' | 'contains' | 'starts-with' | 'ends-with' | 'equals' | 'contains-key' | 'contains-value' | 'greater-than' | 'less-than' | 'is-empty' | 'equals-ignore-whitespace', required
      - `key` string
      - `systemCondition` boolean
  - `fieldMappings` object — Field mappings of the action.
  - `properties` object — Properties of the action.

## Other responses

- `401` — Returned if the authentication credentials are incorrect
- `403` — Returned if the request user does not have permission to create the sync or operation is not allowed.
- `404` — Returned if sync is not found
- `422` — Returned if the payload is not validated

---

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