# Teams

Use these operations to interact with [teams](/ingesting-data-into-cortex/entities-overview/entities/adding-entities/teams.md) in Cortex.

This page lists operations specific to team entities. See [Catalog entities](/api/readme/catalog-entities.md) for API operations relating to all entity types (including teams).

### Required permissions

Your API key must have the `Edit entities` permission.

## Operations

## Retrieve list of teams or team details

> \*Warning:\* This API can return team details if you pass in a teamTag query parameter. However, this should only be used to retrieve team details if your team identifier contains non-alphanumeric characters. Otherwise, use the standard API under \`Teams\` -> \`Retrieve team details\`. When retrieving team details, the response will be a single team entity instead of a list.\
> \
> Note: the response objects can also include an \`idpGroup\` or \`cortexTeam\` field depending on whether the team contains a \`group\` or only consists of individually defined \`members\`.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Teams"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"AllTeamsResponse":{"required":["teams"],"type":"object","properties":{"teams":{"type":"array","items":{"$ref":"#/components/schemas/TeamResponse"}}}},"TeamResponse":{"required":["catalogEntityTag","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","properties":{"catalogEntityTag":{"type":"string"},"id":{"type":"string"},"isArchived":{"type":"boolean"},"links":{"type":"array","items":{"$ref":"#/components/schemas/TeamsLink"}},"metadata":{"$ref":"#/components/schemas/TeamMetadata"},"slackChannels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannel1"}},"teamTag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/TeamResponse.CORTEX"},{"$ref":"#/components/schemas/TeamResponse.IDP"}]},"TeamsLink":{"required":["name","type","url"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"TeamMetadata":{"required":["name"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"}}},"SlackChannel1":{"required":["name","notificationsEnabled"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"}}},"TeamResponse.CORTEX":{"title":"CORTEX","required":["catalogEntityTag","cortexTeam","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"cortexTeam":{"$ref":"#/components/schemas/CortexTeamDetails"}}}]},"CortexTeamDetails":{"required":["members"],"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberDetails"}}}},"CortexTeamMemberDetails":{"required":["email","name","notificationsEnabled","roles"],"type":"object","properties":{"description":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"},"role":{"$ref":"#/components/schemas/CortexTeamMemberRole"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberRole"}}}},"CortexTeamMemberRole":{"required":["tag","type"],"type":"object","properties":{"source":{"type":"string"},"tag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole.MISCONFIGURED"},{"$ref":"#/components/schemas/CortexTeamMemberRole.TEAM_ROLE"}]},"CortexTeamMemberRole.MISCONFIGURED":{"title":"MISCONFIGURED","required":["tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"}]},"CortexTeamMemberRole.TEAM_ROLE":{"title":"TEAM_ROLE","required":["name","tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"},{"type":"object","properties":{"name":{"type":"string"}}}]},"TeamResponse.IDP":{"title":"IDP","required":["catalogEntityTag","id","idpGroup","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"idpGroup":{"$ref":"#/components/schemas/IdpGroupDetailsResponse"}}}]},"IdpGroupDetailsResponse":{"required":["group","members","provider"],"type":"object","properties":{"group":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"provider":{"type":"string","enum":["ACTIVE_DIRECTORY","AZURE_DEVOPS","BAMBOOHR","GIT","GITLAB","GOOGLE","OKTA","OPSGENIE","SERVICE_NOW","SLACK","WORKDAY"]}}},"Member":{"required":["id","roles"],"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}}},"Role":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the role"},"source":{"type":"string","description":"Source of the role if pulled in through integration. This will be blank if manually defined in Cortex."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/teams":{"get":{"description":"*Warning:* This API can return team details if you pass in a teamTag query parameter. However, this should only be used to retrieve team details if your team identifier contains non-alphanumeric characters. Otherwise, use the standard API under `Teams` -> `Retrieve team details`. When retrieving team details, the response will be a single team entity instead of a list.\n\nNote: the response objects can also include an `idpGroup` or `cortexTeam` field depending on whether the team contains a `group` or only consists of individually defined `members`.","operationId":"getTeamDetailsAdvanced","parameters":[{"description":"Include teams without members","in":"query","name":"includeTeamsWithoutMembers","required":false,"schema":{"type":"boolean"}},{"description":"Team identifier","in":"query","name":"teamTag","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllTeamsResponse"}}},"description":"Object containing a list of teams"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Team not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Retrieve list of teams or team details","tags":["Teams"]}}}}
```

## GET /api/v1/teams/{tagOrId}

