Share an existing share with a teammate by email.
const url = 'https://api.share2.us/v1/shares/example/share-with';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","visibility":"private"}'};
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/shares/example/share-with \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "visibility": "private" }'Sends the existing share to a teammate. public emails the public link without changing recipient restrictions. private marks the share as recipient-restricted and adds the teammate as an allowed recipient.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Responses
Section titled “Responses”Updated share metadata.
object
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.
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).
Example
{ "content_class": "text", "state": "created", "scan_status": "pending"}Invalid email or visibility.
Share not found for this account.
default
Section titled “default”Standard error envelope.
object
object
Example
{ "error": { "code": "quota_exceeded" }}