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

# Create a workout



## OpenAPI

````yaml post /api/public/workouts
openapi: 3.0.0
info:
  title: WodUp Public API
  version: '0.1'
servers:
  - description: Development / testing server
    url: https://api.wodup.dev
    variables: {}
security:
  - authorization: []
tags: []
paths:
  /api/public/workouts:
    post:
      tags:
        - workouts
      summary: Create a workout
      operationId: WodUpWeb.PublicApi.WorkoutController.create
      parameters:
        - description: |
            **Only used by platform integrations**  
            ID of gym to execute on behalf of
          example: gym_123abc
          in: header
          name: wodup-gym
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWorkoutRequest'
        description: Workout parameters
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkoutResponse'
          description: Workout
      callbacks: {}
components:
  schemas:
    CreateWorkoutRequest:
      description: POST body for creating a workout
      example:
        details:
          movements:
            - id: mv_fT0m3viH
              load: null
              reps: '5'
          rest:
            type: as_needed
          type: Strength
        type: Strength
      properties:
        details:
          description: |
            [View details](../workouts/types)
          format: json
          type: string
        type:
          description: Workout type
          enum:
            - Amrap
            - Cardio
            - CardioIntervals
            - DeathBy
            - Emom
            - Fgb
            - ForTime
            - FranStyle
            - Generic
            - MaxReps
            - RoundsForTime
            - Strength
            - Tabata
            - TwelveDays
            - WarmUp
          type: string
      required:
        - type
        - details
      title: CreateWorkoutRequest
      type: object
    WorkoutResponse:
      allOf:
        - $ref: '#/components/schemas/Workout'
      example:
        description: Back Squat 5 reps
        details:
          movements:
            - id: mv_fT0m3viH
              load: null
              reps: '5'
          rest:
            type: as_needed
          type: Strength
        movements:
          - complex_details: null
            description: null
            has_calories: false
            has_distance: false
            has_duration: false
            has_height: false
            has_load: true
            has_power: false
            has_reps: true
            id: mv_fT0m3viH
            name: Back Squat
            source: wodup
            video:
              id: dQw4w9WgXcQ
              service: youtube
        name: null
        type: Strength
      title: WorkoutResponse
      type: object
    Workout:
      description: Workout object
      example:
        description: Back Squat 5 reps
        details:
          movements:
            - id: mv_fT0m3viH
              load: null
              reps: '5'
          rest:
            type: as_needed
          type: Strength
        movements:
          - complex_details: null
            description: null
            has_calories: false
            has_distance: false
            has_duration: false
            has_height: false
            has_load: true
            has_power: false
            has_reps: true
            id: mv_fT0m3viH
            name: Back Squat
            source: wodup
            video:
              id: dQw4w9WgXcQ
              service: youtube
        name: null
        type: Strength
      properties:
        description:
          description: A human readable description of the workout
          type: string
        details:
          description: '[View details](./types)'
          format: json
          type: string
        movements:
          description: Movement objects referenced by this workout
          items:
            $ref: '#/components/schemas/Movement'
          type: array
        name:
          description: An official name for the workout
          type: string
        type:
          description: Workout type
          enum:
            - Amrap
            - Cardio
            - CardioIntervals
            - DeathBy
            - Emom
            - Fgb
            - ForTime
            - FranStyle
            - Generic
            - MaxReps
            - RoundsForTime
            - Strength
            - Tabata
            - TwelveDays
            - WarmUp
          type: string
      required:
        - type
        - description
        - details
        - movements
      title: Workout
      type: object
    Movement:
      description: Movement object
      properties:
        complex_details:
          description: Movements in this complex
          items:
            properties:
              movement_id:
                description: Movement id
                type: string
              reps:
                description: Number of reps to perform
                type: integer
            required:
              - movement_id
              - reps
            type: object
          type: array
        description:
          description: Movement instructions / description
          type: string
        has_calories:
          description: Does this movement involve calories. E.g. Row
          type: boolean
        has_distance:
          description: Does this movement involve distance. E.g. Row
          type: boolean
        has_duration:
          description: Does this movement involve duration. E.g. Row or Weighted Plank Hold
          type: boolean
        has_height:
          description: Does this movement involve height. E.g. Box Jumps
          type: boolean
        has_load:
          description: >-
            Does this movement involve load. E.g. Back Squat or Weighted Plank
            Hold
          type: boolean
        has_power:
          description: Does this movement involve power. E.g. Row
          type: boolean
        has_reps:
          description: Does this movement involve reps. E.g. Push-Up or Back Squat
          type: boolean
        id:
          description: Movement ID
          type: string
        name:
          description: Movement name
          type: string
        source:
          description: >-
            Whether this movement is from the global WodUp library or a custom
            movement
          enum:
            - wodup
            - custom
          type: string
        video:
          properties:
            id:
              description: Video id
              type: string
            service:
              description: Video service
              enum:
                - vimeo
                - youtube
              type: string
          required:
            - id
            - service
          type: object
      title: Movement
      type: object
  securitySchemes:
    authorization:
      scheme: basic
      type: http

````