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

# Redeem a perk for a user

> Redeem a perk for a user.



## OpenAPI

````yaml openapi.yaml post /perks/{perkId}/redeem
openapi: 3.1.0
info:
  title: Housr API
  version: 1.0.0
  summary: Hourly-expiring bearer token auth with perks browse & redemption.
  description: >
    This API issues an hourly-expiring bearer token via HTTP Basic Auth and
    exposes endpoints

    for browsing, managing, and redeeming perks. Unless otherwise noted, all
    endpoints

    require `Authorization: Bearer <token>` over HTTPS.


    ## Authentication

    - Obtain a token with Basic Auth to /auth/token.

    - Token expires in 1 hour by default.

    - Optional "replicable per-hour" mode can be enabled server-side (see
    `hourly` flag).


    ## Pagination & Sorting

    - Use `page` (default 1) and `per_page` (default 25, max 100).

    - Responses include `X-Total-Count` and RFC5988 `Link` headers where
    applicable.

    - Sorting via `?sort=field,-otherField`.
servers:
  - url: https://v2.api.us.housr.com/partners
    description: Production
  - url: https://v2.staging.api.us.housr.com/partners
    description: Sandbox
security:
  - bearerAuth: []
tags:
  - name: Auth
  - name: Perks
  - name: Health Check
paths:
  /perks/{perkId}/redeem:
    post:
      tags:
        - Perks
      summary: Redeem a perk for a user
      description: Redeem a perk for a user.
      parameters:
        - $ref: '#/components/parameters/PerkId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - user_id
              properties:
                user_id:
                  type: string
                metadata:
                  type: object
                  additionalProperties: true
      responses:
        '201':
          description: Redemption created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Redemption'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  parameters:
    PerkId:
      in: path
      name: perkId
      required: true
      schema:
        type: string
  schemas:
    Redemption:
      type: object
      properties:
        id:
          type: string
        perk_id:
          type: string
        user_id:
          type: string
        redeemed_at:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - approved
            - rejected
            - pending
        metadata:
          type: object
          additionalProperties: true
    Problem:
      type: object
      properties:
        response:
          type: string
  responses:
    BadRequest:
      description: Bad request
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Unauthorized:
      description: Missing or invalid authentication
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    NotFound:
      description: Resource not found
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````