Share a file or folder with one person by email
POST
/v1/workspaces/{workspaceId}/share-person
const url = 'https://shareout.site/v1/workspaces/example/share-person';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"email":"hello@example.com","resource_type":"file","resource_id":"example","capability":"view"}'};
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://shareout.site/v1/workspaces/example/share-person \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "email": "hello@example.com", "resource_type": "file", "resource_id": "example", "capability": "view" }'Teams/Enterprise. Admin only. Invites an external user if needed and mints an external_user grant. Returns 409 if the email is already an internal member.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” workspaceId
required
string
Workspace ID or slug.
Request Body required
Section titled “Request Body required ” Media type application/json
object
email
required
string format: email
resource_type
required
string
resource_id
required
string
capability
string
Responses
Section titled “ Responses ”Grant created (idempotent re-share)
Access denied
Media type application/json
object
success
required
boolean
error
required
Human-readable message.
string
code
required
Machine-readable error code.
string
Example
{ "success": false}Email is already an internal workspace member