Link an error to an issue

Link an error to an existing Linear or Jira issue.

POST https://errors.betterstack.com/api/v4/applications/{application_id}/errors/{error_id}/issues/link

URL parameters

application_id
required string
error_id
required string

Query parameters

team_id
string

Headers

Authorization
required string
Content-Type
string

Body parameters

issue
required string
integration_id
string
201

Response body

{
  "data": {
    "id": "123456789",
    "type": "error_issue",
    "attributes": {
      "integration_id": "7",
      "integration_type": "linear",
      "external_id": "ENG-123",
      "label": "ENG-123",
      "url": "https://linear.app/example/issue/ENG-123",
      "operation": "linked_manually"
    }
  }
}
200

Response body

{
  "data": {
    "id": "123456789",
    "type": "error_issue",
    "attributes": {
      "integration_id": "7",
      "integration_type": "linear",
      "external_id": "ENG-123",
      "label": "ENG-123",
      "url": "https://linear.app/example/issue/ENG-123",
      "operation": "linked_manually"
    }
  }
}
401

Response body

{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/logs/api/getting-started/#obtaining-a-logtail-api-token"
}
403

Response body

{
  "errors": "This API token is read-only and cannot be used for write operations."
}
404
422

Response body

{
  "errors": "More than one integration could serve this request. Pass integration_id set to one of the listed IDs.",
  "integration_ids": [
    "7",
    "9"
  ]
}
422
422
503

Response attributes

id
string
type
string
integration_id
string
integration_type
string
external_id
string
label
string
url
string
operation
string

Example cURL

Link an issue
curl --request POST \
  --url https://errors.betterstack.com/api/v4/applications/1234/errors/6f1c2b9a8e4d7f3012ab45cd/issues/link \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "issue": "ENG-123"
}'