> For the complete documentation index, see [llms.txt](https://developers.incidents.cloud.solarwinds.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/sdks/v4squads.md).

# V4.Squads

## Overview

### Available Operations

* [Update](#update) - Update Squad

## Update

This endpoint is used to update squad.

The role will be considered only if your organization is on the OBAC permission model; otherwise, the role field will be ignored, and only the member will be added to the squad. Requires `access_token` as a `Bearer {{token}}` in the `Authorization` header with `squad-create` scope.

### Example Usage

```go
package main

import(
	"context"
	"os"
	squadcastsdk "github.com/solarwinds/squadcast-sdk-go"
	"github.com/solarwinds/squadcast-sdk-go/models/components"
	"log"
)

func main() {
    ctx := context.Background()

    s := squadcastsdk.New(
        squadcastsdk.WithSecurity(os.Getenv("SQUADCASTSDK_REFRESH_TOKEN_AUTH")),
    )

    res, err := s.V4.Squads.Update(ctx, "<id>", components.V4SquadsUpdateSquadRequest{})
    if err != nil {
        log.Fatal(err)
    }
    if res.Object != nil {
        // handle response
    }
}
```

### Parameters

| Parameter                    | Type                                                                                                                                                   | Required             | Description                         |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ----------------------------------- |
| `ctx`                        | [context.Context](https://pkg.go.dev/context#Context)                                                                                                  | :heavy\_check\_mark: | The context to use for the request. |
| `squadID`                    | `string`                                                                                                                                               | :heavy\_check\_mark: | N/A                                 |
| `v4SquadsUpdateSquadRequest` | [components.V4SquadsUpdateSquadRequest](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/models/components/v4squadsupdatesquadrequest.md) | :heavy\_check\_mark: | N/A                                 |
| `opts`                       | \[][operations.Option](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/models/operations/option.md)                                      | :heavy\_minus\_sign: | The options for this request.       |

### Response

[**\*operations.SquadsUpdateSquadResponse**](https://developers.incidents.cloud.solarwinds.com/go-sdk/docs/models/operations/squadsupdatesquadresponse.md)**, error**

### Errors

| Error Type              | Status Code                       | Content Type     |
| ----------------------- | --------------------------------- | ---------------- |
| apierrors.CommonV4Error | 400, 401, 402, 403, 404, 409, 422 | application/json |
| apierrors.CommonV4Error | 500, 502, 503, 504                | application/json |
| apierrors.APIError      | 4XX, 5XX                          | \*/\*            |
