---
title: "Add roster entry"
method: POST
path: "/departments/{departmentId}/roster"
tags: ["Departments"]
---

# Add roster entry

`POST /departments/{departmentId}/roster`

## Request

- Base URL: `https://anchorcad.xyz/api/v1`
- URL: `https://anchorcad.xyz/api/v1/departments/{departmentId}/roster`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
  - API key in query parameter `api_key`
- TypeScript: <https://skmtc.dev/anchr/apis/anchor-open-developer-api/docs/departments/:departmentId/roster/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- RosterEntryBody
  - `discordUserId` string: Required (or use userId)
  - `userId` string: Alias of discordUserId
  - `name` string, required
  - `role` string
  - `callsign` string
  - `discordUsername` string
  - `rankId` string, nullable
  - `customFields` object

## Response `200`

Roster entry created

- object

## Other responses

- `400`: Bad input / ER:LC not configured / civilian disabled
- `401`: Missing or invalid key
- `403`: Insufficient scope or cross-panel serverId
- `404`: Resource not found on this panel

---

[API](https://skmtc.dev/anchr/apis/anchor-open-developer-api.md) - [All operations](https://skmtc.dev/anchr/apis/anchor-open-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anchr/apis/anchor-open-developer-api/revisions/3a14d4cb4985?raw)
