Schedules

Create Schedule

POST /v1/schedules

POST/v1/schedules
POST
/v1/schedules

Create a schedule

Create a sending schedule that can be assigned to one or more sequences.

Required fields: name, timezone (IANA Time Zone Database identifier, e.g. Asia/Kolkata), and timeSlots (per-day sending windows).

Set isDefault: true to make this the caller's default schedule — it will be assigned automatically to new sequences that do not specify one.

Authorization

x-api-key<token>

API key for Open API authentication

In: header

Request Body

application/jsonRequired

namestring

Human-readable label for the schedule.

Example: "Weekdays 9-5"

timezonestring

IANA timezone identifier (e.g. America/New_York, Asia/Kolkata). Must be a valid entry from the IANA Time Zone Database.

Example: "America/New_York"

timeSlotsarray<object>

Exactly 7 entries — one per day of the week (Sunday through Saturday). Days with no sending windows should have an empty slots array.

Example: [{"day":0,"slots":[]},{"day":1,"slots":[{"start":{"hour":9,"minute":0},"end":{"hour":17,"minute":0}}]},{"day":2,"slots":[{"start":{"hour":9,"minute":0},"end":{"hour":17,"minute":0}}]},{"day":3,"slots":[{"start":{"hour":9,"minute":0},"end":{"hour":17,"minute":0}}]},{"day":4,"slots":[{"start":{"hour":9,"minute":0},"end":{"hour":17,"minute":0}}]},{"day":5,"slots":[{"start":{"hour":9,"minute":0},"end":{"hour":17,"minute":0}}]},{"day":6,"slots":[]}]

isDefaultboolean

If true, mark this schedule as the account default. New sequences without an explicit scheduleId will use this schedule.

Example: false

Responses

201
Schedule created successfully

Request

curl -X POST \
  "https://open-api.saleshandy.com/v1/schedules" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Weekdays 9-5",
  "timezone": "America/New_York",
  "timeSlots": [
    {
      "day": 0,
      "slots": []
    },
    {
      "day": 1,
      "slots": [
        {
          "start": {
            "hour": 9,
            "minute": 0
          },
          "end": {
            "hour": 17,
            "minute": 0
          }
        }
      ]
    },
    {
      "day": 2,
      "slots": [
        {
          "start": {
            "hour": 9,
            "minute": 0
          },
          "end": {
            "hour": 17,
            "minute": 0
          }
        }
      ]
    },
    {
      "day": 3,
      "slots": [
        {
          "start": {
            "hour": 9,
            "minute": 0
          },
          "end": {
            "hour": 17,
            "minute": 0
          }
        }
      ]
    },
    {
      "day": 4,
      "slots": [
        {
          "start": {
            "hour": 9,
            "minute": 0
          },
          "end": {
            "hour": 17,
            "minute": 0
          }
        }
      ]
    },
    {
      "day": 5,
      "slots": [
        {
          "start": {
            "hour": 9,
            "minute": 0
          },
          "end": {
            "hour": 17,
            "minute": 0
          }
        }
      ]
    },
    {
      "day": 6,
      "slots": []
    }
  ],
  "isDefault": false
}'

Response

No response body