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

# Create Team



## OpenAPI

````yaml /openapi.json post /api/v1/teams
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/teams:
    post:
      tags:
        - Teams
      summary: Create Team
      operationId: create_team_api_v1_teams_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamCreateRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamDetailResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TeamCreateRequest:
      properties:
        team_type:
          type: string
          title: Team Type
          description: Team type slug, e.g. 'content-marketing-team'
        tier:
          type: string
          title: Tier
          description: Subscription tier
          default: starter
        display_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Name
          description: Custom display name (defaults to team definition name)
        trigger_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Trigger Mode
          description: '''strategy-driven'' (default) or ''content-driven'''
      type: object
      required:
        - team_type
      title: TeamCreateRequest
    TeamDetailResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        team_type:
          type: string
          title: Team Type
        display_name:
          type: string
          title: Display Name
        status:
          type: string
          title: Status
        workflow_phase:
          type: string
          title: Workflow Phase
          default: onboarding
        workflow_phase_label:
          type: string
          title: Workflow Phase Label
          default: Setting Up
        tier:
          type: string
          title: Tier
        operation_mode:
          type: string
          title: Operation Mode
        trigger_mode:
          type: string
          title: Trigger Mode
          default: strategy-driven
        default_currency:
          type: string
          title: Default Currency
          default: USD
        auto_config:
          additionalProperties: true
          type: object
          title: Auto Config
          default: {}
        orchestrator_cadence:
          additionalProperties: true
          type: object
          title: Orchestrator Cadence
          default: {}
        content_strategy:
          additionalProperties: true
          type: object
          title: Content Strategy
          default: {}
        stripe_subscription_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Stripe Subscription Id
        config:
          additionalProperties: true
          type: object
          title: Config
          default: {}
        onboarding_step:
          type: string
          title: Onboarding Step
          default: pending
        connected_accounts:
          items:
            type: string
          type: array
          title: Connected Accounts
          default: []
        brand_kit_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Brand Kit Id
        brand_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Brand Id
        brand_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Brand Name
        hired_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Hired At
        paused_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Paused At
        cancelled_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Cancelled At
        subscription_ends_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Subscription Ends At
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        members:
          items:
            $ref: '#/components/schemas/TeamMemberResponse'
          type: array
          title: Members
        recent_activity:
          items:
            $ref: '#/components/schemas/TeamAuditLogResponse'
          type: array
          title: Recent Activity
          default: []
        content_cadence:
          items:
            $ref: '#/components/schemas/CadenceStreamResponse'
          type: array
          title: Content Cadence
          default: []
        my_role:
          anyOf:
            - type: string
            - type: 'null'
          title: My Role
      type: object
      required:
        - id
        - team_type
        - display_name
        - status
        - tier
        - operation_mode
        - created_at
        - updated_at
        - members
      title: TeamDetailResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TeamMemberResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        role:
          type: string
          title: Role
        agent_slug:
          type: string
          title: Agent Slug
        display_name:
          type: string
          title: Display Name
        capabilities:
          items:
            type: string
          type: array
          title: Capabilities
        hired_agent_id:
          type: string
          format: uuid
          title: Hired Agent Id
        current_activity:
          additionalProperties: true
          type: object
          title: Current Activity
          default: {}
        persona_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Persona Name
          description: Derive persona_name from the hired_agent relationship.
          readOnly: true
        agent_classes:
          items:
            type: string
          type: array
          title: Agent Classes
          description: >-
            AgentClass taxonomy (analyst / creator / platform_specialist /

            orchestrator / evaluator) derived from the canonical class map.


            Surfaced in the API response so the frontend Office Space canvas

            can enforce the rule: Platform cards attach only to members

            classed ``platform_specialist``. Looking up via
            ``hired_agent.agent_type``

            rather than ``agent_slug`` because team-member slug can differ

            from the underlying agent_type (e.g. slug "blog-publisher" →

            agent_type "blog-specialist").
          readOnly: true
      type: object
      required:
        - id
        - role
        - agent_slug
        - display_name
        - capabilities
        - hired_agent_id
        - persona_name
        - agent_classes
      title: TeamMemberResponse
    TeamAuditLogResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        action_type:
          type: string
          title: Action Type
        description:
          type: string
          title: Description
        details:
          additionalProperties: true
          type: object
          title: Details
        source:
          type: string
          title: Source
        severity:
          type: string
          title: Severity
        member_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Member Id
        team_task_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Team Task Id
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - action_type
        - description
        - details
        - source
        - severity
        - member_id
        - team_task_id
        - created_at
      title: TeamAuditLogResponse
    CadenceStreamResponse:
      properties:
        label:
          type: string
          title: Label
        cadence:
          type: string
          title: Cadence
        schedule_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Schedule Type
        source_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Url
      type: object
      required:
        - label
        - cadence
      title: CadenceStreamResponse
      description: >-
        One human-readable Content-Cadence row for the Team Settings card.


        Derived read-time from the team's work loops (see

        ``app.services.cadence_display.derive_cadence_streams``) — NOT from the

        collapsed, load-bearing ``orchestrator_cadence`` dict. ``label`` is the

        loop name (plus a ``— Posts`` / ``— Guides`` source sub-label when two

        distribution loops share a name); ``cadence`` is the human cadence
        string

        ("Daily", "Every 3 days", "When triggered", …) — never a raw mode token.
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````