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

# Get the demographic for a user

> Returns the demographic record linked to the user identified by `{sourcedId}`. The path parameter is the **user's** `sourcedId` (the value used with `upsertUser` / `upsertStudent`), NOT the demographic record's own `sourcedId`. Returns 404 if no demographic exists for the user.




## OpenAPI

````yaml /openapi/learn-with-ai/platform-api.yaml get /rostering/1.0/users/{sourcedId}/demographics
openapi: 3.1.1
info:
  title: TimeBack Platform API
  description: >-
    RESTful API for the TimeBack Platform. Covers authentication, rostering,
    curriculum, insights, assessments, content grading, and more.
  version: 2026.09.10.1
servers:
  - url: https://platform.dev.timeback.com
    description: integration
security: []
tags:
  - name: Auth
    description: Authentication and authorization endpoints
  - name: Organizations
    description: Organizations module contains all endpoints around organization management
  - name: Applications
    description: Applications module contains all endpoints for managing LTI applications
  - name: Users
    description: >-
      Users module contains all endpoints around user creation, update and
      consultation
  - name: Students
    description: Students module contains all endpoints around student management
  - name: Demographics
    description: >-
      Demographics module contains all endpoints around demographics
      consultation
  - name: Consent
    description: >-
      Initiate and query TimeBack parental consent for a student, backed by an
      immutable audit trail.
  - name: Classes
    description: Classes module contains all endpoints around class management
  - name: Courses
    description: Courses module contains all endpoints around course management
  - name: Enrollments
    description: Enrollments module contains all endpoints around enrollment consultation
  - name: CASE
    description: Competency and Academic Standards Exchange (CASE) 1.1 API
  - name: Curriculum
    description: Curriculum module contains endpoints for managing curriculum data
  - name: Competency Track
    description: Competency track endpoints
  - name: Content Grading
    description: >-
      Registration and management of graders for free-response content items —
      bring-your-own external graders (Tier 2) and, once shipped,
      platform-managed grading prompts (Tier 1).
  - name: Caliper
    description: The Caliper module contains all endpoints around Caliper Analytics
  - name: Insights
    description: Coaching insights and session analytics endpoints
paths:
  /rostering/1.0/users/{sourcedId}/demographics:
    get:
      tags:
        - Demographics
      summary: Get the demographic for a user
      description: >
        Returns the demographic record linked to the user identified by
        `{sourcedId}`. The path parameter is the **user's** `sourcedId` (the
        value used with `upsertUser` / `upsertStudent`), NOT the demographic
        record's own `sourcedId`. Returns 404 if no demographic exists for the
        user.
      operationId: getDemographicsForUser
      parameters:
        - name: sourcedId
          in: path
          description: >-
            User ID (the user's sourcedId, not the demographic record's own
            sourcedId)
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/fields2'
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  demographics:
                    $ref: '#/components/schemas/OneRosterDemographicOutput'
        '400':
          $ref: '#/components/responses/BadRequest17'
        '404':
          description: Demographic not found for the given user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/imsxStatusInfoDType11'
              examples:
                default:
                  value:
                    imsx_codeMajor: failure
                    imsx_severity: error
                    imsx_description: Demographic not found
                    imsx_CodeMinor:
                      imsx_codeMinorField:
                        - imsx_codeMinorFieldName: TargetEndSystem
                          imsx_codeMinorFieldValue: unknownobject
        '500':
          $ref: '#/components/responses/InternalError16'
      security:
        - CognitoUserPoolAuthorizer:
            - https://purl.imsglobal.org/spec/or/v1p2/scope/roster.readonly
            - >-
              https://purl.imsglobal.org/spec/or/v1p2/scope/roster-demographics.readonly
