Simplio3D

Project Sharing

Generate public share links for projects. Supports password protection, expiry, and download permissions.

Get Share Configuration

GET/projects/:id/share
const response = await fetch(BASE_URL + '/projects/proj_123/share', {
  headers: { 'Authorization': 'Bearer ' + accessToken }
});

const data = await response.json();
// { "success": true, "shareConfig": { "enabled": true, "shareUrl": "https://...",
//   "viewCount": 42, "passwordProtected": false } }

Enable Sharing

POST/projects/:id/share/enable
const response = await fetch(BASE_URL + '/projects/proj_123/share/enable', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer ' + accessToken }
});

Update Share Settings

PUT/projects/:id/share
const response = await fetch(BASE_URL + '/projects/proj_123/share', {
  method: 'PUT',
  headers: {
    'Authorization': 'Bearer ' + accessToken,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    allowDownload: true,
    passwordProtected: true,
    password: 'secret123',
    expiresAt: '2026-06-01T00:00:00Z'
  })
});

Regenerate Share Token

POST/projects/:id/share/regenerate
const response = await fetch(BASE_URL + '/projects/proj_123/share/regenerate', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer ' + accessToken }
});

Access Shared Project (Public)

GET/share/:projectId/:token
const response = await fetch(BASE_URL + '/share/proj_123/abc123', {
  headers: {
    // Required when calling Supabase Edge Functions directly from browser clients
    'apikey': SUPABASE_ANON_KEY,
    'Authorization': 'Bearer ' + SUPABASE_ANON_KEY
  }
});
const data = await response.json();
// Handles large-project variants internally in the share viewer

Submit Shared Form (Async Processing)

POST/share/:projectId/:token/submit
const response = await fetch(BASE_URL + '/share/proj_123/abc123/submit', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'apikey': SUPABASE_ANON_KEY,
    'Authorization': 'Bearer ' + SUPABASE_ANON_KEY
  },
  body: JSON.stringify({
    formData: { name: 'Jane Smith', email: '[email protected]' },
    selectedOptions: {},
    configurationSummary: '...',
    screenshots: []
  })
});

const data = await response.json();
// Immediate acknowledgment:
// { "success": true, "requestId": "..." }
// Screenshots/PDF/emails/webhooks are processed asynchronously after response.

Async Submit Semantics

Shared-form submit endpoints persist the request first and respond immediately. Heavy side effects (screenshot upload, PDF generation, SMTP notifications, webhook dispatch) run in background tasks, so they are eventually consistent and may complete after the initial 200 response.

Continue reading