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

# Set Team Scope Requirements

> Post org team scope requirements via the Junction API. Requires authentication with your team API key.

<Info>
  [Junction Management API](/api-details/junction-management-api) is available for [the Scale plan](https://tryvital.io/pricing).
</Info>

<Tip>
  The base URL of this endpoint is `https://api.management.junction.com/`.

  The endpoint accepts only [Management Key](/api-details/junction-management-api#authentication) (`X-Management-Key`).
  Team API Key is not accepted.
</Tip>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.management.junction.com/v1/org/{org_id}/team/{team_id}/scope_requirements \
    --header 'Content-Type: application/json' \
    --header 'X-Vital-Org-Key: <api-key>' \
    --data '{
     "fitbit": null,
     "oura": {
          "user_must_grant": ["daily"],
          "user_may_grant": ["workout"]
     }
  }'
  ```
</RequestExample>


## OpenAPI

````yaml post /v1/org/{org_id}/team/{team_id}/scope_requirements
openapi: 3.1.0
info:
  title: Org Management
  version: 0.1.0
servers:
  - url: https://api.management.junction.com
    description: Production Management API server
security:
  - ManagementKey: []
paths:
  /v1/org/{org_id}/team/{team_id}/scope_requirements:
    post:
      tags:
        - Team
      summary: Upsert Team Scope Requirements
      operationId: >-
        upsert_team_scope_requirements_v1_org__org_id__team__team_id__scope_requirements_post
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Org Id
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertTeamScopeRequirementsBody'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UpsertTeamScopeRequirementsBody:
      properties:
        fitbit:
          anyOf:
            - $ref: '#/components/schemas/TeamScopeRequirementsBase_FitbitScope_'
            - type: 'null'
        google_fit:
          anyOf:
            - $ref: '#/components/schemas/TeamScopeRequirementsBase_GoogleFitScope_'
            - type: 'null'
        oura:
          anyOf:
            - $ref: '#/components/schemas/TeamScopeRequirementsBase_OuraScope_'
            - type: 'null'
        strava:
          anyOf:
            - $ref: '#/components/schemas/TeamScopeRequirementsBase_StravaScope_'
            - type: 'null'
        withings:
          anyOf:
            - $ref: '#/components/schemas/TeamScopeRequirementsBase_WithingsScope_'
            - type: 'null'
        wahoo:
          anyOf:
            - $ref: '#/components/schemas/TeamScopeRequirementsBase_WahooScope_'
            - type: 'null'
        whoop_v2:
          anyOf:
            - $ref: '#/components/schemas/TeamScopeRequirementsBase_WhoopScope_'
            - type: 'null'
        my_fitness_pal_v2:
          anyOf:
            - $ref: >-
                #/components/schemas/TeamScopeRequirementsBase_MyFitnessPalScope_
            - type: 'null'
      type: object
      title: UpsertTeamScopeRequirementsBody
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TeamScopeRequirementsBase_FitbitScope_:
      properties:
        user_must_grant:
          items:
            $ref: '#/components/schemas/FitbitScope'
          type: array
          uniqueItems: true
          title: User Must Grant
        user_may_grant:
          items:
            $ref: '#/components/schemas/FitbitScope'
          type: array
          uniqueItems: true
          title: User May Grant
      type: object
      required:
        - user_must_grant
        - user_may_grant
      title: TeamScopeRequirementsBase[FitbitScope]
    TeamScopeRequirementsBase_GoogleFitScope_:
      properties:
        user_must_grant:
          items:
            $ref: '#/components/schemas/GoogleFitScope'
          type: array
          uniqueItems: true
          title: User Must Grant
        user_may_grant:
          items:
            $ref: '#/components/schemas/GoogleFitScope'
          type: array
          uniqueItems: true
          title: User May Grant
      type: object
      required:
        - user_must_grant
        - user_may_grant
      title: TeamScopeRequirementsBase[GoogleFitScope]
    TeamScopeRequirementsBase_OuraScope_:
      properties:
        user_must_grant:
          items:
            $ref: '#/components/schemas/OuraScope'
          type: array
          uniqueItems: true
          title: User Must Grant
        user_may_grant:
          items:
            $ref: '#/components/schemas/OuraScope'
          type: array
          uniqueItems: true
          title: User May Grant
      type: object
      required:
        - user_must_grant
        - user_may_grant
      title: TeamScopeRequirementsBase[OuraScope]
    TeamScopeRequirementsBase_StravaScope_:
      properties:
        user_must_grant:
          items:
            $ref: '#/components/schemas/StravaScope'
          type: array
          uniqueItems: true
          title: User Must Grant
        user_may_grant:
          items:
            $ref: '#/components/schemas/StravaScope'
          type: array
          uniqueItems: true
          title: User May Grant
      type: object
      required:
        - user_must_grant
        - user_may_grant
      title: TeamScopeRequirementsBase[StravaScope]
    TeamScopeRequirementsBase_WithingsScope_:
      properties:
        user_must_grant:
          items:
            $ref: '#/components/schemas/WithingsScope'
          type: array
          uniqueItems: true
          title: User Must Grant
        user_may_grant:
          items:
            $ref: '#/components/schemas/WithingsScope'
          type: array
          uniqueItems: true
          title: User May Grant
      type: object
      required:
        - user_must_grant
        - user_may_grant
      title: TeamScopeRequirementsBase[WithingsScope]
    TeamScopeRequirementsBase_WahooScope_:
      properties:
        user_must_grant:
          items:
            $ref: '#/components/schemas/WahooScope'
          type: array
          uniqueItems: true
          title: User Must Grant
        user_may_grant:
          items:
            $ref: '#/components/schemas/WahooScope'
          type: array
          uniqueItems: true
          title: User May Grant
      type: object
      required:
        - user_must_grant
        - user_may_grant
      title: TeamScopeRequirementsBase[WahooScope]
    TeamScopeRequirementsBase_WhoopScope_:
      properties:
        user_must_grant:
          items:
            $ref: '#/components/schemas/WhoopScope'
          type: array
          uniqueItems: true
          title: User Must Grant
        user_may_grant:
          items:
            $ref: '#/components/schemas/WhoopScope'
          type: array
          uniqueItems: true
          title: User May Grant
      type: object
      required:
        - user_must_grant
        - user_may_grant
      title: TeamScopeRequirementsBase[WhoopScope]
    TeamScopeRequirementsBase_MyFitnessPalScope_:
      properties:
        user_must_grant:
          items:
            $ref: '#/components/schemas/MyFitnessPalScope'
          type: array
          uniqueItems: true
          title: User Must Grant
        user_may_grant:
          items:
            $ref: '#/components/schemas/MyFitnessPalScope'
          type: array
          uniqueItems: true
          title: User May Grant
      type: object
      required:
        - user_must_grant
        - user_may_grant
      title: TeamScopeRequirementsBase[MyFitnessPalScope]
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    FitbitScope:
      type: string
      enum:
        - heartrate
        - oxygen_saturation
        - cardio_fitness
        - respiratory_rate
        - activity
        - location
        - nutrition
        - profile
        - settings
        - sleep
        - social
        - weight
        - temperature
      title: FitbitScope
    GoogleFitScope:
      type: string
      enum:
        - openid
        - email
        - https://www.googleapis.com/auth/fitness.activity.read
        - https://www.googleapis.com/auth/fitness.body.read
        - https://www.googleapis.com/auth/fitness.sleep.read
        - https://www.googleapis.com/auth/fitness.blood_glucose.read
        - https://www.googleapis.com/auth/fitness.blood_pressure.read
        - https://www.googleapis.com/auth/fitness.heart_rate.read
        - https://www.googleapis.com/auth/fitness.nutrition.read
        - https://www.googleapis.com/auth/fitness.location.read
      title: GoogleFitScope
    OuraScope:
      type: string
      enum:
        - email
        - personal
        - daily
        - heartrate
        - workout
        - tag
        - session
      title: OuraScope
    StravaScope:
      type: string
      enum:
        - activity:read_all
        - activity:write
        - profile:write
        - profile:read_all
      title: StravaScope
    WithingsScope:
      type: string
      enum:
        - user.activity
        - user.metrics
        - user.sleepevents
      title: WithingsScope
    WahooScope:
      type: string
      enum:
        - email
        - user_read
        - workouts_read
        - offline_data
      title: WahooScope
    WhoopScope:
      type: string
      enum:
        - read:recovery
        - read:cycles
        - read:workout
        - read:sleep
        - read:profile
        - read:body_measurement
        - offline
      title: WhoopScope
    MyFitnessPalScope:
      type: string
      enum:
        - diary
        - measurements
        - private-exercises
        - subscriptions
      title: MyFitnessPalScope
  securitySchemes:
    ManagementKey:
      type: apiKey
      in: header
      name: X-Management-Key

````