---
title: "Apply a goodwill credit to the account (staff only)"
url: "https://kongnet.kongai.uk/apis/kongnet-telco-api-1/versions/3d9e2c10-cf93-4e6e-8bf8-2129457a6aa5/operations/apply_account_credit"
---

> Full API specification: https://kongnet.kongai.uk/apis/kongnet-telco-api-1/versions/3d9e2c10-cf93-4e6e-8bf8-2129457a6aa5.md

# Apply a goodwill credit to the account (staff only)

`POST` `/me/credits`

Operation ID: `apply_account_credit`

Applies a credit in pence, capped at 5000, with a reason. Staff only. Never promise a credit to a customer before staff have approved it.

## Request body (required)

Content types: `application/json`

## Responses

- `201` - Successful Response
- `422` - Validation Error

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: KongNet Telco API
  version: 1.0.0
paths:
  /me/credits:
    post:
      tags:
        - staff
      summary: Apply a goodwill credit to the account (staff only)
      description: Applies a credit in pence, capped at 5000, with a reason. Staff
        only. Never promise a credit to a customer before staff have approved
        it.
      operationId: apply_account_credit
      requestBody:
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CreditCreate"
        required: true
      responses:
        "201":
          description: Successful Response
          content:
            application/json:
              schema: {}
        "422":
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/HTTPValidationError"
components:
  schemas:
    CreditCreate:
      properties:
        amount_pence:
          type: integer
          maximum: 5000
          exclusiveMinimum: 0
          title: Amount Pence
          description: Credit in pence, capped at 5000
        reason:
          type: string
          maxLength: 280
          minLength: 5
          title: Reason
          description: Why the credit is being applied
      type: object
      required:
        - amount_pence
        - reason
      title: CreditCreate
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: "#/components/schemas/ValidationError"
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
```