components:
  parameters:
    fields2:
      name: fields
      in: query
      description: >
        Comma-separated list of fields to include in the response.

        Available fields: sourcedId, status, dateLastModified, username,
        enabledUser, givenName, familyName, middleName, email, phone, sms,
        identifier, roles, grades, agents, userIds, userMasterIdentifier,
        preferredFirstName, preferredMiddleName, preferredLastName,
        primaryOrg.sourcedId, primaryOrg.type, userProfiles,
        userProfiles.profileId, userProfiles.profileType, userProfiles.vendorId,
        userProfiles.applicationId
      required: false
      schema:
        type: string
      style: form
      explode: false
  schemas:
    OneRosterDemographicOutput:
      type: object
      properties:
        sourcedId:
          type: string
          description: Unique identifier for the demographic
        status:
          $ref: '#/components/schemas/EntityStatus'
        dateLastModified:
          type: string
          format: date-time
          description: Timestamp of when the demographic was last modified
        metadata:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: Additional metadata associated with the demographic
        birthDate:
          type:
            - string
            - 'null'
          format: date
          description: Birth date of the person
        sex:
          type:
            - string
            - 'null'
          enum:
            - male
            - female
            - other
            - unspecified
          description: Sex of the person
        americanIndianOrAlaskaNative:
          description: Whether the person identifies as American Indian or Alaska Native
          anyOf:
            - $ref: '#/components/schemas/OneRosterBooleanString'
            - type: 'null'
        asian:
          description: Whether the person identifies as Asian
          anyOf:
            - $ref: '#/components/schemas/OneRosterBooleanString'
            - type: 'null'
        blackOrAfricanAmerican:
          description: Whether the person identifies as Black or African American
          anyOf:
            - $ref: '#/components/schemas/OneRosterBooleanString'
            - type: 'null'
        nativeHawaiianOrOtherPacificIslander:
          description: >-
            Whether the person identifies as Native Hawaiian or Other Pacific
            Islander
          anyOf:
            - $ref: '#/components/schemas/OneRosterBooleanString'
            - type: 'null'
        white:
          description: Whether the person identifies as White
          anyOf:
            - $ref: '#/components/schemas/OneRosterBooleanString'
            - type: 'null'
        demographicRaceTwoOrMoreRaces:
          description: Whether the person identifies as two or more races
          anyOf:
            - $ref: '#/components/schemas/OneRosterBooleanString'
            - type: 'null'
        hispanicOrLatinoEthnicity:
          description: Whether the person identifies as Hispanic or Latino
          anyOf:
            - $ref: '#/components/schemas/OneRosterBooleanString'
            - type: 'null'
        countryOfBirthCode:
          type:
            - string
            - 'null'
          description: Country of birth code
        stateOfBirthAbbreviation:
          type:
            - string
            - 'null'
          description: State of birth abbreviation
        cityOfBirth:
          type:
            - string
            - 'null'
          description: City of birth
        publicSchoolResidenceStatus:
          type:
            - string
            - 'null'
          description: Public school residence status
      required:
        - sourcedId
        - status
        - dateLastModified
    imsxStatusInfoDType11:
      description: >
        This is the container for the status code and associated information
        returned within the HTTP messages received from the Service Provider.
        For the OneRoster Rostering service this object will only be returned to
        provide information about a failed request i.e. it will NOT be in the
        payload for a successful request.
      type: object
      required:
        - imsx_codeMajor
        - imsx_severity
      properties:
        imsx_codeMajor:
          description: |
            The code major value (from the corresponding enumerated vocabulary).
          type: string
          enum:
            - success
            - processing
            - failure
            - unsupported
        imsx_severity:
          description: |
            The severity value (from the corresponding enumerated vocabulary).
          type: string
          enum:
            - status
            - warning
            - error
        imsx_description:
          description: >-
            A human readable description supplied by the entity creating the
            status code information.
          type: string
        imsx_CodeMinor:
          $ref: '#/components/schemas/imsxCodeMinorDType11'
      additionalProperties: false
    EntityStatus:
      type: string
      description: Status of an entity in the system
      enum:
        - active
        - tobedeleted
        - inactive
    OneRosterBooleanString:
      type: string
      enum:
        - 'true'
        - 'false'
      description: String representation of a boolean value as required by OneRoster spec
    imsxCodeMinorDType11:
      description: >
        This is the container for the set of code minor status codes reported in
        the responses from the Service Provider.
      type: object
      required:
        - imsx_codeMinorField
      properties:
        imsx_codeMinorField:
          description: |
            Each reported code minor status code.
          type: array
          minItems: 1
          items:
            $ref: '#/components/schemas/imsxCodeMinorFieldDType11'
      additionalProperties: false
    imsxCodeMinorFieldDType11:
      description: |
        This is the container for a single code minor status code.
      type: object
      required:
        - imsx_codeMinorFieldName
        - imsx_codeMinorFieldValue
      properties:
        imsx_codeMinorFieldName:
          description: >-
            This should contain the identity of the system that has produced the
            code minor status code report. In most cases this will be the target
            service provider denoted as 'TargetEndSystem'.
          type: string
          default: TargetEndSystem
        imsx_codeMinorFieldValue:
          description: >
            The code minor status code (this is a value from the corresponding
            enumerated vocabulary).
          type: string
          enum:
            - fullsuccess
            - invalid_filter_field
            - invalid_selection_field
            - invaliddata
            - unauthorisedrequest
            - forbidden
            - server_busy
            - unknownobject
            - internal_server_error
      additionalProperties: false
  responses:
    BadRequest17:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/imsxStatusInfoDType11'
          examples:
            invalidData:
              value:
                imsx_codeMajor: failure
                imsx_severity: error
                imsx_description: Invalid data provided
                imsx_CodeMinor:
                  imsx_codeMinorField:
                    - imsx_codeMinorFieldName: TargetEndSystem
                      imsx_codeMinorFieldValue: invaliddata
            invalidFilter:
              value:
                imsx_codeMajor: failure
                imsx_severity: error
                imsx_description: Invalid filter field
                imsx_CodeMinor:
                  imsx_codeMinorField:
                    - imsx_codeMinorFieldName: TargetEndSystem
                      imsx_codeMinorFieldValue: invalid_filter_field
    InternalError16:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/imsxStatusInfoDType11'
          examples:
            default:
              value:
                imsx_codeMajor: failure
                imsx_severity: error
                imsx_description: Internal server error
                imsx_CodeMinor:
                  imsx_codeMinorField:
                    - imsx_codeMinorFieldName: TargetEndSystem
                      imsx_codeMinorFieldValue: internal_server_error
  securitySchemes:
    CognitoUserPoolAuthorizer:
      type: oauth2
      description: >-
        OAuth 2.0 client credentials flow. Contact timeback@trilogy.com to
        request credentials for your application.
      flows:
        clientCredentials:
          tokenUrl: https://platform.dev.timeback.com/auth/1.0/token
          scopes:
            https://purl.imsglobal.org/spec/or/v1p2/scope/roster.readonly: roster readonly
            https://purl.imsglobal.org/spec/or/v1p2/scope/roster-core.readonly: roster-core readonly
            https://purl.imsglobal.org/spec/or/v1p2/scope/roster.createput: roster createput
            https://purl.imsglobal.org/spec/lti/v1p3/scope/lti.readonly: lti readonly
            https://purl.imsglobal.org/spec/or/v1p2/scope/roster-demographics.readonly: roster-demographics readonly
            https://timeback-platform.trilogy.com/consent/scope/consent.write: consent write
            https://timeback-platform.trilogy.com/consent/scope/consent.read: consent read
            https://purl.imsglobal.org/spec/or/v1p2/scope/roster-core.createput: roster-core createput
            https://purl.imsglobal.org/spec/or/v1p2/scope/roster.delete: roster delete
            https://purl.imsglobal.org/spec/or/v1p2/scope/roster-core.delete: roster-core delete
            https://purl.imsglobal.org/spec/case/v1p0/scope/case.readonly: case readonly
            https://purl.imsglobal.org/spec/case/v1p0/scope/case.createput: case createput
            https://purl.imsglobal.org/spec/case/v1p0/scope/case.delete: case delete
            https://timeback-platform.trilogy.com/competency-track/scope/competency-track.readonly: competency-track readonly
            https://timeback-platform.trilogy.com/competency-track/scope/competency-track.write: competency-track write
            https://timeback-platform.trilogy.com/competency-track/scope/competency-track.delete: competency-track delete
            https://timeback-platform.trilogy.com/content/scope/content.write: content write
            https://timeback-platform.trilogy.com/content/scope/content.read: content read
            https://purl.imsglobal.org/spec/caliper/v1p2/scope/events.write: events write
            https://purl.imsglobal.org/spec/caliper/v1p2/scope/events.readonly: events readonly
            https://timeback-platform.trilogy.com/webhooks/scope/webhooks.write: webhooks write
            https://timeback-platform.trilogy.com/webhooks/scope/webhooks.read: webhooks read
            https://timeback-platform.trilogy.com/webhooks/scope/webhooks.delete: webhooks delete

````