AnyFile Shares API
The Shares API from AnyFile — 2 operation(s) for shares.
The Shares API from AnyFile — 2 operation(s) for shares.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/useanyfile-com:useanyfile-com-shares-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a 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.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: AnyFile REST Shares API
version: 1.0.0
description: 'Public REST API for AnyFile: upload, download and organize owned files in folders, manage share links and file requests, inspect submissions, and read share analytics. Authenticate with an AnyFile API key or OAuth 2.0 bearer token and request only the scopes required for the task.'
servers:
- url: https://www.useanyfile.com/api/v1
tags:
- name: Shares
paths:
/shares:
get:
operationId: shares_list
summary: List share links
x-required-scope: shares:read
security:
- bearerAuth: []
parameters:
- name: cursor
in: query
schema:
type: string
maxLength: 128
- name: limit
in: query
schema:
type: integer
minimum: 1
maximum: 100
default: 25
responses:
'200':
description: A page of share links
content:
application/json:
schema:
type: object
required:
- data
- pagination
properties:
data:
type: array
items:
$ref: '#/components/schemas/ShareWithFile'
pagination:
$ref: '#/components/schemas/Pagination'
'400':
$ref: '#/components/responses/ApiError'
'401':
$ref: '#/components/responses/ApiError'
'403':
$ref: '#/components/responses/ApiError'
'404':
$ref: '#/components/responses/ApiError'
'409':
$ref: '#/components/responses/ApiError'
'429':
$ref: '#/components/responses/ApiError'
tags:
- Shares
post:
operationId: shares_create
summary: Create or reactivate a share link
x-required-scope: shares:write
security:
- bearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateShareInput'
responses:
'201':
description: Share link created or reactivated
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/Share'
'400':
$ref: '#/components/responses/ApiError'
'401':
$ref: '#/components/responses/ApiError'
'403':
$ref: '#/components/responses/ApiError'
'404':
$ref: '#/components/responses/ApiError'
'409':
$ref: '#/components/responses/ApiError'
'429':
$ref: '#/components/responses/ApiError'
tags:
- Shares
/shares/{shareId}:
get:
operationId: shares_get
summary: Get a share link
x-required-scope: shares:read
security:
- bearerAuth: []
parameters:
- name: shareId
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 128
responses:
'200':
description: Share link
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/ShareWithFile'
'400':
$ref: '#/components/responses/ApiError'
'401':
$ref: '#/components/responses/ApiError'
'403':
$ref: '#/components/responses/ApiError'
'404':
$ref: '#/components/responses/ApiError'
'409':
$ref: '#/components/responses/ApiError'
'429':
$ref: '#/components/responses/ApiError'
tags:
- Shares
patch:
operationId: shares_update
summary: Update a share link
x-required-scope: shares:write
security:
- bearerAuth: []
parameters:
- name: shareId
in: path
required: true
schema:
type: string
minLength: 1
maxLength: 128
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateShareInput'
responses:
'200':
description: Updated share link
content:
application/json:
schema:
type: object
required:
- data
properties:
data:
$ref: '#/components/schemas/Share'
'400':
$ref: '#/components/responses/ApiError'
'401':
$ref: '#/components/responses/ApiError'
'403':
$ref: '#/components/responses/ApiError'
'404':
$ref: '#/components/responses/ApiError'
'409':
$ref: '#/components/responses/ApiError'
'429':
$ref: '#/components/responses/ApiError'
tags:
- Shares
components:
responses:
ApiError:
description: Structured AnyFile API error
content:
application/json:
schema:
$ref: '#/components/schemas/ApiError'
schemas:
Share:
type: object
required:
- id
- isActive
- expiresAt
- viewCount
- downloadCount
- createdAt
- publicUrl
properties:
id:
type: string
isActive:
type: boolean
expiresAt:
type:
- string
- 'null'
format: date-time
viewCount:
type: integer
minimum: 0
downloadCount:
type: integer
minimum: 0
createdAt:
type: string
format: date-time
publicUrl:
type: string
format: uri
ShareWithFile:
allOf:
- $ref: '#/components/schemas/Share'
- type: object
required:
- file
properties:
file:
type: object
required:
- name
- contentType
- size
properties:
name:
type: string
contentType:
type: string
size:
type: integer
minimum: 0
UpdateShareInput:
type: object
minProperties: 1
properties:
isActive:
type: boolean
expiresAt:
type:
- string
- 'null'
format: date-time
CreateShareInput:
type: object
required:
- fileId
properties:
fileId:
type: string
minLength: 1
maxLength: 128
expiresAt:
type:
- string
- 'null'
format: date-time
Pagination:
type: object
required:
- nextCursor
properties:
nextCursor:
type:
- string
- 'null'
ApiError:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
- hint
properties:
code:
type: string
message:
type: string
hint:
type: string
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: AnyFile API key or OAuth 2.0 access token
description: 'Send an AnyFile API key or OAuth 2.0 access token in Authorization: Bearer. OAuth tokens must target https://www.useanyfile.com/api/v1.'
externalDocs:
description: AnyFile developer resources
url: https://www.useanyfile.com/developers