---
title: "Create Bundle URL"
method: POST
path: "/v1/public-access/bundle/"
tags: ["Public URLs"]
---

# Create Bundle URL

`POST /v1/public-access/bundle/`

Create a public access URL for a bundle of items, including forms, assets, documents, and a site check-in.

The following set of "public_access_item" types are supported:

- "form", "id" - this is the ID of the form template
- "document", "id" - this is the ID of the specific document
- "asset", "id" - this is the ID of the asset
- "title", "url" - for a link; we have to specify the title and URL
- "on_site_log" - for the on_site_log the site has to be specified

This generates a link that will encode the bundle.

## Request body

- PublicBundleCreateModel — The configuration for a bundle.
  - `name` string, required — A name that will be used when a user navigates to the URL of the bundle
  - `siteId` integer, required — This is the ID of the site that will automatically be associated with time in this bundle.
  - `allowUserJoinCompany` boolean — If this is true, users will be propmted to join your company once they scan the QR code, only if they are not already associated with a company
  - `allowSubcontractor` boolean — If this is true, companies subcontracting on the selected site can access the forms
  - `allowUserJoinSubcontractor` boolean — If this is true, allows users to join subcontractors
  - `items` union[], required — The list of items that are required for the bundle
    - union
      - PublicBundleItemModel — A generic item that can included in a bundle.
        - `itemType` 'form' | 'document' | 'asset' | 'link' | 'on_site_log', required — The supported configuration for items included in bundles shared via public access URLs.
        - `itemId` integer, required — ID of the item to include in the bundle
      - PublicBundleLinkItemModel — A link resource that can be included in a bundle.
        - `title` string, required — Text to appear for the link
        - `url` string, required — Full URL to link to
      - PublicBundleLogItemModel — A toggle that indicates that an on-site log widget should be included in a bundle.
        - `itemType` 'form' | 'document' | 'asset' | 'link' | 'on_site_log' — The supported configuration for items included in bundles shared via public access URLs.

## Response `200`

Successful Response

- ApiGenericResponsePublicAccessSearchModel
  - `error` boolean — A boolean error indicator.
  - `message` string, nullable — Optional message.
  - `data` PublicAccessSearchModel — The required data to navigate to a public access URL.
    - `id` integer, required — The unique identifier for the public access bundle.
    - `url` string, required — The public URL to access this public access.
    - `name` string, required — The name of the item.
    - `entity` string, required — The type of entities at the specified URL.
    - `shortCode` string, nullable, required — For bundles, the short code that can be entered instead of scanning the QR code

## Other responses

- `400` — Business Logic Error
- `403` — Permission Error
- `409` — Integrity Error or Data Conflict
- `422` — Validation Error

---

[API](https://skmtc.dev/salussafety/apis/salus-developer-api.md) · [All operations](https://skmtc.dev/salussafety/apis/salus-developer-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/salussafety/salus-developer-api/revisions/ef065f44da25/schema)
