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

# Register Cape Digi consumer

> Register a new Cape Digi consumer account.



## OpenAPI

````yaml /openapi/user.yaml post /api/v1/auth/register-consumer
openapi: 3.0.3
info:
  title: CapeMedia User Service API
  version: 1.0.0
  description: |2-

        **CapeMedia User Service API** - Comprehensive user service and management system.

        ## Authentication
        This API uses **JWT Bearer tokens** for authentication.

        1. Login via `/api/v1/auth/login` to obtain tokens
        2. Include the access token in the `Authorization` header: `Bearer <access_token>`
        3. Refresh expired tokens via `/api/v1/auth/refresh-token`

        ## Versioning
        The API uses URL path versioning (e.g., `/api/v1/`, `/api/v2/`).
        Current version: **v1**
        
  contact:
    name: API Support
    email: support@capemedia.co.ke
  license:
    name: Cape Media
servers:
  - url: https://api.diginacape.co.ke/acl
    description: Production
  - url: http://localhost:8000
    description: Local
security: []
paths:
  /api/v1/auth/register-consumer:
    post:
      tags:
        - Registration
      summary: Register Cape Digi consumer
      description: Register a new Cape Digi consumer account.
      operationId: auth_register_consumer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsumerRegistrationRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/ConsumerRegistrationRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/ConsumerRegistrationRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerRegistration'
          description: ''
      security:
        - bearerAuth: []
        - {}
components:
  schemas:
    ConsumerRegistrationRequest:
      type: object
      description: |-
        Serializer for public Cape Digi user self-registration.

        No employee number, department, or phone — consumers only need
        email, name, and a password.  Realm is always capedigi.
      properties:
        email:
          type: string
          format: email
          minLength: 1
        first_name:
          type: string
          minLength: 1
          maxLength: 150
        last_name:
          type: string
          minLength: 1
          maxLength: 150
        password:
          type: string
          writeOnly: true
          minLength: 8
        confirm_password:
          type: string
          writeOnly: true
          minLength: 1
      required:
        - confirm_password
        - email
        - first_name
        - last_name
        - password
    ConsumerRegistration:
      type: object
      description: |-
        Serializer for public Cape Digi user self-registration.

        No employee number, department, or phone — consumers only need
        email, name, and a password.  Realm is always capedigi.
      properties:
        email:
          type: string
          format: email
        first_name:
          type: string
          maxLength: 150
        last_name:
          type: string
          maxLength: 150
      required:
        - email
        - first_name
        - last_name
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Enter your JWT token in the format: Bearer <token>'

````