---
title: "Create a call rate"
method: POST
path: "/call_rates"
tags: ["Billing"]
---

# Create a call rate

`POST /call_rates`

## Request

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

Add a new call rate into system.

## Request body

- object
  - `prefix` string, required: The call prefix of the rating.
  - `type` 'LOCAL' | 'NATIONAL' | 'INTERNATIONAL' | 'MOBILE', required: The type of the rating: Can be either: - `LOCAL`: - `NATIONAL`: - `INTERNATIONAL`: - `MOBILE`:
  - `free_seconds` integer, required: Free seconds of the rating.
  - `grace_period` integer, required: Grace period of the rating.
  - `interval_1` integer, required: The first interval of the rating.
  - `interval_n` integer, required: The subsequent interval of the rating after the first one.
  - `connect_fee` number, double, required: Connect fee of the rating. Precision is five digits.
  - `postcall_surcharge` number, double, required: Postcall surcharge of the rating. Precision is five digits.
  - `price_1` number, double, required: The price of the first interval. Precision is five digits.
  - `price_n` number, double, required: The price of the subsequent interval after the first one. Precision is five digits.
  - `description` string: The description text for this rule.

## Response `200`

OK

- 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)
