Content Sharing
Distribute content to other tenants' catalogs using the share_with_tenants_ids field. This allows a content owner to make their content available in other tenants' stores without duplicating the content item.
How It Works
- The content owner sets
share_with_tenants_idson a content item with an array of target tenant IDs. - Each receiving tenant gets a read-only catalog entry for that content.
- The receiving tenant can list and view the shared content but cannot modify or delete it.
- The owner can update or remove sharing at any time by changing the
share_with_tenants_idsarray.
Using share_with_tenants_ids
The share_with_tenants_ids field is available on the Create Content and Update Content endpoints.
| Behavior | Description |
|---|---|
| Availability | Create and Update endpoints only (not supported in Bulk Operations) |
| Type | Array of string tenant IDs |
| Replacement | Full replacement — the array you send replaces the current sharing list |
| Remove sharing | Send an empty array [] to remove all sharing |
| Owner-only | Only the content owner can manage sharing (403 if not owner) |
Full Replacement
The share_with_tenants_ids array is not merged with existing values. Every update replaces the entire sharing list. To add a new tenant, include all previously shared tenant IDs plus the new one.
Request Examples
Share During Creation
curl -X POST "https://yourstore.publica.la/api/v3/content" \
-H "X-User-Token: your-api-token" \
-H "Content-Type: application/json" \
-d '{
"name": "Shared Publication",
"file_type": "pdf",
"lang": "en",
"external_id": "SHARED-001",
"file_url": "https://example.com/files/shared-pub.pdf",
"share_with_tenants_ids": ["42", "87", "153"]
}'
Update Sharing List
Add or change which tenants receive the content. Remember this replaces the full list.
curl -X PUT "https://yourstore.publica.la/api/v3/content/468170" \
-H "X-User-Token: your-api-token" \
-H "Content-Type: application/json" \
-d '{
"share_with_tenants_ids": ["42", "87", "153", "201"]
}'
Remove All Sharing
curl -X PUT "https://yourstore.publica.la/api/v3/content/468170" \
-H "X-User-Token: your-api-token" \
-H "Content-Type: application/json" \
-d '{
"share_with_tenants_ids": []
}'
Permissions & Restrictions
| Rule | Details |
|---|---|
| Owner-only | Only the content owner can set or change share_with_tenants_ids |
| Target tenant validation | Target tenant must have share permission (check with support) or be an aggregated tenant, a sub-tenant of the owner |
| Invalid IDs | Invalid or unauthorized tenant IDs are silently skipped (not rejected) |
| Non-owner update | Returns 403 Forbidden if a non-owner tenant attempts to manage sharing |
Behavior for Receiving Tenant
When content is shared with a tenant:
- The content appears in their catalog (returned by List Content and Get Content endpoints).
- The content is read-only: the receiving tenant cannot update or delete it. Attempting to do so returns
403 Forbidden. - Access settings (free, preview, require_login) are copied from the owner's configuration.
Withdrawal Behavior
When a tenant ID is removed from the share_with_tenants_ids array:
- The content is withdrawn from that tenant's catalog and is no longer available for new purchases.
- Users who already purchased or were assigned the content retain their access.
- The content stops appearing in catalog listings (via plans) for that tenant.
See Also
- Create Content - Add new content with sharing
- Update Content - Modify sharing on existing content
- Overview - API overview