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

# Create Certificate URL

`POST /v1/public-access/certificate/`

Create a public access URL for a set of certificates.

Certificates can be associated with a site, or with a list of works, but not both. In either case, the certificates can be restricted to certain certificate types, and will be grouped by user.

So, a public certificate link will list all certificates with the specified certificate types associated with the specified site grouped by user; or it will list all certificates with the specified certificate type associated with the specified users regardless of site.

## Request body

- PublicCertCreateModel — The configuration for certificate public access.
  - `name` string, required — A name that will be used when a user navigates to the public certificate URL
  - `certificateTypeIds` integer[] — IDs of the certificate types to display at the public certificate URL. If left blank, will include all certificate types
  - `siteId` integer, nullable — ID of the site that the certificates are for. Either this or user_ids should be provided
  - `userIds` integer[], nullable — IDs of the workes to list certificates for. Either this or site_id should be provided

## 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)
