CreateTerritory
CreateTerritory adds a territory with the next color; a team holds at most 50. The same request_id returns the territory it made.
Authentication
AuthorizationBearer
A team API key, sent as Authorization: Bearer <key>.
OR
AuthorizationBearer
The Cognito access token of a signed-in Edulead user (edulead auth login), sent as Authorization: Bearer <token>.
Headers
Edulead-Team
Query parameters
request_id
Caller-chosen idempotency key. The same key from the same caller within 24 hours returns the original result instead of acting again.
Request
This endpoint expects an object.
id
Identifier of the resource, assigned by Edulead and opaque to callers.
name
The territory’s name, trimmed; required on create and when updated. Names need not be unique.
states
Two-letter codes of the states it covers (the 50 states and DC), upper case, distinct, in the order given; may be empty.
color
The display color, 1 to 8, chosen on create as the one the team's territories use least.
creator_id
The user or API key that created it; “system” for the default regions Edulead added.
create_time
When Edulead created the resource.
update_time
When any field last changed.
Response
Success
territory
Territory is a named set of US states.