Targets

Update a Target

PATCH
/targets/{target_id}

Omitted fields keep their current values. Supplied config and checks replace their complete stored values. Change Deliveries with createDelivery, updateDelivery, and deleteDelivery. With Project auto_generate enabled, changing Target config or checks queues that Target's Generation. A queued or running Target reuses that Generation. Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag returns 412 precondition_failed without saving. Select the next version through PATCH /drafts/{draft_id} on the Target's draft_id.

A 409 target_busy means the Target is publishing; wait for it to finish. A 409 delivery_conflict means another Target owns the requested repository tree; retrieve both Targets, choose a free destination, and retry. A 502 follow_up_failed means the update was saved, but retiring an obsolete review or regenerating the Target failed. Retrieve the Target and follow the error's retryable and suggested_action fields. See conditional writes for ETag and If-Match.

AuthorizationBearer <token>

Organization API key from the console (ak_...), or an OAuth access token with user:org:read, the organization selected during consent, and the capability required by the operation.

In: header

Path Parameters

target_id*string

Stable identifier for one configured generated product.

Match^tgt_[a-z0-9]{16}$

Header Parameters

If-Match?string

ETag from a preceding response. The write applies only if the resource still has that version; otherwise it returns 412 precondition_failed without changes. Omit to write the current version. See https://typeship.dev/docs/typeship-api#conditional-writes.

Length1 <= length <= 1024

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Properties1 <= properties

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/targets/tgt_5m8q2v7k1p9d4h6c" \  -H "Content-Type: application/json" \  -d '{    "status": "disabled"  }'
{  "id": "tgt_5m8q2v7k1p9d4h6c",  "object": "target",  "project_id": "prj_4f8k2m7x9q1v6b3n",  "spec_id": "spec_2p8m4q7k1v9d6h3c",  "name": "Parcel CLI",  "type": "cli",  "status": "disabled",  "release_channel": "stable",  "version_current": "1.0.0",  "draft_id": "drf_3q7m1v8k2p5d9h4c",  "checks": {    "generated": [      "build",      "package",      "public_entrypoint"    ],    "repository_required": [],    "customer": []  },  "config": {    "cli": {      "command_name": "parcel"    }  },  "deliveries": [    {      "id": "dlv_4q8m2v7k1p9d5h6c",      "object": "delivery",      "target_id": "tgt_5m8q2v7k1p9d4h6c",      "type": "repository",      "repository": {        "provider": "github",        "identifier": "parcel-example/parcel-client",        "directory": null,        "package_name": null,        "module_path": "github.com/parcel-example/parcel-client",        "publish_on_merge": false      },      "status": "active",      "issues": [],      "required_checks": [        "Typeship Release"      ],      "last_event": null,      "created_at": "2026-09-23T08:00:00Z",      "updated_at": "2026-09-23T08:00:00Z"    }  ],  "created_at": "2026-09-23T08:00:00Z",  "updated_at": "2026-09-23T08:00:00Z",  "request_id": "req_3k8m1v6q9p2d7h4c"}