---
title: "TaskRecurrences.batch_create_or_update"
method: POST
path: "/entities/TaskRecurrences/batch-modify"
tags: ["Activity"]
---

# TaskRecurrences.batch_create_or_update

`POST /entities/TaskRecurrences/batch-modify`

## Request

- Base URL: `https://us-east.api.coevera.com/api/v100/rest/spaces/your_space_id`
- URL: `https://us-east.api.coevera.com/api/v100/rest/spaces/your_space_id/entities/TaskRecurrences/batch-modify`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/coevera/apis/coevera-crm-api/docs/entities/TaskRecurrences/batch-modify/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates or updates TaskRecurrence records in one request: an item with an id updates that record, an item without one creates a new record.

## Query parameters

- `validation-level` integer
- `rollback-method` 0 | 1

## Request body

- BatchTaskRecurrenceInput[]
  - `apply_recurrence` boolean: Default true. When set, then reccurence will apply when other conditions passed. With the value false (e.g. when skip button is used) then recurrence will not apply
  - `day` 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31: Field whose values are strictly defined with an enumeration of values. The day of the month. This setting is applicable only for RecurrenceTypeEnum.MonthlyRelative and RecurrenceTypeEnum.YearlyRelative. Integer enum value: 1 - Day1, 2 - Day2, 3 - Day3, 4 - Day4, 5 - Day5, 6 - Day6, 7 - Day7, 8 - Day8, 9 - Day9, 10 - Day10, 11 - Day11, 12 - Day12, 13 - Day13, 14 - Day14, 15 - Day15, 16 - Day16, 17 - Day17, 18 - Day18, 19 - Day19, 20 - Day20, 21 - Day21, 22 - Day22, 23 - Day23, 24 - Day24, 25 - Day25, 26 - Day26, 27 - Day27, 28 - Day28, 29 - Day29, 30 - Day30, 31 - Day31
  - `day_of_week` string: Bit Flag field, with limited combination of integer values. Options: Sunday = 1 (0b0000001) Monday = 2 (0b0000010) Tuesday = 4 (0b0000100) Wednesday = 8 (0b0001000) Thursday = 16 (0b0010000) Friday = 32 (0b0100000) Saturday = 64 (0b1000000) The days of week in bit mask, number where every bit means one day (e.g. 0010001 = every Monday and Friday), bit 0 is Monday. This setting is applicable only for RecurrenceTypeEnum.Weekly, RecurrenceTypeEnum.MonthlyAbsolute, RecurrenceTypeEnum.YearlyAbsolute.
  - `end_date` string, date: Date information. The last date when no more other items should be created.
  - `month` 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12: Field whose values are strictly defined with an enumeration of values. The number of month this setting is applicable only for RecurrenceTypeEnum.YearlyAbsolute and RecurrenceTypeEnum.YearlyRelative. Integer enum value: 1 - Month1, 2 - Month2, 3 - Month3, 4 - Month4, 5 - Month5, 6 - Month6, 7 - Month7, 8 - Month8, 9 - Month9, 10 - Month10, 11 - Month11, 12 - Month12
  - `occur_every` integer: The number of units of a given recurrence type between occurrences according to RecurrenceTypeEnum.
  - `occurrences_count` integer: Whole natural number. The number of remaining occurrences. Each time a new one is created, it decreases. When item is set to 1, only last one can be created. If it is set to 0, recurrence is stopped. If -1, no limits are applied.
  - `start_date` string, date: Date information. The effective start date of recurrence, which means each next recurrence must be on or after this date.
  - `task_id` string, uuid: Id of the parent task.
  - `type` 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10: Recurrence cadence (e.g. Daily, Weekly, MonthlyAbsolute, MonthlyRelative, YearlyAbsolute, YearlyRelative, AfterNDays, AfterNWeeks, AfterNMonths, AfterNYears). Integer enum value: 0 - NotSet, 1 - Daily, 2 - Weekly, 3 - MonthlyRelative, 4 - MonthlyAbsolute, 5 - YearlyRelative, 6 - YearlyAbsolute, 7 - AfterNDays, 8 - AfterNWeeks, 9 - AfterNMonths, 10 - AfterNYears
  - `week` -1 | 1 | 2 | 3 | 4: Field whose values are strictly defined with an enumeration of values. The week of month. This setting is applicable only for RecurrenceTypeEnum.MonthlyAbsolute and RecurrenceTypeEnum.YearlyAbsolute. Integer enum value: -1 - WeekLast, 1 - Week1, 2 - Week2, 3 - Week3, 4 - Week4
  - `revision` integer: Revision when entity was lastly changed.
  - `id` string, uuid: ID of object to update.

## Response `200`

Result per item, in request order: the id of the created or updated record, or the error.

- object
  - `success` boolean: True when the request succeeded; false on error.
  - `data` union[]
    - union
      - string, uuid: Id of the created or updated record.
      - Error: The body of every REST error. `code` and `name` are stable identifiers; `message` is for people. The full list of codes is at https://developers.coevera.com/reference/errors/.
        - `http_status` integer, required: HTTP status code.
        - `code` integer: Numeric code of the API error.
        - `name` string: Name of the API error.
        - `message` string: Message describing the error.
        - `success` boolean, required: Always false on error.

## Other responses

- `400`: Bad request: a bad or unknown parameter (codes 117, 118), a missing permission (code 50), conflicting data (code 2002) or any other API error. The REST API answers 400 where others answer 403 or 409; check `code`.
- `401`: Not authenticated: missing or wrong credentials, a credential of another space, or an expired token (code 401, ERROR_UNAUTHORIZED).
- `422`: Validation failed (code 40000, with the failing fields) or a required parameter is missing (code 119). By default one failed item fails a whole batch and nothing is written.
- `429`: Too many requests (code 182). Wait for the seconds in Retry-After, then retry.
- `500`: Unexpected server error (code 1000, ERROR_UNKNOWN).

---

[API](https://skmtc.dev/coevera/apis/coevera-crm-api.md) - [All operations](https://skmtc.dev/coevera/apis/coevera-crm-api/llms.txt) - [OpenAPI document](https://skmtc.dev/coevera/apis/coevera-crm-api/revisions/40ebbc83f179?raw)
