---
title: "Create Resources"
method: POST
path: "/resources"
tags: ["Create Resources"]
---

# Create Resources

`POST /resources`

Creates new learning resources. The structure of the request is a list of resource objects. The required properties for each new resource are `category`, `name`, `free`, and `url`.

## Request body

- object[]
  - `category` string — Category
  - `languages` string[] — List of languages
  - `name` string — Resource name
  - `notes` string — Resource notes
  - `free` boolean — True or false for whether resource is free
  - `url` string — Resource url

## Response `200`

Created resources

- ResourceData[]
  - `category` string — Category
  - `created_at` string, date-time — Date created
  - `downvotes` integer — Negative ratings
  - `id` integer — Resource ID
  - `last_updated` string, date-time — Date updated
  - `languages` string[] — List of languages
  - `name` string — Resource name
  - `notes` string — Resource notes
  - `free` boolean — True or false for whether resource is free
  - `upvotes` integer — Positive ratings
  - `url` string — Resource url
  - `user_vote_direction` string, nullable — Vote direction of a logged in user

## Other responses

- `400` — Bad request
- `401` — Unauthorized access
- `422` — Invalid request

## Changes

> 24 revisions in range; 1 could not be searched.

- **2020-10-19** `5f6fef2c1be0` — 2 warning, 2 info
  - removed the request property `allOf[#/components/schemas/ResourcesRequest]/items/paid`
  - removed the optional property `items/paid` from the response with the `200` status
  - added the new optional request property `allOf[#/components/schemas/ResourcesRequest]/items/free`
  - added the optional property `items/free` to the response with the `200` status
- **2020-05-12** `a1ebd031433f` — 3 warning
  - removed the optional property `data` from the response with the `400` status
  - removed the optional property `data` from the response with the `401` status
  - removed the optional property `data` from the response with the `422` status
- **2020-01-10** `ac7f919a3345` — 3 warning
  - removed the optional property `errors/invalid-credentials` from the response with the `400` status
  - removed the optional property `errors/invalid-credentials` from the response with the `401` status
  - removed the optional property `errors/items/invalid-credentials` from the response with the `422` status
- …earlier changes not shown

[Full history](https://skmtc.dev/operationcode/apis/operation-code-resources-api/changes/resources/post.md)

---

[API](https://skmtc.dev/operationcode/apis/operation-code-resources-api.md) · [All operations](https://skmtc.dev/operationcode/apis/operation-code-resources-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/operationcode/operation-code-resources-api/revisions/6071d3157f6d/schema)
