Create smart links via Jira API

I’m creating issues via the Jira REST API. They have Figma links in them but they’re not being rendered as Smart Links. It’s showing up as just a regular link.

Is there a way to trigger the Smart Link to be generated when creating issues via the API?

@AlexChumbley, welcome to the Atlassian developer community.

Yes, it is possible.

  1. Create issue using GET /rest/api/3/issue/{issueIdOrKey}
  2. Send a description in Atlassian Document Format.
  3. Use the inlineCard node as the Smart Link.

An issue payload might look something like the following:

{
  "fields":{
    "project":{
      "key":"NGEW"
    },
    "issuetype":{
      "id":"10308"
    },
    "summary":"inlineCard is a Smart Link",
    "description":{
      "type":"doc",
      "version":1,
      "content":[
        {
          "type":"paragraph",
          "content":[
            {
              "type":"inlineCard",
              "attrs":{
                "url":"https://devpartisan.atlassian.net/browse/NGEW-1"
              }
            }
          ]
        }
      ]
    }
  }
}