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

# Send enrollment invitation via email

> Generate a guest access token and send it via email to allow a parent/guardian 
to complete the student enrollment form without requiring them to log in.

Supports both user authentication and API token authentication (admin).
For API token auth, first obtain a token via /ims/oneroster/v1p1/token endpoint.




## OpenAPI

````yaml /api-reference/openapi.json post /enrollment/invitations
openapi: 3.1.0
info:
  title: Scout API
  version: 1.0.0
  description: >-
    Programmatic access to Scout rostering data (IMS OneRoster 1.1 & 1.2) and
    related endpoints, authenticated with an API access token.
servers:
  - url: https://api.teachwithscout.com/v1
    description: Production
security: []
paths:
  /enrollment/invitations:
    post:
      summary: Send enrollment invitation via email
      description: >
        Generate a guest access token and send it via email to allow a
        parent/guardian 

        to complete the student enrollment form without requiring them to log
        in.


        Supports both user authentication and API token authentication (admin).

        For API token auth, first obtain a token via /ims/oneroster/v1p1/token
        endpoint.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                interestFormSubmissionId:
                  type: string
                email:
                  type: string
                  format: email
                  description: The email address to send the enrollment invitation to
                studentCount:
                  type: number
                  description: Number of students to create invitations for
                  default: 1
                schoolId:
                  type: string
                  description: The school ID to associate with this enrollment invitation
                learningCenterId:
                  type: string
                  nullable: true
                  description: >-
                    The learning center/campus ID to associate with this
                    enrollment invitation (optional)
                schoolYearId:
                  type: string
                  nullable: true
                  description: >-
                    The school year ID to associate with this enrollment
                    invitation (optional)
                scopes:
                  type: array
                  items:
                    type: string
                  description: The scopes to grant to the guest token
                  example:
                    - fillEnrollment
                sentByUserId:
                  type: string
                  description: >-
                    User ID to attribute the invitation to (required when using
                    API token auth)
              required:
                - email
                - scopes
                - schoolId
      responses:
        '200':
          description: Enrollment invitation sent successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Whether the email was sent successfully
                  message:
                    type: string
                    description: Success message
                required:
                  - success
                  - message
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message
                required:
                  - message
      security:
        - accessToken: []
components:
  securitySchemes:
    accessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer access token obtained from the OneRoster token endpoint. Send it
        as `Authorization: Bearer <access_token>` on every request. Tokens
        expire after 1 hour.

````