# AttachSendDiscount

> Link a discount code to an email or SMS send. Write access, marketing toolset, MCP tool attach_send_discount. Part of the MISSIN public API: call it with an…

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

## Variables

| Variable | Type | Required | Accepts | Description |
|---|---|---|---|---|
| `discountCodeId` | `UUID!` | yes |  |  |
| `sendId` | `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":"AttachSendDiscount","variables":{"discountCodeId":"00000000-0000-0000-0000-000000000000","sendId":"00000000-0000-0000-0000-000000000000"},"extensions":{"persistedQuery":{"version":1,"sha256Hash":"614d2808455db1911eacd1de7da36d097b73fbcccab2d0a776b1f2bdcbbbd7aa"}}}'
```

## Document

```graphql
mutation AttachSendDiscount($discountCodeId: UUID!, $sendId: UUID!) { __typename attachSendDiscount(input: {sendId: $sendId, discountCodeId: $discountCodeId}) { __typename linkId userErrors { __typename code field message } } }
```

Source: https://developer.missin.co.uk/reference/marketing/attach-send-discount
