Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: AgentDrive Shares Redemption API
description: 'AgentDrive is an agent-focused artifact store: drive-scoped folders, artifacts, and immutable versions, with local grants, possession-based share links, drive-scoped search, and a cursor-resumable change feed. Bearer-authenticated with Hub-issued product tokens (see /.well-known/oauth-protected-resource); every mutation takes an Idempotency-Key, and existing-state mutations take If-Match.'
version: 0.0.1
servers:
- url: https://drive.tokencanopy.com
description: This deployment
- url: http://127.0.0.1:8000
description: Local dev
tags:
- name: shares-redemption
paths:
/s/{share_key}:
get:
tags:
- shares-redemption
summary: Redeem Share
description: 'The un-slashed form. Browsers are canonicalized onto `/s/{key}/`.
This keeps the published `shares_redeem` operation id because it remains
the same redemption operation: same URL, JSON `Accept`, byte/JSON result,
and uniform 404. In a split deployment the share host authorizes a
specific non-HTML request and then 308s it to this same path on the
configured public renderer; the renderer (or direct-renderer rollback)
returns the existing result. Dropping the route from the spec would have
described a live operation as gone.
The page links its own sub-resources relatively (`content`), and relative
resolution replaces the last path segment: from `/s/KEY` that reaches
`/s/content`, from `/s/KEY/` it reaches `/s/KEY/content`. The trailing
slash is what makes an image on a share page load at all. Links already in
the wild have no slash, so this redirect is how they keep working.
It is unconditional and runs before any lookup — redirecting only for keys
that resolve would turn the status code into an existence oracle and undo
the anti-enumeration property the rest of this module maintains.
HTML navigation is canonicalized to the trailing-slash form. Non-HTML
clients are answered in place by the renderer/direct rollback, or moved
to the renderer only after the credential resolves on the share host.'
operationId: shares_redeem
parameters:
- name: share_key
in: path
required: true
schema:
type: string
title: Share Key
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Request validation failed.
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
headers:
X-Request-Id:
description: Request correlation identifier.
schema:
type: string
components:
schemas:
ValidationErrorResponse:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
properties:
code:
type: string
message:
type: string
details:
type: object
properties:
fields:
type: array
items:
type: object
properties:
location:
type: string
reason:
type: string
additionalProperties: true
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: 'Hub-issued bearer token. Scopes: drives:*, content:*, sharing:*, changes:read, usage:read. See the OAuth-protected-resource discovery document (RFC 9728).'
x-agentdrive-compatibility-policy: 2