---
title: "Create a block code"
method: POST
path: "/disallowed_codes"
tags: ["Security"]
---

# Create a block code

`POST /disallowed_codes`

## Request

- Base URL: `https://HOSTNAME:8887/api`
- URL: `https://HOSTNAME:8887/api/disallowed_codes`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/docs/disallowed_codes/post.ts> (a function with typed inputs; its response is checked against the schema)

Create a block code.

## Request body

- object
  - `number_prefix` string: The number prefix of blocked code. An alphanumeric sequence beginning with an optional plus sign.
  - `description` string: The description of blocked code.

## Response `201`

Created

- object
  - `id` string: The unique ID of the resource.

## Other responses

- `4XX`: Error

---

[API](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api.md) - [All operations](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/portsip/apis/portsip-pbx-rest-api/revisions/577415d4a3d5?raw)
