Skip to content
UneeqUneeqUneeq Docs

Set a team's scenarios

PUT
/external/v1/organization/{organizationID}/teams/{teamID}/scenarios
curl --request PUT \
--url "$UNEEQ_API_URL/external/v1/organization/$UNEEQ_ORG_ID/teams/{teamID}/scenarios" \
--header "Authorization: Bearer $UNEEQ_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"assigned_scenario_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"7c9e6679-7425-40de-944b-e07fc1f90ae7"
]
}'

Replaces the team’s assigned scenarios with exactly the listed set: listed scenarios not yet assigned are added, assigned scenarios not in the list are removed, and the rest are left alone. Send an empty array to remove every assignment; omitting the field is rejected. Duplicate IDs count once. Every ID must be a live, non-practice scenario of this organization, otherwise nothing changes and the call returns 403. The change is applied atomically, and repeating the same call is a no-op.

organizationID
required
string

ID of the organization the API key belongs to, for example org_HYPCX67vaupjhdTn.

Example

org_HYPCX67vaupjhdTn
teamID
required
string format: uuid

ID of a live team in the organization. Must be a lowercase hyphenated UUID.

Media typeapplication/json
object
assigned_scenario_ids
required

The complete set of scenario IDs the team should have. Must not be null; an empty array removes every assignment.

Array<string>
<= 500 items

Example

{
"assigned_scenario_ids": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"7c9e6679-7425-40de-944b-e07fc1f90ae7"
]
}

The team’s assignments now match the list.

teamID is not a lowercase UUID; the body is empty, not valid JSON or has a field of the wrong type (message unable to decode request body); or assigned_scenario_ids is missing, null, has more than 500 entries or contains a non-UUID (message invalid request). No error_code.

Media typeapplication/json

The body of an error returned by an endpoint.

object
message
required

Human-readable explanation of what went wrong.

string
error_code

Stable machine-readable cause. Present only for errors that have one.

string

Example generated

{
"message": "example",
"error_code": "example"
}

The Authorization header is missing, or the API key is not valid for this organization. A key check that fails on the server is also reported as 401.

Media typeapplication/json

The body of an error returned before the request reaches an endpoint (authentication and rate limiting).

object
error
required

Human-readable explanation of what went wrong.

string

Example generated

{
"error": "example"
}

The team is not in this organization (message team does not belong to the requested organization), or one or more scenario IDs are not live, non-practice scenarios of this organization (message one or more scenarios do not belong to the requested organization). No error_code.

Media typeapplication/json

The body of an error returned by an endpoint.

object
message
required

Human-readable explanation of what went wrong.

string
error_code

Stable machine-readable cause. Present only for errors that have one.

string

Example generated

{
"message": "example",
"error_code": "example"
}

The API key has sent too many requests. Wait for the number of seconds in Retry-After, then retry.

Media typeapplication/json

The body of an error returned before the request reaches an endpoint (authentication and rate limiting).

object
error
required

Human-readable explanation of what went wrong.

string

Example generated

{
"error": "example"
}
Retry-After
integer
>= 1

Seconds to wait before retrying.

The assignments could not be updated (message unable to update the team's assigned scenarios, no error_code).

Media typeapplication/json

The body of an error returned by an endpoint.

object
message
required

Human-readable explanation of what went wrong.

string
error_code

Stable machine-readable cause. Present only for errors that have one.

string

Example generated

{
"message": "example",
"error_code": "example"
}