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

# Add User To Team

> Add a user to a team with the specified role.

If the person has no Aspect account yet, they're invited by email.

Requirements:
- Requires FULL_ACCESS on the team
- Cannot set team permissions for workspace owners (they always have full access)
- Someone new to the workspace also joins it as a member, which takes a seat; only a
  workspace owner's add can buy that seat (`purchase_seat`)

Role must be a team role other than `no_access`: full_access, editor, commenter, downloader, viewer



## OpenAPI

````yaml /api-reference/openapi.json post /teams/{team_id}/users
openapi: 3.1.0
info:
  title: Aspect API
  description: Manage and search media in Aspect.
  version: 1.0.0
servers:
  - url: https://api.aspect.inc
security:
  - ApiKeyAuth: []
tags:
  - name: Users
  - name: API Keys
  - name: Workspaces
  - name: Teams
  - name: Directories
  - name: Assets
  - name: Attachments
  - name: Filesystem Items
  - name: Collections
  - name: Canvases
  - name: Comments
  - name: Search
  - name: Transcription
  - name: Metadata
  - name: Shares
  - name: Share Templates
  - name: Watermarks
paths:
  /teams/{team_id}/users:
    post:
      tags:
        - Teams
      summary: Add User To Team
      description: >-
        Add a user to a team with the specified role.


        If the person has no Aspect account yet, they're invited by email.


        Requirements:

        - Requires FULL_ACCESS on the team

        - Cannot set team permissions for workspace owners (they always have
        full access)

        - Someone new to the workspace also joins it as a member, which takes a
        seat; only a
          workspace owner's add can buy that seat (`purchase_seat`)

        Role must be a team role other than `no_access`: full_access, editor,
        commenter, downloader, viewer
      operationId: add_user_to_team
      parameters:
        - 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/TeamAddUserRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamUserResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TeamAddUserRequest:
      properties:
        email:
          type: string
          title: Email
          description: Email of the user to add to team
        role:
          $ref: '#/components/schemas/TeamRole'
          description: The person's role on the team. `no_access` is rejected.
          default: editor
        purchase_seat:
          type: boolean
          title: Purchase Seat
          description: >-
            Buy a seat if none is free (prorated, charged now). Ignored when a
            seat is free. Only when the person is new to the workspace and
            you're a workspace admin.
          default: false
      type: object
      required:
        - email
      title: TeamAddUserRequest
      description: >-
        Add a person to a team. If the email has no Aspect account yet, the
        person is invited.
    TeamUserResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: User ID
        first_name:
          type: string
          title: First Name
          description: User's first name
        last_name:
          type: string
          title: Last Name
          description: User's last name
        email:
          type: string
          title: Email
          description: User's email address
        avatar_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Avatar Url
          description: User's avatar URL
        role:
          $ref: '#/components/schemas/TeamRole'
          description: User's effective role on this team
        workspace_role:
          $ref: '#/components/schemas/WorkspaceRole'
          description: User's workspace role
        has_explicit_permission:
          type: boolean
          title: Has Explicit Permission
          description: >-
            True when the person was added to this team. False for workspace
            owners, who have full access to every team.
      type: object
      required:
        - id
        - first_name
        - last_name
        - email
        - role
        - workspace_role
        - has_explicit_permission
      title: TeamUserResponse
      description: API response schema for a user with team access.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TeamRole:
      type: string
      enum:
        - full_access
        - editor
        - commenter
        - downloader
        - viewer
        - no_access
      title: TeamRole
      description: Role on a team.
    WorkspaceRole:
      type: string
      enum:
        - owner
        - member
        - member_limited
      title: WorkspaceRole
      description: >-
        Role in a workspace. `member_limited` is deprecated: it is accepted as
        `member` and never returned.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.