# Creating a new Workweek

This endpoint returns structured Workweek objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array
and will be indexed by ID in the workweeks top-level JSON key.
Please see our Response Format section for more information.

Endpoint: POST /workweeks
Version: 1.0.0

## Query parameters:

  - `enable_workweeks` (boolean)
    Required when creating a workweek for the first time.

  - `include` (string)
    Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.
- workweek_memberships (WorkweekMembership) - References the workweek memberships that use the workweek.

## Request fields (application/json):

  - `workweek` (object)

  - `workweek.start_date` (string)
    The start date of the workweek (must be a Sunday). The date must be in [ISO 8601](https://www.w3.org/TR/NOTE-datetime) format.

  - `workweek.sunday_minutes` (integer)
    The number of workable minutes on Sunday.

  - `workweek.monday_minutes` (integer)
    The number of workable minutes on Monday.

  - `workweek.tuesday_minutes` (integer)
    The number of workable minutes on Tuesday.

  - `workweek.wednesday_minutes` (integer)
    The number of workable minutes on Wednesday.

  - `workweek.thursday_minutes` (integer)
    The number of workable minutes on Thursday.

  - `workweek.friday_minutes` (integer)
    The number of workable minutes on Friday.

  - `workweek.saturday_minutes` (integer)
    The number of workable minutes on Saturday.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

  - `workweeks` (object)

  - `workweek_memberships` (object)

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)


