{"components":{"parameters":{"CsrfHeader":{"description":"Required on mutating requests that authenticate with the session cookie; must equal the act_csrf cookie value. Not required for bearer-token requests.","in":"header","name":"x-csrf-token","required":false,"schema":{"type":"string"}},"IdPath":{"in":"path","name":"id","required":true,"schema":{"type":"string"}}},"responses":{"Error":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Structured error. Codes include invalid_body, invalid_email, email_taken, invalid_credentials, unauthorized, csrf_failed, rate_limited, not_found, forbidden, invalid_version, invalid_file_type, invalid_mode, package_invalid, version_exists, invalid_transition, and invalid_digest."}},"schemas":{"ApiToken":{"properties":{"createdAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"lastUsedAt":{"format":"date-time","type":["string","null"]},"name":{"type":"string"},"revokedAt":{"format":"date-time","type":["string","null"]}},"required":["id","name","createdAt","lastUsedAt","revokedAt"],"type":"object"},"AuthResponse":{"properties":{"user":{"$ref":"#/components/schemas/User"}},"required":["user"],"type":"object"},"Capability":{"properties":{"createdAt":{"format":"date-time","type":"string"},"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","slug","name","description","createdAt"],"type":"object"},"CapabilitySummary":{"allOf":[{"$ref":"#/components/schemas/Capability"},{"properties":{"versions":{"items":{"$ref":"#/components/schemas/CapabilityVersionRef"},"type":"array"}},"required":["versions"],"type":"object"}]},"CapabilityVersionDetail":{"properties":{"artifactId":{"type":["string","null"]},"blocked":{"type":"boolean"},"createdAt":{"format":"date-time","type":"string"},"digest":{"type":"string"},"id":{"type":"string"},"manifest":{"description":"The ACT manifest (act.json) for this version.","type":"object"},"scanFindings":{"items":{"$ref":"#/components/schemas/ScanFinding"},"type":"array"},"version":{"type":"string"}},"required":["id","version","digest","manifest","artifactId","blocked","scanFindings","createdAt"],"type":"object"},"CapabilityVersionRef":{"properties":{"createdAt":{"format":"date-time","type":"string"},"digest":{"type":"string"},"id":{"type":"string"},"version":{"type":"string"}},"required":["id","version","digest","createdAt"],"type":"object"},"ClaimResult":{"properties":{"claim":{"properties":{"kind":{"enum":["account","anonymous"],"type":"string"},"linkId":{"type":"string"}},"required":["kind","linkId"],"type":"object"},"claimGrant":{"description":"Anonymous claims only. The claim grant, shown once; only its SHA-256 hash is stored. Send it as the x-act-grant header on later calls.","type":"string"},"csrfToken":{"type":"string"},"note":{"type":"string"},"transfer":{"$ref":"#/components/schemas/TransferRef"}},"required":["transfer","claim"],"type":"object"},"CreateCapabilityRequest":{"properties":{"content":{"description":"Paste mode: the instructions text. Document mode: the document text.","maxLength":300000,"type":"string"},"description":{"maxLength":2000,"minLength":1,"type":"string"},"fileName":{"description":"Document mode: the original file name (.md or .txt).","maxLength":300,"type":"string"},"files":{"description":"Skill mode: the skill files. Must include SKILL.md.","items":{"properties":{"content":{"type":"string"},"path":{"type":"string"}},"required":["path","content"],"type":"object"},"maxItems":50,"type":"array"},"mode":{"enum":["paste","document","skill"],"type":"string"},"name":{"maxLength":200,"minLength":1,"type":"string"},"permissions":{"properties":{"external_side_effects":{"type":"boolean"},"filesystem_write":{"type":"boolean"},"network":{"type":"boolean"}},"type":"object"},"tools":{"items":{"maxLength":128,"type":"string"},"maxItems":50,"type":"array"},"version":{"description":"Semantic version. Defaults to 1.0.0.","maxLength":50,"type":"string"}},"required":["mode","name","description"],"type":"object"},"CreateShareLinkRequest":{"properties":{"capabilityVersionId":{"maxLength":200,"type":"string"},"digest":{"description":"Required with capabilityVersionId: the package digest the sender reviewed. Approval is recorded as part of link creation.","maxLength":200,"type":"string"},"transferId":{"description":"Alternative to capabilityVersionId: an existing transfer. It must already be approved and offered; an unapproved transfer returns 409 with code needs_approval and the digest and summary in the error details.","maxLength":200,"type":"string"}},"type":"object"},"CreatedCapability":{"properties":{"artifactId":{"type":"string"},"blocked":{"type":"boolean"},"capability":{"properties":{"description":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","slug","name","description"],"type":"object"},"scanFindings":{"items":{"$ref":"#/components/schemas/ScanFinding"},"type":"array"},"version":{"properties":{"digest":{"type":"string"},"id":{"type":"string"},"version":{"type":"string"}},"required":["id","version","digest"],"type":"object"}},"required":["capability","version","artifactId","blocked","scanFindings"],"type":"object"},"CreatedShareLink":{"properties":{"link":{"properties":{"expiresAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"path":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"required":["id","path","url","expiresAt","status"],"type":"object"},"transfer":{"$ref":"#/components/schemas/TransferRef"}},"required":["link","transfer"],"type":"object"},"Error":{"properties":{"error":{"properties":{"code":{"type":"string"},"details":{"description":"Optional structured detail, for example the validation errors of a rejected package."},"message":{"type":"string"}},"required":["code","message"],"type":"object"}},"required":["error"],"type":"object"},"LifecycleState":{"enum":["DRAFT","AWAITING_SENDER_APPROVAL","OFFERED","RECEIVED","INSPECTED","ACCEPTED","REJECTED","REVOKED","EXPIRED"],"type":"string"},"LinkInspect":{"description":"The rendezvous document for a share link. While the link is active it carries metadata only: capability name and description, manifest summary, declared dependencies and requested permissions, the security findings summary, and the package file list (names and sizes). It never carries package contents. The actions block names the claim call and the calls that follow it, so an agent handed only the link can complete the flow from this document alone. After a claim, only the capability name and the claimed status remain.","properties":{"actions":{"type":"object"},"capability":{"properties":{"description":{"type":"string"},"digest":{"type":"string"},"name":{"type":"string"},"version":{"type":"string"}},"required":["name"],"type":"object"},"files":{"items":{"properties":{"path":{"type":"string"},"sizeBytes":{"type":"integer"}},"required":["path","sizeBytes"],"type":"object"},"type":"array"},"link":{"properties":{"expiresAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status","expiresAt"],"type":"object"},"manifest":{"type":"object"},"note":{"type":"string"},"notes":{"items":{"type":"string"},"type":"array"},"security":{"type":"object"},"sender":{"properties":{"displayName":{"type":"string"}},"required":["displayName"],"type":"object"}},"required":["link","capability"],"type":"object"},"LoginRequest":{"properties":{"email":{"type":"string"},"password":{"type":"string"}},"required":["email","password"],"type":"object"},"Offer":{"properties":{"capabilityDescription":{"type":"string"},"capabilityName":{"type":"string"},"expired":{"type":"boolean"},"expiresAt":{"format":"date-time","type":["string","null"]},"recipientEmail":{"type":["string","null"]},"revoked":{"type":"boolean"},"senderDisplayName":{"type":"string"},"state":{"$ref":"#/components/schemas/LifecycleState"},"transferId":{"type":"string"},"version":{"type":"string"}},"required":["transferId","state","senderDisplayName","capabilityName","capabilityDescription","version","recipientEmail","expiresAt","expired","revoked"],"type":"object"},"Receipt":{"description":"A verification receipt as defined by the ACT 0.1 protocol (spec section 8). Result labels are exactly VALIDATED, POLICY_CHECKS_PASSED, TESTED, VERIFIED_FOR_TEST_SUITE, INSUFFICIENT_EVIDENCE, FAILED, NOT_TESTED. No label states that a capability is safe in general.","properties":{"adoption_status":{"type":"string"},"artifact_digest":{"type":"string"},"baseline_comparison":{"type":"object"},"behavioral_outcomes":{"items":{"type":"object"},"type":"array"},"capability":{"type":"object"},"compatibility_result":{"type":"string"},"environment":{"type":"object"},"evidence_references":{"items":{"type":"string"},"type":"array"},"human_approval_status":{"type":"string"},"missing_checks":{"items":{"type":"string"},"type":"array"},"receipt_version":{"type":"string"},"security_result":{"type":"string"},"structural_result":{"type":"string"},"test_suite":{"type":"object"},"timestamp":{"format":"date-time","type":"string"},"transfer_id":{"type":"string"},"unsupported_checks":{"items":{"type":"string"},"type":"array"}},"type":"object"},"RegisterRequest":{"properties":{"displayName":{"maxLength":120,"type":"string"},"email":{"maxLength":254,"minLength":3,"type":"string"},"password":{"maxLength":200,"minLength":10,"type":"string"}},"required":["email","password"],"type":"object"},"ScanFinding":{"description":"One secret-scan finding. The excerpt is redacted to at most five characters and never carries the matched value.","properties":{"excerpt":{"type":"string"},"kind":{"type":"string"},"path":{"type":"string"},"severity":{"enum":["low","medium","high","critical"],"type":"string"}},"type":"object"},"ShareLink":{"properties":{"capabilityName":{"type":"string"},"claimedAt":{"format":"date-time","type":["string","null"]},"createdAt":{"format":"date-time","type":"string"},"digest":{"type":"string"},"expiresAt":{"format":"date-time","type":"string"},"id":{"type":"string"},"status":{"enum":["active","claimed","expired","revoked"],"type":"string"},"transferId":{"type":"string"},"transferState":{"$ref":"#/components/schemas/LifecycleState"},"version":{"type":"string"}},"required":["id","transferId","capabilityName","version","digest","status","transferState","createdAt","expiresAt","claimedAt"],"type":"object"},"TransferRef":{"properties":{"id":{"type":"string"},"state":{"$ref":"#/components/schemas/LifecycleState"}},"required":["id","state"],"type":"object"},"TransferSummary":{"properties":{"blocked":{"type":"boolean"},"capabilityName":{"type":"string"},"createdAt":{"format":"date-time","type":"string"},"digest":{"type":"string"},"direction":{"enum":["sent","received"],"type":"string"},"expiresAt":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"recipientEmail":{"type":["string","null"]},"recipientId":{"type":["string","null"]},"scanFindings":{"items":{"$ref":"#/components/schemas/ScanFinding"},"type":"array"},"senderId":{"type":"string"},"state":{"$ref":"#/components/schemas/LifecycleState"},"updatedAt":{"format":"date-time","type":"string"},"verificationState":{"$ref":"#/components/schemas/VerificationState"},"version":{"type":"string"}},"required":["id","state","verificationState","capabilityName","version","digest","direction","blocked","scanFindings","recipientEmail","senderId","recipientId","expiresAt","createdAt","updatedAt"],"type":"object"},"User":{"properties":{"displayName":{"type":"string"},"email":{"format":"email","type":"string"},"id":{"type":"string"}},"required":["id","email","displayName"],"type":"object"},"VerificationRun":{"properties":{"environment":{"type":["object","null"]},"finishedAt":{"format":"date-time","type":["string","null"]},"id":{"type":"string"},"results":{"type":["object","null"]},"startedAt":{"format":"date-time","type":["string","null"]},"status":{"type":"string"},"suiteId":{"type":"string"},"suiteVersion":{"type":"string"}},"required":["id","status","suiteId","suiteVersion","environment","results","startedAt","finishedAt"],"type":"object"},"VerificationState":{"enum":["NOT_STARTED","PENDING","VERIFIED","FAILED"],"type":"string"}},"securitySchemes":{"bearerToken":{"description":"Personal API token (prefix act_) created on the dashboard or through POST /api/v1/tokens. Shown once at creation; stored as a SHA-256 hash. Carries the owner's identity only, with no scopes in v0.1.","scheme":"bearer","type":"http"},"sessionCookie":{"description":"Session cookie set by register and login. httpOnly. Mutating requests also require the x-csrf-token header to match the act_csrf cookie (double-submit pattern). Bearer-token requests skip the CSRF check because they carry no cookie authority.","in":"cookie","name":"act_session","type":"apiKey"}}},"info":{"description":"REST API for the ACT reference hosted service. All endpoints live under /api/v1. Browser clients authenticate with a session cookie and send the CSRF token on mutating requests. Programs (the SDK, the actx CLI, the MCP server) authenticate with a personal API token sent as a bearer token. A token carries the owning user's identity only; v0.1 has no token scopes.","title":"ACT Hosted Service API","version":"0.1.0"},"openapi":"3.1.0","paths":{"/api/v1/auth/csrf":{"get":{"description":"Issues (or returns) the act_csrf cookie used by the double-submit CSRF check and returns its value. Mutating browser requests must send the same value in the x-csrf-token header.","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"csrfToken":{"type":"string"}},"required":["csrfToken"],"type":"object"}}},"description":"CSRF token issued."}},"security":[],"summary":"Get a CSRF token","tags":["auth"]}},"/api/v1/auth/login":{"post":{"parameters":[{"$ref":"#/components/parameters/CsrfHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}},"description":"Session started."},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"Sign in","tags":["auth"]}},"/api/v1/auth/logout":{"post":{"parameters":[{"$ref":"#/components/parameters/CsrfHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"ok":{"type":"boolean"}},"required":["ok"],"type":"object"}}},"description":"Session deleted."},"403":{"$ref":"#/components/responses/Error"}},"summary":"Sign out","tags":["auth"]}},"/api/v1/auth/me":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}},"description":"The signed-in user."},"401":{"$ref":"#/components/responses/Error"}},"summary":"Current user","tags":["auth"]}},"/api/v1/auth/register":{"post":{"description":"Creates an account and starts a session. Requires the CSRF header for browser clients.","parameters":[{"$ref":"#/components/parameters/CsrfHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegisterRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}},"description":"Account created and session started."},"400":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"Create an account","tags":["auth"]}},"/api/v1/capabilities":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"capabilities":{"items":{"$ref":"#/components/schemas/CapabilitySummary"},"type":"array"}},"required":["capabilities"],"type":"object"}}},"description":"Capabilities owned by the signed-in user, each with its versions."},"401":{"$ref":"#/components/responses/Error"}},"summary":"List my capabilities","tags":["capabilities"]},"post":{"description":"Builds a package from pasted instructions (mode paste), an uploaded document's text (mode document), or an existing skill's files (mode skill). The package is validated and scanned for secrets before storage. A finding with severity critical or high marks the version blocked; a blocked version cannot be approved for sending.","parameters":[{"$ref":"#/components/parameters/CsrfHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCapabilityRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedCapability"}}},"description":"Capability and version created."},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"summary":"Create a capability","tags":["capabilities"]}},"/api/v1/capabilities/sample":{"post":{"description":"Builds the public sample capability (Competitor Research, from examples/competitor-research in the project repository) for the signed-in user and creates a draft transfer for it, ready to approve and send. If the user already owns the sample capability, its existing version is reused and a fresh draft transfer is created.","parameters":[{"$ref":"#/components/parameters/CsrfHeader"}],"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"capability":{"properties":{"id":{"type":"string"}},"required":["id"],"type":"object"},"transfer":{"properties":{"id":{"type":"string"},"state":{"type":"string"}},"required":["id","state"],"type":"object"},"version":{"properties":{"digest":{"type":"string"},"id":{"type":"string"}},"required":["id","digest"],"type":"object"}},"required":["capability","version","transfer"],"type":"object"}}},"description":"Sample capability ready, with a draft transfer."},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"}},"summary":"Create the sample capability and a draft transfer","tags":["capabilities"]}},"/api/v1/capabilities/{id}":{"get":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"capability":{"$ref":"#/components/schemas/Capability"},"versions":{"items":{"$ref":"#/components/schemas/CapabilityVersionDetail"},"type":"array"}},"required":["capability","versions"],"type":"object"}}},"description":"The capability and its versions, with scan findings and blocked state per version."},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Capability detail","tags":["capabilities"]}},"/api/v1/invitations/{token}":{"get":{"description":"The one unauthenticated read in the transfer flow. Returns offer-level metadata only: no package contents. Anyone holding the link can read this metadata until the invitation is received, so treat the link as a bearer credential until then.","parameters":[{"description":"The invitation token from the invitation link.","in":"path","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"offer":{"$ref":"#/components/schemas/Offer"}},"required":["offer"],"type":"object"}}},"description":"Offer metadata."},"404":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"Invitation offer metadata","tags":["invitations"]}},"/api/v1/invitations/{token}/receive":{"post":{"description":"The signed-in recipient opens the invitation. When the offer names a recipient email, the signed-in account's email must match. The transfer moves to RECEIVED.","parameters":[{"in":"path","name":"token","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/CsrfHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"transfer":{"$ref":"#/components/schemas/TransferRef"}},"required":["transfer"],"type":"object"}}},"description":"Transfer received."},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"summary":"Receive an invitation","tags":["invitations"]}},"/api/v1/links":{"get":{"description":"Share links the signed-in user created, with status (active, claimed, expired, revoked). Plain tokens are never listed; only their hashes are stored.","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"links":{"items":{"$ref":"#/components/schemas/ShareLink"},"type":"array"}},"required":["links"],"type":"object"}}},"description":"The sender's share links."},"401":{"$ref":"#/components/responses/Error"}},"summary":"List my share links","tags":["links"]},"post":{"description":"Creates a one-off share link for an approved package; the link expires 7 days after creation by default. Send capabilityVersionId with the digest the sender reviewed (approval is recorded as part of creation), or transferId for an existing transfer. An unapproved transfer returns 409 with code needs_approval; the error details carry the package digest and a contents summary, so an agent can show the owner what would be shared, get approval through the approve endpoint, and only then create the link. A package blocked by the secret scan returns 422. The plain token is returned once, in the link URL; only its SHA-256 hash is stored.","parameters":[{"$ref":"#/components/parameters/CsrfHeader"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateShareLinkRequest"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedShareLink"}}},"description":"Link created; the URL carries the plain token, shown once."},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"}},"summary":"Create a share link","tags":["links"]}},"/api/v1/links/revoke":{"post":{"description":"Revokes one of the sender's own active links. Revocation is enforced on every link endpoint from then on. A claimed link cannot be revoked; its transfer belongs to the recipient flow.","parameters":[{"$ref":"#/components/parameters/CsrfHeader"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"id":{"maxLength":200,"minLength":1,"type":"string"}},"required":["id"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"link":{"properties":{"id":{"type":"string"},"revokedAt":{"format":"date-time","type":["string","null"]}},"required":["id","revokedAt"],"type":"object"}},"required":["link"],"type":"object"}}},"description":"Link revoked (or already revoked)."},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"summary":"Revoke a share link","tags":["links"]}},"/api/v1/links/{token}":{"get":{"description":"The unauthenticated rendezvous read for a share link. Returns metadata only, never package contents; see the LinkInspect schema. Anyone holding the link can read this until the link is claimed, expires, or is revoked, so treat the link like a password-reset link. After a claim it returns only the capability name and the claimed status. Expired and revoked links return 410. Rate limited per address and token. The response sets Referrer-Policy: no-referrer and Cache-Control: no-store.","parameters":[{"description":"The share-link token from the /l/<token> URL. Only its SHA-256 hash is stored server-side.","in":"path","name":"token","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkInspect"}}},"description":"Link metadata and the next-step actions."},"404":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"Inspect a share link (no account)","tags":["links"]}},"/api/v1/links/{token}/claim":{"post":{"description":"Binds the link to one claimant and moves its transfer to RECEIVED, so the package, verification, and accept calls work from there. A signed-in caller claims into their account. An anonymous caller gets an ephemeral recipient identity: the response sets a session cookie and a claim-grant cookie and returns the claim grant once for clients that cannot keep cookies. A link can be claimed once; later claims return 409. Expired and revoked links return 410. Rate limited per address.","parameters":[{"description":"The share-link token from the /l/<token> URL. Only its SHA-256 hash is stored server-side.","in":"path","name":"token","required":true,"schema":{"type":"string"}},{"$ref":"#/components/parameters/CsrfHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimResult"}}},"description":"Transfer claimed."},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}},"security":[],"summary":"Claim a share link","tags":["links"]}},"/api/v1/openapi.json":{"get":{"responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"The OpenAPI 3.1 document for this API."}},"security":[],"summary":"This OpenAPI document","tags":["meta"]}},"/api/v1/receipts/{id}":{"get":{"description":"Returns one receipt by id. Only parties to the transfer can read its receipts; other accounts get 404.","parameters":[{"$ref":"#/components/parameters/IdPath"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"digest":{"type":"string"},"id":{"type":"string"},"receipt":{"$ref":"#/components/schemas/Receipt"},"transferId":{"type":"string"}},"required":["id","digest","transferId","receipt"],"type":"object"}}},"description":"The receipt and the SHA-256 digest of its stored JSON."},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Fetch a receipt","tags":["verification"]}},"/api/v1/tokens":{"get":{"description":"Lists token records (id, name, created, last used, revoked). Plain token values are never listed.","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"tokens":{"items":{"$ref":"#/components/schemas/ApiToken"},"type":"array"}},"required":["tokens"],"type":"object"}}},"description":"Token records."},"401":{"$ref":"#/components/responses/Error"}},"summary":"List my API tokens","tags":["tokens"]},"post":{"description":"Creates a personal API token. The plain token is returned once, in this response; only its SHA-256 hash is stored. Tokens have no scopes in v0.1.","parameters":[{"$ref":"#/components/parameters/CsrfHeader"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"name":{"maxLength":120,"minLength":1,"type":"string"}},"required":["name"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"apiToken":{"$ref":"#/components/schemas/ApiToken"},"token":{"type":"string"}},"required":["token","apiToken"],"type":"object"}}},"description":"Token created; plain value shown once."},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"}},"summary":"Create an API token","tags":["tokens"]}},"/api/v1/tokens/{id}":{"delete":{"description":"Revokes one of the signed-in user's own tokens. A revoked token is refused with 401 from then on.","parameters":[{"$ref":"#/components/parameters/IdPath"},{"$ref":"#/components/parameters/CsrfHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"revoked":{"type":"boolean"}},"required":["revoked"],"type":"object"}}},"description":"Token revoked."},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Revoke an API token","tags":["tokens"]}},"/api/v1/transfers":{"get":{"description":"Transfers the signed-in user sent or received.","responses":{"200":{"content":{"application/json":{"schema":{"properties":{"transfers":{"items":{"$ref":"#/components/schemas/TransferSummary"},"type":"array"}},"required":["transfers"],"type":"object"}}},"description":"Transfer summaries."},"401":{"$ref":"#/components/responses/Error"}},"summary":"List transfers","tags":["transfers"]},"post":{"parameters":[{"$ref":"#/components/parameters/CsrfHeader"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"capabilityVersionId":{"minLength":1,"type":"string"},"recipientEmail":{"format":"email","maxLength":254,"type":"string"}},"required":["capabilityVersionId"],"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"transfer":{"$ref":"#/components/schemas/TransferSummary"}},"required":["transfer"],"type":"object"}}},"description":"Draft transfer created."},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Create a draft transfer","tags":["transfers"]}},"/api/v1/transfers/{id}":{"get":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"transfer":{"$ref":"#/components/schemas/TransferSummary"}},"required":["transfer"],"type":"object"}}},"description":"The transfer summary."},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Transfer detail","tags":["transfers"]}},"/api/v1/transfers/{id}/accept":{"post":{"description":"Recipient adoption approval, recorded against the package digest. The transfer must be in RECEIVED or INSPECTED state.","parameters":[{"$ref":"#/components/parameters/IdPath"},{"$ref":"#/components/parameters/CsrfHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"transfer":{"$ref":"#/components/schemas/TransferRef"}},"required":["transfer"],"type":"object"}}},"description":"Transfer accepted."},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"summary":"Accept a transfer","tags":["transfers"]}},"/api/v1/transfers/{id}/approve":{"post":{"description":"Sender export approval, bound to the package digest the sender reviewed. On success the transfer moves to OFFERED and the response carries the invitation token once. Only its SHA-256 hash is stored. The invitation expires 7 days after approval by default.","parameters":[{"$ref":"#/components/parameters/IdPath"},{"$ref":"#/components/parameters/CsrfHeader"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"digest":{"maxLength":128,"minLength":1,"type":"string"},"recipientEmail":{"format":"email","maxLength":254,"type":"string"}},"required":["digest"],"type":"object"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"invitation":{"properties":{"expiresAt":{"format":"date-time","type":"string"},"path":{"type":"string"},"token":{"type":"string"}},"required":["token","path","expiresAt"],"type":"object"},"transfer":{"$ref":"#/components/schemas/TransferRef"}},"required":["transfer","invitation"],"type":"object"}}},"description":"Transfer offered; invitation token shown once."},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"summary":"Approve a transfer for sending","tags":["transfers"]}},"/api/v1/transfers/{id}/package":{"get":{"description":"Returns the manifest, file contents, and the serialized package form. Available to the sender and to a recipient who has received the transfer. The stored package digest is checked against the recorded artifact digest before any content is returned. A recipient's first read moves the transfer from RECEIVED to INSPECTED.","parameters":[{"$ref":"#/components/parameters/IdPath"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"blocked":{"type":"boolean"},"digest":{"type":"string"},"files":{"items":{"type":"object"},"type":"array"},"manifest":{"type":"object"},"scanFindings":{"items":{"$ref":"#/components/schemas/ScanFinding"},"type":"array"},"serialized":{"type":"string"},"transfer":{"$ref":"#/components/schemas/TransferRef"}},"required":["transfer","manifest","digest","files","serialized","scanFindings","blocked"],"type":"object"}}},"description":"Package view."},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Read the package for a transfer","tags":["transfers"]}},"/api/v1/transfers/{id}/reject":{"post":{"parameters":[{"$ref":"#/components/parameters/IdPath"},{"$ref":"#/components/parameters/CsrfHeader"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"reason":{"maxLength":1000,"type":"string"}},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"transfer":{"$ref":"#/components/schemas/TransferRef"}},"required":["transfer"],"type":"object"}}},"description":"Transfer rejected."},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"summary":"Reject a transfer","tags":["transfers"]}},"/api/v1/transfers/{id}/revoke":{"post":{"description":"Sender revokes the transfer. Revocation stops future access to the hosted copy; it cannot recall copies a recipient already downloaded.","parameters":[{"$ref":"#/components/parameters/IdPath"},{"$ref":"#/components/parameters/CsrfHeader"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"transfer":{"$ref":"#/components/schemas/TransferRef"}},"required":["transfer"],"type":"object"}}},"description":"Transfer revoked."},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"summary":"Revoke a transfer","tags":["transfers"]}},"/api/v1/transfers/{id}/verification":{"get":{"parameters":[{"$ref":"#/components/parameters/IdPath"}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"receipt":{"properties":{"digest":{"type":"string"},"id":{"type":"string"},"receipt":{"$ref":"#/components/schemas/Receipt"}},"required":["id","digest","receipt"],"type":["object","null"]},"run":{"$ref":"#/components/schemas/VerificationRun"}},"required":["run","receipt"],"type":"object"}}},"description":"The latest run and its receipt, when one exists."},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"}},"summary":"Latest verification run and receipt","tags":["verification"]}},"/api/v1/transfers/{id}/verify":{"post":{"description":"Starts a server-side verification run for the transfer. The body may carry a recipient environment profile under \"profile\" (or as the body itself). Receipt, status, and result fields sent by a client are ignored; receipts are written only by the server-side run.","parameters":[{"$ref":"#/components/parameters/IdPath"},{"$ref":"#/components/parameters/CsrfHeader"}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"profile":{"description":"Recipient environment profile: adapter id, tools, and configuration the environment provides.","type":"object"}},"type":"object"}}},"required":false},"responses":{"202":{"content":{"application/json":{"schema":{"properties":{"run":{"properties":{"id":{"type":"string"},"status":{"type":"string"},"transferId":{"type":"string"}},"required":["id","transferId","status"],"type":"object"}},"required":["run"],"type":"object"}}},"description":"Run queued."},"401":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}},"summary":"Start a verification run","tags":["verification"]}}},"security":[{"sessionCookie":[]},{"bearerToken":[]}],"servers":[{"description":"The hosted service origin","url":"/"}],"tags":[{"description":"Accounts and sessions","name":"auth"},{"description":"Capability packages owned by the signed-in user","name":"capabilities"},{"description":"Transfers and their lifecycle actions","name":"transfers"},{"description":"Invitation offers and receiving","name":"invitations"},{"description":"Verification runs and receipts","name":"verification"},{"description":"Personal API tokens","name":"tokens"},{"description":"Service metadata","name":"meta"},{"description":"One-off share links: create, inspect, claim, revoke","name":"links"}]}