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

# Create Capture

> Reserves server-side resources for a video and returns a pre-signed Amazon S3 POST upload target. The video is not stored until the client completes the S3 POST upload within the expiry window.

<Note>
  **Capture creation is an Enterprise feature.** Upload video directly through the API to run it through Uplift's movement analysis pipeline. [Contact Sales](mailto:sales@uplift.ai) to enable it for your organization.
</Note>

### Example Request Body

```json theme={null}
{
  "athlete_id": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "session_group_id": "11111111-2222-3333-4444-555555555555",
  "file_name": "swing-001.mov",
  "capture_time": "2026-05-13T12:00:00.000Z",
  "camera_configuration": {
    "camera_setup_selection": "single.down_the_line",
    "camera_orientation": "landscape"
  },
  "movement_attributes": {
    "activity": "golf",
    "movement": "full_swing"
  }
}
```

#### Movement dimensions

Optional movement dimension keys for each `activity` / `movement` pair can be included in `movement_attributes`. Valid values are validated by the API.

| Activity          | Movement                  | Dimensions                                        |
| ----------------- | ------------------------- | ------------------------------------------------- |
| `agility`         | `cutting`                 | `direction`                                       |
| `baseball`        | `hitting`                 | `bat_length`, `handedness`                        |
| `baseball`        | `pitching`                | `handedness`                                      |
| `basketball`      | `free_throw`              | `handedness`                                      |
| `basketball`      | `jump_shot`               | `handedness`                                      |
| `basketball`      | `layup`                   | `handedness`                                      |
| `golf`            | `swing`                   | `handedness`                                      |
| `jump`            | `broad`                   | `arm_position`                                    |
| `jump`            | `countermovement`         | `arm_position`                                    |
| `jump`            | `drop_vertical`           | `arm_position`                                    |
| `jump`            | `single_leg`              | `arm_position`, `footedness`                      |
| `jump`            | `single_leg_broad`        | `arm_position`, `footedness`                      |
| `jump`            | `squat`                   | `arm_position`                                    |
| `lunge`           | `forward`                 | `footedness`                                      |
| `lunge`           | `side`                    | `footedness`                                      |
| `range_of_motion` | `ankle_flexion`           | `body_position`, `footedness`                     |
| `range_of_motion` | `cervical_rotation`       | `direction`                                       |
| `range_of_motion` | `sfma_shoulder_extension` | `handedness`                                      |
| `range_of_motion` | `sfma_shoulder_flexion`   | `handedness`                                      |
| `range_of_motion` | `shoulder_9090`           | `handedness`                                      |
| `range_of_motion` | `shoulder_flexion`        | `handedness`                                      |
| `range_of_motion` | `t_spine_rotation`        | `handedness`                                      |
| `softball`        | `hitting`                 | `bat_length`, `handedness`                        |
| `softball`        | `pitching`                | `handedness`                                      |
| `squat`           | `single_leg`              | `footedness`                                      |
| `stability`       | `plank`                   | `plank_orientation`, `plank_position`             |
| `stability`       | `rotary`                  | `handedness`                                      |
| `stability`       | `single_leg_stance`       | `eyes`, `footedness`                              |
| `stability`       | `y_balance_lower_quarter` | `footedness`, `y_balance_lower_quarter_direction` |
| `stability`       | `y_balance_upper_quarter` | `handedness`, `y_balance_upper_quarter_direction` |
| `tennis`          | `backhand`                | `handedness`                                      |
| `tennis`          | `forehand`                | `handedness`                                      |
| `tennis`          | `overhand_serve`          | `handedness`, `overhand_serve_type`               |
| `tennis`          | `underhand_serve`         | `handedness`                                      |
| `track_and_field` | `discus`                  | `handedness`                                      |
| `track_and_field` | `shot_put`                | `handedness`                                      |

Pairs with **no** published movement dimensions (for example `gait/walking`, `squat/body_weight`) accept only `activity` and `movement` in `movement_attributes`.


## OpenAPI

````yaml POST /captures
openapi: 3.0.0
info:
  title: Uplift SQL API
  version: v1
  description: >-
    API for submitting SQL queries and retrieving job IDs for the Uplift
    platform.
servers:
  - url: https://api.uplift.ai/v1
