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

# Create a new member | Comp AI API

> Adds a new member to the authenticated organization. The user must already exist in the system.



## OpenAPI

````yaml /openapi.json post /v1/people
openapi: 3.0.0
info:
  title: Comp AI API
  description: >-
    Compliance automation API for SOC 2, ISO 27001, HIPAA, GDPR, evidence
    collection, policy workflows, Trust Access, security questionnaires,
    integrations, cloud checks, and device compliance.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.trycomp.ai
    description: Production API Server
security: []
tags:
  - name: Attachments
    description: >-
      Generate signed download links for files attached to compliance tasks,
      comments, evidence records, and workflow reviews.
  - name: Audit Logs
    description: >-
      Retrieve audit trails for compliance activity, evidence changes, access
      decisions, and customer-facing security review workflows.
  - name: CloudSecurity
    description: >-
      Run AWS, Azure, and GCP cloud security scans, detect enabled services,
      review findings, and connect cloud posture results to compliance work.
    x-group: Cloud Security
  - name: Comments
    description: >-
      Create and manage collaboration comments on compliance entities such as
      tasks, policies, risks, vendors, and findings.
  - name: Context
    description: >-
      Manage organization context that helps Comp AI tailor policies,
      assessments, and compliance automation to the business.
  - name: Controls
    description: >-
      Manage controls, map them to policies, tasks, framework requirements, and
      evidence document types, and track implementation progress.
  - name: Device Agent
    description: >-
      Register employee devices, submit device compliance check-ins, download
      agent builds, and manage endpoint security status.
  - name: Devices
    description: >-
      Read and manage employee device inventory and Fleet compliance data used
      for endpoint security controls.
  - name: Evidence Export
    description: >-
      Export task evidence, automation evidence, and reviewer-ready evidence
      bundles as PDF or ZIP files.
  - name: Evidence Export (Auditor)
    description: Export all organization evidence for an auditor review package.
  - name: Evidence Forms
    description: >-
      Collect, review, upload, and export structured evidence submissions for
      compliance tasks and document requirements.
  - name: Findings
    description: >-
      Create, review, update, and track audit findings, remediation activity,
      and finding history for an organization.
  - name: Frameworks
    description: >-
      Manage SOC 2, ISO 27001, HIPAA, GDPR, and custom framework instances,
      requirements, scores, and sync history.
  - name: ISMS
  - name: Integrations
    description: >-
      Connect vendor systems, configure OAuth apps, run compliance checks, sync
      employees, manage variables, and collect automated evidence.
  - name: Knowledge Base
    description: >-
      Upload source documents, process them for retrieval, and manage reusable
      manual answers that power questionnaires and AI policy workflows.
  - name: Offboarding Checklist
  - name: Org Chart
    description: >-
      Manage organization chart metadata and evidence used for governance,
      accountability, and audit readiness.
  - name: Organization
    description: >-
      Manage organization profile data, API keys, logos, ownership, role
      notifications, and access approval settings.
  - name: People
    description: >-
      Invite and manage workforce members, training status, device compliance,
      email preferences, and employee evidence records.
  - name: Policies
    description: >-
      Create, version, publish, export, map, and improve compliance policies
      with AI-assisted drafting and approval workflows.
  - name: Questionnaire
    description: >-
      Parse security questionnaires, generate answers from approved evidence,
      save reviewer edits, stream progress, and export completed files.
  - name: Risks
    description: >-
      Create, update, and report on organizational risks with ownership,
      departments, and compliance remediation status.
  - name: Roles
    description: >-
      Create custom roles and resolve permission sets for organization-level
      access control.
  - name: SOA
    description: >-
      Create, auto-fill, review, approve, and export ISO 27001 Statement of
      Applicability documents.
    x-group: Statement of Applicability
  - name: Security Penetration Tests
    description: >-
      Create AI-powered penetration test runs, track progress, inspect findings
      and events, and download markdown or PDF reports.
  - name: Task Automations
    description: >-
      Create, version, run, and inspect automated evidence collection workflows
      attached to compliance tasks.
  - name: Task Management
    description: >-
      Manage task items and attachments linked to operational entities such as
      risks and vendors.
  - name: Tasks
    description: >-
      Manage compliance task lifecycle, assignments, review approvals, evidence
      uploads, policy links, and activity history.
  - name: Timelines
    description: >-
      Track audit and compliance readiness timelines, phases, and review
      milestones for an organization.
  - name: Training
    description: >-
      Record security awareness and HIPAA training completion status and
      generate completion certificates.
  - name: Trust Access
    description: >-
      Manage external Trust Center access requests, NDA signing, grants,
      tokenized document downloads, public FAQs, and reviewer access.
  - name: Trust Portal
    description: >-
      Configure the live Trust Center, custom domain, public overview, FAQs,
      compliance resources, documents, links, and vendor disclosures.
  - name: Uploads
  - name: Vendors
    description: >-
      Manage third-party vendors, global vendor search, risk assessment
      triggers, and Trust Center vendor visibility.
