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

# Create Redemption Codes

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Monetization",
    "version": "1.0.0",
    "description": ""
  },
  "servers": [
    {
      "url": "https://api.zype.com/"
    }
  ],
  "security": [
    {
      "api_key": []
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "api_key",
        "in": "query"
      }
    }
  },
  "paths": {
    "/redemption_codes": {
      "post": {
        "summary": "Create Redemption Codes",
        "description": "",
        "tags": [
          "Redemption Codes"
        ],
        "operationId": "createRedemptionCode",
        "requestBody": {
          "description": "",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "RedemptionCodeRequest",
                "type": "object",
                "required": [
                  "redemption_code"
                ],
                "properties": {
                  "redemption_code": {
                    "type": "object",
                    "title": "RedemptionCodeProperties",
                    "required": [
                      "code",
                      "expiration_date"
                    ],
                    "properties": {
                      "code": {
                        "type": "string",
                        "description": "Use this param to specify your own code. If no code is sent, one will automatically be generated."
                      },
                      "expiration_date": {
                        "type": "string",
                        "description": "Expiration date for the redemption code. Example: 2017-01-15."
                      },
                      "video_id": {
                        "type": "string",
                        "description": "The ID of the video that the user will be entitled to upon redeeming the code. Required if the redemption code is for a video."
                      },
                      "playlist_id": {
                        "type": "string",
                        "description": "The ID of the playlist that the user will be entitled to upon redeeming the code. Required if the redemption code is for a playlist."
                      },
                      "plan_id": {
                        "type": "string",
                        "description": "The ID of the subscription plan that the user will be subscribed to upon redeeming the code. Required if the redemption code is for a subscription."
                      },
                      "pass_plan_id": {
                        "type": "string",
                        "description": "The ID of the pass plan that the user will have access to upon redeeming the code. Required if the redemption code is for a pass plan."
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "title": "RedemptionCodeResponse",
                  "type": "object",
                  "properties": {
                    "response": {
                      "title": "RedemptionCode",
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string"
                        },
                        "content_title": {
                          "type": "string"
                        },
                        "content_type": {
                          "type": "string"
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "redeemed_at": {
                          "type": "string"
                        },
                        "site_id": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        },
                        "nice_code": {
                          "type": "string"
                        },
                        "available": {
                          "type": "string"
                        },
                        "redeemed": {
                          "type": "string"
                        },
                        "expired": {
                          "type": "string"
                        },
                        "code": {
                          "type": "string"
                        },
                        "expiration_date": {
                          "type": "string"
                        },
                        "video_id": {
                          "type": "string"
                        },
                        "pass_plan_id": {
                          "type": "string"
                        },
                        "plan_id": {
                          "type": "string"
                        },
                        "playlist_id": {
                          "type": "string"
                        },
                        "transaction_id": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/paths/~1plans/post/responses/422/content/application~1json/schema"
                }
              }
            }
          }
        }
      }
    }
  }
}
```