---
title: "Upsert libraries"
method: PUT
path: "/api/v2/bulk/skills/libraries"
tags: ["Skills"]
---

# Upsert libraries

`PUT /api/v2/bulk/skills/libraries`

## Request

- Base URL: `https://app.360learning.com`
- URL: `https://app.360learning.com/api/v2/bulk/skills/libraries`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `/api/v2/oauth2/token`

> 🔑
>
> Required OAuth scope: `skillsLibraries:bulk`.

> 🚜
>
> This endpoint processes up to 10,000 objects asynchronously. For more information, see the [Bulk operations guide](doc:bulk-operations-1).

Adds or replaces multiple libraries based on the given `externalId`.
- If a provided `externalId` matches an existing library, the library is replaced with the new data.
- If no match is found, a new library is created.

Upon submission, the request is queued. Use the provided URL in the response header to check the status of the bulk operation.

## Headers

- `360-api-version` 'v2.0', required

## Request body

- UpsertLibrariesBody
  - `input` LibraryUpsertDTO[], required: An array of library upsert objects.
    - `externalId` string, required: The unique external ID of the library.
    - `name` string, required: The name of the library.
    - `description` string: The description of the library.
    - `translations` LibraryTranslationDTO[]: The different translations available for the library.
      - `lang` 'bg' | 'cs' | 'de' | 'en' | 'es' | 'fr' | 'hu' | 'it' | 'ja' | 'nl' | 'pl' | 'pt' | 'ro' | 'ru' | 'sa' | 'tr' | 'uk' | 'vm' | 'zh', required: The language of the translation.
      - `translatedFields` BaseTranslatedFieldsDTO, required
        - `name` string: The translation of the field `name` for this language.
        - `description` string: The translation of the field `description` for this language.
    - `status` 'draft' | 'published': The status of the library.

## Response `202`

The operation is successfully created.

## Other responses

- `400`: The server cannot or will not process the request due to something that is perceived to be a client error.
- `401`: The given access token is either missing, invalid, has expired, or has been revoked.
- `403`: The given access token does not have the required OAuth scope to execute the request.
- `429`: The maximum number of concurrent operations has been reached.
- `503`: The bulk API is temporarily disabled.

---

[API](https://skmtc.dev/360learning/apis/bulk-api.md) - [All operations](https://skmtc.dev/360learning/apis/bulk-api/llms.txt) - [OpenAPI document](https://skmtc.dev/360learning/apis/bulk-api/revisions/375f9b05b456?raw)
