> ## 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.

# Assign a staff member to a student

> Adds a staff association for an existing student: the staff member
gets the student on their caseload with the given `caseloadType`
(for example `TEACHER_OF_RECORD`), as if a district admin added it
in Scout. Use it after staff approve an enrollment submission.

Both ids are Scout ids. A student's id is the `sourcedId` of its
OneRoster `students` record; a staff member's id is the `sourcedId`
of its OneRoster `teachers` or `users` record.

`startedAt` defaults to now. A student can have only one teacher of
record at a time, and can't be added twice to the same staff
member's caseload of one type; both return `400`.

Requires the `student-staff-associations` scope.




## OpenAPI

````yaml /api-reference/openapi.json post /student/{studentId}/staff-associations
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: []
tags:
  - name: Access tokens
  - name: Attendance
  - name: Enrollment invitations
  - name: Enrollment submissions
  - name: Master agreements
  - name: Staff associations
  - name: OneRoster 1.1
  - name: OneRoster 1.2
paths:
  /student/{studentId}/staff-associations:
    post:
      tags:
        - Staff associations
      summary: Assign a staff member to a student
      description: |
        Adds a staff association for an existing student: the staff member
        gets the student on their caseload with the given `caseloadType`
        (for example `TEACHER_OF_RECORD`), as if a district admin added it
        in Scout. Use it after staff approve an enrollment submission.

        Both ids are Scout ids. A student's id is the `sourcedId` of its
        OneRoster `students` record; a staff member's id is the `sourcedId`
        of its OneRoster `teachers` or `users` record.

        `startedAt` defaults to now. A student can have only one teacher of
        record at a time, and can't be added twice to the same staff
        member's caseload of one type; both return `400`.

        Requires the `student-staff-associations` scope.
      parameters:
        - name: studentId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                staffMemberId:
                  type: string
                  description: The staff member's Scout id.
                caseloadType:
                  $ref: '#/components/schemas/CaseloadType'
                startedAt:
                  type: string
                  format: date-time
                  description: When the association starts. Defaults to now.
              required:
                - staffMemberId
                - caseloadType
      responses:
        '201':
          description: The staff association was added.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                required:
                  - success
        '400':
          description: >-
            Invalid body (unknown `caseloadType`, missing `staffMemberId`, bad
            `startedAt`), the student already has a teacher of record, or the
            student is already on this staff member's caseload of this type.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 400
                  message:
                    type: string
        '403':
          description: Not an API token, or missing the `student-staff-associations` scope.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 403
                  message:
                    type: string
        '404':
          description: No student or staff member with that id.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                    example: 404
                  message:
                    type: string
      security:
        - accessToken: []
components:
  schemas:
    CaseloadType:
      type: string
      description: >-
        One of the [Caseload type](/api-reference/code-sets/caseload-type)
        values.
  securitySchemes:
    accessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Bearer access token from `POST /oauth/token` (OAuth 2.0 client
        credentials; the OneRoster `/ims/oneroster/v1p1/token` and `/v1p2/token`
        URLs are aliases). Send it as `Authorization: Bearer <access_token>`.
        Tokens expire after 1 hour and carry your API client's granted scopes —
        an endpoint outside them returns 403.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.