Create sales territory
POST/sales/territories
Creates a new sales territory with an optional short code, assigned manager, and description. Territories group deals for reporting and quota assignment. The code is automatically uppercased.
Request
Request body
Content type application/json (required).
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Full name of the territory (e.g. "Greater Accra"). Max length: 180 |
code | string, nullable | No | Short unique code for the territory (e.g. "GHA-ACC"). Stored in uppercase. Leave blank to omit. Max length: 20 |
manager_user_id | integer, nullable | No | ID of the tenant user assigned as territory manager. Must exist in the users table. |
description | string, nullable | No | Human-readable description of the territory's scope. Max length: 2000 |
status | string | No | Whether the territory is currently in use. One of: |
notes | string, nullable | No | Internal operator notes. Max length: 2000 |
Example
{
"name": "Greater Accra",
"code": "GHA-ACC",
"manager_user_id": 7,
"description": "Primary commercial territory covering Accra metro area.",
"status": "active"
}
Responses
302 Redirect to the territories list after creation
422 Validation error — name is required
Content type application/json, any.
Example
{
"errors": {
"name": [
"The name field is required."
]
}
}
Example request
curl -X POST "https://{tenant}.faciotech.net/api/v1/sales/territories" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name": "Greater Accra", "code": "GHA-ACC", "manager_user_id": 7, "description": "Primary commercial territory covering Accra metro area.", "status": "active"}'