---
title: "Cancel an appointment"
url: "https://real-estate-agency.apim.eu/apis/viewing-appointments/versions/70b37971-1301-4569-bd6c-e68e8b19e7e2/operations/cancelAppointment"
---

> Full API specification: https://real-estate-agency.apim.eu/apis/viewing-appointments/versions/70b37971-1301-4569-bd6c-e68e8b19e7e2.md

# Cancel an appointment

`DELETE` `/appointments/{appointmentId}`

Operation ID: `cancelAppointment`

## Path parameters

- `appointmentId` (string, required)

## Responses

- `204` - Cancelled; attendees have been notified
- `404` - Record not found

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: Viewing Appointments
  version: 1.0.0
servers:
  - url: https://api.realestateagency.example/v1
    description: Production
  - url: https://sandbox.api.realestateagency.example/v1
    description: Sandbox
paths:
  /appointments/{appointmentId}:
    parameters:
      - name: appointmentId
        in: path
        required: true
        schema:
          type: string
          example: appt_9a44
    delete:
      tags:
        - Appointments
      summary: Cancel an appointment
      operationId: cancelAppointment
      responses:
        "204":
          description: Cancelled; attendees have been notified
        "404":
          $ref: "#/components/responses/NotFound"
security:
  - apiKey: []
components:
  responses:
    NotFound:
      description: Record not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
  schemas:
    Error:
      type: object
      description: Uniform error format across all Real Estate Agency APIs.
      required:
        - code
        - message
      properties:
        code:
          type: string
          example: validation_failed
        message:
          type: string
          example: The appointment start time is missing.
        details:
          type: array
          items:
            $ref: "#/components/schemas/ErrorDetail"
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
          example: start
        reason:
          type: string
          example: missing
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: |
        Every call carries an API key in the `apikey` header. You generate the
        key in the Real Estate portal under "My Apps"; it's shown exactly once.

        Each key has the scopes it's allowed to use attached to it. If one is
        missing, the API responds with `403` and `code: "scope_missing"`; the
        missing scope is in `details[].field`.
```
