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

# Invite a Member



## OpenAPI

````yaml POST /members
openapi: 3.0.1
info:
  title: Payroll API
  description: A full flagged payroll api provided by Teal
  version: 1.0.0
servers:
  - url: https://api.sandbox.goteal.co
    description: Sandbox server for experiments
  - url: https://api.goteal.co
    description: Production server
security:
  - ApiKeyAuth: []
  - MemberBearerAuth: []
paths:
  /members:
    post:
      summary: >-
        Invites a member to be part of the team. The member will need to create
        their account if they don't exist.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InviteMemberRequest'
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Member'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/UnauthorizedApiKey'
components:
  schemas:
    InviteMemberRequest:
      type: object
      required:
        - email
        - role
      properties:
        email:
          type: string
          format: email
          example: john.smith@goteal.co
        role:
          type: string
          enum:
            - FullMember
          description: The Role of the Member
          items:
            type: string
          example: FullMember
    Member:
      type: object
      required:
        - email
        - role
        - status
        - mfa_status
      properties:
        email:
          type: string
          format: email
          example: john.smith@goteal.co
        role:
          type: string
          description: The Role of the Member
          items:
            type: string
          example: Owner
        name:
          type: string
          description: Names of the Member
          example: John Smith
        status:
          type: string
          description: the status of the Member
          enum:
            - unconfirmed
            - confirmed
            - archived
            - compromised
            - unknown
            - reset_required
            - force_change_password
            - external_provider
          readOnly: true
          example: unconfirmed
        mfa_status:
          type: string
          description: the status of the Member
          enum:
            - sms
            - email
            - disabled
          readOnly: true
          example: sms
    Error:
      required:
        - errors
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          description: An array of messages describing the errors
          example:
            - The request is missing the required field `name`
    Unauthorized:
      type: object
      properties:
        errors:
          type: string
          description: An array of messages describing the errors
          example:
            - No X-API-KEY header provided or wrong value
  responses:
    BadRequest:
      description: Bad request if one of the required parameters is missing
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnauthorizedApiKey:
      description: Unauthorized if the X-API-KEY is not provided or is wrong
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Unauthorized'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    MemberBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token for authentication. The token should be the one returned by
        the "/members/signin"

````