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

# Assign an interviewer to teams

> Assign this interviewer to one or more teams and return the resulting set of assigned teams. Every team ID is validated before anything is written, so an unknown ID assigns nothing and returns 400. Re-assigning a team the interviewer already belongs to is a no-op.

Note: assigning an interviewer to any team restricts dashboard visibility to members of those teams. An interviewer with no team is visible to the whole workspace.



## OpenAPI

````yaml https://api.heymilo.ai/openapi.json post /api/v2/postings/{posting_id}/teams
openapi: 3.1.0
info:
  title: HeyMilo Public API
  description: >-
    External developer-facing API for HeyMilo. Create interviewers with agentic
    workflows, ingest candidates, retrieve interview results, and manage
    workspace resources.
  version: 2.0.0
servers:
  - url: https://api.heymilo.ai
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Interviewers
    description: >-
      Create, read, update, and manage interviewers. An interviewer (posting)
      combines job details with an AI agent configuration and agentic workflow.
  - name: Candidates
    description: >-
      Ingest candidates into an interviewer's workflow (sync or async, single or
      bulk) and list candidates with their progress.
  - name: Interviews
    description: >-
      Retrieve full interview results (scorecard, transcript, resume evaluation)
      and manage per-interview metadata.
  - name: Webhooks
    description: >-
      Register, list, and manage webhook endpoints that receive real-time event
      notifications.
  - name: Voices
    description: Browse the workspace voice registry for AI interviewer voices.
  - name: Phone Numbers
    description: List provisioned phone numbers for SMS and voice agents.
  - name: Sender Emails
    description: Manage sender email addresses used for candidate communications.
  - name: Email Templates
    description: View email templates configured for candidate outreach.
  - name: Email Template Groups
    description: View grouped email template configurations.
  - name: Design Templates
    description: View design templates that control the candidate interview UI.
  - name: Design Template Groups
    description: View grouped design template configurations.
  - name: Interview Templates
    description: >-
      View interview templates, reusable agent configurations cloned from a
      blueprint posting (workflow, questions, criteria, agent settings).
  - name: Domains
    description: Manage custom domains for white-labelled interview URLs.
  - name: Questions
    description: >-
      Create, read, update, delete, and reorder questions and criteria for an
      interviewer's workflow. Covers all modalities: voice, sms, form,
      resume_eligibility, resume_scoring, and voice_tags.
  - name: Workspaces
    description: >-
      List the workspaces accessible to the authenticated caller. API-key
      callers receive a single entry; OAuth callers receive every workspace they
      are a member of.
  - name: Teams
    description: >-
      List workspace teams and manage which teams an interviewer belongs to.
      Interviewers can also be assigned at creation time via ``team_ids`` on the
      create-interviewer request. Requires the Teams feature to be enabled for
      the workspace.
paths:
  /api/v2/postings/{posting_id}/teams:
    post:
      tags:
        - Teams
      summary: Assign an interviewer to teams
      description: >-
        Assign this interviewer to one or more teams and return the resulting
        set of assigned teams. Every team ID is validated before anything is
        written, so an unknown ID assigns nothing and returns 400. Re-assigning
        a team the interviewer already belongs to is a no-op.


        Note: assigning an interviewer to any team restricts dashboard
        visibility to members of those teams. An interviewer with no team is
        visible to the whole workspace.
      operationId: assignInterviewerTeams
      parameters:
        - name: posting_id
          in: path
          required: true
          schema:
            type: string
            title: Posting Id
        - name: X-API-KEY
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
        - name: Authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: X-Workspace-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Workspace-Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AssignTeamsRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListResponse_PostingTeam_'
        '400':
          description: One or more team IDs are unknown for this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        '401':
          description: Invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        '403':
          description: Teams is not enabled for this workspace.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        '404':
          description: Resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
components:
  schemas:
    AssignTeamsRequest:
      properties:
        team_ids:
          items:
            type: string
          type: array
          minItems: 1
          title: Team Ids
          description: Team IDs to assign this interviewer to.
          examples:
            - - team_abc123
      type: object
      required:
        - team_ids
      title: AssignTeamsRequest
      description: Request body for assigning an interviewer to teams.
    ListResponse_PostingTeam_:
      properties:
        data:
          items:
            $ref: '#/components/schemas/PostingTeam'
          type: array
          title: Data
        pagination:
          $ref: '#/components/schemas/PaginationMeta'
      type: object
      required:
        - data
        - pagination
      title: ListResponse[PostingTeam]
    APIErrorResponse:
      properties:
        error:
          $ref: '#/components/schemas/APIError'
      type: object
      required:
        - error
      title: APIErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    PostingTeam:
      properties:
        object:
          type: string
          title: Object
          description: Object type identifier.
          default: posting_team
        team_id:
          type: string
          title: Team Id
          description: Unique team identifier.
          examples:
            - team_abc123
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Team name.
          examples:
            - Engineering
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Team description.
        assigned_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Assigned At
          description: Unix timestamp when the interviewer was assigned.
        assigned_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Assigned By
          description: >-
            Who created the assignment. For API-key callers this is
            'api_key:<key name>'.
      type: object
      required:
        - team_id
      title: PostingTeam
      description: A team an interviewer is assigned to.
    PaginationMeta:
      properties:
        has_more:
          type: boolean
          title: Has More
          description: Whether more results exist beyond this page
        total_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Count
          description: Total number of results (if available)
        url:
          anyOf:
            - type: string
            - type: 'null'
          title: Url
          description: URL of this resource
      type: object
      required:
        - has_more
      title: PaginationMeta
    APIError:
      properties:
        type:
          type: string
          title: Type
          description: Error category
          examples:
            - invalid_request_error
        code:
          type: string
          title: Code
          description: Machine-readable error code
          examples:
            - validation_error
        message:
          type: string
          title: Message
          description: Human-readable summary
          examples:
            - The request body failed validation
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
          description: Top-level parameter that caused the error
        doc_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Doc Url
          description: Link to relevant documentation
        errors:
          items:
            $ref: '#/components/schemas/APIErrorDetail'
          type: array
          title: Errors
          description: Detailed per-field validation errors
      type: object
      required:
        - type
        - code
        - message
      title: APIError
    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
    APIErrorDetail:
      properties:
        code:
          type: string
          title: Code
          description: Machine-readable error code
          examples:
            - invalid_param
        message:
          type: string
          title: Message
          description: Human-readable explanation
          examples:
            - title must be between 3 and 200 characters
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
          description: Parameter that caused the error
          examples:
            - title
      type: object
      required:
        - code
        - message
      title: APIErrorDetail
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
      description: API key for authentication. Pass your key in the X-API-KEY header.

````