security: []
paths:
  /captures:
    post:
      tags:
        - Captures
      summary: Create Capture in Organization
      description: >-
        Reserves server-side resources for a video and returns a pre-signed
        Amazon S3 POST upload target. The video is not stored until the client
        completes the S3 POST upload within the expiry window.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - athlete_id
                - session_group_id
                - camera_configuration
                - movement_attributes
                - file_name
              properties:
                athlete_id:
                  type: string
                  format: uuid
                  description: >-
                    UUID of an athlete that belongs to the same organization as
                    the API key. Returns 400 with `athlete_id not found` when
                    the athlete is missing or not in your organization.
                session_group_id:
                  type: string
                  format: uuid
                  description: >-
                    Identifies the capture group. If the group already exists,
                    it must belong to the same organization and athlete.
                camera_configuration:
                  type: object
                  required:
                    - camera_setup_selection
                  properties:
                    camera_setup_selection:
                      type: string
                      enum:
                        - single.front_on
                        - single.down_the_line
                      description: Camera setup preset for the capture.
                    camera_orientation:
                      type: string
                      enum:
                        - portrait
                        - landscape
                      description: Optional device orientation.
                  additionalProperties: true
                  description: >-
                    Additional keys are allowed and stored with the capture
                    configuration.
                movement_attributes:
                  type: object
                  required:
                    - activity
                    - movement
                  properties:
                    activity:
                      type: string
                      maxLength: 128
                      description: >-
                        Activity label; combined with `movement` for dimension
                        validation.
                    movement:
                      type: string
                      maxLength: 128
                      description: >-
                        Movement label; combined with `activity` for dimension
                        validation.
                  additionalProperties:
                    type: string
                  description: >-
                    Activity and movement labels plus optional movement
                    dimension keys for that pair. Validated against the
                    published catalog. See [Movement
                    dimensions](#movement-dimensions) for the per
                    activity/movement field catalog.
                file_name:
                  type: string
                  maxLength: 255
                  description: >-
                    Video file name; must not contain `/` or `\\`. Must use a
                    `.mov` or `.mp4` extension (case-insensitive). If omitted or
                    blank, the request fails with 400.
                capture_time:
                  type: string
                  format: date-time
                  description: >-
                    ISO 8601 capture time; must not be in the future. Defaults
                    to current server time if omitted.
      responses:
        '200':
          description: >-
            Reservation succeeded. POST the file to `upload_url` with all
            `upload_fields` before `upload_expires_at`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  session_id:
                    type: string
                    description: Capture identifier assigned for this reservation.
                  session_group_id:
                    type: string
                    description: Echo of the request `session_group_id`.
                  upload_url:
                    type: string
                    description: S3 endpoint URL for `multipart/form-data` POST.
                  upload_fields:
                    type: object
                    additionalProperties: true
                    description: >-
                      Form fields that must be included in the POST body exactly
                      as returned (policy, signature, `key`, `Content-Type`,
                      etc.).
                  upload_expires_at:
                    type: string
                    format: date-time
                    description: >-
                      When the pre-signed POST is no longer valid (30 minutes
                      after issuance).
                  status:
                    type: string
                    enum:
                      - NEW
                    description: Literal `NEW` while the capture awaits upload.
        '400':
          $ref: '#/components/responses/CaptureCreateBadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: Required capture configuration is missing for the organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error: NotFound
                message: Capture is not available for this organization.
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
components:
  responses:
    CaptureCreateBadRequest:
      description: >-
        Invalid request body, or `athlete_id` does not exist in the
        organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            validationError:
              summary: Invalid request body
              value:
                error: BadRequest
                messages: '"file_name" is required'
            athleteNotFound:
              summary: Unknown athlete_id
              value:
                error: BadRequest
                message: athlete_id not found
    Unauthorized:
      description: Unauthorized. Bearer token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
            message: Bearer token is missing or invalid.
    Forbidden:
      description: Forbidden. You do not have permission to access this resource.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Forbidden
            message: You do not have permission to access this resource.
    TooManyRequests:
      description: Too Many Requests. The rate limit has been exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: TooManyRequests
            message: The rate limit has been exceeded. Please wait and try again later.
    InternalServerError:
      description: Internal Server Error. Something went wrong on the server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: InternalServerError
            message: >-
              An unexpected error occurred on the server. Please try again
              later.
    ServiceUnavailable:
      description: Temporary upstream failure; retry shortly.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: ServiceUnavailable
            message: Temporary upstream video reservation issue. Please retry shortly.
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          description: A short error code representing the type of error.
        message:
          type: string
          description: A detailed message explaining the error.
        messages:
          type: string
          description: >-
            Create Capture only: validation detail. Multiple issues are joined
            with `; `.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````