# LinkCampaignDiscount

> Link a discount code to a campaign. Write access, campaigns toolset, MCP tool link_campaign_discount. Part of the MISSIN public API: call it with an API key,…

**Access:** [Write](https://developer.missin.co.uk/get-started/authentication.md#access-levels)

## Variables

| Variable | Type | Required | Accepts | Description |
|---|---|---|---|---|
| `input` | `LinkCampaignDiscountInput!` | yes | Input object, below |  |

## Input types

### LinkCampaignDiscountInput

| Field | Type | Required | Accepts | Description |
|---|---|---|---|---|
| `campaignId` | `UUID!` | yes |  |  |
| `discountCodeId` | `UUID!` | yes |  |  |

## Call it

```bash curl
curl https://api.missin.co.uk/graphql/v1 \
  -H "Authorization: Bearer $MISSIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"operationName":"LinkCampaignDiscount","variables":{"input":{"campaignId":"00000000-0000-0000-0000-000000000000","discountCodeId":"00000000-0000-0000-0000-000000000000"}},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"fb9f5e5a7c01f93ce6100a8bd9f6d9f5b952d095257720e9a5183b4b8f91b6da"}}}'
```

## Document

```graphql
mutation LinkCampaignDiscount($input: LinkCampaignDiscountInput!) { __typename linkCampaignDiscount(input: $input) { __typename id userErrors { __typename code field message } } }
```

Source: https://developer.missin.co.uk/reference/campaigns/link-campaign-discount
