> For the complete documentation index, see [llms.txt](https://magicpay.gitbook.io/magicpay-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://magicpay.gitbook.io/magicpay-documentation/magic-links/update-magic-links.md).

# Update Magic Links

## 7.2 Update Magic Links

**Request**

| Method | URL                                      |
| ------ | ---------------------------------------- |
| PUT    | /magiclink/v1/products/{magic\_link\_id} |

Copy

```
{
  "name": "Updated Magic Link Name",
  "description": "Magic Link Description",
  "channel": "SomeChannel",
  "orderId": 1,
  "conversationId": "SomeConversationId",
  "externalId": "SomeExternalId",
  "status": "Active",
  "price": 29.99,
  "currency": "USD",
  "enabledInstallments": "[1, 2]",
  "stock": 50,
  "image": "image_url.jpg",
  "url": "some_url",
  "image_url": "image_url.jpg",
  "is_active": true,
  "is_deleted": false,
  "merchant_id": 1,
  "link_id": "SomeLinkId",
  "soldCount": 10,
  "token": "SomeToken",
  "custom_link": true,
  "custom_token": "SomeCustomToken"
}
```

**Response**

| Status | Response                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 200    | <p>{</p><p>"data": {</p><p>"id": 164,</p><p>"name": "Updated Magic Link Name",</p><p>"description": "Magic Link Description",</p><p>"orderId": "1",</p><p>"conversationId": "SomeConversationId",</p><p>"externalId": "SomeExternalId",</p><p>"status": "Active",</p><p>"price": 29.99,</p><p>"currency": "USD",</p><p>"stock": 50,</p><p>"soldCount": 0,</p><p>"token": null,</p><p>"enabledInstallments": \[],</p><p>"url": "<https://www.paytr.com/link/0pF9RUP>",</p><p>"imageUrl": "iVBORw0KGgoAAAANSUhEUgAAAuQAAALkAQMAAAB9arImAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAACNklEQVR4nO3ZQXaDMAwFwNyA+9/SN6CvLUZCNiTd1vMXFLA18k5N8nqJiIiIiIiIiIiIiIiIiMgfs9e077fbvsdq2fdQRqfT6XT68nqbP0bVTLoto9PpdDp9eb1UDfBl4baMTqfT6XT6dNt2vMl3r4zQ6XQ6nU7/WB+l6BP76HQ6nU6nT/Thsf96O9xtc45Op9PpdPrv+5IYyc+XsYxOp9Pp9OX1h45tcvdHiU6n0+n0tfTb+p+/ecuef8yNFo/N6HQ6nU5fUh8Lip4r2mlu55Z5CzqdTqfT19ILV6py/dgiH49Op9PpdPpZXy4XuCxEn+EodDqdTqcvr/eCSF6IadxbDNN9e/s/AZ1Op9Ppi+jHB+ELcrQod+Xjb18YTkGn0+l0+uJ6Gcm5T8tbSosPpzadTqfT6Wvpx6XD5S6nINvZYh46nU6n09fSM7cNWBwgD/FYfTe16XQ6nU5fTQ+z5ceYxnm1Nxs60ul0Op1Ov24rLfpdtCgV+Xh0Op1Op9MzXDqWd/MJveXpTqfT6XT68noUzMwiDbmb1XQ6nU6nr6k/dOwZ4DbZ93kfOp1Op9P/r77XtOu7Ps7z5jLiH7/DptPpdDp9Lb0Nj7M+8Y1yaUan0+l0Ov2eKyP5gsRjVMzOSKfT6XQ6/YRjQufSbW6Wd3Q6nU6n0696Lri0iNVolg9Ap9PpdDr9rlkvPRZGqRyATqfT6XR6zTjEizQcoL+j0+l0On15XUREREREREREREREREREHvIFjRiii8uDyA8AAAAASUVORK5CYII=",</p><p>"channel": "SomeChannel"</p><p>}</p><p>}</p> |
| 403    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 400    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 401    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 401    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| 500    |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

[<br>](https://hilals-organization.gitbook.io/magicpay-documentation/7.-magic-links/7.1-create-magic-links)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://magicpay.gitbook.io/magicpay-documentation/magic-links/update-magic-links.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
