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

# Start today's session

> Start the session scheduled for today in the teammate's time zone, as planned, or rebuilt easier or harder and stored before it starts. Once the session has started, calling it again that day, with any effort, returns the existing started session. Returns 404 when no session is scheduled for today.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/teammates/{external_id}/sessions/today:start
openapi: 3.1.0
info:
  description: >-
    Send training events for your teammates and read back programs, body state
    and the reasons behind every change.
  title: TechnicallyFit Engine API
  version: 1.0.0
servers:
  - description: Production
    url: https://api.technicallyfit.com
  - description: Staging
    url: https://api-staging.technicallyfit.com
security:
  - ApiKey: []
tags:
  - name: Organization
  - name: Teammates
  - name: Events
  - name: Programs
  - name: Body state
  - name: Proposals
  - name: Webhooks
  - name: Locations
  - name: Insights
  - name: Reference
  - name: Sandbox
  - name: Attestations
paths:
  /v1/teammates/{external_id}/sessions/today:start:
    post:
      tags:
        - Programs
      summary: Start today's session
      description: >-
        Start the session scheduled for today in the teammate's time zone, as
        planned, or rebuilt easier or harder and stored before it starts. Once
        the session has started, calling it again that day, with any effort,
        returns the existing started session. Returns 404 when no session is
        scheduled for today.
      operationId: startTodaySession
      parameters:
        - description: Your own id for the teammate, or `@me` with a teammate token.
          in: path
          name: external_id
          required: true
          schema:
            maxLength: 255
            minLength: 1
            pattern: ^(?:@me|[A-Za-z0-9._:-]{1,255})$
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartTodaySessionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StartTodaySessionResponse'
          description: ''
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/RateLimitLimitDay'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/RateLimitRemainingDay'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Reset-Day:
              $ref: '#/components/headers/RateLimitResetDay'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/RateLimitLimitDay'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/RateLimitRemainingDay'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Reset-Day:
              $ref: '#/components/headers/RateLimitResetDay'
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/RateLimitLimitDay'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/RateLimitRemainingDay'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Reset-Day:
              $ref: '#/components/headers/RateLimitResetDay'
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/RateLimitLimitDay'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/RateLimitRemainingDay'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Reset-Day:
              $ref: '#/components/headers/RateLimitResetDay'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/RateLimitLimitDay'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/RateLimitRemainingDay'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Reset-Day:
              $ref: '#/components/headers/RateLimitResetDay'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/RateLimitLimitDay'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/RateLimitRemainingDay'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Reset-Day:
              $ref: '#/components/headers/RateLimitResetDay'
        '413':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/RateLimitLimitDay'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/RateLimitRemainingDay'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Reset-Day:
              $ref: '#/components/headers/RateLimitResetDay'
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/RateLimitLimitDay'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/RateLimitRemainingDay'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Reset-Day:
              $ref: '#/components/headers/RateLimitResetDay'
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/RateLimitLimitDay'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/RateLimitRemainingDay'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Reset-Day:
              $ref: '#/components/headers/RateLimitResetDay'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/RateLimitLimitDay'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/RateLimitRemainingDay'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Reset-Day:
              $ref: '#/components/headers/RateLimitResetDay'
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/RateLimitLimitDay'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/RateLimitRemainingDay'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Reset-Day:
              $ref: '#/components/headers/RateLimitResetDay'
        '504':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/RateLimitLimitDay'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/RateLimitRemainingDay'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Reset-Day:
              $ref: '#/components/headers/RateLimitResetDay'
        4XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/RateLimitLimitDay'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/RateLimitRemainingDay'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Reset-Day:
              $ref: '#/components/headers/RateLimitResetDay'
        5XX:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            X-RateLimit-Limit:
              $ref: '#/components/headers/RateLimitLimit'
            X-RateLimit-Limit-Day:
              $ref: '#/components/headers/RateLimitLimitDay'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/RateLimitRemaining'
            X-RateLimit-Remaining-Day:
              $ref: '#/components/headers/RateLimitRemainingDay'
            X-RateLimit-Reset:
              $ref: '#/components/headers/RateLimitReset'
            X-RateLimit-Reset-Day:
              $ref: '#/components/headers/RateLimitResetDay'
      security:
        - ApiKey: []
        - TeammateToken:
            - programs:write
