Detach an artifact from a job
Detach an artifact from a job
Required scopes: jobs:write
Required scopes: jobs:write plus the artifact's own write scope — interview_plans:write for artifact_type interview_plan, job_postings:write for job_posting, applications:write for application. The machine-readable security array lists only jobs:write because OpenAPI cannot express a scope that depends on the request body; the artifact write scope is enforced server-side and a caller missing it receives HTTP 403 insufficient_scope.
Example (curl):
curl -X POST https://api.yardstick.team/v1/jobs/job_abc123/actions/detach_artifact \
-H 'Authorization: Bearer ys_sk_live_…' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: 7c3a…' \
-d '{"artifact_type":"job_posting","artifact_id":"jp_xyz789"}'
Example (TypeScript):
await fetch(
"https://api.yardstick.team/v1/jobs/job_abc123/actions/detach_artifact",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.YS_API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
artifact_type: "job_posting",
artifact_id: "jp_xyz789",
}),
},
).then((r) => r.json());
Request
- Base URL: https://api.yardstick.team
- URL: https://api.yardstick.team/v1/jobs/{job_id}/actions/detach_artifact
- Auth: HTTP bearer
Headers
Supported for safe retry. Reuse the same key to receive the cached response without repeating the operation.
Optional caller-supplied request identifier. Values must match ^[A-Za-z0-9_-]{1,128}$; a valid value is echoed in the response X-Request-Id header, otherwise the API generates one.
Request body
Response
Success
Changes
No recorded changes to this operation across all 1 revision of this API.