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

# Update Settings

> ## Modify Your Settings

Update company configuration. Only include fields you want to change.

**Security notifications:**
Sensitive changes trigger email alerts:
- Email changes: notification sent to the old email address
- Password changes: confirmation to current email
- Live code changes: notification with old and new codes
- Webhook changes: notification about new configuration

**Personality options:**
Choose from 20+ personalities for scoring variety:
- `jaded_dev` - Cynical veteran who's seen every horror
- `caffeinated_genius` - 3am energy, connects everything to quantum mechanics
- `academic_rebel` - PhD dropout with street smarts
- `mad_scientist` - Chaos enthusiast who believes systems need more entropy
- Plus many more for maximum evaluation diversity

**Validation requirements:**
- Live codes: unique, 10+ characters, must start with digit
- Emails: unique and properly formatted
- Passwords: 10+ characters with confirmation
- Webhook URLs: valid HTTPS endpoints only
- Candidate limits: 1-4 attempts per email address




## OpenAPI

````yaml PATCH /settings
openapi: 3.0.3
info:
  title: Error Golf API - Where Code Goes to Die
  description: >
    # 🏌️ Error Golf API


    **Error Golf** replaces algorithmic tests with creative coding challenges
    that actually measure problem-solving skills.

    Companies pay $39 per candidate to discover if applicants can think
    creatively or just copy-paste from Stack Overflow.


    ## Business Model

    - **Setup Fee:** $49 one-time fee (because quality costs money)

    - **Per Candidate:** $39 each attempt (cheaper than a decent lunch)

    - **No Subscriptions:** We're not Netflix


    ## Golf Terminology

    - **Round:** Complete test (3 questions, like actual golf but with more
    crying)

    - **Hole:** Individual question (candidates pick 3 from 100 nightmares)

    - **Shot:** Solution attempt (usually involves existential crisis)

    - **Scorecard:** A roast of your code from 3 different personalities


    ## Authentication

    Protected endpoints need JWT Bearer token: `Bearer <your-digital-passport>`


    ## Error Responses

    When things inevitably break:

    ```json

    {
      "error": "something_went_sideways",
      "message": "A helpful explanation of what you did wrong this time"
    }

    ```


    ## Rate Limiting

    - 100 requests/hour (generous, considering your coding skills)

    - Headers tell you when we'll start ignoring you
  version: 1.0.0
  contact:
    name: Error Golf Support (May the odds be ever in your favor)
    url: https://errorgolf.com/support
    email: support@errorgolf.com
  license:
    name: Proprietary (We own this beautiful mess)
    url: https://errorgolf.com/terms
servers:
  - url: https://api.errorgolf.com/v1
    description: Production (where dreams meet reality)
  - url: http://localhost:8080/v1
    description: Local dev (your personal playground)
security: []
tags:
  - name: Health
    description: Is this thing even working?
  - name: Course
    description: Browse the vault of coding nightmares
  - name: Round
    description: Take 3 swings at holes you pick
  - name: Members
    description: Prove you belong here
  - name: Clubhouse
    description: Configure your coding challenge empire
paths:
  /settings:
    patch:
      tags:
        - Clubhouse
      summary: Update configuration
      description: >
        ## Modify Your Settings


        Update company configuration. Only include fields you want to change.


        **Security notifications:**

        Sensitive changes trigger email alerts:

        - Email changes: notification sent to the old email address

        - Password changes: confirmation to current email

        - Live code changes: notification with old and new codes

        - Webhook changes: notification about new configuration


        **Personality options:**

        Choose from 20+ personalities for scoring variety:

        - `jaded_dev` - Cynical veteran who's seen every horror

        - `caffeinated_genius` - 3am energy, connects everything to quantum
        mechanics

        - `academic_rebel` - PhD dropout with street smarts

        - `mad_scientist` - Chaos enthusiast who believes systems need more
        entropy

        - Plus many more for maximum evaluation diversity


        **Validation requirements:**

        - Live codes: unique, 10+ characters, must start with digit

        - Emails: unique and properly formatted

        - Passwords: 10+ characters with confirmation

        - Webhook URLs: valid HTTPS endpoints only

        - Candidate limits: 1-4 attempts per email address
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                live_code:
                  type: string
                  minLength: 10
                  pattern: ^[0-9][A-Z0-9]+$
                  description: New live code (must start with digit and be unique)
                  example: 1AB2CD3EF4
                email:
                  type: string
                  format: email
                  description: New email address (must be unique)
                  example: newemail@techcorp.com
                password:
                  type: string
                  minLength: 10
                  description: New password (requires confirmation)
                password_confirmation:
                  type: string
                  description: Password confirmation (required if password provided)
                webhook_url:
                  type: string
                  format: uri
                  description: >-
                    Webhook URL for result notifications (empty string to
                    disable)
                  example: https://api.yourcompany.com/webhooks/error-golf
                webhook_secret:
                  type: string
                  minLength: 10
                  pattern: ^[A-Za-z0-9]+$
                  description: Secret for webhook signature verification
                  example: abc123def456ghi789
                per_candidate:
                  type: integer
                  minimum: 1
                  maximum: 4
                  description: Maximum attempts per candidate email
                  example: 2
                personality_first:
                  type: string
                  description: First evaluator personality
                  example: jaded_dev
                personality_second:
                  type: string
                  description: Second evaluator personality
                  example: caffeinated_genius
                personality_third:
                  type: string
                  description: Third evaluator personality
                  example: mad_scientist
      responses:
        '204':
          description: Settings updated successfully
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/TokenDead'
        '409':
          $ref: '#/components/responses/EmailTaken'
        '422':
          $ref: '#/components/responses/ValidationError'
        '500':
          $ref: '#/components/responses/ServerExistentialCrisis'
      security:
        - bearerAuth: []
components:
  responses:
    BadRequest:
      description: Request was malformed or contained invalid data
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: empty_request_body
            message: Request body cannot be empty. Please include some data.
    TokenDead:
      description: JWT token is invalid or has expired
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: token_expired
            message: Your authentication token has expired. Please login again.
    EmailTaken:
      description: Email address is already registered
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: email_already_exists
            message: An account with this email address already exists.
    ValidationError:
      description: Input validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missing_email:
              value:
                error: missing_required_field
                message: Email field is required but was not provided.
            invalid_email:
              value:
                error: invalid_email_format
                message: The provided email address format is invalid.
    ServerExistentialCrisis:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: internal_server_error
            message: Something went wrong on our end. We're looking into it.
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Machine-readable error identifier
        message:
          type: string
          description: Human-readable error explanation
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token from /token endpoint

````