> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cortex.io/llms.txt
> Use this file to discover all available pages before exploring further.

# [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`.



## OpenAPI

````yaml /openapi/cortex_swagger.json put /api/v1/teams/members
openapi: 3.0.1
info:
  description: >-
    The Cortex REST API provides programmatic access to the data in the catalog,
    Scorecards, and more.
  title: Cortex API
  version: v1
servers:
  - url: https://api.getcortexapp.com
    description: Cortex Cloud API host
security:
  - bearerAuth: []
tags:
  - name: API Keys
  - name: Audit Logs
  - name: Catalog Entities
  - name: Catalogs
  - name: Custom Data
  - name: Custom Data [Advanced]
  - name: Custom Events
  - name: Custom Metrics
  - name: Dependencies
  - name: Deploys
  - name: Discovery Audit
  - name: Docs
  - name: 'Eng Intel: 1-Registry'
  - name: 'Eng Intel: 2-Metrics'
  - name: 'Eng Intel: 3-Trace'
  - name: 'Eng Intel: User Labels'
  - name: Entity Relationship Types
  - name: Entity Relationships
  - name: Entity Types
  - name: GitOps Logs
  - name: Groups
  - name: IP Allowlist
  - name: Initiatives
  - name: My Workspace
  - name: Notification Logs
  - name: On-call
  - name: Packages
  - name: Plugins
  - name: Queries
  - name: SCIM
  - name: Scaffolder
  - name: Scorecards
  - name: Secrets
  - name: Team Roles
  - name: Teams
  - name: Teams Hierarchies
  - name: Teams [Advanced]
  - name: Teams [Departments] (legacy)
  - name: Users
  - name: Verifications
  - name: Workflows
  - name: '[Integrations] AWS'
  - name: '[Integrations] Anthropic'
  - name: '[Integrations] Apiiro'
  - name: '[Integrations] ArgoCD'
  - name: '[Integrations] Azure Active Directory'
  - name: '[Integrations] Azure Devops'
  - name: '[Integrations] Azure Resources'
  - name: '[Integrations] BambooHR'
  - name: '[Integrations] Bitbucket'
  - name: '[Integrations] Bugsnag'
  - name: '[Integrations] Buildkite'
  - name: '[Integrations] Checkmarx SAST'
  - name: '[Integrations] CircleCI'
  - name: '[Integrations] ClickUp'
  - name: '[Integrations] Codecov'
  - name: '[Integrations] Coralogix'
  - name: '[Integrations] Datadog'
  - name: '[Integrations] Dynatrace'
  - name: '[Integrations] Firehydrant'
  - name: '[Integrations] GitHub'
  - name: '[Integrations] GitLab'
  - name: '[Integrations] Harness'
  - name: '[Integrations] Incident.io'
  - name: '[Integrations] Instana'
  - name: '[Integrations] Jenkins'
  - name: '[Integrations] Jira'
  - name: '[Integrations] Kubernetes'
  - name: '[Integrations] LaunchDarkly'
  - name: '[Integrations] Lightstep'
  - name: '[Integrations] Mend SAST'
  - name: '[Integrations] Mend SCA'
  - name: '[Integrations] New Relic'
  - name: '[Integrations] Okta'
  - name: '[Integrations] Opsgenie'
  - name: '[Integrations] PagerDuty'
  - name: '[Integrations] Prometheus'
  - name: '[Integrations] Rollbar'
  - name: '[Integrations] Rootly'
  - name: '[Integrations] Semgrep'
  - name: '[Integrations] Sentry'
  - name: '[Integrations] ServiceNow'
  - name: '[Integrations] SignalFx'
  - name: '[Integrations] Snyk'
  - name: '[Integrations] SonarQube'
  - name: '[Integrations] SumoLogic'
  - name: '[Integrations] Veracode'
  - name: '[Integrations] VictorOps'
  - name: '[Integrations] Wiz'
  - name: '[Integrations] Workday'
  - name: '[Integrations] xMatters'
  - name: dev-login-controller
  - name: public-scim-schema-controller
paths:
  /api/v1/teams/members:
    put:
      tags:
        - Teams (Advanced)
      summary: '[Cortex managed teams] Update members in team'
      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. 

        *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'
components:
  schemas:
    CortexManagedTeamMembersRequest:
      required:
        - members
        - type
      type: object
      properties:
        members:
          type: array
          items:
            $ref: '#/components/schemas/CortexTeamMember'
        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'
    ErrorResponse:
      required:
        - message
        - type
      type: object
      properties:
        details:
          type: string
        errorCode:
          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
    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
    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
      type: object
      allOf:
        - $ref: '#/components/schemas/TeamResponse'
        - required:
            - cortexTeam
          type: object
          properties:
            cortexTeam:
              $ref: '#/components/schemas/CortexTeamDetails'
    TeamResponse.IDP:
      title: IDP
      type: object
      allOf:
        - $ref: '#/components/schemas/TeamResponse'
        - required:
            - idpGroup
          type: object
          properties:
            idpGroup:
              $ref: '#/components/schemas/IdpGroupDetailsResponse'
    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
    CortexTeamDetails:
      required:
        - members
      type: object
      properties:
        members:
          type: array
          items:
            $ref: '#/components/schemas/CortexTeamMemberDetails'
    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
    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'
    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'
    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'
    Role:
      required:
        - name
      type: object
      properties:
        name:
          type: string
          description: Name of the role
          example: Team Leader
        source:
          type: string
          description: >-
            Source of the role if pulled in through integration. This will be
            blank if manually defined in Cortex.
          example: WORKDAY
    CortexTeamMemberRole.MISCONFIGURED:
      title: MISCONFIGURED
      type: object
      allOf:
        - $ref: '#/components/schemas/CortexTeamMemberRole'
    CortexTeamMemberRole.TEAM_ROLE:
      title: TEAM_ROLE
      type: object
      allOf:
        - $ref: '#/components/schemas/CortexTeamMemberRole'
        - required:
            - name
          type: object
          properties:
            name:
              type: string
  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
  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

````

## Related topics

- [[Cortex managed teams] Update members in team](/api/rest/teams/[cortex-managed-teams]-update-members-in-team.md)
- [Teams](/api/rest/teams.md)
- [Update team metadata](/api/rest/teams-advanced/update-team-metadata.md)
