---
title: "/calendars/{calendarId}"
url: "https://developers.rest.rodeo/apis/calendar/versions/9fa518e1-4597-4801-ad08-2c360cda2316/operations/updateCalendar"
---

> Full API specification: https://developers.rest.rodeo/apis/calendar/versions/9fa518e1-4597-4801-ad08-2c360cda2316.md

# /calendars/{calendarId}

`PUT` `/calendars/{calendarId}`

Operation ID: `updateCalendar`

Replaces the calendar's name.

## Path parameters

- `calendarId` (string, uuid, required) - The calendar id.

## Request body (required)

Content types: `application/json`

## Responses

- `200` - The updated calendar
- `400` - Invalid JSON body or invalid `name`
- `401` - Missing or invalid bearer token
- `404` - No calendar with this id
- `405` - Method not allowed

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Calendar API
  version: 1.0.0
servers:
  - url: https://api.rest.rodeo/calendar/api/v1
    description: Production
paths:
  /calendars/{calendarId}:
    put:
      operationId: updateCalendar
      summary: /calendars/{calendarId}
      description: Replaces the calendar's name.
      parameters:
        - $ref: "#/components/parameters/CalendarId"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/CalendarRequest"
            examples:
              update:
                value:
                  name: Personal
      responses:
        "200":
          description: The updated calendar
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Calendar"
              examples:
                calendar:
                  value:
                    id: 3d8df2a2-0d68-4dc4-9d5e-6b1e94a7a51d
                    name: Personal
        "400":
          description: Invalid JSON body or invalid `name`
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Missing or invalid bearer token
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: No calendar with this id
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "405":
          description: Method not allowed
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
security:
  - bearerAuth: []
components:
  parameters:
    CalendarId:
      name: calendarId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: The calendar id.
  schemas:
    CalendarRequest:
      type: object
      required:
        - name
      additionalProperties: false
      properties:
        name:
          type: string
          description: The calendar name.
          maxLength: 256
          minLength: 1
    Calendar:
      type: object
      required:
        - id
        - name
      additionalProperties: false
      properties:
        id:
          type: string
          format: uuid
          description: The calendar id.
        name:
          type: string
          description: The calendar name.
          maxLength: 256
    Error:
      type: object
      required:
        - error
      additionalProperties: false
      properties:
        error:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
