Update a Linear integration

Updates the settings of a Linear integration, the same settings as its Configure page. Send only the parameters you wish to change.

Connect the integration in Errors → Integrations first, since connecting Linear needs you to authorize Better Stack in Linear.

PATCH https://errors.betterstack.com/api/v1/linear-integrations/{id}

URL parameters

id
required string

Headers

Authorization
required string
Content-Type
required string

Body parameters

applications
array of objects
notifications
object
occurrence_threshold_count
integer
occurrence_threshold_interval
string
affected_users_threshold_count
integer
tag_filter
array of objects
name
string
linear_team_id
string
linear_assignee_id
string
linear_status_id
string
linear_project_id
string
linear_label_ids
array of strings
linear_priority
string
auto_resolve
boolean
linear_resolved_status_id
string
auto_reopen
boolean
sync_comments
boolean
200

Response body

{
  "data": {
    "id": "66368",
    "type": "linear_integration",
    "attributes": {
      "team_id": "t123456",
      "team_name": "My team",
      "applications": [],
      "notifications": {
        "spikes": false,
        "new_errors": true,
        "automatically_reopened": true,
        "occurrence_milestones": false,
        "occurrence_threshold": true,
        "affected_users_threshold": false
      },
      "occurrence_threshold_count": 100,
      "occurrence_threshold_interval": "hour",
      "affected_users_threshold_count": 10,
      "tag_filter": [
        {
          "tag": "environment",
          "values": [
            "production"
          ]
        }
      ],
      "name": "Platform errors",
      "linear_team_id": "9cfb482a-81e3-4154-b5b9-2c805e70a02d",
      "linear_assignee_id": "",
      "linear_status_id": "5c3a1f8e-2b7d-4e61-9a0c-7d4b8e2f1a36",
      "linear_resolved_status_id": "e2d4f6a8-1b3c-4d5e-8f70-9a1b2c3d4e5f",
      "linear_project_id": "",
      "linear_label_ids": [
        "0b8f3c2e-6a1d-4f97-b5e4-3c2a1d0e9f8b"
      ],
      "linear_priority": "high",
      "auto_reopen": true,
      "auto_resolve": true,
      "sync_comments": true
    }
  }
}
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"
}
404

Response body

{
  "errors": "Resource with the provided ID was not found"
}
422

Response body

{
  "errors": "linear_priority must be one of no_priority, urgent, high, medium, low."
}

Example cURL

Create issues for new errors
curl --request PATCH \
  --url https://errors.betterstack.com/api/v1/linear-integrations/66368 \
  --header "Authorization: Bearer $TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
    "notifications": {
      "new_errors": true
    },
    "linear_priority": "high",
    "linear_label_ids": ["0b8f3c2e-6a1d-4f97-b5e4-3c2a1d0e9f8b"]
  }'