---
title: "Create synchronization request for a plan run"
method: POST
path: "/tcm/external/sync/executions/planRun"
tags: ["TestCaseManagement"]
---

# Create synchronization request for a plan run

`POST /tcm/external/sync/executions/planRun`

Manually publishes a synchronization request for a plan run with job source tracking

## Request body

- XraySyncRequest — Request body for creating an Xray sync job
  - `plan_run_id` string, required — Unique identifier for the PlanRun
  - `job_source` 'test_run' | 'plan_run', required — What triggered this job
  - `test_run_id` string — The test run to sync, if not the whole plan run

## Response `201`

Synchronization request created successfully

- AsynchronousJob — An AsynchronousJob to track and provide insight into long-running background job
  - `id` string — Unique identifier of the TestCase
  - `workspace_id` string — Unique identifier for the associated Workspace
  - `job_type` 'xray_sync' | 'workspace_copy' — Type of AsynchronousJob
  - `status` 'pending' | 'running' | 'completed' | 'failed' — Current status of the AsynchronousJob
  - `associated_entities` AsynchronousJobAssociatedEntity[] — Type of Entity this AsynchronousJob is associated with
    - `type` 'workspace' | 'plan_run' — Type of Entity this AsynchronousJob is associated with
    - `id` string — Unique identifier for the associated Entity
  - `created_time` integer — Time the AsynchronousJob was created
  - `created_by_id` string — Identifier of the user who created the AsynchronousJob
  - `last_updated_time` integer — Time the AsynchronousJob was last updated
  - `last_updated_by_id` string — Identifier of the user who last updated the AsynchronousJob
  - `error_message` string — If failed, an optional error message associated with the failure
  - `job_source` 'test_run' | 'plan_run' — What triggered this job

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `404` — Entity not found
- `501` — Unknown error
- `default` — Unknown error

---

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