API Reference / Strategy - Initiative Ownership

Add an ownership pattern to an initiative

post https://api.intelig.ai/api/v1/intelig/strategy/initiatives/{initiativeId}/ownership-patterns

Auth: Authorization: ApiKey <key> (an API key sent as Bearer is rejected) or Authorization: Bearer <jwt> for a dashboard session. operationId: addPattern

Creates a new ownership pattern linking the initiative to a code path. Supported pattern types: FILE_GLOB (file path patterns), REPOSITORY (entire repository), BRANCH_PREFIX (branch name prefix). Commits matching these patterns will be attributed to this initiative.

Example request

curl -X POST "https://api.intelig.ai/api/v1/intelig/strategy/initiatives/1/ownership-patterns" \
  -H "Authorization: ApiKey $INTELIG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "patternType": "FILE_GLOB",
    "pattern": "apps/web/src/server/arboris/**",
    "repositoryId": 9,
    "repositoryName": "levi-garner/tree-inventory-ai"
  }'

Path parameters

NameTypeRequiredDescription
initiativeId integer (int64) yes Initiative ID

Request body

application/json

FieldTypeRequiredDescription
patternType string yes Type of ownership pattern One of: FILE_GLOB, REPOSITORY, BRANCH_PREFIX Example: FILE_GLOB
pattern string no Glob or regex pattern to match files Example: src/main/java/com/example/**
repositoryId integer (int64) yes ID of the repository this pattern applies to Example: 10
repositoryName string yes Full name of the repository Example: org/my-repo

Response 201

application/json · ApiResponseOwnershipPatternDto

FieldTypeDescription
success boolean
message string
data OwnershipPatternDto Ownership pattern linking an initiative to repository file paths

Status codes

  • 201 — Pattern created successfully
  • 401 — —
  • 404 — Initiative not found
  • 409 — Duplicate pattern - this pattern already exists for this initiative
  • 429 — —

Every response is wrapped in { success, message, data }. A 4xx means the request is wrong — do not retry it unchanged. A 429 carries Retry-After in seconds.