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

> Creates a new athlete within an organization. The user must provide at least the `first_name` field. Other standard attributes, while optional, are recommended. Any additional attributes that are not part of the predefined standard attributes should be included as `custom_attributes`.

### Custom Attributes

* **`custom_attributes`** (object)
  * A set of user-defined key-value pairs for additional attributes.
  * **Key Format Rules:**
    * Must contain only alphanumeric characters, underscores (`_`), or dashes (`-`).
    * Must start with a letter or underscore.
    * Must avoid spaces and special characters (e.g., `@`, `#`, `$`, etc.).
    * Reserved keywords (e.g., `first_name`, `last_name`, `date_of_birth`, `email`, `height`, `weight`, and `DOB`) cannot be used as keys.
  * **Value:**
    * Must be a string.

### Example Request Body

```json theme={null}
{
  "first_name": "John",
  "last_name": "Doe",
  "date_of_birth": "1990-01-01",
  "email": "john.doe@example.com",
  "height": 70,
  "weight": 180,
  "custom_attributes": {
    "team": "Team A",
    "position": "left fielder"
  }
}
```


## OpenAPI

````yaml POST /athletes
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:
  /athletes:
    post:
      tags:
        - Athlete Management
      summary: Create Athlete in Organization
      description: >-
        Creates a new athlete within an organization. The user must provide at
        least the `first_name` field. Other standard attributes, while optional,
        are recommended. Any additional attributes that are not part of the
        predefined standard attributes should be included as
        `custom_attributes`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                first_name:
                  type: string
                  description: |-
                    The first name of the athlete.

                    **Note:** This is the minimum required field.
                last_name:
                  type: string
                  description: The last name of the athlete.
                date_of_birth:
                  type: string
                  description: >-
                    The date of birth of the athlete, formatted as
                    **_YYYY-MM-DD_**
                email:
                  type: string
                  description: The athlete's email address.
                phone:
                  type: string
                  description: The athlete's phone number.
                gender:
                  type: string
                  enum:
                    - male
                    - female
                    - non-binary
                    - prefer_not_to_say
                  description: >-
                    The athlete's gender. Allowed values: male, female,
                    non-binary, prefer_not_to_say.
                height:
                  type: integer
                  description: The height of the athlete, in inches.
                weight:
                  type: integer
                  description: The weight of the athlete, in pounds (lbs).
                dominant_arm:
                  type: string
                  enum:
                    - left
                    - right
                    - both
                  description: 'Dominant arm. Allowed values: left, right, both.'
                dominant_leg:
                  type: string
                  enum:
                    - left
                    - right
                    - both
                  description: 'Dominant leg. Allowed values: left, right, both.'
                activity:
                  type: string
                  enum:
                    - baseball
                    - softball
                    - tennis
                    - basketball
                    - golf
                  description: >-
                    Primary sport or activity. Allowed values: baseball,
                    softball, tennis, basketball, golf.
                positions:
                  type: array
                  items:
                    type: string
                  description: >-
                    Positions for the athlete's activity. Requires activity to
                    be set. baseball/softball: pitcher, catcher, first_base,
                    second_base, third_base, shortstop, left_field,
                    center_field, right_field, designated_hitter. basketball:
                    point_guard, shooting_guard, small_forward, power_forward,
                    center.
                competition_level:
                  type: string
                  enum:
                    - youth
                    - high_school
                    - college
                    - professional
                  description: >-
                    Competition level. Allowed values: youth, high_school,
                    college, professional.
                custom_attributes:
                  type: object
                  description: >-
                    A set of custom key-value attributes. _Keys_ must be
                    strings, and _values_ must also be strings.
                  additionalProperties:
                    type: string
              required:
                - first_name
      responses:
        '200':
          description: Athlete created successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  athlete:
                    $ref: '#/components/schemas/Athlete'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - bearerAuth: []
components:
  schemas:
    Athlete:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the athlete.
        first_name:
          type: string
          description: The first name of the athlete.
        last_name:
          type: string
          description: The last name of the athlete.
        date_of_birth:
          type: string
          format: date-time
          description: The date of birth of the athlete.
        email:
          type: string
          description: The athlete's email address.
        phone:
          type: string
          description: The athlete's phone number.
        gender:
          type: string
          enum:
            - male
            - female
            - non-binary
            - prefer_not_to_say
          description: >-
            The athlete's gender. Allowed values: male, female, non-binary,
            prefer_not_to_say.
        dominant_arm:
          type: string
          enum:
            - left
            - right
            - both
          description: 'Dominant arm. Allowed values: left, right, both.'
        dominant_leg:
          type: string
          enum:
            - left
            - right
            - both
          description: 'Dominant leg. Allowed values: left, right, both.'
        activity:
          type: string
          enum:
            - baseball
            - softball
            - tennis
            - basketball
            - golf
          description: >-
            Primary sport or activity. Allowed values: baseball, softball,
            tennis, basketball, golf.
        positions:
          type: array
          items:
            type: string
          description: >-
            Positions for the athlete's activity. Requires activity to be set.
            Allowed values depend on activity: baseball and softball: pitcher,
            catcher, first_base, second_base, third_base, shortstop, left_field,
            center_field, right_field, designated_hitter. basketball:
            point_guard, shooting_guard, small_forward, power_forward, center.
            tennis and golf have no positions.
        competition_level:
          type: string
          enum:
            - youth
            - high_school
            - college
            - professional
          description: >-
            Competition level. Allowed values: youth, high_school, college,
            professional.
        height:
          type: integer
          description: The height of the athlete, in inches.
        weight:
          type: integer
          description: The weight of the athlete, in pounds (lbs).
        custom_attributes:
          type: object
          description: >-
            A set of custom key-value attributes. Keys must be strings, and
            values must also be strings.
          additionalProperties:
            type: string
        created_at:
          type: string
          format: date-time
          description: The timestamp when the athlete record was created.
        updated_at:
          type: string
          format: date-time
          description: The timestamp when the athlete record was last updated.
    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 `; `.
  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.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````