---
title: "Add a resource"
method: POST
path: "/config/resources"
---

# Add a resource

`POST /config/resources`

## Request body

- union
  - GitResource
    - `type` 'git', required
    - `name` string, required
    - `url` string, required
    - `branch` string, required
    - `searchPath` string, nullable
    - `searchPaths` string[], nullable
    - `specialNotes` string, nullable
  - LocalResource
    - `type` 'local', required
    - `name` string, required
    - `path` string, required
    - `specialNotes` string, nullable
  - NpmResource
    - `type` 'npm', required
    - `name` string, required
    - `package` string, required
    - `version` string, nullable
    - `specialNotes` string, nullable

## Response `200`

Created resource

- union
  - GitResource
    - `type` 'git', required
    - `name` string, required
    - `url` string, required
    - `branch` string, required
    - `searchPath` string, nullable
    - `searchPaths` string[], nullable
    - `specialNotes` string, nullable
  - LocalResource
    - `type` 'local', required
    - `name` string, required
    - `path` string, required
    - `specialNotes` string, nullable
  - NpmResource
    - `type` 'npm', required
    - `name` string, required
    - `package` string, required
    - `version` string, nullable
    - `specialNotes` string, nullable

## Other responses

- `400` — Validation error

## Changes

- **2026-02-13** `750f91a4279a` — 1 breaking, 1 info
  - added `#/components/schemas/NpmResource` to the response body `oneOf` list for the response status `200`
  - added `#/components/schemas/NpmResource` to the request body `oneOf` list

[Change history](https://skmtc.dev/davis7dotsh/apis/btca-local-server-api/changes/config/resources/post.md)

---

[API](https://skmtc.dev/davis7dotsh/apis/btca-local-server-api.md) · [All operations](https://skmtc.dev/davis7dotsh/apis/btca-local-server-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/davis7dotsh/btca-local-server-api/revisions/0d00ac63b7d8/schema)
