> For the complete documentation index, see [llms.txt](https://developer.firmhouse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.firmhouse.com/graphql-api/api-reference/mutations/update-discount-code.md).

# updateDiscountCode

### Arguments

| Argument                                                                                             | Description                       |
| ---------------------------------------------------------------------------------------------------- | --------------------------------- |
| input ([UpdateDiscountCodeInput](/graphql-api/api-reference/objects/update-discount-code-input.md)!) | Parameters for UpdateDiscountCode |

### UpdateDiscountCodeInput Arguments

| Argument                                                             | Description                                                                         |
| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| metadata ([JSON](/graphql-api/api-reference/objects/json.md))        | Metadata that can be used by developers to store additional information on objects. |
| id ([ID](/graphql-api/api-reference/objects/id.md)!)                 | The ID of the discount code to update                                               |
| activated ([Boolean](/graphql-api/api-reference/objects/boolean.md)) | Whether the discount code is active/deactivated                                     |
| maxTimesUsed ([Int](/graphql-api/api-reference/objects/int.md))      | The max times this discount code can be used                                        |

### Return fields

#### discountCode ([DiscountCode](/graphql-api/api-reference/objects/discount-code.md))

#### errors (\[[ModelValidationError](/graphql-api/api-reference/objects/model-validation-error.md)!]!)
