# removeIssueExternalRef mutation


`removeIssueExternalRef` is a GraphQL mutation of the Chameleoon MAX API. Send it as `POST https://max-api.chameleoon.sk/api/v1/graphql` with your API key, see [Chameleoon MAX](/chameleoon-max).

Removes the issue's reference in an external source. Call it when the reference recorded with
[`setIssueExternalRef`](/chameleoon-max/mutation/set-issue-external-ref) no longer applies.

- Returns `changed: false` when the issue had no reference in that external source.
- Works for an archived external source too.
- The permissions and `NOT_FOUND` are those of [`setIssueExternalRef`](/chameleoon-max/mutation/set-issue-external-ref).

> An error whose path runs below this field does not mean the call failed: the reference was
> removed, so do not retry. See [`Mutation`](/chameleoon-max/mutations).

## Arguments

- `id`: [`UUID!`](/chameleoon-max/type/uuid) · required
- `source`: `String!` · required

## Returns

[`IssueExternalRefResult!`](/chameleoon-max/type/issue-external-ref-result)

## Example

**Mutation**

```graphql
mutation removeIssueExternalRef($id: UUID!, $source: String!) {
  removeIssueExternalRef(id: $id, source: $source) {
    issue {
      stockVersion
      id
      number
      status
      version
      effectiveAt
    }
    changed
  }
}
```

**Variables**

```json
{
  "id": "00000000-0000-4000-8000-000000000001",
  "source": "example"
}
```

**Response**

```json
{
  "data": {
    "removeIssueExternalRef": {
      "issue": {
        "stockVersion": "example",
        "id": "00000000-0000-4000-8000-000000000001",
        "number": "example",
        "status": "OPEN",
        "version": 1,
        "effectiveAt": "2026-01-01T00:00:00Z"
      },
      "changed": true
    }
  }
}
```

Values are illustrative: replace IDs and codes with your own before you send the call.
