# Create coupon code Creates coupon code. Endpoint: POST /v2/project/{project_id}/admin/coupon/{external_id}/code Version: 2.0.0 Security: basicAuth ## Path parameters: - `project_id` (integer, required) Project ID. You can find this parameter in your Publisher Account next to the name of the project. Example: 44056 - `external_id` (integer, required) Promotion external ID. Unique promotion identifier within the project. Example: "coupon_44056_1" ## Request fields (application/json): - `coupon_code` (string) Unique case sensitive code. Contains letters and numbers. Example: "WINTER2021" ## Response 201 fields (application/json): - `code` (string) Unique case sensitive code. Contains letters and numbers. Example: "WINTER2021" ## Response 401 fields (application/json): - `statusCode` (integer) Example: 401 - `errorCode` (integer) Example: 1020 - `errorMessage` (string) Example: "[0401-1020]: Error in Authentication method occurred" ## Response 404 fields (application/json): - `statusCode` (integer) Example: 404 - `errorCode` (integer) Example: 4001 - `errorMessage` (string) Example: "[0401-9802]: Coupon not found" - `transactionId` (string) Example: "x-x-x-x-transactionId-mock-x-x-x" ## Response 422 fields (application/json): - `statusCode` (integer) Example: 422 - `errorCode` (integer) Example: 9803 - `errorMessage` (string) Example: "[0401-9803]: The code already exists." - `transactionId` (string) Example: "x-x-x-x-transactionId-mock-x-x-x"