createShareLink
Creates a share link that lets external users view a resource without authentication.
Business Rules
- Only resource types registered as shareable are supported (currently
OrderFulfillment). - The link is scoped to the company that owns the resource; the requester needs permission on that company.
- The token is generated server-side with 256 bits of entropy and returned once in the payload.
- Expiration, view limit, and password are optional; omitting them creates a link without that restriction.
Error Scenarios
- **
BAD_REQUEST**: when the resource is not shareable, the resulting expiration is not in the future, ormaxViewsis not a positive integer. - **
UNAUTHORIZED**: when the requester lacks permission on the company that owns the resource.
Permissions Required
sharing:create_linkpermission
createShareLink(
input: CreateShareLinkInput!
): ShareLink!
Arguments
createShareLink.input ● CreateShareLinkInput! non-null input common
Parameters for CreateShareLink
Type
ShareLink object common
Represents a share link for sharing resources with external users.