components:
  schemas:
    StartTodaySessionRequest:
      additionalProperties: false
      properties:
        effort:
          default: as_planned
          description: >-
            How to start today's session. `as_planned` starts the stored
            session. `easier` and `harder` first rebuild today's session for
            that effort and store it, then start it. Once today's session has
            started, any later start that day returns the started session
            unchanged, whatever the effort. Defaults to `as_planned`.
          enum:
            - as_planned
            - easier
            - harder
          type: string
      type: object
    StartTodaySessionResponse:
      additionalProperties: false
      properties:
        date:
          description: Today in the teammate's time zone.
          format: date
          type: string
        effort:
          description: >-
            The effort the started session was stored with. When the session had
            already started, this is the effort it started with, not the one
            this call asked for.
          enum:
            - as_planned
            - easier
            - harder
          type: string
        engine_version:
          anyOf:
            - type: string
            - type: 'null'
        program_id:
          type: string
        revision:
          anyOf:
            - type: integer
            - type: 'null'
        session:
          additionalProperties: false
          properties:
            blocks:
              items:
                additionalProperties: false
                properties:
                  distance_meters:
                    anyOf:
                      - type: number
                      - type: 'null'
                  duration_seconds:
                    anyOf:
                      - type: number
                      - type: 'null'
                  effort_target:
                    anyOf:
                      - type: number
                      - type: 'null'
                  load:
                    anyOf:
                      - additionalProperties: false
                        properties:
                          unit:
                            enum:
                              - kg
                              - lb
                            type: string
                          value:
                            type: number
                        required:
                          - value
                          - unit
                        type: object
                      - type: 'null'
                  movement:
                    additionalProperties: false
                    properties:
                      id:
                        anyOf:
                          - type: string
                          - type: 'null'
                      name:
                        type: string
                    required:
                      - id
                      - name
                    type: object
                  notes:
                    anyOf:
                      - type: string
                      - type: 'null'
                  reps:
                    anyOf:
                      - type: string
                      - type: 'null'
                  rest_seconds:
                    anyOf:
                      - type: number
                      - type: 'null'
                  sets:
                    anyOf:
                      - type: integer
                      - type: 'null'
                required:
                  - movement
                  - sets
                  - reps
                  - duration_seconds
                  - distance_meters
                  - load
                  - effort_target
                  - rest_seconds
                  - notes
                type: object
              type: array
            day_index:
              anyOf:
                - type: integer
                - type: 'null'
            id:
              type: string
            title:
              anyOf:
                - type: string
                - type: 'null'
            week_number:
              type: integer
          required:
            - id
            - week_number
            - day_index
            - title
            - blocks
          type: object
        started_at:
          description: When this run of the session started, in UTC.
          format: date-time
          type: string
        time_zone:
          description: The IANA time zone the date was read in.
          type: string
      required:
        - date
        - time_zone
        - program_id
        - revision
        - engine_version
        - effort
        - started_at
        - session
      type: object
    Error:
      additionalProperties: false
      properties:
        error:
          additionalProperties: false
          properties:
            code:
              description: >-
                A stable code. Known values: invalid_request, unauthorized,
                forbidden, consent_required, plan_required,
                attestor_not_approved, not_found, conflict, payload_too_large,
                validation_failed, rate_limit_exceeded, internal_error,
                engine_unavailable. More codes may be added, so handle one you
                do not know.
              type: string
              x-known-values:
                - invalid_request
                - unauthorized
                - forbidden
                - consent_required
                - plan_required
                - attestor_not_approved
                - not_found
                - conflict
                - payload_too_large
                - validation_failed
                - rate_limit_exceeded
                - internal_error
                - engine_unavailable
            details:
              additionalProperties:
                description: 'contract: open'
              type: object
            message:
              description: A sentence a person can read.
              type: string
            request_id:
              description: >-
                Equals the X-Request-ID response header. Send it to support with
                a question.
              type: string
          required:
            - code
            - message
            - request_id
            - details
          type: object
      required:
        - error
      type: object
  headers:
    RateLimitLimit:
      description: How many requests this key may make in one minute.
      schema:
        minimum: 0
        type: integer
    RateLimitLimitDay:
      description: How many requests this key may make in one UTC day.
      schema:
        minimum: 0
        type: integer
    RateLimitRemaining:
      description: How many requests this key has left in the current minute.
      schema:
        minimum: 0
        type: integer
    RateLimitRemainingDay:
      description: How many requests this key has left in the current UTC day.
      schema:
        minimum: 0
        type: integer
    RateLimitReset:
      description: When the current minute ends, in seconds since the Unix epoch.
      schema:
        minimum: 0
        type: integer
    RateLimitResetDay:
      description: The next UTC midnight, in seconds since the Unix epoch.
      schema:
        minimum: 0
        type: integer
    RetryAfter:
      description: How many seconds to wait before sending the request again.
      schema:
        minimum: 0
        type: integer
  securitySchemes:
    ApiKey:
      in: header
      name: X-API-Key
      type: apiKey
    TeammateToken:
      description: >-
        A member app signs one teammate in with PKCE and calls the operations
        that accept this token, addressing the teammate as `@me`. Never ship an
        organization key in an app.
      flows:
        authorizationCode:
          authorizationUrl: https://api.technicallyfit.com/oauth/authorize
          refreshUrl: https://api.technicallyfit.com/oauth/token
          scopes:
            body_state:read: Read the teammate's body state.
            events:write: Send the teammate's own events.
            locations:read: Read the organization's locations and equipment.
            measurements:write: Send the teammate's own measurements.
            programs:read: Read the teammate's session, programs and revisions.
            programs:write: Set the teammate's goal and build programs.
            reference:read: Read reference data such as exercises.
            teammates:read: Read the signed-in teammate and set their time zone.
          tokenUrl: https://api.technicallyfit.com/oauth/token
      type: oauth2

````

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