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

# Invite user

> Invite a new user to the app, creates user with pending status and sends invitation email



## OpenAPI

````yaml /swagger.json post /v1/{app_id}/users/invite
openapi: 3.0.1
info:
  title: Scute API
  version: v1
  description: API for managing users in Scute applications
servers:
  - url: https://{defaultHost}
    variables:
      defaultHost:
        default: api.scute.io
  - url: http://localhost:3333
    description: Development server
security:
  - apiSecret: []
    userAccess: []
paths:
  /v1/{app_id}/users/invite:
    parameters:
      - name: app_id
        in: path
        required: true
        description: App ID
        schema:
          type: string
    post:
      tags:
        - Users
      summary: Invite user
      description: >-
        Invite a new user to the app, creates user with pending status and sends
        invitation email
      operationId: inviteUser
      parameters: []
      responses:
        '200':
          description: successful
          content:
            application/json:
              schema:
                type: object
                properties:
                  user:
                    $ref: '#/components/schemas/AppUser'
                  user_meta_errors:
                    type: object
                    nullable: true
                    description: Validation errors for user metadata
        '400':
          description: bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '422':
          description: user already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
      security:
        - apiSecret: []
components:
  schemas:
    AppUser:
      type: object
      properties:
        id:
          type: string
          description: App user ID
          example: usr_1234567890
        app_id:
          type: string
          description: Application ID
        user_id:
          type: string
          description: Base user ID
        status:
          type: string
          enum:
            - active
            - pending
            - inactive
            - imported
          description: User status
        email:
          type: string
          format: email
          description: User email
          example: user@example.com
        phone:
          type: string
          description: User phone number
          example: '+1234567890'
        created_at:
          type: string
          format: date-time
          description: Creation timestamp
        updated_at:
          type: string
          format: date-time
          description: Last update timestamp
        user_meta:
          type: object
          description: User metadata object
          example:
            first_name: John
            last_name: Doe
            custom_field: value
      required:
        - id
        - app_id
        - user_id
        - status
  securitySchemes:
    apiSecret:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API Secret token
    userAccess:
      type: apiKey
      name: X-Authorization
      in: header
      description: User Access token

````