paths:
  /v1/people:
    post:
      tags:
        - People
      summary: Create a new member
      description: >-
        Adds a new member to the authenticated organization. The user must
        already exist in the system.
      operationId: PeopleController_createMember_v1
      parameters: []
      requestBody:
        required: true
        description: Member creation data
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePeopleDto'
      responses:
        '201':
          description: Member created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PeopleResponseDto'
              example:
                id: mem_abc123def456
                organizationId: org_abc123def456
                userId: usr_abc123def456
                role: admin
                createdAt: '2024-01-01T00:00:00Z'
                department: it
                isActive: true
                fleetDmLabelId: 123
                user:
                  id: usr_abc123def456
                  name: John Doe
                  email: john.doe@company.com
                  emailVerified: true
                  image: https://example.com/avatar.jpg
                  createdAt: '2024-01-01T00:00:00Z'
                  updatedAt: '2024-01-15T00:00:00Z'
                  lastLogin: '2024-01-15T12:00:00Z'
        '400':
          description: Bad Request - Invalid member data or user already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: >-
                      User user@example.com is already a member of this
                      organization
        '401':
          description: Unauthorized - Invalid authentication or insufficient permissions
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Unauthorized
        '404':
          description: Organization or user not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: User with ID usr_abc123def456 not found
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Failed to create member
      security:
        - apikey: []
components:
  schemas:
    CreatePeopleDto:
      type: object
      properties:
        userId:
          type: string
          description: User ID to associate with this member
          example: usr_abc123def456
        role:
          type: string
          description: Role for the member (built-in role name or custom role ID)
          example: admin
        department:
          type: string
          description: >-
            Member department. Built-in values: none, admin, gov, hr, it, itsm,
            qms. Custom department names are also accepted.
          example: it
          maxLength: 64
        isActive:
          type: boolean
          description: Whether member is active
          example: true
        fleetDmLabelId:
          type: number
          description: FleetDM label ID for member devices
          example: 123
        jobTitle:
          type: string
          description: Job title for the member
          example: Software Engineer
      required:
        - userId
        - role
    PeopleResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Member ID
          example: mem_abc123def456
        organizationId:
          type: string
          description: Organization ID this member belongs to
          example: org_abc123def456
        userId:
          type: string
          description: User ID associated with member
          example: usr_abc123def456
        role:
          type: string
          description: Member role
          example: admin
        createdAt:
          format: date-time
          type: string
          description: When the member was created
          example: '2024-01-01T00:00:00Z'
        department:
          type: string
          description: >-
            Member department. May be one of the built-in values (none, admin,
            gov, hr, it, itsm, qms) or a custom department name.
          example: it
        jobTitle:
          type: object
          description: Job title for the member
          example: Software Engineer
          nullable: true
        isActive:
          type: boolean
          description: Whether member is active
          example: true
        deactivated:
          type: boolean
          description: Whether member is deactivated
          example: false
        fleetDmLabelId:
          type: object
          description: FleetDM label ID for member devices
          example: 123
          nullable: true
        user:
          description: User information
          allOf:
            - $ref: '#/components/schemas/UserResponseDto'
        backgroundCheckRequests:
          description: Background check requests for this member
          type: array
          items:
            $ref: '#/components/schemas/BackgroundCheckSummaryDto'
      required:
        - id
        - organizationId
        - userId
        - role
        - createdAt
        - department
        - jobTitle
        - isActive
        - deactivated
        - fleetDmLabelId
        - user
    UserResponseDto:
      type: object
      properties:
        id:
          type: string
          description: User ID
          example: usr_abc123def456
        name:
          type: string
          description: User name
          example: John Doe
        email:
          type: string
          description: User email
          example: john.doe@company.com
        emailVerified:
          type: boolean
          description: Whether email is verified
          example: true
        image:
          type: object
          description: User profile image URL
          example: https://example.com/avatar.jpg
          nullable: true
        createdAt:
          format: date-time
          type: string
          description: When the user was created
          example: '2024-01-01T00:00:00Z'
        updatedAt:
          format: date-time
          type: string
          description: When the user was last updated
          example: '2024-01-15T00:00:00Z'
        lastLogin:
          type: object
          description: Last login time
          example: '2024-01-15T12:00:00Z'
          nullable: true
        role:
          type: object
          description: Platform role of the user (managed by Better Auth admin plugin)
          example: user
          nullable: true
      required:
        - id
        - name
        - email
        - emailVerified
        - image
        - createdAt
        - updatedAt
        - lastLogin
        - role
    BackgroundCheckSummaryDto:
      type: object
      properties:
        id:
          type: string
          description: Background check request ID
          example: bcr_abc123def456
        status:
          type: string
          description: Background check status
          enum:
            - invited
            - in_progress
            - in_review
            - completed
            - completed_with_flags
            - failed
            - cancelled
          example: invited
      required:
        - id
        - status
  securitySchemes:
    apikey:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````