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

### 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"
  }
}
```


## 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 (reserve upload)
      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.
                session_group_id:
                  type: string
                  format: uuid
                  description: >-
                    Identifies the capture group. If a session group row already
                    exists, it must match the organization and athlete. If
                    `configdata.source` is set and is not `api`, the session
                    group is not eligible for this endpoint.
                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 forwarded into session
                    `configdata.keyvaluepairs`.
                movement_attributes:
                  type: object
                  required:
                    - activity
                    - movement
                  properties:
                    activity:
                      type: string
                      maxLength: 128
                      description: >-
                        Activity label; combined with `movement` for protocol
                        and dimension validation.
                    movement:
                      type: string
                      maxLength: 128
                      description: >-
                        Movement label; combined with `activity` for protocol
                        and dimension validation.
                  additionalProperties:
                    type: string
                  description: >-
                    Additional keys are movement dimensions validated against
                    published protocol dimension mappings.
                file_name:
                  type: string
                  maxLength: 255
                  description: >-
                    Video file name; must not contain `/` or `\\`. Must use a
                    `.mov` extension (case-insensitive). If omitted or blank
                    after processing, the request fails with 400.
                capture_time:
                  type: string
                  format: date-time
                  description: >-
                    ISO 8601 capture time; must not be in the future. Used as
                    session create time when reserving; 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/session 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/BadRequest'
        '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: >-
                  The organization does not have an execution user configured
                  for captures.
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
components:
  responses:
    BadRequest:
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: BadRequest
            message: >-
              The request parameters are invalid. Please review the request and
              try again.
    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.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````