Skip to main content
DELETE
/
api
/
appointments
/
:id
Delete Appointment
curl --request DELETE \
  --url https://api.example.com/api/appointments/:id
{
  "error": {
    "code": "<string>",
    "message": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/DUVAN100/saludya-api/llms.txt

Use this file to discover all available pages before exploring further.

Permanently delete an appointment from the system. This action cannot be undone.
Deleting an appointment is permanent and cannot be reversed. Consider using the update endpoint to cancel the appointment instead, which preserves the appointment history.

Path Parameters

id
string
required
Unique identifier of the appointment to delete

Query Parameters

send_notification
boolean
default:"true"
Whether to send cancellation notification to the patient and doctor
reason
string
Reason for deletion (will be included in notifications if sent)

Response

Successful deletion returns a 204 No Content response with no body.

Example Request

curl -X DELETE "https://api.saludya.com/api/appointments/apt_7k3m9n2p4q?send_notification=true&reason=Duplicate%20appointment" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Example Request - No Notification

curl -X DELETE "https://api.saludya.com/api/appointments/apt_7k3m9n2p4q?send_notification=false" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

Success Response

Status Code: 204 No Content No response body is returned on successful deletion.

Error Responses

error
object
code
string
Error code identifier
message
string
Human-readable error message

401 Unauthorized

{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Invalid or missing API token"
  }
}

403 Forbidden

{
  "error": {
    "code": "FORBIDDEN",
    "message": "You don't have permission to delete this appointment"
  }
}

404 Not Found

{
  "error": {
    "code": "RESOURCE_NOT_FOUND",
    "message": "Appointment with ID 'apt_7k3m9n2p4q' not found"
  }
}

409 Conflict

{
  "error": {
    "code": "CANNOT_DELETE",
    "message": "Cannot delete appointment that is currently in progress"
  }
}

422 Unprocessable Entity

{
  "error": {
    "code": "DELETION_NOT_ALLOWED",
    "message": "Cannot delete completed appointments. Contact support for assistance."
  }
}

Best Practices

Instead of deleting appointments, consider updating the status to cancelled. This preserves appointment history and provides better audit trails for medical records.

When to Delete vs Cancel

Delete when:
  • The appointment was created by mistake
  • It’s a duplicate entry
  • The appointment was never confirmed and is no longer needed
Cancel (using update endpoint) when:
  • Patient cancels a scheduled appointment
  • Doctor is unavailable
  • Appointment needs to be rescheduled
  • Any situation where maintaining history is important

Bulk Deletion

To delete multiple appointments, you need to make individual DELETE requests for each appointment. Bulk deletion is not supported through this endpoint for safety reasons. If you need to delete multiple appointments, consider:
  1. Using the list endpoint to get appointment IDs
  2. Filtering appointments that match your criteria
  3. Making individual DELETE requests for each
  4. Implementing rate limiting to avoid API throttling