---
title: "Create pre-schedule"
method: POST
path: "/v1/pre-schedules"
tags: ["Schedules"]
---

# Create pre-schedule

`POST /v1/pre-schedules`

Create a pre-schedule, which is executed by a direct call from the Pismo platform at the end of the closing cycle. To configure execution of a pre-schedule, contact your Pismo representative or call the [Execute pre-schedule](https://developers.pismo.io/pismo-docs/reference/post-execute-pre-schedule) endpoint.

This endpoint generates the [Scheduled payment created or modified](https://developers.pismo.io/events/docs/scheduler-payments-scheduled-payments-1) event with the `status` field set to `CREATED`.

Once the pre-schedule is created, its execution generates the following events.

- First execution of the pre-schedule on the start date generates the [Scheduled payment created or modified](https://developers.pismo.io/events/docs/scheduler-payments-scheduled-payments-1) event with the `status` field set to `IN_PROGRESS`.
- Last execution of the pre-schedule on the end date generates the [Scheduled payment created or modified](https://developers.pismo.io/events/docs/scheduler-payments-scheduled-payments-1) event with the `status` field set to `COMPLETED`.
- Each execution of the pre-schedule also generates the [Scheduled payment executed](https://developers.pismo.io/events/docs/scheduler-payments-scheduled-payments-execution-1) event with the corresponding execution status.

Refer to the [Payment scheduler](https://developers.pismo.io/pismo-docs/docs/payment-scheduler) guide for more information.

## Request body

- PreScheduleRequest — Request to create a new pre-schedule
  - `schedule_id` string, required — Schedule ID (idempotency field for this operation)
  - `schedule_details` PreScheduleDetails, required — Pre-schedule details
    - `statement` Statement
      - `id` integer — Pismo ID of the statement linked to the pre-schedule
  - `account_id` integer, required — Account ID
  - `amount` number, double, required — Fee amount.
  - `currency_code` string, required — ISO 4217 3-letter currency code, For example, `986` = Brazilian real and `840` = US dollar.
  - `processing_code` string, required — Processing code for the debit transaction. If `split_transaction` is `false` (the default), each installment payment is recorded as one debit transaction equal to the installment amount minus the discount, and `processing_code` is the processing code for that transaction. If `split_transaction` is `true`, each installment payment is recorded as two transactions: a debit transaction for the installment amount and a credit transaction for the discount. In this case, `processing_code` is the processsing code for the debit transaction, and `second_processing_code` is the processing code for the credit transaction.
  - `description` string — Challenge result
  - `metadata` string — Any data object with key/value pairs. No limit on length. **Note**: This field must not be used to send Personally Identifiable Information (PII), Payment Card Industry (PCI) data, or any sensitive/regulated information. Metadata fields are intended for operational, non-sensitive data only. For sensitive data, use the specific parameters designed for that purpose. For more information, refer to [Get started with Pismo APIs](https://developers.pismo.io/pismo-docs/reference/get-started-with-pismo-apis#metadata).

## Response `200`

Request was processed successfully, existing schedule with the corresponding `schedule_id` returned.

- PreScheduleResponse — Response from the creation of a new pre-schedule from the migration process
  - `schedule_id` string — Schedule ID (idempotency field for this operation)

## Other responses

- `201` — Request was processed successfully, new pre-schedule created.
- `400` — Bad request
- `403` — The request has been lost
- `500` — Internal server error

---

[API](https://skmtc.net/pismo/apis/platform-authentication.md) · [All operations](https://skmtc.net/pismo/apis/platform-authentication/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pismo/platform-authentication/versions/935b62e16de4/schema)
