---
updatedAt: 2026-05-04T20:47:50.000Z
---

Fetch the complete documentation index at: https://developers.pismo.io/pismo-docs/llms.txt. Use this file to discover all available pages before exploring further.

# Copy program (async)

Copy an existing program to create a new one. 

Refer to [Core objects](doc:setup-overview) for more information about programs.

For information on what properties are copied, refer to [Cloned and exported program properties](doc:cc-cloned-and-exported-data).

This endpoint operates asynchronously; meaning, your program can continue executing while the program is being copied. It can take 2 minutes or more to copy the program. 

Alternatively, you can call [Copy program](ref:copyprogram), which executes synchronously and returns a response indicating failure or success.

This endpoint generates a [Program created](https://developers.pismo.io/events/docs/programs-creation-1) event. Given that creation is done asynchronously, it is recommended you do not try to access the program object via Pismo endpoints until this event is received.

To get your Organization's programs, call the [List programs](ref:programs-1) endpoint, or view them in the [Pismo Control Center](doc:get-started-with-control-center).


# OpenAPI definition

````json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Platform setup - Programs",
    "description": "Endpoints to handle Programs",
    "version": "v1.0",
    "contact": {
      "name": "Pismo Support",
      "url": "https://developers.pismo.io/support/"
    },
    "license": {
      "name": "Copyright Pismo"
    }
  },
  "servers": [
    {
      "url": "https://sandbox.pismolabs.io",
      "description": "Sandbox API server for testing"
    }
  ],
  "tags": [
    {
      "name": "Programs",
      "description": "Create and manage programs"
    }
  ],
  "components": {
    "schemas": {
      "BaseProgramID": {
        "type": "integer",
        "format": "int64",
        "description": "ID of program that was used to create this program.",
        "example": 2
      },
      "Bin": {
        "type": "object",
        "description": "Bank Identification Number (BIN) object. **REQUIRED** for card-issuing programs. \n",
        "properties": {
          "start_range": {
            "type": "string",
            "description": "BIN range start.  **REQUIRED** for card-issuing programs.",
            "example": "0"
          },
          "end_range": {
            "type": "string",
            "description": "BIN range end.  **REQUIRED** for card-issuing programs.",
            "example": "999999999"
          },
          "value": {
            "type": "string",
            "description": "Card network-issued Bank Identification Number (BIN). \n6 or 8-digit BIN identifying the card network, issuer, and product.\n **REQUIRED** for card-issuing programs.\n",
            "example": "999999"
          }
        }
      },
      "Brand": {
        "type": "string",
        "description": "Program's card brand.  **REQUIRED** for card-issuing programs.\n",
        "enum": [
          "VISA",
          "MASTERCARD",
          "ELO",
          "RUPAY",
          "PRIVATE",
          "CABAL",
          "GOODCARD",
          "GPN"
        ],
        "example": "VISA"
      },
      "CopyProgram": {
        "type": "object",
        "required": [
          "base_program_id",
          "name",
          "timezone",
          "currency_numeric_code",
          "country_code"
        ],
        "properties": {
          "base_program_id": {
            "$ref": "#/components/schemas/BaseProgramID"
          },
          "name": {
            "$ref": "#/components/schemas/ProgramName"
          },
          "timezone": {
            "$ref": "#/components/schemas/TimeZone"
          },
          "currency_numeric_code": {
            "$ref": "#/components/schemas/CurrencyNumericCode"
          },
          "country_code": {
            "$ref": "#/components/schemas/CountryCode"
          },
          "due_dates": {
            "$ref": "#/components/schemas/DueDates"
          },
          "brand": {
            "$ref": "#/components/schemas/Brand"
          },
          "bin": {
            "$ref": "#/components/schemas/Bin"
          },
          "language": {
            "$ref": "#/components/schemas/ProgramLanguage"
          },
          "cycle_closing": {
            "$ref": "#/components/schemas/ProgramCycleClosing"
          },
          "holiday_calendar_id": {
            "$ref": "#/components/schemas/ProgramHolidayCalendarId"
          }
        }
      },
      "CountryCode": {
        "type": "string",
        "description": "<a href=\"https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3\" target=\"_blank\">ISO 3166 Alpha-3</a> program country code. For example, `BRA` = Brazil.",
        "example": "BRA"
      },
      "CurrencyNumericCode": {
        "type": "string",
        "description": "Program ISO 4217 currency code.",
        "example": "986"
      },
      "DueDateActiveBoolean": {
        "type": "boolean",
        "description": "Is due date active?",
        "example": true
      },
      "DueDateDay": {
        "type": "integer",
        "format": "int32",
        "description": "Day of the month (1 to 28) for the statement due date.",
        "example": 10
      },
      "DueDates": {
        "type": "array",
        "description": "Array of available program due dates. Every program account specifies a due date to use.\n\nA due date is **REQUIRED** for Full balance credit programs.\n\nFor each due date, `day` and `active` are **REQUIRED**, as in the following example:\n```\n{\n    \"due_dates\": [\n          {\n            \"day\": 1,\n            \"active\": true\n          },\n          {\n            \"day\": 2,\n            \"active\": false\n          }\n    ]\n}\n```\n**Note:** The due date ID is passed as a **numeric value**. For example, for due date `1` (first day of the month) the ID could be something like `3063`. This is the value you should use. `day` must be between 1 and 28.\n",
        "items": {
          "$ref": "#/components/schemas/ProgramDueDate"
        }
      },
      "handler.HTTPError": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "description": "Bad request code",
            "example": "EOA0017"
          },
          "message": {
            "type": "string",
            "description": "Bad request response",
            "example": "Bad Request"
          }
        }
      },
      "ProgramCopyV2Response": {
        "type": "object",
        "properties": {
          "program_export_id": {
            "type": "integer",
            "description": "Through `program_export_id`, it is possible to check the creation stage",
            "example": 1504
          },
          "message": {
            "type": "string",
            "description": "Process started message",
            "example": "Your request has been submitted successfully. It may take some time to finish. You can track the progress on the programs dashboard."
          }
        }
      },
      "ProgramDueDate": {
        "type": "object",
        "required": [
          "active",
          "day"
        ],
        "properties": {
          "active": {
            "$ref": "#/components/schemas/DueDateActiveBoolean"
          },
          "day": {
            "$ref": "#/components/schemas/DueDateDay"
          },
          "id": {
            "description": "Program due date ID",
            "type": "integer",
            "format": "int64",
            "example": 12345
          }
        }
      },
      "ProgramName": {
        "type": "string",
        "description": "Program name",
        "maxLength": 50,
        "example": "Acme debit program"
      },
      "ProgramLanguage": {
        "type": "string",
        "description": "Program Language:\n\n* `en-US` - US English\n* `pt-BR` - Brazilian Portuguese\n\nDefault is `en-US`\n",
        "enum": [
          "pt-BR",
          "en-US"
        ],
        "example": "en-US"
      },
      "ProgramHolidayCalendarId": {
        "type": "string",
        "description": "Program holiday calendar ID",
        "maxLength": 36,
        "example": "0c78714f-3e88-40f3-9eda-debd356faabc"
      },
      "ProgramCycleClosing": {
        "type": "string",
        "description": "Program cicle closing. \n\nThis field is used for things like accrual basis, interest calculation, taxes, penalties, tiers, and more.  \n\nFormat = HH:MM:SS. Default is null.\n",
        "example": "23:59:59"
      },
      "TimeZone": {
        "type": "string",
        "description": "Program timezone. This is the <a href=\"https://en.wikipedia.org/wiki/List_of_tz_database_time_zones\" target=\"_blank\"> IANA (Internet Assigned Numbers Authority) time zone database</a> \"Region/City\" format.\n",
        "example": "America/Anchorage"
      }
    },
    "responses": {
      "404NotFound2": {
        "description": "Not Found",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/handler.HTTPError"
            },
            "examples": {
              "program-not-found": {
                "$ref": "#/components/examples/ProgramNotFoundResponse"
              },
              "brand-not-found": {
                "$ref": "#/components/examples/BrandNotFoundResponse"
              }
            }
          }
        }
      }
    },
    "examples": {
      "BinEndRangeNotAValidNumberResponse": {
        "value": {
          "code": "EOA0040",
          "message": "bin.end_range is not a valid number"
        }
      },
      "BinStartRangeNotAValidNumberResponse": {
        "value": {
          "code": "EOA0040",
          "message": "bin.start_range is not a valid number"
        }
      },
      "BinValueNotAValidNumberResponse": {
        "value": {
          "code": "EOA0040",
          "message": "bin.value is not a valid number"
        }
      },
      "BodyParsingErrorResponse": {
        "value": {
          "code": "EOA0008",
          "message": "Error parsing utils body with message: "
        }
      },
      "CardInformationBinBrandRequiredResponse": {
        "value": {
          "code": "EOA0073",
          "message": "Card information is required (Bin and Brand)"
        }
      },
      "BrandNotFoundResponse": {
        "value": {
          "code": "EOA0064",
          "message": "Brand not found"
        }
      },
      "CardInformationRequiredResponse": {
        "value": {
          "code": "EOA0054",
          "message": "Card information is required (Bin, Brand and DueDate)"
        }
      },
      "ConnectionFailResponse": {
        "value": {
          "code": "EOA0009",
          "message": "Connection failed with message: "
        }
      },
      "ErrorMissingXTenantResponse": {
        "value": {
          "code": "EOA0017",
          "message": "Missing x-tenant header"
        }
      },
      "ErrorToBinderResponse": {
        "value": {
          "code": "EOA0018",
          "message": "Error to Binder"
        }
      },
      "FieldRequiredResponse": {
        "value": {
          "code": "EOA0086",
          "message": "fieldName' field is required"
        }
      },
      "GenericError2Response": {
        "value": {
          "code": "EOA0016",
          "message": "Something went wrong, please try again later"
        }
      },
      "GenericErrorResponse": {
        "value": {
          "code": "EOA0015",
          "message": "Something went wrong, please try again later"
        }
      },
      "InvalidBin68Response": {
        "value": {
          "code": "EOA0037",
          "message": "Bin must be 6 or 8 digits"
        }
      },
      "InvalidBinRange6Response": {
        "value": {
          "code": "EOA0038",
          "message": "When a BIN is 6, the range can be up to 9 digits"
        }
      },
      "InvalidBinRange8Response": {
        "value": {
          "code": "EOA0039",
          "message": "When a BIN is 8, the range can be up to 7 digits"
        }
      },
      "InvalidCountryCodeResponse": {
        "value": {
          "code": "EOA0063",
          "message": "Invalid country_code: xxx"
        }
      },
      "InvalidCurrencyNumericCodeResponse": {
        "value": {
          "code": "EOA0033",
          "message": "Invalid currency_numeric_code: xxx"
        }
      },
      "InvalidDueDatesResponse": {
        "value": {
          "code": "EOA0082",
          "message": "Due dates need at least one active day"
        }
      },
      "InvalidTimezoneResponse": {
        "value": {
          "code": "EOA0029",
          "message": "Invalid timezone: xxx"
        }
      },
      "ProgramNotFoundResponse": {
        "value": {
          "code": "EOA0020",
          "message": "Program x not found"
        }
      },
      "ProgramNotOperationalResponse": {
        "value": {
          "code": "EOA0085",
          "message": "Program xxx isn't operational"
        }
      },
      "ShouldNotContainCardInformationResponse": {
        "value": {
          "code": "EOA0055",
          "message": "Should not contain card information (Bin, Brand and DueDate)"
        }
      }
    },
    "securitySchemes": {
      "S2SAuthentication": {
        "type": "http",
        "scheme": "bearer",
        "description": "All requests must be previoulsy authenticated."
      }
    }
  },
  "security": [
    {
      "S2SAuthentication": []
    }
  ],
  "paths": {
    "/programs/v2/programs/copy": {
      "post": {
        "summary": "Copy program (async)",
        "description": "Copy an existing program to create a new one. \n\nRefer to [Core objects](https://developers.pismo.io/pismo-docs/docs/setup-overview) for more information about programs.\n\nFor information on what properties are copied, refer to [Cloned and exported program properties](https://developers.pismo.io/pismo-docs/docs/cc-cloned-and-exported-data).\n\nThis endpoint operates asynchronously; meaning, your program can continue executing while the program is being copied. It can take 2 minutes or more to copy the program. \n\nAlternatively, you can call [Copy program](https://developers.pismo.io/pismo-docs/reference/copyprogram), which executes synchronously and returns a response indicating failure or success.\n\nThis endpoint generates a [Program created](https://developers.pismo.io/events/docs/programs-creation-1) event. Given that creation is done asynchronously, it is recommended you do not try to access the program object via Pismo endpoints until this event is received.\n\nTo get your Organization's programs, call the [List programs](https://developers.pismo.io/pismo-docs/reference/programs-1) endpoint, or view them in the [Pismo Control Center](https://developers.pismo.io/pismo-docs/docs/get-started-with-control-center).\n",
        "operationId": "CopyProgramAsync",
        "tags": [
          "Programs"
        ],
        "requestBody": {
          "description": "Program copy body request",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CopyProgram"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProgramCopyV2Response"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/handler.HTTPError"
                },
                "examples": {
                  "missing-x-tenant": {
                    "$ref": "#/components/examples/ErrorMissingXTenantResponse"
                  },
                  "error-to-binder": {
                    "$ref": "#/components/examples/ErrorToBinderResponse"
                  },
                  "field-required": {
                    "$ref": "#/components/examples/FieldRequiredResponse"
                  },
                  "invalid-timezone": {
                    "$ref": "#/components/examples/InvalidTimezoneResponse"
                  },
                  "invalid-currency-numeric-code": {
                    "$ref": "#/components/examples/InvalidCurrencyNumericCodeResponse"
                  },
                  "invalid-country-code": {
                    "$ref": "#/components/examples/InvalidCountryCodeResponse"
                  },
                  "should-not-contain-card-info": {
                    "$ref": "#/components/examples/ShouldNotContainCardInformationResponse"
                  },
                  "card-info-bin-brand-required": {
                    "$ref": "#/components/examples/CardInformationBinBrandRequiredResponse"
                  },
                  "card-info-required": {
                    "$ref": "#/components/examples/CardInformationRequiredResponse"
                  },
                  "invalid-bin-value": {
                    "$ref": "#/components/examples/BinValueNotAValidNumberResponse"
                  },
                  "invalid-bin-start-range": {
                    "$ref": "#/components/examples/BinStartRangeNotAValidNumberResponse"
                  },
                  "invalid-bin-end-range": {
                    "$ref": "#/components/examples/BinEndRangeNotAValidNumberResponse"
                  },
                  "invalid-bin": {
                    "$ref": "#/components/examples/InvalidBin68Response"
                  },
                  "invalid-bin-6-range": {
                    "$ref": "#/components/examples/InvalidBinRange6Response"
                  },
                  "invalid-bin-8-range": {
                    "$ref": "#/components/examples/InvalidBinRange8Response"
                  },
                  "invalid-due-dates": {
                    "$ref": "#/components/examples/InvalidDueDatesResponse"
                  },
                  "program-not-operation": {
                    "$ref": "#/components/examples/ProgramNotOperationalResponse"
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/404NotFound2"
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/handler.HTTPError"
                },
                "examples": {
                  "connection-fail": {
                    "$ref": "#/components/examples/ConnectionFailResponse"
                  },
                  "body-parsing-error": {
                    "$ref": "#/components/examples/BodyParsingErrorResponse"
                  },
                  "generic-error": {
                    "$ref": "#/components/examples/GenericErrorResponse"
                  },
                  "generic-error-2": {
                    "$ref": "#/components/examples/GenericError2Response"
                  }
                }
              }
            }
          }
        },
        "x-codegen-request-body-name": "programCopy"
      }
    }
  }
}
````