The link column stores a link to a webpage. Our API supports this column, so you can read and update the link column via the API.

Reading the link column

You can return the data in a link column in two different formats. The text field will return the data as a simple string, and the value field will return the data as a JSON string.

{
  "text": "https://monday.com/",
  "value": "{\"url\":\"https://monday.com/\",\"text\":\"https://monday.com/\",\"changed_at\":\"2022-07-21T12:00:00.000Z\"}"
}

Updating the link column

You can update a link column with both a simple string and a JSON string.

Simple strings

To update a link column, send the URL (including HTTP/HTTPS) and the display text, separated with a space. You can include spaces in the display text. For example: "http://monday.com go to monday!"

JSON

To update a link column, write the URL (including HTTP/HTTPS) in the URL field, and the display text in the text field. For example: {\“url\” : \“http://monday.com\“, \“text\“:\“go to monday!\“}

mutation {
  change_multiple_column_values(item_id:11111, board_id:22222, column_values: "{\"link2\" : {\"url\" : \"http://monday.com\", \"text\":\"go to monday!\"}}") {
    id
  }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    query : "mutation ($myBoardId:Int!, $myItemId:Int!, $myColumnValues:JSON!) { change_multiple_column_values(item_id:$myItemId, board_id:$myBoardId, column_values: $myColumnValues) { id } }",
    variables : JSON.stringify({
      myBoardId: YOUR_BOARD_ID,
      myItemId: YOUR_ITEM_ID,
      myColumnValues: "{\"link2\" : {\"url\" : \"http://monday.com\", \"text\": \"go to monday!\"}}"
    })
  })
})

You can find the Postman request to change the link column here.

Clearing the link column

You can clear the link column using a change_multiple_column_values mutation.

mutation {
  change_multiple_column_values(item_id: 2973227073, board_id: 2973227049, column_values: "{\"link\" : {\"url\" : \"\", \"text\" : \"\"}}") {
    id
  }
}

📘

Have questions?

Join our developer community! You can share your questions and learn from fellow users and monday.com product experts.

Don’t forget to search before opening a new topic!