Replace the current Artifact head

PUT
/v1/scopes/{scope_id}/artifacts/{family}/{artifact_id}

Commit a complete next revision when If-Match identifies the current head. Replacing a Prompt requires current scope.admin authority, including switching to Auto and restoring an earlier revision. Artifact ownership does not authorize Prompt replacement after Scope role revocation. Topic Memory replacement also requires scope.admin and preserves independently versioned tags. Complete title, summary, and detail text replaces the head without semantic generation. Profile replacement uses the same conditional write. To roll back Profile, Prompt, Experience, Skill, Handoff, or Topic Memory, set restored_from_revision and reason. The server checks that the submitted canonical content matches that revision and differs from the current head, then commits a new revision. Atomic Memory replacement rejects both fields; restore Atomic Memory through its restoration flow.

Authorization

BearerAuth
AuthorizationBearer <token>

Bearer credential resolved to an opaque authenticated Principal by the Server deployment.

In: header

Path Parameters

scope_id*string
Match.*\S.*
Length1 <= length <= 256
family*string

Value in

  • "memory"
  • "atomic-memory"
  • "experience"
  • "skill"
  • "handoff"
  • "prompt"
  • "topic-memory"
  • "profile"
artifact_id*string
Match^[\x21-\x7E]+$
Length1 <= length <= 128

Header Parameters

If-Match*string
Length1 <= length

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/scopes/string/artifacts/memory/string" \  -H "If-Match: string" \  -H "Content-Type: application/json" \  -d '{    "content": {      "kind": "string",      "text": "string"    }  }'
{  "scope_id": "string",  "family": "memory",  "artifact_id": "string",  "revision": 1,  "content": {},  "sources": [    {      "source_type": "string",      "source_id": "string"    }  ],  "artifacts": [    {      "family": "string",      "artifact_id": "string",      "revision": 1    }  ],  "content_digest": "string",  "created_at": "2019-08-24T14:15:22Z",  "created_by": {    "type": "user",    "id": "string",    "description": "string"  },  "restored_from_revision": 1,  "reason": "string"}