# Route Spec

## Route ID
`users-follow-create`

## Endpoint
`POST /api/v1/users/{userId}/follow`

## Human Description
Creates a follow relationship from current user to target user.

## Authentication
- Required: `yes`

## Request
### Path Parameters
- `userId` (`string`, required)

## Responses
### Success: `200 OK`
```json
{"success": true, "message": "Followed user", "data": {"following": true}}
```

### Error: `401 Unauthorized`
When returned:
- Missing, invalid, or expired bearer token.

Body:
```json
{"success": false, "error": {"code": "UNAUTHORIZED", "message": "Authentication required.", "details": {}}}
```

### Error: `409 Conflict`
```json
{"success": false, "error": {"code": "ALREADY_FOLLOWING", "message": "Already following user.", "details": {}}}
```

### Error: `422 Unprocessable Entity`
When returned:
- User attempts to follow themselves.

Body:
```json
{"success": false, "error": {"code": "CANNOT_FOLLOW_SELF", "message": "You cannot follow yourself.", "details": {}}}
```

## Data & Caching Dependencies
- **Spanner Tables:** `user_follows, notifications (Write), user_social_counters (Update)`
- **Redis Cache:** `None`
- **GCS Storage:** `None`
- **Edge Cache (CDN):** `No`

## Side Effects
- Creates follow relationship from current user to target user.
- Increments follower/following counters.
- Creates `user_followed` notification for the followed user.
