Skip to content

Create Sector

POST
/api/v1/sectors
curl --request POST \
--url https://api.spartanauth.com/api/v1/sectors \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "domain": "example", "allowedOrigins": [ "example" ], "slug": "example" }'

Creates a new sector with the specified name, domain, allowed origins, and slug. The slug is a unique identifier used in URLs and must be URL-safe (e.g. lowercase letters, numbers, hyphens).

Media type application/json
object
name
string
domain
string
allowedOrigins
Array<string>
slug
string
Example generated
{
"name": "example",
"domain": "example",
"allowedOrigins": [
"example"
],
"slug": "example"
}

A successful response.

Media type application/json
object
sectorID
string
name
string
domain
string
isDefault
boolean
allowedOrigins
Array<string>
slug
string
Example generated
{
"sectorID": "example",
"name": "example",
"domain": "example",
"isDefault": true,
"allowedOrigins": [
"example"
],
"slug": "example"
}

An unexpected error response.

Media type application/json
object
code
integer format: int32
message
string
details
Array<object>
object
@type
string
key
additional properties
Example generated
{
"code": 1,
"message": "example",
"details": [
{
"@type": "example"
}
]
}