Revoke a file content link
Code Mode: praxis.file.files.contentLinks.revoke
HTTP: POST /file/v1/files/{file_id}/content_links:revoke
Stop a previously issued content link from reading a file. Obtain the link with files.contentUrl.create. Use file_id from file creation or listing and the token path component from a content URL (/c/<token>), not the complete URL. The caller must own the file and have write access; a read-only binding is refused. Revocation propagates through the capability deny list within 15 minutes; the file and other links remain available. Only current IAM capability tokens can be revoked; legacy content links expire at the migration deadline. Example body: {“token”:“<token from /c/>”}.
Signature
praxis.file.files.contentLinks.revoke(args:{path:{/** pattern: ^file-[0-9A-Za-z]{24}$ e.g. "file-0123456789ABCDEFGHIJKLMN" */ file_id:string};body:{/** Signed token taken from the /c/ path component of a previously issued file content URL, without the host or /c/ prefix. */ token:string}}):Promise<{/** True when IAM has recorded revocation of this content link. */ revoked:true}>;Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| file_id | path | string | yes | Tenant-owned file identifier returned by file creation or listing; the token must name this same file. |
Request body
| Required | Content types | Description |
|---|---|---|
| yes | application/json |
Responses
| Status | Content types | Description |
|---|---|---|
| 200 | application/json | The content link is revoked; deny-list propagation stops further reads. |
| 400 | INVALID_PARAMS: correct the filename, byte count, MIME type, purpose or lifetime named by the error before retrying. | |
| 401 | UNAUTHENTICATED: supply a valid organization API key or signed-in session. | |
| 403 | PERMISSION_DENIED or BINDING_READ_ONLY: use a credential with the required create or file-write authority. | |
| 404 | FILE_NOT_FOUND: the file or token is missing, expired, invalid, already revoked or belongs to another organization; obtain a live matching token and verify file access. |