Create an error issue

Create a Linear issue or Jira work item for an error, and link it. The issue describes the error with its call site, stack trace and a link to it in Better Stack, and uses the integration's default project and settings.

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

URL parameters

application_id
required string
error_id
required string

Query parameters

team_id
string

Headers

Authorization
required string
Content-Type
string

Body parameters

integration_id
string
title
string
notes
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

Create an issue With a title and notes
curl --request POST \
  --url https://errors.betterstack.com/api/v4/applications/1234/errors/6f1c2b9a8e4d7f3012ab45cd/issues \
  --header "Authorization: Bearer $TOKEN"
curl --request POST \
  --url https://errors.betterstack.com/api/v4/applications/1234/errors/6f1c2b9a8e4d7f3012ab45cd/issues \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "title": "TypeError in renderCart",
  "notes": "Started after the 1.4.2 deploy."
}'