Mark a direct-to-storage upload complete for validation/scanning.
POST
/v1/uploads/{id}/complete
const url = 'https://api.share2.us/v1/uploads/example/complete';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"size_bytes":1,"sha256":"example","multipart_etags":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.share2.us/v1/uploads/example/complete \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "size_bytes": 1, "sha256": "example", "multipart_etags": [ "example" ] }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
size_bytes
required
integer format: int64
sha256
required
string
multipart_etags
Array<string>
Examplegenerated
{ "size_bytes": 1, "sha256": "example", "multipart_etags": [ "example" ]}Responses
Section titled “Responses”Upload accepted for validation.
Media typeapplication/json
object
id
required
string
public_id
required
string
url
required
string format: uri
filename
required
string
size_bytes
required
integer format: int64
content_class
string
state
required
string
download_count
integer
max_downloads
integer
password_protected
boolean
recipient_restricted
What the share ACTUALLY is. On the create response this is what lets a client that asked for visibility: private tell it got one: an older server ignores the field and returns a 201 with a PUBLIC link, so an ABSENT value must be read as “unknown”, never as false.
boolean
encrypted
boolean
scan_status
Malware scan outcome. skipped means the file was not scanned (scanning off, encrypted, or scanner unavailable) and is served with a visible warning; only a real dirty verdict blocks a share (ADR-013).
string
expires_at
required
string format: date-time
created_at
required
string format: date-time
Example
{ "content_class": "text", "state": "created", "scan_status": "pending"}default
Section titled “default”Standard error envelope.
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
request_id
required
string
Example
{ "error": { "code": "quota_exceeded" }}