---
schema_version: "1"
id: 6dde41e448fd073096d47ef659b82dc6860303fada793af12de0775c5f171e05
title: Update Service Appointments
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/salesforce-scheduler-dev-guide/guides/salesforce-scheduler/uc5-update-anonymous-appoint.md
canonical_url: https://developer.salesforce.com/docs/service/salesforce-scheduler-dev-guide/guide/uc5-update-anonymous-appoint.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 41fabbf3afa35674b16865bc43e292fe325bfff903983de0b80b3520e1deab39
products:
  - Salesforce Scheduler Developer Guide
  - Service Cloud Developer Content
---

# Update Service Appointments

A service appointment represents an appointment that is booked via Salesforce Scheduler. To update the appointment, run a PATCH request on the `service-appointments` Connect API.

Ensure that you make a note of the service appointment IDs that you retrieved in the previous task.

Update service appointments to use new resources by using PATCH requests on the [`service-appointments`](https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/connect_resources_service_appointments.htm) Connect API. Pass the `serviceResourceId` and `serviceAppointmentId` parameters with each request.

**Resource URI**

```nolang
https://YOUR_INSTANCE.salesforce.com/services/data/vXX.X/connect/scheduling/service-appointments
```

Where `YOUR_INSTANCE` is a variable.

**Sample Request**

In the input request body, pass the service appointment ID as `serviceAppointmentId` and service resource ID as `serviceResourceId`.

```nolang
{
    
    "serviceAppointmentId": "08pB0000000aKf2IAE",
    "serviceAppointment": {
      "schedStartTime": "2021-10-25T17:30:00.000+0000",
      "schedEndTime": "2021-10-25T18:30:00.000+0000",
      "serviceTerritoryId": "0HhB0000000TaHOKA0"
    },
    "assignedResources": [
      {
        "serviceResourceId": "0HnB0000000TavDKAS",
        "isRequiredResource": true
      }
    ]
  }
```

**Sample Response**

The API returns the service appointment ID and the assigned service resources.

```nolang
{
    "result" : {
      "assignedResourceIds" : [ "03rB0000000cBVxIAM" ],
      "serviceAppointmentId" : "08pB0000000aKf2IAE"
    }
  }
```

The request modifies the service appointment with a new service resource.

Run the PATCH request for each service appointment ID that needs you want to modify.

