> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.schoolset.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.schoolset.io/_mcp/server.

# Update a PTA event

PATCH https://ssuccessv2.com/app/api/v1/pta/event/update/{id}
Content-Type: application/json

Updates the event configuration and regenerates its slot/family payload. At least one grade, class, or staff member must be selected.

Reference: https://docs.schoolset.io/api-reference/school-set-api/pta-events/update-pta-event

## Authentication

- `Authorization` header (bearer token, required) — The signed-in SchoolSet user token sent by the frontend.

## Request

### Path parameters

- `id` (integer, required) — PTA event identifier.

### Body (application/json)

This endpoint expects an object.

- `title` (string, required)
- `start_date` (datetime, required) — ISO-8601 datetime with timezone offset.
- `pta_gap_parent_count` (integer, required)
- `pta_schedule_type_id` (integer, required)
- `pta_slot_duration_id` (integer, required)
- `pta_slot_meeting_count` (integer, required)
- `grade_ids` (list of integer, optional)
- `class_ids` (list of integer, optional)
- `staff_member_ids` (list of integer, optional)
- `parent_type` (enum, optional, nullable)
  - Allowed values: `mother`, `father`, `both`
- `exclude_staff_children` (boolean, optional)

## Response

### 200

Updated event slot and family payload.

- `status` (string, required)
- `message` (string, required)
- `data` (map from string to any, required)

## Errors

### 400 Bad Request Error

No grade

- `status` (string, required)
- `message` (string, required)
- `data` (any, optional, nullable)

### 401 Unauthorized Error

Unauthenticated.

- `status` (string, required)
- `message` (string, required)
- `data` (any, optional, nullable)

### 403 Forbidden Error

Missing edit-pta-events permission.

- `status` (string, required)
- `message` (string, required)
- `data` (any, optional, nullable)

### 404 Not Found Error

PTA event or referenced configuration record not found.

- `status` (string, required)
- `message` (string, required)
- `data` (any, optional, nullable)

### 422 Unprocessable Entity Error

Event fields are missing or invalid.

- `message` (string, required)
- `errors` (map from string to list of string, required)

## Examples

**Request**

```json
{
  "title": "Fall parent conferences",
  "pta_gap_parent_count": 2,
  "pta_schedule_type_id": 1,
  "pta_slot_duration_id": 2,
  "pta_slot_meeting_count": 1,
  "grade_ids": [
    7,
    8
  ],
  "class_ids": [
    42,
    43
  ],
  "staff_member_ids": [
    118,
    121
  ],
  "parent_type": "both",
  "exclude_staff_children": false
}
```

**Response**

```json
{
  "status": "success",
  "message": "",
  "data": {
    "pta_event_data": {
      "id": 1842,
      "title": "Fall parent conferences"
    },
    "global_slots": [],
    "group_slots": [],
    "family_slots": [],
    "active_families": [],
    "not_active_families": []
  }
}
```

**SDK Code**

```python
import requests

url = "https://ssuccessv2.com/app/api/v1/pta/event/update/1842"

payload = {
    "title": "Fall parent conferences",
    "pta_gap_parent_count": 2,
    "pta_schedule_type_id": 1,
    "pta_slot_duration_id": 2,
    "pta_slot_meeting_count": 1,
    "grade_ids": [7, 8],
    "class_ids": [42, 43],
    "staff_member_ids": [118, 121],
    "parent_type": "both",
    "exclude_staff_children": False
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://ssuccessv2.com/app/api/v1/pta/event/update/1842';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"title":"Fall parent conferences","pta_gap_parent_count":2,"pta_schedule_type_id":1,"pta_slot_duration_id":2,"pta_slot_meeting_count":1,"grade_ids":[7,8],"class_ids":[42,43],"staff_member_ids":[118,121],"parent_type":"both","exclude_staff_children":false}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://ssuccessv2.com/app/api/v1/pta/event/update/1842"

	payload := strings.NewReader("{\n  \"title\": \"Fall parent conferences\",\n  \"pta_gap_parent_count\": 2,\n  \"pta_schedule_type_id\": 1,\n  \"pta_slot_duration_id\": 2,\n  \"pta_slot_meeting_count\": 1,\n  \"grade_ids\": [\n    7,\n    8\n  ],\n  \"class_ids\": [\n    42,\n    43\n  ],\n  \"staff_member_ids\": [\n    118,\n    121\n  ],\n  \"parent_type\": \"both\",\n  \"exclude_staff_children\": false\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://ssuccessv2.com/app/api/v1/pta/event/update/1842")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"title\": \"Fall parent conferences\",\n  \"pta_gap_parent_count\": 2,\n  \"pta_schedule_type_id\": 1,\n  \"pta_slot_duration_id\": 2,\n  \"pta_slot_meeting_count\": 1,\n  \"grade_ids\": [\n    7,\n    8\n  ],\n  \"class_ids\": [\n    42,\n    43\n  ],\n  \"staff_member_ids\": [\n    118,\n    121\n  ],\n  \"parent_type\": \"both\",\n  \"exclude_staff_children\": false\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://ssuccessv2.com/app/api/v1/pta/event/update/1842")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"title\": \"Fall parent conferences\",\n  \"pta_gap_parent_count\": 2,\n  \"pta_schedule_type_id\": 1,\n  \"pta_slot_duration_id\": 2,\n  \"pta_slot_meeting_count\": 1,\n  \"grade_ids\": [\n    7,\n    8\n  ],\n  \"class_ids\": [\n    42,\n    43\n  ],\n  \"staff_member_ids\": [\n    118,\n    121\n  ],\n  \"parent_type\": \"both\",\n  \"exclude_staff_children\": false\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://ssuccessv2.com/app/api/v1/pta/event/update/1842', [
  'body' => '{
  "title": "Fall parent conferences",
  "pta_gap_parent_count": 2,
  "pta_schedule_type_id": 1,
  "pta_slot_duration_id": 2,
  "pta_slot_meeting_count": 1,
  "grade_ids": [
    7,
    8
  ],
  "class_ids": [
    42,
    43
  ],
  "staff_member_ids": [
    118,
    121
  ],
  "parent_type": "both",
  "exclude_staff_children": false
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://ssuccessv2.com/app/api/v1/pta/event/update/1842");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"title\": \"Fall parent conferences\",\n  \"pta_gap_parent_count\": 2,\n  \"pta_schedule_type_id\": 1,\n  \"pta_slot_duration_id\": 2,\n  \"pta_slot_meeting_count\": 1,\n  \"grade_ids\": [\n    7,\n    8\n  ],\n  \"class_ids\": [\n    42,\n    43\n  ],\n  \"staff_member_ids\": [\n    118,\n    121\n  ],\n  \"parent_type\": \"both\",\n  \"exclude_staff_children\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "title": "Fall parent conferences",
  "pta_gap_parent_count": 2,
  "pta_schedule_type_id": 1,
  "pta_slot_duration_id": 2,
  "pta_slot_meeting_count": 1,
  "grade_ids": [7, 8],
  "class_ids": [42, 43],
  "staff_member_ids": [118, 121],
  "parent_type": "both",
  "exclude_staff_children": false
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://ssuccessv2.com/app/api/v1/pta/event/update/1842")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```