> Retrieve team details

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Teams"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"TeamResponse":{"required":["catalogEntityTag","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","properties":{"catalogEntityTag":{"type":"string"},"id":{"type":"string"},"isArchived":{"type":"boolean"},"links":{"type":"array","items":{"$ref":"#/components/schemas/TeamsLink"}},"metadata":{"$ref":"#/components/schemas/TeamMetadata"},"slackChannels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannel1"}},"teamTag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/TeamResponse.CORTEX"},{"$ref":"#/components/schemas/TeamResponse.IDP"}]},"TeamsLink":{"required":["name","type","url"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"TeamMetadata":{"required":["name"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"}}},"SlackChannel1":{"required":["name","notificationsEnabled"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"}}},"TeamResponse.CORTEX":{"title":"CORTEX","required":["catalogEntityTag","cortexTeam","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"cortexTeam":{"$ref":"#/components/schemas/CortexTeamDetails"}}}]},"CortexTeamDetails":{"required":["members"],"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberDetails"}}}},"CortexTeamMemberDetails":{"required":["email","name","notificationsEnabled","roles"],"type":"object","properties":{"description":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"},"role":{"$ref":"#/components/schemas/CortexTeamMemberRole"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberRole"}}}},"CortexTeamMemberRole":{"required":["tag","type"],"type":"object","properties":{"source":{"type":"string"},"tag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole.MISCONFIGURED"},{"$ref":"#/components/schemas/CortexTeamMemberRole.TEAM_ROLE"}]},"CortexTeamMemberRole.MISCONFIGURED":{"title":"MISCONFIGURED","required":["tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"}]},"CortexTeamMemberRole.TEAM_ROLE":{"title":"TEAM_ROLE","required":["name","tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"},{"type":"object","properties":{"name":{"type":"string"}}}]},"TeamResponse.IDP":{"title":"IDP","required":["catalogEntityTag","id","idpGroup","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"idpGroup":{"$ref":"#/components/schemas/IdpGroupDetailsResponse"}}}]},"IdpGroupDetailsResponse":{"required":["group","members","provider"],"type":"object","properties":{"group":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"provider":{"type":"string","enum":["ACTIVE_DIRECTORY","AZURE_DEVOPS","BAMBOOHR","GIT","GITLAB","GOOGLE","OKTA","OPSGENIE","SERVICE_NOW","SLACK","WORKDAY"]}}},"Member":{"required":["id","roles"],"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}}},"Role":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the role"},"source":{"type":"string","description":"Source of the role if pulled in through integration. This will be blank if manually defined in Cortex."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/teams/{tagOrId}":{"get":{"operationId":"getTeamDetails","parameters":[{"description":"The tag (`x-cortex-tag`) or unique, auto-generated identifier for the entity.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}},"description":"Successfully found team\n\nNote: the response objects can also include an `idpGroup` or `cortexTeam` field depending on whether the team contains a `group` or only consists of individually defined `members`."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Team not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Retrieve team details","tags":["Teams"]}}}}
```

## Create a team

> Team memberships can be backed by an IdP group (from Okta, Azure AD, Google Groups, etc), or can be managed directly through Cortex. Each has a separate request shape, so make sure to select the correct example.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Teams"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"CreateTeamRequest":{"required":["links","metadata","slackChannels","teamTag","type"],"type":"object","properties":{"links":{"type":"array","items":{"$ref":"#/components/schemas/TeamsLink"}},"metadata":{"$ref":"#/components/schemas/TeamMetadata"},"slackChannels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannel1"}},"teamTag":{"type":"string"},"type":{"type":"string","description":"Use \"IDP\" for IdentityProviderBackedTeam and \"CORTEX\" for ManagedTeam"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CreateTeamRequest.CORTEX"},{"$ref":"#/components/schemas/CreateTeamRequest.IDP"}]},"TeamsLink":{"required":["name","type","url"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"TeamMetadata":{"required":["name"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"}}},"SlackChannel1":{"required":["name","notificationsEnabled"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"}}},"CreateTeamRequest.CORTEX":{"title":"CORTEX","required":["cortexTeam","links","metadata","slackChannels","teamTag","type"],"type":"object","description":"Use this request shape when creating a team entry whose memberships are manually maintained via API or the UI.","allOf":[{"$ref":"#/components/schemas/CreateTeamRequest"},{"type":"object","properties":{"cortexTeam":{"$ref":"#/components/schemas/CortexTeamDetails"},"teamTag":{"type":"string","description":"A unique identifier for the team, which is used for programmatic access as well as in Catalog Descriptors to define ownership of an entity."},"type":{"type":"string"}}}]},"CortexTeamDetails":{"required":["members"],"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberDetails"}}}},"CortexTeamMemberDetails":{"required":["email","name","notificationsEnabled","roles"],"type":"object","properties":{"description":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"},"role":{"$ref":"#/components/schemas/CortexTeamMemberRole"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberRole"}}}},"CortexTeamMemberRole":{"required":["tag","type"],"type":"object","properties":{"source":{"type":"string"},"tag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole.MISCONFIGURED"},{"$ref":"#/components/schemas/CortexTeamMemberRole.TEAM_ROLE"}]},"CortexTeamMemberRole.MISCONFIGURED":{"title":"MISCONFIGURED","required":["tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"}]},"CortexTeamMemberRole.TEAM_ROLE":{"title":"TEAM_ROLE","required":["name","tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"},{"type":"object","properties":{"name":{"type":"string"}}}]},"CreateTeamRequest.IDP":{"title":"IDP","required":["idpGroup","links","metadata","slackChannels","teamTag","type"],"type":"object","description":"Use this request shape when creating a team entry whose memberships are synced with an Idp group, such as from Okta, Google Groups, Github Teams, Azure AD, etc.","allOf":[{"$ref":"#/components/schemas/CreateTeamRequest"},{"type":"object","properties":{"idpGroup":{"$ref":"#/components/schemas/IdpGroupDetailsRequest"},"teamTag":{"type":"string","description":"A unique identifier for the team to be used for API/programmatic access"},"type":{"type":"string"}}}]},"IdpGroupDetailsRequest":{"required":["group","provider"],"type":"object","properties":{"group":{"type":"string"},"provider":{"type":"string","enum":["ACTIVE_DIRECTORY","AZURE_DEVOPS","BAMBOOHR","GIT","GITLAB","GOOGLE","OKTA","OPSGENIE","SERVICE_NOW","SLACK","WORKDAY"]}}},"TeamResponse":{"required":["catalogEntityTag","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","properties":{"catalogEntityTag":{"type":"string"},"id":{"type":"string"},"isArchived":{"type":"boolean"},"links":{"type":"array","items":{"$ref":"#/components/schemas/TeamsLink"}},"metadata":{"$ref":"#/components/schemas/TeamMetadata"},"slackChannels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannel1"}},"teamTag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/TeamResponse.CORTEX"},{"$ref":"#/components/schemas/TeamResponse.IDP"}]},"TeamResponse.CORTEX":{"title":"CORTEX","required":["catalogEntityTag","cortexTeam","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"cortexTeam":{"$ref":"#/components/schemas/CortexTeamDetails"}}}]},"TeamResponse.IDP":{"title":"IDP","required":["catalogEntityTag","id","idpGroup","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"idpGroup":{"$ref":"#/components/schemas/IdpGroupDetailsResponse"}}}]},"IdpGroupDetailsResponse":{"required":["group","members","provider"],"type":"object","properties":{"group":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"provider":{"type":"string","enum":["ACTIVE_DIRECTORY","AZURE_DEVOPS","BAMBOOHR","GIT","GITLAB","GOOGLE","OKTA","OPSGENIE","SERVICE_NOW","SLACK","WORKDAY"]}}},"Member":{"required":["id","roles"],"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}}},"Role":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the role"},"source":{"type":"string","description":"Source of the role if pulled in through integration. This will be blank if manually defined in Cortex."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/teams":{"post":{"description":"Team memberships can be backed by an IdP group (from Okta, Azure AD, Google Groups, etc), or can be managed directly through Cortex. Each has a separate request shape, so make sure to select the correct example.","operationId":"createTeam","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeamRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}},"description":"Successfully created a team"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Create a team","tags":["Teams"]}}}}
```

