---
title: "Creates an external reference type"
method: POST
path: "/external-reference-types"
tags: ["External Reference Types"]
---

# Creates an external reference type

`POST /external-reference-types`

## Request

- Base URL: `https://api.rillet.com`
- URL: `https://api.rillet.com/external-reference-types`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/rillet/apis/rillet-accounting-api/docs/external-reference-types/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a `type` for use in `external_references`. If the organization already has a type with this
`slug`, it is returned unchanged with `200`; otherwise it is created and returned with `201`. Reserved
names are rejected.

## Request body

- CreateExternalReferenceTypeRequest
  - `slug` string, required: The `type` value used in `external_references`. No whitespace; case-sensitive.
  - `name` string, required: Label shown in Rillet. At least 3 characters.

## Response `200`

Already existed; returned unchanged

- ExternalReferenceType
  - `id` string, uuid, required
  - `slug` string, required: The `type` value used in `external_references`.
  - `name` string, required: Label shown in Rillet.

## Other responses

- `201`: Created
- `default`: Error

## Changes

- **2026-11-03** `c393d0102005`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rillet/apis/rillet-accounting-api/changes/external-reference-types/post.md)

---

[API](https://skmtc.dev/rillet/apis/rillet-accounting-api.md) - [All operations](https://skmtc.dev/rillet/apis/rillet-accounting-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rillet/apis/rillet-accounting-api/revisions/c393d0102005?raw)
