> ## Documentation Index
> Fetch the complete documentation index at: https://docs.occtoo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# updateSegment

> Changes a segment; returns no segment, so read it to see the result. A change to `searchCriteria` or `language` on a live segment matches cards again in the background: `status` is `INITIALIZING` until it's `ACTIVE`. `ConflictError`: the segment is archived.



**mutation** `updateSegment(input: UpdateSegmentInput!): UpdateSegmentPayload!`

## Arguments

**`input`**: `UpdateSegmentInput!` (required)

## Returns

`UpdateSegmentPayload!`

**`empty`**: `Empty`

---

**`errors`**: `[UpdateSegmentError!]`

## Examples

```graphql Mutation
mutation UpdateSegment($input: UpdateSegmentInput!) {
  updateSegment(input: $input) {
    empty {
      value
    }
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
  }
}
```

```json Variables
{
  "input": {
    "id": "id"
  }
}
```

```json Response
{
  "data": {
    "updateSegment": {
      "empty": {
        "value": 1
      },
      "errors": [
        {
          "__typename": "GraphQlError",
          "code": "string",
          "details": [
            {
              "__typename": "KeyValuePairOfStringAndString"
            }
          ],
          "message": "string"
        }
      ]
    }
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.