## \[Cortex managed teams] Update members in team

> For teams whose members are not backed by an IdP, use this API to update the team members. Note that it will replace the members in the team with the members defined in this request.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Teams"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"CortexManagedTeamMembersRequest":{"required":["members","type"],"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMember"}},"type":{"type":"string"}}},"CortexTeamMember":{"required":["email","name","notificationsEnabled","roleTags"],"type":"object","properties":{"description":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"},"roleTags":{"type":"array","items":{"type":"string"}}}},"TeamResponse":{"required":["catalogEntityTag","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","properties":{"catalogEntityTag":{"type":"string"},"id":{"type":"string"},"isArchived":{"type":"boolean"},"links":{"type":"array","items":{"$ref":"#/components/schemas/TeamsLink"}},"metadata":{"$ref":"#/components/schemas/TeamMetadata"},"slackChannels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannel1"}},"teamTag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/TeamResponse.CORTEX"},{"$ref":"#/components/schemas/TeamResponse.IDP"}]},"TeamsLink":{"required":["name","type","url"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"TeamMetadata":{"required":["name"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"}}},"SlackChannel1":{"required":["name","notificationsEnabled"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"}}},"TeamResponse.CORTEX":{"title":"CORTEX","required":["catalogEntityTag","cortexTeam","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"cortexTeam":{"$ref":"#/components/schemas/CortexTeamDetails"}}}]},"CortexTeamDetails":{"required":["members"],"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberDetails"}}}},"CortexTeamMemberDetails":{"required":["email","name","notificationsEnabled","roles"],"type":"object","properties":{"description":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"},"role":{"$ref":"#/components/schemas/CortexTeamMemberRole"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberRole"}}}},"CortexTeamMemberRole":{"required":["tag","type"],"type":"object","properties":{"source":{"type":"string"},"tag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole.MISCONFIGURED"},{"$ref":"#/components/schemas/CortexTeamMemberRole.TEAM_ROLE"}]},"CortexTeamMemberRole.MISCONFIGURED":{"title":"MISCONFIGURED","required":["tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"}]},"CortexTeamMemberRole.TEAM_ROLE":{"title":"TEAM_ROLE","required":["name","tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"},{"type":"object","properties":{"name":{"type":"string"}}}]},"TeamResponse.IDP":{"title":"IDP","required":["catalogEntityTag","id","idpGroup","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"idpGroup":{"$ref":"#/components/schemas/IdpGroupDetailsResponse"}}}]},"IdpGroupDetailsResponse":{"required":["group","members","provider"],"type":"object","properties":{"group":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"provider":{"type":"string","enum":["ACTIVE_DIRECTORY","AZURE_DEVOPS","BAMBOOHR","GIT","GITLAB","GOOGLE","OKTA","OPSGENIE","SERVICE_NOW","SLACK","WORKDAY"]}}},"Member":{"required":["id","roles"],"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}}},"Role":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the role"},"source":{"type":"string","description":"Source of the role if pulled in through integration. This will be blank if manually defined in Cortex."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/teams/{tagOrId}/members":{"put":{"description":"For teams whose members are not backed by an IdP, use this API to update the team members. Note that it will replace the members in the team with the members defined in this request.","operationId":"updateCortexTeamMembers","parameters":[{"description":"The tag (`x-cortex-tag`) or unique, auto-generated identifier for the entity.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CortexManagedTeamMembersRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}},"description":"Successfully updated team members"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Team not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"[Cortex managed teams] Update members in team","tags":["Teams"]}}}}
```

## \[Cortex managed teams] Update members in team

> For teams whose members are not backed by an IdP, use this API to update the team members. Note that it will replace the members in the team with the members defined in this request. \
> \*Warning:\* This API should only be used if your team identifier contains non-alphanumeric characters. Otherwise, use the standard API under \`Teams\`.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Teams [Advanced]"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"CortexManagedTeamMembersRequest":{"required":["members","type"],"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMember"}},"type":{"type":"string"}}},"CortexTeamMember":{"required":["email","name","notificationsEnabled","roleTags"],"type":"object","properties":{"description":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"},"roleTags":{"type":"array","items":{"type":"string"}}}},"TeamResponse":{"required":["catalogEntityTag","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","properties":{"catalogEntityTag":{"type":"string"},"id":{"type":"string"},"isArchived":{"type":"boolean"},"links":{"type":"array","items":{"$ref":"#/components/schemas/TeamsLink"}},"metadata":{"$ref":"#/components/schemas/TeamMetadata"},"slackChannels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannel1"}},"teamTag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/TeamResponse.CORTEX"},{"$ref":"#/components/schemas/TeamResponse.IDP"}]},"TeamsLink":{"required":["name","type","url"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"TeamMetadata":{"required":["name"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"}}},"SlackChannel1":{"required":["name","notificationsEnabled"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"}}},"TeamResponse.CORTEX":{"title":"CORTEX","required":["catalogEntityTag","cortexTeam","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"cortexTeam":{"$ref":"#/components/schemas/CortexTeamDetails"}}}]},"CortexTeamDetails":{"required":["members"],"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberDetails"}}}},"CortexTeamMemberDetails":{"required":["email","name","notificationsEnabled","roles"],"type":"object","properties":{"description":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"},"role":{"$ref":"#/components/schemas/CortexTeamMemberRole"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberRole"}}}},"CortexTeamMemberRole":{"required":["tag","type"],"type":"object","properties":{"source":{"type":"string"},"tag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole.MISCONFIGURED"},{"$ref":"#/components/schemas/CortexTeamMemberRole.TEAM_ROLE"}]},"CortexTeamMemberRole.MISCONFIGURED":{"title":"MISCONFIGURED","required":["tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"}]},"CortexTeamMemberRole.TEAM_ROLE":{"title":"TEAM_ROLE","required":["name","tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"},{"type":"object","properties":{"name":{"type":"string"}}}]},"TeamResponse.IDP":{"title":"IDP","required":["catalogEntityTag","id","idpGroup","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"idpGroup":{"$ref":"#/components/schemas/IdpGroupDetailsResponse"}}}]},"IdpGroupDetailsResponse":{"required":["group","members","provider"],"type":"object","properties":{"group":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"provider":{"type":"string","enum":["ACTIVE_DIRECTORY","AZURE_DEVOPS","BAMBOOHR","GIT","GITLAB","GOOGLE","OKTA","OPSGENIE","SERVICE_NOW","SLACK","WORKDAY"]}}},"Member":{"required":["id","roles"],"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}}},"Role":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the role"},"source":{"type":"string","description":"Source of the role if pulled in through integration. This will be blank if manually defined in Cortex."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/teams/members":{"put":{"description":"For teams whose members are not backed by an IdP, use this API to update the team members. Note that it will replace the members in the team with the members defined in this request. \n*Warning:* This API should only be used if your team identifier contains non-alphanumeric characters. Otherwise, use the standard API under `Teams`.","operationId":"updateCortexTeamMembersAdvanced","parameters":[{"in":"query","name":"teamTag","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CortexManagedTeamMembersRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}},"description":"Successfully updated team members"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Forbidden"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Team not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"[Cortex managed teams] Update members in team","tags":["Teams [Advanced]"]}}}}
```

## Update team metadata

> \*Warning:\* This API should only be used if your team identifier contains non-alphanumeric characters. Otherwise, use the standard API under \`Teams\`.

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Teams [Advanced]"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"UpdateTeamRequest":{"required":["links","metadata","slackChannels","type"],"type":"object","properties":{"links":{"type":"array","items":{"$ref":"#/components/schemas/TeamsLink"}},"metadata":{"$ref":"#/components/schemas/TeamMetadata"},"slackChannels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannel1"}},"type":{"type":"string","description":"Use \"IDP\" for IdentityProviderBackedTeam and \"CORTEX\" for ManagedTeam"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/UpdateTeamRequest.CORTEX"},{"$ref":"#/components/schemas/UpdateTeamRequest.IDP"}]},"TeamsLink":{"required":["name","type","url"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"TeamMetadata":{"required":["name"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"}}},"SlackChannel1":{"required":["name","notificationsEnabled"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"}}},"UpdateTeamRequest.CORTEX":{"title":"CORTEX","required":["cortexTeam","links","metadata","slackChannels","type"],"type":"object","description":"Use this request shape when updating a team entry whose memberships are manually maintained via API or the UI.","allOf":[{"$ref":"#/components/schemas/UpdateTeamRequest"},{"type":"object","properties":{"cortexTeam":{"$ref":"#/components/schemas/CortexTeamDetails"},"type":{"type":"string"}}}]},"CortexTeamDetails":{"required":["members"],"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberDetails"}}}},"CortexTeamMemberDetails":{"required":["email","name","notificationsEnabled","roles"],"type":"object","properties":{"description":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"},"role":{"$ref":"#/components/schemas/CortexTeamMemberRole"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberRole"}}}},"CortexTeamMemberRole":{"required":["tag","type"],"type":"object","properties":{"source":{"type":"string"},"tag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole.MISCONFIGURED"},{"$ref":"#/components/schemas/CortexTeamMemberRole.TEAM_ROLE"}]},"CortexTeamMemberRole.MISCONFIGURED":{"title":"MISCONFIGURED","required":["tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"}]},"CortexTeamMemberRole.TEAM_ROLE":{"title":"TEAM_ROLE","required":["name","tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"},{"type":"object","properties":{"name":{"type":"string"}}}]},"UpdateTeamRequest.IDP":{"title":"IDP","required":["links","metadata","slackChannels","type"],"type":"object","description":"Use this request shape when updating a team entry whose memberships are synced with an Idp group, such as from Okta, Google Groups, Github Teams, Azure AD, etc.","allOf":[{"$ref":"#/components/schemas/UpdateTeamRequest"},{"type":"object","properties":{"type":{"type":"string"}}}]},"TeamResponse":{"required":["catalogEntityTag","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","properties":{"catalogEntityTag":{"type":"string"},"id":{"type":"string"},"isArchived":{"type":"boolean"},"links":{"type":"array","items":{"$ref":"#/components/schemas/TeamsLink"}},"metadata":{"$ref":"#/components/schemas/TeamMetadata"},"slackChannels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannel1"}},"teamTag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/TeamResponse.CORTEX"},{"$ref":"#/components/schemas/TeamResponse.IDP"}]},"TeamResponse.CORTEX":{"title":"CORTEX","required":["catalogEntityTag","cortexTeam","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"cortexTeam":{"$ref":"#/components/schemas/CortexTeamDetails"}}}]},"TeamResponse.IDP":{"title":"IDP","required":["catalogEntityTag","id","idpGroup","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"idpGroup":{"$ref":"#/components/schemas/IdpGroupDetailsResponse"}}}]},"IdpGroupDetailsResponse":{"required":["group","members","provider"],"type":"object","properties":{"group":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"provider":{"type":"string","enum":["ACTIVE_DIRECTORY","AZURE_DEVOPS","BAMBOOHR","GIT","GITLAB","GOOGLE","OKTA","OPSGENIE","SERVICE_NOW","SLACK","WORKDAY"]}}},"Member":{"required":["id","roles"],"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}}},"Role":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the role"},"source":{"type":"string","description":"Source of the role if pulled in through integration. This will be blank if manually defined in Cortex."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/teams":{"put":{"description":"*Warning:* This API should only be used if your team identifier contains non-alphanumeric characters. Otherwise, use the standard API under `Teams`.","operationId":"updateTeamAdvanced","parameters":[{"in":"query","name":"teamTag","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}},"description":"Successfully updated team"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Team not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Update team metadata","tags":["Teams [Advanced]"]}}}}
```

## PUT /api/v1/teams/{tagOrId}

> Update team metadata

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Teams"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"UpdateTeamRequest":{"required":["links","metadata","slackChannels","type"],"type":"object","properties":{"links":{"type":"array","items":{"$ref":"#/components/schemas/TeamsLink"}},"metadata":{"$ref":"#/components/schemas/TeamMetadata"},"slackChannels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannel1"}},"type":{"type":"string","description":"Use \"IDP\" for IdentityProviderBackedTeam and \"CORTEX\" for ManagedTeam"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/UpdateTeamRequest.CORTEX"},{"$ref":"#/components/schemas/UpdateTeamRequest.IDP"}]},"TeamsLink":{"required":["name","type","url"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"TeamMetadata":{"required":["name"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"}}},"SlackChannel1":{"required":["name","notificationsEnabled"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"}}},"UpdateTeamRequest.CORTEX":{"title":"CORTEX","required":["cortexTeam","links","metadata","slackChannels","type"],"type":"object","description":"Use this request shape when updating a team entry whose memberships are manually maintained via API or the UI.","allOf":[{"$ref":"#/components/schemas/UpdateTeamRequest"},{"type":"object","properties":{"cortexTeam":{"$ref":"#/components/schemas/CortexTeamDetails"},"type":{"type":"string"}}}]},"CortexTeamDetails":{"required":["members"],"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberDetails"}}}},"CortexTeamMemberDetails":{"required":["email","name","notificationsEnabled","roles"],"type":"object","properties":{"description":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"},"role":{"$ref":"#/components/schemas/CortexTeamMemberRole"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberRole"}}}},"CortexTeamMemberRole":{"required":["tag","type"],"type":"object","properties":{"source":{"type":"string"},"tag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole.MISCONFIGURED"},{"$ref":"#/components/schemas/CortexTeamMemberRole.TEAM_ROLE"}]},"CortexTeamMemberRole.MISCONFIGURED":{"title":"MISCONFIGURED","required":["tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"}]},"CortexTeamMemberRole.TEAM_ROLE":{"title":"TEAM_ROLE","required":["name","tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"},{"type":"object","properties":{"name":{"type":"string"}}}]},"UpdateTeamRequest.IDP":{"title":"IDP","required":["links","metadata","slackChannels","type"],"type":"object","description":"Use this request shape when updating a team entry whose memberships are synced with an Idp group, such as from Okta, Google Groups, Github Teams, Azure AD, etc.","allOf":[{"$ref":"#/components/schemas/UpdateTeamRequest"},{"type":"object","properties":{"type":{"type":"string"}}}]},"TeamResponse":{"required":["catalogEntityTag","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","properties":{"catalogEntityTag":{"type":"string"},"id":{"type":"string"},"isArchived":{"type":"boolean"},"links":{"type":"array","items":{"$ref":"#/components/schemas/TeamsLink"}},"metadata":{"$ref":"#/components/schemas/TeamMetadata"},"slackChannels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannel1"}},"teamTag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/TeamResponse.CORTEX"},{"$ref":"#/components/schemas/TeamResponse.IDP"}]},"TeamResponse.CORTEX":{"title":"CORTEX","required":["catalogEntityTag","cortexTeam","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"cortexTeam":{"$ref":"#/components/schemas/CortexTeamDetails"}}}]},"TeamResponse.IDP":{"title":"IDP","required":["catalogEntityTag","id","idpGroup","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"idpGroup":{"$ref":"#/components/schemas/IdpGroupDetailsResponse"}}}]},"IdpGroupDetailsResponse":{"required":["group","members","provider"],"type":"object","properties":{"group":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"provider":{"type":"string","enum":["ACTIVE_DIRECTORY","AZURE_DEVOPS","BAMBOOHR","GIT","GITLAB","GOOGLE","OKTA","OPSGENIE","SERVICE_NOW","SLACK","WORKDAY"]}}},"Member":{"required":["id","roles"],"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}}},"Role":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the role"},"source":{"type":"string","description":"Source of the role if pulled in through integration. This will be blank if manually defined in Cortex."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/teams/{tagOrId}":{"put":{"operationId":"updateTeamMetadata","parameters":[{"description":"The tag (`x-cortex-tag`) or unique, auto-generated identifier for the entity.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeamRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}},"description":"Successfully updated team"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Bad Request"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Team not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Update team metadata","tags":["Teams"]}}}}
```

## PUT /api/v1/teams/{tagOrId}/archive

> Archive team

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Teams"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"TeamResponse":{"required":["catalogEntityTag","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","properties":{"catalogEntityTag":{"type":"string"},"id":{"type":"string"},"isArchived":{"type":"boolean"},"links":{"type":"array","items":{"$ref":"#/components/schemas/TeamsLink"}},"metadata":{"$ref":"#/components/schemas/TeamMetadata"},"slackChannels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannel1"}},"teamTag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/TeamResponse.CORTEX"},{"$ref":"#/components/schemas/TeamResponse.IDP"}]},"TeamsLink":{"required":["name","type","url"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"TeamMetadata":{"required":["name"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"}}},"SlackChannel1":{"required":["name","notificationsEnabled"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"}}},"TeamResponse.CORTEX":{"title":"CORTEX","required":["catalogEntityTag","cortexTeam","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"cortexTeam":{"$ref":"#/components/schemas/CortexTeamDetails"}}}]},"CortexTeamDetails":{"required":["members"],"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberDetails"}}}},"CortexTeamMemberDetails":{"required":["email","name","notificationsEnabled","roles"],"type":"object","properties":{"description":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"},"role":{"$ref":"#/components/schemas/CortexTeamMemberRole"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberRole"}}}},"CortexTeamMemberRole":{"required":["tag","type"],"type":"object","properties":{"source":{"type":"string"},"tag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole.MISCONFIGURED"},{"$ref":"#/components/schemas/CortexTeamMemberRole.TEAM_ROLE"}]},"CortexTeamMemberRole.MISCONFIGURED":{"title":"MISCONFIGURED","required":["tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"}]},"CortexTeamMemberRole.TEAM_ROLE":{"title":"TEAM_ROLE","required":["name","tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"},{"type":"object","properties":{"name":{"type":"string"}}}]},"TeamResponse.IDP":{"title":"IDP","required":["catalogEntityTag","id","idpGroup","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"idpGroup":{"$ref":"#/components/schemas/IdpGroupDetailsResponse"}}}]},"IdpGroupDetailsResponse":{"required":["group","members","provider"],"type":"object","properties":{"group":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"provider":{"type":"string","enum":["ACTIVE_DIRECTORY","AZURE_DEVOPS","BAMBOOHR","GIT","GITLAB","GOOGLE","OKTA","OPSGENIE","SERVICE_NOW","SLACK","WORKDAY"]}}},"Member":{"required":["id","roles"],"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}}},"Role":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the role"},"source":{"type":"string","description":"Source of the role if pulled in through integration. This will be blank if manually defined in Cortex."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/teams/{tagOrId}/archive":{"put":{"operationId":"archiveTeam","parameters":[{"description":"The tag (`x-cortex-tag`) or unique, auto-generated identifier for the entity.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}},"description":"Successfully archived team"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Team not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Archive team","tags":["Teams"]}}}}
```

## PUT /api/v1/teams/{tagOrId}/unarchive

> Unarchive team

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Teams"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"TeamResponse":{"required":["catalogEntityTag","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","properties":{"catalogEntityTag":{"type":"string"},"id":{"type":"string"},"isArchived":{"type":"boolean"},"links":{"type":"array","items":{"$ref":"#/components/schemas/TeamsLink"}},"metadata":{"$ref":"#/components/schemas/TeamMetadata"},"slackChannels":{"type":"array","items":{"$ref":"#/components/schemas/SlackChannel1"}},"teamTag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/TeamResponse.CORTEX"},{"$ref":"#/components/schemas/TeamResponse.IDP"}]},"TeamsLink":{"required":["name","type","url"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"type":{"type":"string"},"url":{"type":"string"}}},"TeamMetadata":{"required":["name"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"summary":{"type":"string"}}},"SlackChannel1":{"required":["name","notificationsEnabled"],"type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"}}},"TeamResponse.CORTEX":{"title":"CORTEX","required":["catalogEntityTag","cortexTeam","id","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"cortexTeam":{"$ref":"#/components/schemas/CortexTeamDetails"}}}]},"CortexTeamDetails":{"required":["members"],"type":"object","properties":{"members":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberDetails"}}}},"CortexTeamMemberDetails":{"required":["email","name","notificationsEnabled","roles"],"type":"object","properties":{"description":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"},"notificationsEnabled":{"type":"boolean"},"role":{"$ref":"#/components/schemas/CortexTeamMemberRole"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/CortexTeamMemberRole"}}}},"CortexTeamMemberRole":{"required":["tag","type"],"type":"object","properties":{"source":{"type":"string"},"tag":{"type":"string"},"type":{"type":"string"}},"discriminator":{"propertyName":"type"},"oneOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole.MISCONFIGURED"},{"$ref":"#/components/schemas/CortexTeamMemberRole.TEAM_ROLE"}]},"CortexTeamMemberRole.MISCONFIGURED":{"title":"MISCONFIGURED","required":["tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"}]},"CortexTeamMemberRole.TEAM_ROLE":{"title":"TEAM_ROLE","required":["name","tag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/CortexTeamMemberRole"},{"type":"object","properties":{"name":{"type":"string"}}}]},"TeamResponse.IDP":{"title":"IDP","required":["catalogEntityTag","id","idpGroup","isArchived","links","metadata","slackChannels","teamTag","type"],"type":"object","allOf":[{"$ref":"#/components/schemas/TeamResponse"},{"type":"object","properties":{"idpGroup":{"$ref":"#/components/schemas/IdpGroupDetailsResponse"}}}]},"IdpGroupDetailsResponse":{"required":["group","members","provider"],"type":"object","properties":{"group":{"type":"string"},"members":{"type":"array","items":{"$ref":"#/components/schemas/Member"}},"provider":{"type":"string","enum":["ACTIVE_DIRECTORY","AZURE_DEVOPS","BAMBOOHR","GIT","GITLAB","GOOGLE","OKTA","OPSGENIE","SERVICE_NOW","SLACK","WORKDAY"]}}},"Member":{"required":["id","roles"],"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"role":{"$ref":"#/components/schemas/Role"},"roles":{"type":"array","items":{"$ref":"#/components/schemas/Role"}}}},"Role":{"required":["name"],"type":"object","properties":{"name":{"type":"string","description":"Name of the role"},"source":{"type":"string","description":"Source of the role if pulled in through integration. This will be blank if manually defined in Cortex."}}},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/teams/{tagOrId}/unarchive":{"put":{"operationId":"unarchiveTeam","parameters":[{"description":"The tag (`x-cortex-tag`) or unique, auto-generated identifier for the entity.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamResponse"}}},"description":"Successfully unarchived team"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Team not found"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Unarchive team","tags":["Teams"]}}}}
```

## DELETE /api/v1/teams

> Delete team

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Teams"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"Unit":{"type":"object"},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/teams":{"delete":{"operationId":"deleteTeam","parameters":[{"in":"query","name":"teamTag","required":true,"schema":{"type":"string"}}],"responses":{"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unit"}}},"description":"Successfully deleted team"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Team not found"},"405":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unit"}}},"description":"Team delete is not allowed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Delete team","tags":["Teams"]}}}}
```

## DELETE /api/v1/teams/{tagOrId}

> Delete team by tag or ID

```json
{"openapi":"3.0.1","info":{"title":"Cortex API","version":"v1"},"tags":[{"name":"Teams"}],"servers":[{"url":"https://api.getcortexapp.com","description":"Cortex Cloud API host"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","description":"All requests to the Cortex API need to provide an `Authorization: Bearer <token>` header, where `<token>` is an API key created in the Settings page of your workspace.","scheme":"bearer","type":"http"}},"schemas":{"Unit":{"type":"object"},"ErrorResponse":{"required":["message","type"],"type":"object","properties":{"details":{"type":"string"},"gatewayHttpStatus":{"type":"integer","format":"int32"},"httpStatus":{"type":"integer","format":"int32"},"message":{"type":"string"},"requestId":{"type":"string"},"type":{"type":"string","enum":["INTEGRATION_MISSING","INTEGRATION_UNREGISTERED","INTEGRATION_UNSUPPORTED","INTEGRATION_GRAPHQL_ERROR","INTEGRATION_BAD_REQUEST","INTEGRATION_UNAUTHORIZED","INTEGRATION_FORBIDDEN","INTEGRATION_NOT_FOUND","INTEGRATION_UNPROCESSABLE_CONTENT","INTEGRATION_RATE_LIMITED","INTEGRATION_INTERNAL_ERROR","INTEGRATION_NOT_IMPLEMENTED","INTEGRATION_BAD_GATEWAY","INTEGRATION_UNAVAILABLE","INTEGRATION_GATEWAY_TIMEOUT","INTEGRATION_TIMED_OUT","INTEGRATION_CACHE_ERROR","INTEGRATION_UNHANDLED_HTTP_ERROR","INTEGRATION_UNHANDLED_EXCEPTION","INTEGRATION_UNEXPECTED_ERROR","ILLEGAL_ARGUMENT_ERROR","BAD_REQUEST","FORBIDDEN","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","UNHANDLED_EXCEPTION","UNCATEGORIZED","SERVICE_CREATOR","UNKNOWN_HOST","TOO_MANY_REQUESTS"]}}},"TooManyRequestsProblemDetail":{"required":["type","title","status"],"type":"object","properties":{"detail":{"type":"string"},"instance":{"type":"string","format":"uri-reference"},"retryAfter":{"minimum":0,"type":"integer","description":"The number of seconds until the rate limiting resets.","format":"int32"},"status":{"maximum":599,"minimum":100,"type":"integer","format":"int32","enum":[429]},"title":{"type":"string"},"type":{"type":"string","format":"uri-reference"}}}},"responses":{"TooManyRequests":{"content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/TooManyRequestsProblemDetail"}}},"description":"The client has exceeded the rate limit by performing too many requests in a short period. Retry the request after a delay.","headers":{"Retry-After":{"description":"The number of seconds until the rate limiting resets.","schema":{"minimum":0,"type":"integer","format":"int32"}}}}}},"paths":{"/api/v1/teams/{tagOrId}":{"delete":{"operationId":"deleteTeamByTagOrId","parameters":[{"description":"The tag (`x-cortex-tag`) or unique, auto-generated identifier for the entity.","in":"path","name":"tagOrId","required":true,"schema":{"type":"string","description":"Entity identifier - can be a tag or CID"}}],"responses":{"204":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unit"}}},"description":"Successfully deleted team"},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}},"description":"Team not found"},"405":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unit"}}},"description":"Team delete is not allowed"},"429":{"$ref":"#/components/responses/TooManyRequests"}},"summary":"Delete team by tag or ID","tags":["Teams"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cortex.io/api/readme/teams.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
