---
title: "Update credit grant"
method: PUT
path: "/creditgrants/{id}"
tags: ["Credit Grants"]
---

# Update credit grant

`PUT /creditgrants/{id}`

Use when changing a credit grant (e.g. amount or end date). Request body contains the fields to update.

## Path parameters

- `id` string, required

## Request body

- UpdateCreditGrantRequest
  - `end_date` string, date-time
  - `metadata` TypesMetadata
  - `name` string

## Response `200`

OK

- CreditGrantResponse
  - `addon_id` string
  - `cadence` 'ONETIME' | 'RECURRING'
  - `conversion_rate` string — amount in the currency = number of credits * conversion_rate ex if conversion_rate is 1, then 1 USD = 1 credit ex if conversion_rate is 2, then 1 USD = 0.5 credits ex if conversion_rate is 0.5, then 1 USD = 2 credits
  - `created_at` string, date-time
  - `created_by` string
  - `credit_grant_anchor` string, date-time
  - `credits` string
  - `end_date` string, date-time
  - `environment_id` string
  - `expiration_duration` integer
  - `expiration_duration_unit` 'DAY' | 'WEEK' | 'MONTH' | 'YEAR'
  - `expiration_type` 'NEVER' | 'DURATION' | 'BILLING_CYCLE'
  - `id` string
  - `metadata` TypesMetadata
  - `name` string
  - `period` 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'ANNUAL' | 'QUARTERLY' | 'HALF_YEARLY'
  - `period_count` integer
  - `plan_id` string
  - `priority` integer
  - `scope` 'PLAN' | 'SUBSCRIPTION' | 'ADDON'
  - `start_date` string, date-time
  - `status` 'published' | 'deleted' | 'archived'
  - `subscription_id` string
  - `tenant_id` string
  - `topup_conversion_rate` string — topup_conversion_rate is the conversion rate for the topup to the currency ex if topup_conversion_rate is 1, then 1 USD = 1 credit ex if topup_conversion_rate is 2, then 1 USD = 0.5 credits ex if topup_conversion_rate is 0.5, then 1 USD = 2 credits
  - `updated_at` string, date-time
  - `updated_by` string

## Other responses

- `400` — Invalid request
- `500` — Server error

---

[API](https://skmtc.net/flexprice/apis/flexprice-api.md) · [All operations](https://skmtc.net/flexprice/apis/flexprice-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/flexprice/flexprice-api/versions/f0601ed97bd3/schema)
