openapi: 3.0.2 info: description: Linkwarden OpenAPI Documentation. version: 1.0.0 title: API Introduction license: name: GNU Affero General Public License v3.0 url: "https://www.gnu.org/licenses/agpl-3.0.html" tags: - name: Archives - name: Auth - name: Avatar - name: Collections - name: Config - name: Dashboard - name: Highlights - name: Links - name: Logins - name: Migration - name: Preserved - name: Public - name: RSS - name: Session - name: Tags - name: Tokens - name: Favicon - name: Users - name: Worker paths: /api/v1/archives/{linkId}: get: security: - bearerAuth: [] tags: - Archives summary: Retrieves an archive file by link ID parameters: - name: linkId in: path required: true description: The ID of the desired link schema: type: string - name: format in: query required: false description: | The numeric value corresponding to the format of the file being uploaded: - `0`: PNG - `1`: JPEG - `2`: PDF - `3`: Readability JSON - `4` Monolith HTML schema: type: integer enum: - 0 # PNG - 1 # JPEG - 2 # PDF - 3 # Readability JSON - 4 # Monolith HTML - name: preview in: query required: false description: Indicates whether to return a preview of the archive. schema: type: boolean responses: "200": description: Archive file retrieved successfully. content: application/octet-stream: schema: type: string format: binary "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": description: The requested archive file was not found. content: application/json: schema: type: object properties: response: type: string description: | Retrieves an archive file in the specified format. When `NEXT_PUBLIC_USER_CONTENT_DOMAIN` is configured, browser-style requests for monolith HTML (`format=4`) are rejected on this route unless a bearer token is provided. In that setup, monolith HTML should be loaded through `/api/v1/preserved/token` and `/api/v1/preserved/view` instead. post: security: - bearerAuth: [] tags: - Archives summary: Uploads a file to an archive by link ID parameters: - name: linkId in: path required: true description: The ID of the desired link schema: type: integer - name: format in: query required: true description: | The numeric value corresponding to the format of the file being uploaded: - `0`: PNG - `1`: JPEG - `2`: PDF - `4`: Monolith HTML schema: type: integer enum: - 0 # PNG - 1 # JPEG - 2 # PDF - 4 # Monolith HTML - name: preview in: query required: false description: Indicates whether the uploaded file should be stored as the generated preview instead of the main archive file. schema: type: boolean requestBody: required: true content: multipart/form-data: schema: type: object properties: file: type: string format: binary description: The file to upload (PNG, JPEG, PDF, or HTML). required: - file responses: "200": description: File successfully uploaded and processed. content: application/json: schema: type: object properties: response: $ref: "#/components/schemas/Link" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" description: Uploads or replaces a client-side archive file for the specified link. /api/v1/archives: post: security: - bearerAuth: [] tags: - Archives summary: Uploads a standalone archive and creates a new link parameters: - name: format in: query required: true description: | The numeric value corresponding to the format of the file being uploaded: - `0`: PNG - `1`: JPEG - `2`: PDF - `4`: Monolith HTML schema: type: integer enum: - 0 # PNG - 1 # JPEG - 2 # PDF - 4 # Monolith HTML - name: preview in: query required: false description: Indicates whether the uploaded file should be treated as a generated preview instead of the main archive file. schema: type: boolean requestBody: required: true content: multipart/form-data: schema: type: object properties: file: type: string format: binary description: The file to upload (PNG, JPEG, PDF, or HTML). url: type: string format: uri description: Optional source URL used to populate metadata for the newly created link. required: - file responses: "200": description: Archive file successfully uploaded and linked. content: application/json: schema: type: object properties: response: $ref: "#/components/schemas/Link" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" description: Uploads an archive file, creates a new link for it, and stores it in the authenticated user's default collection. /api/v1/config: get: tags: - Config summary: Retrieves public runtime configuration responses: "200": description: Public runtime configuration retrieved successfully. content: application/json: schema: type: object properties: response: $ref: "#/components/schemas/PublicConfig" description: Returns the public configuration values used by Linkwarden clients. /api/v1/preserved/token: get: tags: - Preserved summary: Creates a short-lived preserved format URL parameters: - name: linkId in: query required: true description: The ID of the link whose archived format should be accessed. schema: type: integer - name: format in: query required: false description: | The numeric value corresponding to the preserved format: - `0`: PNG - `1`: JPEG - `2`: PDF - `3`: Readability JSON - `4`: Monolith HTML schema: type: integer enum: - 0 - 1 - 2 - 3 - 4 responses: "200": description: Signed preserved format URL created successfully. content: application/json: schema: type: object properties: response: $ref: "#/components/schemas/PreservedFormatUrl" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" description: | Returns a short-lived signed URL for loading an archived format from the configured user content domain. This route supports authenticated requests and can also work for public links if the archived item belongs to a public collection. /api/v1/preserved/view: get: tags: - Preserved summary: Streams an archived format from the user content domain parameters: - name: token in: query required: true description: The short-lived signed token returned by `/api/v1/preserved/token`. schema: type: string - name: download in: query required: false description: If set to `1`, the response is served as a file download. schema: type: string enum: - "1" responses: "200": description: Archived format streamed successfully. content: text/html: schema: type: string application/pdf: schema: type: string format: binary image/png: schema: type: string format: binary image/jpeg: schema: type: string format: binary application/json: schema: type: string "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" description: | Streams an archived format by validating a short-lived signed token. This route is intended to be served only on the hostname configured in `NEXT_PUBLIC_USER_CONTENT_DOMAIN`. /api/v1/auth/forgot-password: post: tags: - Auth summary: Sends a password reset email to the user requestBody: required: true content: application/json: schema: type: object properties: email: type: string format: email description: The email of the user requesting the password reset. required: - email responses: "200": description: Password reset email sent successfully. content: application/json: schema: type: object properties: response: type: string "400": $ref: "#/components/responses/BadRequest" "404": description: User not found. content: application/json: schema: type: object properties: response: type: string /api/v1/auth/reset-password: post: tags: - Auth summary: Resets the password for a user using a valid token requestBody: required: true content: application/json: schema: type: object properties: token: type: string description: The password reset token. password: type: string minLength: 8 description: The new password to set. required: - token - password responses: "200": description: Password has been reset successfully. content: application/json: schema: type: object properties: response: type: string "400": $ref: "#/components/responses/BadRequest" /api/v1/auth/verify-email: post: tags: - Auth summary: Verifies the user's email after they click a verification link parameters: - name: token in: query required: true description: The verification token sent to the user's email. schema: type: string responses: "200": description: Email verification successful. content: application/json: schema: type: object properties: response: type: string "400": $ref: "#/components/responses/BadRequest" /api/v1/avatar/{id}: get: security: - bearerAuth: [] tags: - Avatar summary: Retrieves the avatar of a user by their ID parameters: - name: id in: path required: true description: The ID of the user whose avatar is to be retrieved. schema: type: integer responses: "200": description: Avatar image successfully retrieved content: image/jpeg: schema: type: string format: binary "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" /api/v1/collections: get: security: - bearerAuth: [] summary: Get all collections operationId: getAllCollections tags: - Collections responses: "200": description: List of collections successfully retrieved. content: application/json: schema: type: object properties: response: type: array items: type: object properties: id: type: integer example: 3 name: type: string example: Health and Wellness description: type: string example: Latest articles on health and wellness. icon: type: string description: Acorn nullable: true iconWeight: type: string example: fill nullable: true enum: - fill - bold - light - regular - duotone - thin color: type: string example: "#0ea5e9" parentId: type: integer example: null nullable: true isPublic: type: boolean example: false ownerId: type: integer example: 1 createdById: type: integer example: 2 createdAt: type: string format: date-time example: "2024-12-02T00:40:22.295Z" updatedAt: type: string format: date-time example: "2024-12-02T00:40:22.295Z" _count: type: object properties: links: type: integer example: 3 parent: type: object nullable: true properties: id: type: integer example: 6 name: type: string example: New Collection members: type: array items: type: object properties: userId: type: integer example: 3 collectionId: type: integer example: 4 canCreate: type: boolean example: true canUpdate: type: boolean example: true canDelete: type: boolean example: true createdAt: type: string format: date-time example: "2024-12-02T05:50:22.680Z" updatedAt: type: string format: date-time example: "2024-12-02T05:50:22.680Z" user: type: object properties: username: type: string example: user1 name: type: string example: John Doe image: type: string example: null nullable: true "401": $ref: "#/components/responses/Unauthorized" /api/v1/collections/{id}: get: security: - bearerAuth: [] summary: Get a collection by ID operationId: getCollectionById tags: - Collections parameters: - name: id in: path required: true description: The ID of the collection to retrieve. schema: type: integer responses: "200": description: Collection successfully retrieved. content: application/json: schema: type: object properties: response: $ref: "#/components/schemas/Collection" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" post: security: - bearerAuth: [] summary: Create a new collection operationId: createCollection tags: - Collections requestBody: description: The details of the collection to create. content: application/json: schema: type: object properties: name: type: string description: The name of the collection. description: type: string description: The description of the collection. color: type: string description: The color of the collection. icon: type: string description: The icon of the collection. iconWeight: type: string description: The weight of the collection's icon. parentId: type: integer description: The ID of the parent collection, if applicable. responses: "200": description: Collection successfully created. content: application/json: schema: type: object properties: response: $ref: "#/components/schemas/Collection" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" put: security: - bearerAuth: [] summary: Update an existing collection by ID operationId: updateCollection tags: - Collections parameters: - name: id in: path required: true description: The ID of the collection to update. schema: type: integer requestBody: description: The updated collection data. content: application/json: schema: type: object properties: name: type: string description: type: string color: type: string icon: type: string iconWeight: type: string parentId: type: integer isPublic: type: boolean members: type: array items: type: object properties: userId: type: integer canCreate: type: boolean canUpdate: type: boolean canDelete: type: boolean responses: "200": description: Collection successfully updated. content: application/json: schema: type: object properties: response: $ref: "#/components/schemas/Collection" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" delete: security: - bearerAuth: [] summary: Delete a collection by ID operationId: deleteCollectionById tags: - Collections parameters: - name: id in: path required: true description: The ID of the collection to delete. schema: type: integer responses: "200": description: Collection successfully deleted. content: application/json: schema: type: object properties: response: type: object description: The deleted collection details. properties: id: type: integer name: type: string description: type: string icon: type: string nullable: true iconWeight: type: string nullable: true color: type: string parentId: type: integer nullable: true isPublic: type: boolean ownerId: type: integer createdById: type: integer createdAt: type: string format: date-time updatedAt: type: string format: date-time "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" /api/v1/dashboard: get: security: - bearerAuth: [] summary: Get dashboard data (v1) description: Retrieves the dashboard data for the authenticated user. operationId: getDashboard tags: - Dashboard responses: "200": description: Dashboard data successfully retrieved. content: application/json: schema: type: object properties: response: type: array description: List of resources with associated collections. items: $ref: "#/components/schemas/Link" "401": $ref: "#/components/responses/Unauthorized" /api/v2/dashboard: get: security: - bearerAuth: [] summary: Get dashboard data (v2) description: Retrieves the dashboard data for the authenticated user. operationId: getDashboardV2 tags: - Dashboard responses: "200": description: Dashboard data successfully retrieved. content: application/json: schema: type: object properties: data: type: object properties: links: type: array items: $ref: "#/components/schemas/Link" collectionLinks: type: object additionalProperties: type: array items: $ref: "#/components/schemas/Link" numberOfPinnedLinks: type: integer example: 0 numberOfTags: type: integer example: 0 message: type: string example: "Dashboard data fetched successfully." success: type: boolean example: true "401": $ref: "#/components/responses/Unauthorized" put: security: - bearerAuth: [] summary: Update dashboard layout (v2) description: Replaces the authenticated user's dashboard section layout. operationId: updateDashboardLayoutV2 tags: - Dashboard requestBody: required: true content: application/json: schema: type: array items: type: object required: - type - enabled properties: type: type: string enum: - STATS - RECENT_LINKS - PINNED_LINKS - COLLECTION collectionId: type: integer nullable: true enabled: type: boolean order: type: integer responses: "200": description: Dashboard layout updated successfully. content: application/json: schema: type: object properties: data: type: object properties: links: type: array items: $ref: "#/components/schemas/Link" collectionLinks: type: object additionalProperties: type: array items: $ref: "#/components/schemas/Link" numberOfPinnedLinks: type: integer numberOfTags: type: integer message: type: string success: type: boolean "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" /api/v1/getFavicon: get: tags: - Favicon summary: Fetch a favicon for a URL description: Resolves a site origin from the provided URL, redirects to the canonical origin-based request when needed, and proxies a favicon image when available. parameters: - name: url in: query required: true description: The target page or origin URL. schema: type: string format: uri responses: "200": description: Favicon image retrieved successfully. content: image/png: schema: type: string format: binary image/x-icon: schema: type: string format: binary "204": description: No favicon could be resolved for the requested URL. "308": description: Redirect to the canonical origin-based favicon URL. "400": $ref: "#/components/responses/BadRequest" /api/v1/highlights: post: security: - bearerAuth: [] tags: - Highlights summary: Create or update a highlight description: Creates a new highlight for the authenticated user, or updates an existing one matching the same offsets on the same link. requestBody: required: true content: application/json: schema: type: object required: - color - startOffset - endOffset - text - linkId properties: color: type: string maxLength: 50 comment: type: string maxLength: 2048 nullable: true startOffset: type: integer endOffset: type: integer text: type: string maxLength: 2048 linkId: type: integer responses: "200": description: Highlight saved successfully. content: application/json: schema: type: object properties: response: type: object properties: id: type: integer userId: type: integer linkId: type: integer color: type: string comment: type: string nullable: true startOffset: type: integer endOffset: type: integer text: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" /api/v1/highlights/{id}: delete: security: - bearerAuth: [] tags: - Highlights summary: Delete a highlight parameters: - name: id in: path required: true description: The ID of the highlight to delete. schema: type: integer responses: "200": description: Highlight deleted successfully. content: application/json: schema: type: object properties: response: type: integer "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" /api/v1/links: get: deprecated: true security: - bearerAuth: [] tags: - Links summary: Retrieve a list of links description: Fetches a paginated list of links, with optional filtering and sorting options. **This endpoint is deprecated in favor of [`/api/v1/search`](https://docs.linkwarden.app/api/search-links).** parameters: - name: sort in: query required: false schema: type: integer - name: cursor in: query required: false schema: type: integer - name: collectionId in: query required: false schema: type: integer - name: tagId in: query required: false schema: type: integer - name: pinnedOnly in: query required: false schema: type: boolean - name: searchQueryString in: query required: false schema: type: string responses: "200": description: Successfully retrieved the list of links. content: application/json: schema: type: object properties: response: items: $ref: "#/components/schemas/Link" "401": $ref: "#/components/responses/Unauthorized" post: security: - bearerAuth: [] tags: - Links summary: Create a new link description: Creates a new link with optional tags and collection information. operationId: createLink requestBody: required: true content: application/json: schema: type: object properties: name: type: string maxLength: 2048 nullable: true url: type: string maxLength: 2048 example: "https://example.com" nullable: true type: type: string enum: - url - pdf - image example: "url" nullable: true description: type: string maxLength: 2048 example: "Some additional thoughts..." nullable: true tags: type: array items: type: object properties: id: type: integer example: 1 name: type: string maxLength: 50 example: "test" example: [{ "id": 1, "name": "test" }] nullable: true collection: type: object properties: id: type: integer example: 1 name: type: string maxLength: 2048 example: "Unorganized" example: id: 1 name: "Unorganized" nullable: true responses: "200": description: Successfully created the link. content: application/json: schema: type: object properties: response: $ref: "#/components/schemas/Link" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" put: security: - bearerAuth: [] tags: - Links summary: Bulk update links description: Updates multiple links at once, with options to update tags and collection. operationId: bulkUpdateLinks requestBody: required: true content: application/json: schema: type: object properties: links: type: array items: $ref: "#/components/schemas/Link" removePreviousTags: type: boolean newData: type: object properties: collectionId: type: integer tags: type: array items: type: object properties: id: type: integer nullable: true name: type: string maxLength: 50 responses: "200": description: All links updated successfully. content: application/json: schema: type: object properties: response: type: string "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" delete: security: - bearerAuth: [] tags: - Links summary: Delete a list of links description: Deletes multiple links based on the provided list of link IDs. operationId: deleteLinks requestBody: required: true content: application/json: schema: type: object properties: linkIds: type: array items: type: integer description: List of link IDs to be deleted. responses: "200": description: Successfully deleted the links. content: application/json: schema: type: object properties: response: type: object properties: count: type: integer "401": $ref: "#/components/responses/Unauthorized" /api/v1/links/{id}: get: security: - bearerAuth: [] tags: - Links summary: Get a link by ID parameters: - name: id in: path description: The ID of the link to be retrieved. required: true schema: type: integer operationId: getLink responses: "200": description: Successfully retrieved the link. content: application/json: schema: type: object properties: response: type: object $ref: "#/components/schemas/Link" "401": $ref: "#/components/responses/Unauthorized" put: security: - bearerAuth: [] tags: - Links summary: Update a link description: Updates the details of an existing link by its ID. operationId: updateLink parameters: - name: id in: path required: true description: The ID of the link to update. schema: type: integer requestBody: required: true content: application/json: schema: type: object properties: id: type: integer name: type: string maxLength: 2048 nullable: true url: type: string maxLength: 2048 nullable: true description: type: string maxLength: 2048 nullable: true icon: type: string maxLength: 50 nullable: true iconWeight: type: string maxLength: 50 nullable: true color: type: string maxLength: 10 nullable: true tags: type: array items: type: object properties: id: type: integer nullable: true name: type: string maxLength: 50 collection: type: object properties: id: type: integer ownerId: type: integer pinnedBy: type: array items: type: object properties: id: type: integer nullable: true responses: "200": description: Link successfully updated. content: application/json: schema: $ref: "#/components/schemas/Link" "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" delete: security: - bearerAuth: [] tags: - Links summary: Delete a link description: Deletes the specified link from the system. operationId: deleteLink parameters: - name: id in: path description: The ID of the link to be deleted. required: true schema: type: integer responses: "200": description: Successfully deleted the link. content: application/json: schema: type: object properties: response: type: object properties: id: type: integer name: type: string type: type: string description: type: string createdById: type: number collectionId: type: number icon: type: string nullable: true iconWeight: type: string nullable: true color: type: string nullable: true url: type: string textContent: type: string nullable: true preview: type: string nullable: true image: type: string nullable: true pdf: type: string nullable: true readable: type: string nullable: true monolith: type: string nullable: true lastPreserved: type: string format: date-time nullable: true importDate: type: string format: date-time nullable: true createdAt: type: string format: date-time updatedAt: type: string format: date-time "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" /api/v1/links/{id}/archive: put: security: - bearerAuth: [] tags: - Links summary: Archive a link description: Updates a links archive files operationId: archiveLink parameters: - name: id in: path description: The ID of the link to be archived. required: true schema: type: integer responses: "200": description: Successfully archived the link. content: application/json: schema: type: object properties: response: type: string "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" /api/v1/links/{id}/highlights: get: security: - bearerAuth: [] tags: - Links summary: Get highlights for a link parameters: - name: id in: path required: true description: The ID of the link whose highlights should be returned. schema: type: integer responses: "200": description: Highlights retrieved successfully. content: application/json: schema: type: object properties: response: type: array items: type: object properties: id: type: integer userId: type: integer linkId: type: integer color: type: string comment: type: string nullable: true startOffset: type: integer endOffset: type: integer text: type: string createdAt: type: string format: date-time updatedAt: type: string format: date-time "401": $ref: "#/components/responses/Unauthorized" /api/v1/links/archive: delete: security: - bearerAuth: [] tags: - Links summary: Delete archived files for multiple links description: Removes stored archive files for the provided link IDs and resets their preservation fields. requestBody: required: true content: application/json: schema: type: object required: - linkIds properties: linkIds: type: array items: type: integer responses: "200": description: Archive deletion queued successfully. content: application/json: schema: type: object properties: response: type: string "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" /api/v1/logins: get: summary: Get login configuration description: Retrieves the login configuration for the application. operationId: getLoginConfiguration tags: - Logins responses: "200": description: Login configuration successfully retrieved. content: application/json: schema: type: object properties: credentialsEnabled: type: string nullable: true description: Indicates if credentials-based login is enabled. emailEnabled: type: string nullable: true description: Indicates if email-based login is enabled. registrationDisabled: type: string nullable: true description: Indicates if registration is disabled. buttonAuths: type: array description: List of available button-based authentication methods. items: type: object properties: method: type: string description: The method used for authentication. name: type: string description: The name of the authentication method. /api/v1/migration: get: security: - bearerAuth: [] summary: Retrieve migration data description: Fetches migration data, including user information, collections, and links. tags: - Migration responses: "200": description: Migration data successfully retrieved. content: application/json: schema: type: object properties: name: type: string username: type: string email: type: string nullable: true emailVerified: type: boolean nullable: true unverifiedNewEmail: type: string nullable: true image: type: string locale: type: string parentSubscriptionId: type: string nullable: true collectionOrder: type: array items: type: integer linksRouteTo: type: string preventDuplicateLinks: type: boolean archiveAsScreenshot: type: boolean archiveAsMonolith: type: boolean archiveAsPDF: type: boolean archiveAsWaybackMachine: type: boolean isPrivate: type: boolean referredBy: type: string nullable: true createdAt: type: string format: date-time updatedAt: type: string format: date-time collections: type: array items: type: object properties: id: type: integer name: type: string description: type: string icon: type: string nullable: true iconWeight: type: string nullable: true color: type: string parentId: type: integer nullable: true isPublic: type: boolean ownerId: type: integer createdById: type: integer createdAt: type: string format: date-time updatedAt: type: string format: date-time links: type: array items: type: object properties: id: type: integer name: type: string type: type: string description: type: string createdById: type: integer collectionId: type: integer icon: type: string nullable: true iconWeight: type: string nullable: true color: type: string nullable: true url: type: string textContent: type: string nullable: true preview: type: string nullable: true image: type: string nullable: true pdf: type: string nullable: true readable: type: string nullable: true monolith: type: string nullable: true lastPreserved: type: string format: date-time importDate: type: string format: date-time nullable: true createdAt: type: string format: date-time updatedAt: type: string format: date-time tags: type: array items: type: object properties: id: type: integer name: type: string ownerId: type: integer createdAt: type: string format: date-time updatedAt: type: string format: date-time pinnedLinks: type: array items: type: object whitelistedUsers: type: array items: type: object "401": $ref: "#/components/responses/Unauthorized" "404": description: User not found. content: application/json: schema: type: object properties: response: type: string post: security: - bearerAuth: [] summary: Import data for migration description: Imports data into the system using one of the supported formats. tags: - Migration requestBody: required: true content: application/json: schema: type: object required: - format - data properties: format: type: integer enum: - 0 # Linkwarden JSON - 1 # Bookmarks HTML - 2 # Wallabag JSON - 3 # Omnivore JSON - 4 # Pocket JSON description: | The format of the data to import. - `0`: Linkwarden JSON format. - `1`: Bookmarks HTML format. - `2`: Wallabag JSON format. - `3`: Omnivore JSON format. - `4`: Pocket JSON format. data: type: string description: The raw import payload serialized as a string in the selected source format. responses: "200": description: Data imported successfully. content: application/json: schema: type: object properties: response: type: string description: The response message for the import. "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" /api/v1/public/collections/links: get: summary: Retrieve links from a specific collection. tags: - Public parameters: - name: collectionId in: query required: true schema: type: integer example: 4 - name: sort in: query required: false schema: type: integer example: 1 - name: cursor in: query required: false schema: type: integer example: 10 - name: pinnedOnly in: query required: false schema: type: boolean example: true - name: searchQueryString in: query required: false schema: type: string example: "example search query" - name: searchByName in: query required: false schema: type: boolean example: true - name: searchByUrl in: query required: false schema: type: boolean example: true - name: searchByDescription in: query required: false schema: type: boolean example: true - name: searchByTextContent in: query required: false schema: type: boolean example: true - name: searchByTags in: query required: false schema: type: boolean example: true responses: "200": description: Successfully retrieved the list of links. content: application/json: schema: type: object properties: response: type: array items: type: object properties: id: type: integer example: 4 name: type: string example: Example link type: type: string example: url description: type: string example: Some additional thoughts... createdById: type: integer example: 1 collectionId: type: integer example: 3 icon: type: string example: Airplane nullable: true iconWeight: type: string example: fill nullable: true enum: - fill - bold - light - regular - duotone - thin color: example: "#0ea5e9" type: string url: type: string example: https://example.com textContent: type: string example: Example Domain This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission. More information... nullable: true preview: type: string example: archives/preview/3/4.jpeg nullable: true image: type: string example: archives/preview/3/4.jpeg nullable: true pdf: type: string example: archives/preview/3/4.pdf nullable: true readable: type: string example: archives/3/4_readability.json nullable: true monolith: type: string example: "unavailable" nullable: true lastPreserved: type: string format: date-time example: "2024-12-02T00:40:22.295Z" nullable: true importDate: type: string example: "2024-12-02T00:40:22.295Z" nullable: true createdAt: type: string example: "2024-12-02T00:40:22.295Z" format: date-time updatedAt: type: string example: "2024-12-02T00:40:22.295Z" format: date-time tags: type: array items: type: object properties: id: type: integer example: 2 name: type: string example: Technology ownerId: type: integer example: 1 createdAt: type: string example: "2024-12-02T00:40:22.295Z" format: date-time updatedAt: type: string example: "2024-12-02T00:40:22.295Z" format: date-time "400": $ref: "#/components/responses/BadRequest" /api/v1/public/collections/tags: get: summary: Get tags for a collection tags: - Public parameters: - name: collectionId in: query description: The ID of the collection to retrieve tags for required: true schema: type: integer responses: "200": description: A list of tags for the collection content: application/json: schema: type: object properties: response: type: array items: type: object properties: id: type: integer example: 2 name: type: string example: Technology ownerId: type: integer example: 1 createdAt: type: string format: date-time example: "2024-12-02T00:40:22.295Z" updatedAt: type: string format: date-time example: "2024-12-02T00:40:22.295Z" "400": $ref: "#/components/responses/BadRequest" "404": description: Collection not found or no tags available content: application/json: schema: type: object properties: response: type: string example: "Collection not found" /api/v1/public/users/{id}: get: summary: Get user by ID tags: - Public parameters: - name: id in: path description: The ID of the user to retrieve required: true schema: type: integer responses: "200": description: A user object content: application/json: schema: type: object properties: response: type: object properties: id: type: integer example: 1 name: type: string example: John Doe username: type: string example: user1 email: type: string nullable: true image: type: string archiveAsScreenshot: type: boolean example: false archiveAsMonolith: type: boolean example: false archiveAsPDF: type: boolean example: true "404": $ref: "#/components/responses/NotFound" /api/v1/public/links/{id}: get: summary: Get a link by ID tags: - Public parameters: - name: id in: path description: The ID of the link to retrieve required: true schema: type: integer responses: "200": description: Successfully retrieved the link. content: application/json: schema: type: object properties: response: type: object $ref: "#/components/schemas/Link" /api/v1/public/collections/{id}: get: summary: Get a collection by its ID tags: - Public parameters: - name: id in: path required: true schema: type: integer description: The ID of the collection responses: "200": description: Successfully retrieved the collection. content: application/json: schema: type: object properties: response: $ref: "#/components/schemas/Collection" "400": $ref: "#/components/responses/BadRequest" "404": $ref: "#/components/responses/NotFound" /api/v1/rss: get: security: - bearerAuth: [] tags: - RSS summary: List RSS subscriptions responses: "200": description: RSS subscriptions retrieved successfully. content: application/json: schema: type: object properties: response: type: array items: type: object properties: id: type: integer name: type: string url: type: string format: uri ownerId: type: integer collectionId: type: integer createdAt: type: string format: date-time updatedAt: type: string format: date-time collection: type: object properties: name: type: string "401": $ref: "#/components/responses/Unauthorized" post: security: - bearerAuth: [] tags: - RSS summary: Create an RSS subscription requestBody: required: true content: application/json: schema: type: object required: - name - url properties: name: type: string maxLength: 50 url: type: string format: uri maxLength: 2048 collectionId: type: integer collectionName: type: string maxLength: 50 responses: "200": description: RSS subscription created successfully. content: application/json: schema: type: object properties: response: type: object properties: id: type: integer name: type: string url: type: string format: uri ownerId: type: integer collectionId: type: integer createdAt: type: string format: date-time updatedAt: type: string format: date-time "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" /api/v1/rss/{id}: delete: security: - bearerAuth: [] tags: - RSS summary: Delete an RSS subscription parameters: - name: id in: path required: true description: The ID of the RSS subscription to delete. schema: type: integer responses: "200": description: RSS subscription deleted successfully. content: application/json: schema: type: object properties: response: type: string "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" "404": $ref: "#/components/responses/NotFound" /api/v1/search: get: summary: Search links description: Searches for links based on query parameters. tags: - Search parameters: - name: searchQueryString in: query description: A string to filter search results. required: false schema: type: string - name: sort in: query description: A numeric value to sort the search results. required: false schema: type: number - name: cursor in: query description: A numeric value for pagination. required: false schema: type: number responses: "200": description: Successfully retrieved search results. content: application/json: schema: type: object properties: message: type: string data: type: object properties: nextCursor: type: number links: type: array items: $ref: "#/components/schemas/Link" /api/v1/session: post: summary: Create a new session description: Authenticates a user and creates a new session. tags: - Session requestBody: required: true content: application/json: schema: type: object required: - username - password properties: username: type: string description: The username of the user. password: type: string format: password description: The password of the user. sessionName: type: string description: A name for the session. responses: "200": description: Session created successfully. content: application/json: schema: type: object properties: response: type: object properties: token: type: string description: The token generated for the session. "400": $ref: "#/components/responses/BadRequest" /api/v1/tags: get: security: - bearerAuth: [] tags: - Tags summary: Get a list of tags description: Retrieves a paginated list of tags and their associated metadata. operationId: getTags parameters: - name: sort in: query description: A numeric value to sort the tag results. required: false schema: type: number enum: [0, 1, 2, 3, 4, 5] - name: cursor in: query description: The pagination cursor for the next batch of tags. required: false schema: type: number - name: search in: query description: A string to filter tags by name. required: false schema: type: string responses: "200": description: Successfully retrieved the list of tags. content: application/json: schema: type: object properties: message: type: string example: Success success: type: boolean example: true data: type: object properties: nextCursor: type: number nullable: true example: 42 tags: type: array items: type: object properties: id: type: integer example: 1 name: type: string example: Technology ownerId: type: integer example: 1 createdAt: type: string format: date-time example: "2024-12-02T00:40:22.295Z" updatedAt: type: string format: date-time example: "2024-12-02T00:40:22.295Z" _count: type: object properties: links: type: integer example: 12 "401": $ref: "#/components/responses/Unauthorized" post: security: - bearerAuth: [] tags: - Tags summary: Create or update tags in bulk description: Creates tags that do not exist yet and updates archival settings for tags that already exist. operationId: createTags requestBody: required: true content: application/json: schema: type: object required: - tags properties: tags: type: array items: type: object required: - label properties: label: type: string maxLength: 50 archiveAsScreenshot: type: boolean nullable: true archiveAsMonolith: type: boolean nullable: true archiveAsPDF: type: boolean nullable: true archiveAsReadable: type: boolean nullable: true archiveAsWaybackMachine: type: boolean nullable: true aiTag: type: boolean nullable: true responses: "200": description: Tags saved successfully. content: application/json: schema: type: object properties: response: type: array items: type: object properties: id: type: integer name: type: string ownerId: type: integer createdAt: type: string format: date-time updatedAt: type: string format: date-time _count: type: object properties: links: type: integer "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" delete: security: - bearerAuth: [] tags: - Tags summary: Delete tags in bulk operationId: deleteTagsBulk requestBody: required: true content: application/json: schema: type: object required: - tagIds properties: tagIds: type: array items: type: integer responses: "200": description: Tags deleted successfully. content: application/json: schema: type: object properties: response: type: integer "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" /api/v1/tags/{id}: get: security: - bearerAuth: [] tags: - Tags summary: Get a tag by ID operationId: getTag parameters: - name: id in: path required: true description: The ID of the tag to retrieve. schema: type: integer responses: "200": description: Successfully retrieved the tag. content: application/json: schema: type: object properties: response: type: object properties: id: type: integer name: type: string ownerId: type: integer createdAt: type: string format: date-time updatedAt: type: string format: date-time _count: type: object properties: links: type: integer "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" put: tags: - Tags summary: Update a tag by ID description: Updates the name of a specific tag by its ID. This is an authenticated route. operationId: updateTag parameters: - name: id in: path required: true description: The ID of the tag to be updated. schema: type: integer requestBody: required: true content: application/json: schema: type: object properties: name: type: string security: - bearerAuth: [] responses: "200": description: Successfully updated the tag. content: application/json: schema: type: object properties: response: type: object properties: id: type: integer name: type: string ownerId: type: integer createdAt: type: string format: date-time updatedAt: type: string format: date-time "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" delete: tags: - Tags summary: Delete a tag by ID description: Deletes a specific tag by its ID. operationId: deleteTag parameters: - name: id in: path required: true description: The ID of the tag to be deleted. schema: type: integer security: - bearerAuth: [] responses: "200": description: Successfully deleted the tag. content: application/json: schema: type: object properties: response: type: object properties: id: type: integer name: type: string ownerId: type: integer createdAt: type: string format: date-time updatedAt: type: string format: date-time "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" /api/v1/tokens: get: security: - bearerAuth: [] tags: - Tokens summary: Get a list of tokens description: Retrieves a list of all tokens associated with the authenticated user. operationId: getTokens responses: "200": description: Successfully retrieved list of tokens. content: application/json: schema: type: object properties: response: type: array items: type: object properties: id: type: integer name: type: string isSession: type: boolean expires: type: string format: date-time createdAt: type: string format: date-time "401": $ref: "#/components/responses/Unauthorized" post: security: - bearerAuth: [] tags: - Tokens summary: Create a new token description: Creates a new token with the specified name and expiry. operationId: createToken requestBody: required: true content: application/json: schema: type: object required: - name - expires properties: name: type: string description: Name of the token. expires: type: integer description: Expiry duration in seconds. Use 0 for no expiry. responses: "200": description: Token successfully created. content: application/json: schema: type: object properties: response: type: object properties: secretKey: type: string description: The secret key for the token. token: type: object properties: id: type: integer name: type: string userId: type: integer token: type: string revoked: type: boolean isSession: type: boolean expires: type: string format: date-time lastUsedAt: type: string format: date-time nullable: true createdAt: type: string format: date-time updatedAt: type: string format: date-time "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" /api/v1/tokens/{id}: delete: tags: - Tokens summary: Revoke a token description: Revokes a token by its ID. operationId: revokeToken parameters: - name: id in: path description: ID of the token to revoke required: true schema: type: integer responses: "200": description: Successfully revoked the token. content: application/json: schema: type: object properties: response: type: object properties: id: type: integer name: type: string userId: type: integer token: type: string revoked: type: boolean isSession: type: boolean expires: type: string format: date-time lastUsedAt: type: string format: date-time createdAt: type: string format: date-time updatedAt: type: string format: date-time "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" /api/v1/users: get: security: - bearerAuth: [] tags: - Users summary: Get a list of users description: Retrieves a list of users. operationId: getUsers responses: "200": description: Successfully retrieved a list of users. content: application/json: schema: type: object properties: response: type: array items: type: object properties: id: type: integer username: type: string email: type: string nullable: true emailVerified: type: string nullable: true subscriptions: type: string nullable: true createdAt: type: string format: date-time "401": $ref: "#/components/responses/Unauthorized" post: tags: - Users summary: Create a new user description: Registers a new user. operationId: createUser requestBody: content: application/json: schema: type: object properties: name: type: string description: The user's name. maxLength: 50 password: type: string description: The user's password, must be at least 8 characters long. minLength: 8 maxLength: 2048 email: type: string format: email description: The user's email address, optional based on environment variables. username: type: string description: The user's username, optional if email is provided. pattern: "^[a-z0-9_-]{3,50}$" minLength: 3 maxLength: 50 invite: type: boolean description: Optional flag for invitations. responses: "200": description: Successfully created the user. content: application/json: schema: type: object properties: response: type: object properties: id: type: integer name: type: string username: type: string email: type: string nullable: true emailVerified: type: string nullable: true unverifiedNewEmail: type: string nullable: true image: type: string nullable: true locale: type: string parentSubscriptionId: type: string nullable: true collectionOrder: type: array items: type: integer linksRouteTo: type: string preventDuplicateLinks: type: boolean archiveAsScreenshot: type: boolean archiveAsMonolith: type: boolean archiveAsPDF: type: boolean archiveAsWaybackMachine: type: boolean isPrivate: type: boolean referredBy: type: string nullable: true createdAt: type: string format: date-time updatedAt: type: string format: date-time "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" /api/v1/users/me: get: security: - bearerAuth: [] tags: - Users summary: Get the current authenticated user operationId: getCurrentUser responses: "200": description: Current user retrieved successfully. content: application/json: schema: type: object properties: response: type: object properties: id: type: integer name: type: string nullable: true username: type: string email: type: string nullable: true image: type: string locale: type: string dashboardSections: type: array items: type: object subscription: type: object parentSubscription: type: object hasUnIndexedLinks: type: boolean "401": $ref: "#/components/responses/Unauthorized" /api/v1/users/{id}: get: security: - bearerAuth: [] tags: - Users summary: Get a user by ID description: Returns the authenticated user's account data. Non-admin users may only request their own ID. operationId: getUser parameters: - name: id in: path required: true description: The ID of the user to retrieve. schema: type: integer responses: "200": description: User retrieved successfully. content: application/json: schema: type: object properties: response: type: object properties: id: type: integer name: type: string nullable: true username: type: string email: type: string nullable: true image: type: string locale: type: string dashboardSections: type: array items: type: object subscription: type: object parentSubscription: type: object hasUnIndexedLinks: type: boolean "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "404": $ref: "#/components/responses/NotFound" put: security: - bearerAuth: [] tags: - Users summary: Update a user's account details description: Updates the details of an existing user account. operationId: updateUser parameters: - name: id in: path required: true description: The ID of the user to be updated. schema: type: integer requestBody: required: true content: application/json: schema: type: object properties: name: type: string maxLength: 50 example: "John Doe" email: type: string format: email nullable: true example: "john.doe@example.com" username: type: string minLength: 3 maxLength: 30 pattern: "^[a-z0-9_-]{3,30}$" example: "user1" image: type: string nullable: true example: "path/to/image.jpg" password: type: string minLength: 8 maxLength: 2048 nullable: true newPassword: type: string minLength: 8 maxLength: 2048 nullable: true oldPassword: type: string minLength: 8 maxLength: 2048 nullable: true archiveAsScreenshot: type: boolean nullable: true archiveAsPDF: type: boolean nullable: true archiveAsMonolith: type: boolean nullable: true archiveAsWaybackMachine: type: boolean nullable: true locale: type: string maxLength: 20 nullable: true isPrivate: type: boolean nullable: true preventDuplicateLinks: type: boolean nullable: true collectionOrder: type: array items: type: integer nullable: true linksRouteTo: type: string enum: - ORIGINAL - CUSTOM nullable: true whitelistedUsers: type: array items: type: string maxLength: 50 nullable: true referredBy: type: string maxLength: 100 nullable: true responses: "200": description: Successfully updated the user's account details. content: application/json: schema: type: object properties: response: type: object properties: id: type: integer example: 1 name: type: string example: "John Doe" username: type: string example: "user1" email: type: string nullable: true emailVerified: type: string nullable: true image: type: string example: "" locale: type: string example: "en" collectionOrder: type: array items: type: integer example: [] linksRouteTo: type: string example: "ORIGINAL" preventDuplicateLinks: type: boolean example: false archiveAsScreenshot: type: boolean example: true archiveAsMonolith: type: boolean example: true archiveAsPDF: type: boolean example: true archiveAsWaybackMachine: type: boolean example: false isPrivate: type: boolean example: false referredBy: type: string nullable: true createdAt: type: string format: date-time example: "2024-12-01T22:04:16.492Z" updatedAt: type: string format: date-time example: "2024-12-01T22:14:05.742Z" whitelistedUsers: type: array items: type: string example: [] subscription: type: object properties: {} parentSubscription: type: object properties: user: type: object properties: {} "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" delete: security: - bearerAuth: [] tags: - Users summary: Delete a user account description: Deletes a user account and all related data. operationId: deleteUser parameters: - name: id in: path required: true description: The ID of the user to be deleted. schema: type: integer responses: "200": description: Successfully deleted the user account and all related data. content: application/json: schema: type: object properties: response: type: string example: "User account and all related data deleted successfully." "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" /api/v1/users/{id}/preference: put: security: - bearerAuth: [] tags: - Users summary: Update user reading and theme preferences operationId: updateUserPreference parameters: - name: id in: path required: true description: The ID of the user whose preferences should be updated. schema: type: integer requestBody: required: true content: application/json: schema: type: object properties: theme: type: string enum: - dark - light - auto readableFontFamily: type: string maxLength: 100 readableFontSize: type: string maxLength: 100 readableLineHeight: type: string maxLength: 100 readableLineWidth: type: string maxLength: 100 responses: "200": description: User preferences updated successfully. content: application/json: schema: type: object properties: response: type: object properties: id: type: integer theme: type: string readableFontFamily: type: string nullable: true readableFontSize: type: string nullable: true readableLineHeight: type: string nullable: true readableLineWidth: type: string nullable: true dashboardSections: type: array items: type: object subscription: type: object parentSubscription: type: object "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" /api/v1/worker: get: security: - bearerAuth: [] tags: - Worker summary: Get worker statistics description: Returns preservation and search indexing queue statistics for the server admin user. responses: "200": description: Worker statistics retrieved successfully. content: application/json: schema: type: object properties: data: type: object properties: link: type: object properties: pending: type: integer done: type: integer failed: type: integer search: type: object properties: pending: type: integer done: type: integer success: type: boolean message: type: string "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" /api/v1/worker/preservation: delete: security: - bearerAuth: [] tags: - Worker summary: Reset preserved data in bulk description: Server-admin-only endpoint for clearing preserved files across all links or only links with broken archives. requestBody: required: true content: application/json: schema: type: object required: - action properties: action: type: string enum: - allAndRePreserve - allBroken responses: "200": description: Preservation reset started successfully. content: application/json: schema: type: object properties: response: type: string "400": $ref: "#/components/responses/BadRequest" "401": $ref: "#/components/responses/Unauthorized" "403": $ref: "#/components/responses/Forbidden" components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT schemas: ErrorResponse: type: object properties: response: type: string PublicConfig: type: object properties: DISABLE_REGISTRATION: type: boolean nullable: true ADMIN: type: integer nullable: true RSS_POLLING_INTERVAL_MINUTES: type: integer nullable: true EMAIL_PROVIDER: type: boolean nullable: true MAX_FILE_BUFFER: type: integer nullable: true USER_CONTENT_DOMAIN: type: string nullable: true example: https://usercontent.example.com AI_ENABLED: type: boolean nullable: true INSTANCE_VERSION: type: string nullable: true PreservedFormatUrl: type: object properties: url: type: string format: uri example: https://usercontent.example.com/api/v1/preserved/view?token=eyJ... Link: type: object properties: id: type: integer example: 4 name: type: string example: Example link type: type: string example: url description: type: string example: Some additional thoughts... createdById: type: integer example: 1 collectionId: type: integer example: 3 icon: type: string example: Airplane nullable: true iconWeight: type: string example: fill nullable: true enum: - fill - bold - light - regular - duotone - thin color: example: "#0ea5e9" type: string url: type: string example: https://example.com textContent: type: string example: Example Domain This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission. More information... nullable: true preview: type: string example: archives/preview/3/4.jpeg nullable: true image: type: string example: archives/preview/3/4.jpeg nullable: true pdf: type: string example: archives/preview/3/4.pdf nullable: true readable: type: string example: archives/3/4_readability.json nullable: true monolith: type: string example: "unavailable" nullable: true lastPreserved: type: string format: date-time example: "2024-12-02T00:40:22.295Z" nullable: true importDate: type: string example: "2024-12-02T00:40:22.295Z" nullable: true createdAt: type: string example: "2024-12-02T00:40:22.295Z" format: date-time updatedAt: type: string example: "2024-12-02T00:40:22.295Z" format: date-time tags: type: array items: type: object properties: id: type: integer example: 2 name: type: string example: Technology ownerId: type: integer example: 1 createdAt: type: string example: "2024-12-02T00:40:22.295Z" format: date-time updatedAt: type: string example: "2024-12-02T00:40:22.295Z" format: date-time collection: type: object properties: id: type: integer example: 3 name: type: string example: Health and Wellness description: type: string example: Latest articles on health and wellness. icon: type: string description: Acorn nullable: true iconWeight: type: string example: fill nullable: true enum: - fill - bold - light - regular - duotone - thin color: example: "#0ea5e9" type: string parentId: type: integer example: null nullable: true isPublic: type: boolean example: false ownerId: type: integer example: 1 createdById: type: integer example: 2 createdAt: type: string example: "2024-12-02T00:40:22.295Z" format: date-time updatedAt: type: string example: "2024-12-02T00:40:22.295Z" format: date-time pinnedBy: type: array items: type: integer example: [1, 2, 3] Collection: type: object properties: id: type: integer example: 3 name: type: string example: Health and Wellness description: type: string example: Latest articles on health and wellness. icon: type: string description: Acorn nullable: true iconWeight: type: string example: fill nullable: true enum: - fill - bold - light - regular - duotone - thin color: example: "#0ea5e9" type: string parentId: type: integer example: null nullable: true isPublic: type: boolean example: false ownerId: type: integer example: 1 createdById: type: integer example: 2 createdAt: type: string example: "2024-12-02T00:40:22.295Z" format: date-time updatedAt: type: string example: "2024-12-02T00:40:22.295Z" format: date-time _count: type: object properties: links: type: integer example: 3 members: type: array items: type: object properties: userId: type: integer example: 3 collectionId: type: integer example: 4 canCreate: type: boolean example: true canUpdate: type: boolean example: true canDelete: type: boolean example: true createdAt: type: string format: date-time example: "2024-12-02T05:50:22.680Z" updatedAt: type: string format: date-time example: "2024-12-02T05:50:22.680Z" user: type: object properties: username: type: string example: user1 name: type: string example: John Doe image: type: string example: null nullable: true responses: BadRequest: description: Bad request error. content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" NotFound: description: Resource not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" Unauthorized: description: Unauthorized content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" Forbidden: description: Forbidden content: application/json: schema: $ref: "#/components/schemas/ErrorResponse"