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

# Invite Team Member

> Invites a member to the current team by email. The member starts with `pending` status until they accept. If the email isn't a registered user yet, an account is created for them. Owner cannot be assigned via the API.

**Side effect:** the invitee is sent an invitation email.



## OpenAPI

````yaml /openapi.json post /api/v1/team/members
openapi: 3.1.0
info:
  title: Surfacd Public API
  version: 1.0.0
  description: >-
    Public API for Surfacd. Team-scoped operations live under
    `/api/v1/team/...`; project collections live under `/api/v1/projects`;
    project-scoped operations live under `/api/v1/projects/{project}/...`. All
    endpoints require a Bearer team API key created in Team Settings. The API
    key selects the team for team-level and collection endpoints.
servers:
  - url: https://app.surfacd.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: Project management endpoints. Reads only in this version.
  - name: Prompts
    description: Prompt management endpoints. Reads only in this version.
  - name: Team
    description: Team settings and plan details for the current team.
  - name: Reporting
    description: >-
      Read-only reporting endpoints for projects (brand rankings, mentions,
      visibility, matrix analysis, source data).
  - name: Reference
    description: Reference data used by create, update, and reporting filters.
  - name: Tags
    description: Project tag management endpoints.
paths:
  /api/v1/team/members:
    post:
      tags:
        - Team
      summary: Invite Team Member
      description: >-
        Invites a member to the current team by email. The member starts with
        `pending` status until they accept. If the email isn't a registered user
        yet, an account is created for them. Owner cannot be assigned via the
        API.


        **Side effect:** the invitee is sent an invitation email.
      operationId: v1TeamMembersStore
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteMemberRequest'
      responses:
        '201':
          description: The invited member.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamMember'
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  schemas:
    InviteMemberRequest:
      type: object
      properties:
        email:
          type: string
          format: email
          maxLength: 255
        name:
          type: string
          minLength: 2
          maxLength: 255
        role:
          $ref: '#/components/schemas/AssignableTeamRole'
      required:
        - email
        - name
        - role
    TeamMember:
      type: object
      properties:
        email:
          type: string
          format: email
        name:
          type: string
        role:
          $ref: '#/components/schemas/TeamRole'
        status:
          type: string
          enum:
            - active
            - pending
          description: '`pending` until the member accepts their invitation.'
      required:
        - email
        - name
        - role
        - status
    AssignableTeamRole:
      type: string
      enum:
        - admin
        - member
        - viewer
      description: >-
        Roles assignable via the API. `owner` is excluded — ownership is managed
        through a separate transfer flow.
    TeamRole:
      type: string
      enum:
        - owner
        - admin
        - member
        - viewer
    ValidationError:
      type: object
      description: Returned when one or more request parameters fail validation.
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - message
        - errors
  responses:
    ValidationError:
      description: Validation failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token
      description: >-
        Team API key created in Team Settings. Use it with URLs for the same
        team.

````