> ## 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.

# queueSegmentChangesForEndpoint

> Queues a segment change for an endpoint and returns it. It's applied in the background: shortly for an `ACTIVE` segment (and for any `REMOVAL`), otherwise once the segment becomes `ACTIVE`. Applying writes it to `pendingContent` (`activeContent` on a `NEW` version) and removes it from `Endpoint.queuedChanges`, which is how you see it finish. A `PUBLISHED` or `OPERATIONAL` version whose pending changes are only segment changes is then republished on its own. Fails with `ValidationError` when the segment's card definition isn't the one at `path`.



**mutation** `queueSegmentChangesForEndpoint(input: QueueSegmentChangesForEndpointInput!): QueueSegmentChangesForEndpointPayload!`

## Arguments

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

## Returns

`QueueSegmentChangesForEndpointPayload!`

**`errors`**: `[QueueSegmentChangesForEndpointError!]`

---

**`queuedEndpointSegmentChange`**: `QueuedEndpointSegmentChange`

## Examples

```graphql Mutation
mutation QueueSegmentChangesForEndpoint($input: QueueSegmentChangesForEndpointInput!) {
  queueSegmentChangesForEndpoint(input: $input) {
    errors {
      __typename
      ... on GraphQlError {
        code
        details {
          __typename
        }
        message
      }
    }
    queuedEndpointSegmentChange {
      apiVersion {
        allowedOrigins
        applications {
          __typename
        }
        authentication
        cardDefinitions {
          __typename
        }
        clusters {
          __typename
        }
        createdAt
      }
      apiVersionId
      endpoint {
        activeContent
        apiVersion {
          __typename
        }
        apiVersionId
        cardDefinitions {
          __typename
        }
        description
        displayName
      }
      endpointId
      id
      isAddition
    }
  }
}
```

```json Variables
{
  "input": {
    "apiVersionId": "id",
    "destinationId": "id",
    "endpointId": "id",
    "segmentId": "id"
  }
}
```

```json Response
{
  "data": {
    "queueSegmentChangesForEndpoint": {
      "errors": [
        {
          "__typename": "GraphQlError",
          "code": "string",
          "details": [
            {
              "__typename": "KeyValuePairOfStringAndString"
            }
          ],
          "message": "string"
        }
      ],
      "queuedEndpointSegmentChange": {
        "apiVersion": {
          "allowedOrigins": [
            "value"
          ],
          "applications": {
            "__typename": "ApplicationsConnection"
          },
          "authentication": "PROTECTED",
          "cardDefinitions": {
            "__typename": "CardDefinitionsConnection"
          },
          "clusters": {
            "__typename": "ClustersConnection"
          },
          "createdAt": "value"
        },
        "apiVersionId": "id",
        "endpoint": {
          "activeContent": "value",
          "apiVersion": {
            "__typename": "ApiVersion"
          },
          "apiVersionId": "id",
          "cardDefinitions": {
            "__typename": "CardDefinitionsConnection"
          },
          "description": "string",
          "displayName": "string"
        },
        "endpointId": "id",
        "id": "id",
        "isAddition": true
      }
    }
  }
}
```


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