Skip to content
bucker

API reference

task-grants

11 operations. Shapes are sketches of the declared schemas, bounded in depth — the authoritative document is linked from the index.

GET/orgs/{orgSlug}/task-grants

Requires bearerAuth

Parameters

Parameters for GET /orgs/{orgSlug}/task-grants
NameInTypeNotes
orgSlugrequiredpathstringmin length 1, max length 64
objectKindquery"issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 1 moreone of "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 1 more
objectRefquerystringmin length 1, max length 64
activequery"true" | "false"one of "true" | "false"

Response 200

{
  data: {
    id: string
    agentId: string
    objectKind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 1 more
    objectRef: string
    projectId: string | null
    purpose: "investigate" | "propose"
    scopes: string[]
    expiresAt: string
    revokedAt: string | null
    createdAt: string
    createdByPrincipalId: string
    active: boolean
    budgets: {
      kind: string
      limit: integer
      consumed: integer
    }[]
    productionWrite: boolean
  }[]
}

Response 400 · `bad_request` — the path, query or body failed validation. `details` carries the Zod issues, one per offending field.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 401 · `unauthorized` — no credential, or one that is expired, revoked or not valid for this resource. `mfa_required` when the credential is good but a second factor is owed.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 403 · `forbidden` — the credential is valid and its scopes or this principal’s membership do not reach this resource. Scopes are re-intersected with live memberships on every request, so this can appear for a token that worked yesterday.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 404 · `not_found` — no such resource, OR one this principal cannot see. The two are deliberately one answer: a 403 would confirm the existence of something whose identifier is guessable.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 429 · `rate_limited` or `quota_exceeded` — over a ceiling. `Retry-After` says when to come back, and `x-ratelimit-limit` / `-remaining` / `-reset` describe the bucket.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 500 · `internal_error` — an unhandled failure on this side. The message is always generic; `requestId` is the part worth quoting.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Request

curl https://api.bucker.io/orgs/{orgSlug}/task-grants \
  -H "authorization: Bearer $BUCKER_TOKEN"

POST/orgs/{orgSlug}/task-grants

Requires bearerAuth

Parameters

Parameters for POST /orgs/{orgSlug}/task-grants
NameInTypeNotes
orgSlugrequiredpathstringmin length 1, max length 64

Request body (required) · application/json

{
  agentId: string
  objectKind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 1 more
  objectRef: string
  purpose: "investigate" | "propose"
  budgets: {
    kind: "TOKENS" | "SANDBOX_MINUTES" | "CONCURRENT_RUNS" | "USD_CENTS" | "QUERY_SCAN" | "EXPOSURE_UNITS" | "CI_MINUTES" | "PAGES" | … 3 more
    limit: integer
  }[]
  expiresInMinutes?: integer
  audience?: string
  resumeFromTaskGrantId?: string
  reach?: {
    type: "object"
    kind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 2 more
    id: string
    facets: string[]
  } | {
    type: "project_wide_read"
  }[]
}

Response 201

{
  id: string
  agentId: string
  objectKind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 1 more
  objectRef: string
  projectId: string | null
  purpose: "investigate" | "propose"
  scopes: string[]
  expiresAt: string
  revokedAt: string | null
  createdAt: string
  createdByPrincipalId: string
  active: boolean
  budgets: {
    kind: string
    limit: integer
    consumed: integer
  }[]
  productionWrite: boolean
  token: string
  tokenId: string
}

Response 400 · `bad_request` — the path, query or body failed validation. `details` carries the Zod issues, one per offending field.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 401 · `unauthorized` — no credential, or one that is expired, revoked or not valid for this resource. `mfa_required` when the credential is good but a second factor is owed.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 403 · `forbidden` — the credential is valid and its scopes or this principal’s membership do not reach this resource. Scopes are re-intersected with live memberships on every request, so this can appear for a token that worked yesterday.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 404 · `not_found` — no such resource, OR one this principal cannot see. The two are deliberately one answer: a 403 would confirm the existence of something whose identifier is guessable.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 429 · `rate_limited` or `quota_exceeded` — over a ceiling. `Retry-After` says when to come back, and `x-ratelimit-limit` / `-remaining` / `-reset` describe the bucket.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 500 · `internal_error` — an unhandled failure on this side. The message is always generic; `requestId` is the part worth quoting.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Request

curl -X POST https://api.bucker.io/orgs/{orgSlug}/task-grants \
  -H "authorization: Bearer $BUCKER_TOKEN" \
  -H 'content-type: application/json' \
  -d '{ … }'

GET/orgs/{orgSlug}/task-grants/{taskGrantId}

Requires bearerAuth

Parameters

Parameters for GET /orgs/{orgSlug}/task-grants/{taskGrantId}
NameInTypeNotes
orgSlugrequiredpathstringmin length 1, max length 64
taskGrantIdrequiredpathstringmin length 1, max length 64

Response 200

{
  id: string
  agentId: string
  objectKind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 1 more
  objectRef: string
  projectId: string | null
  purpose: "investigate" | "propose"
  scopes: string[]
  expiresAt: string
  revokedAt: string | null
  createdAt: string
  createdByPrincipalId: string
  active: boolean
  budgets: {
    kind: string
    limit: integer
    consumed: integer
  }[]
  productionWrite: boolean
}

Response 400 · `bad_request` — the path, query or body failed validation. `details` carries the Zod issues, one per offending field.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 401 · `unauthorized` — no credential, or one that is expired, revoked or not valid for this resource. `mfa_required` when the credential is good but a second factor is owed.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 403 · `forbidden` — the credential is valid and its scopes or this principal’s membership do not reach this resource. Scopes are re-intersected with live memberships on every request, so this can appear for a token that worked yesterday.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 404 · `not_found` — no such resource, OR one this principal cannot see. The two are deliberately one answer: a 403 would confirm the existence of something whose identifier is guessable.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 429 · `rate_limited` or `quota_exceeded` — over a ceiling. `Retry-After` says when to come back, and `x-ratelimit-limit` / `-remaining` / `-reset` describe the bucket.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 500 · `internal_error` — an unhandled failure on this side. The message is always generic; `requestId` is the part worth quoting.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Request

curl https://api.bucker.io/orgs/{orgSlug}/task-grants/{taskGrantId} \
  -H "authorization: Bearer $BUCKER_TOKEN"

GET/orgs/{orgSlug}/task-grants/{taskGrantId}/reach

Requires bearerAuth

Parameters

Parameters for GET /orgs/{orgSlug}/task-grants/{taskGrantId}/reach
NameInTypeNotes
orgSlugrequiredpathstringmin length 1, max length 64
taskGrantIdrequiredpathstringmin length 1, max length 64

Response 200

{
  pin: {
    kind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 1 more
    ref: string
    label: string | null
    level: "project" | "org"
    org: {
      slug: string
      name: string
    }
    project: {
      id: string
      slug: string
      name: string
    } | null
  }
  taskGrantId: string | null
  purpose: "investigate" | "propose"
  expiresAt: string | null
  active: boolean
  surfaces: "api" | "mcp"[]
  scopes: string[]
  scopesPendingExchange: boolean
  read: {
    via: "pin" | "project_meta" | "project_wide" | "edge" | "child" | "widening"
    kind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 3 more
    id: string | null
    label: string | null
    count: integer | null
    capped: boolean
    sample: {
      id: string
      label: string | null
    }[]
    facets: {
      name: string
      key: string
      why: string
      access: "read" | "write"
      limited: boolean
    }[]
    expiresAt: string | null
    decidedBy: "person" | "review_mode" | "policy" | null
  }[]
  write: {
    via: "pin" | "project_meta" | "project_wide" | "edge" | "child" | "widening"
    kind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 3 more
    id: string | null
    label: string | null
    count: integer | null
    capped: boolean
    sample: {
      id: string
      label: string | null
    }[]
    facets: {
      name: string
      key: string
      why: string
      access: "read" | "write"
      limited: boolean
    }[]
    expiresAt: string | null
    decidedBy: "person" | "review_mode" | "policy" | null
  }[]
  projectWide: boolean
  orgWideNote: {
    projects: integer
  } | null
  cannot: "other_objects" | "other_projects" | "project_lists" | "org_data" | "people_and_billing" | "approve_or_merge" | "publish" | "change_anything"[]
  widening: {
    requestable: boolean
    maxMinutes: integer
    reviewModeMayDecide: boolean
    personDecides: "writes" | "project_wide" | "other_reads"[]
    facets: {
      name: string
      key: string
      access: "read" | "write"
      decidedBy: "review_mode" | "person"[]
    }[]
    projectWideAvailable: boolean
    active: {
      id: string
      taskGrantId: string
      items: object[]
      addScopes: string[]
      minutes: integer
      status: "active" | "pending" | "approved_pending_exchange" | "rejected" | "expired" | "revoked" | "withdrawn"
      decidedBy: "person" | "review_mode" | "policy" | null
      approvalRequestId: string | null
      activatedAt: string | null
      expiresAt: string | null
      createdAt: string
    }[]
    pending: {
      id: string
      taskGrantId: string
      items: object[]
      addScopes: string[]
      minutes: integer
      status: "active" | "pending" | "approved_pending_exchange" | "rejected" | "expired" | "revoked" | "withdrawn"
      decidedBy: "person" | "review_mode" | "policy" | null
      approvalRequestId: string | null
      activatedAt: string | null
      expiresAt: string | null
      createdAt: string
    }[]
  }
  blockers: "no_rights" | "reach_invalid"[]
  reachProblems: string[]
  reachProblemCodes: {
    code: "kind_has_no_reach" | "org_level_no_project" | "issue_bound_no_project" | "not_a_reach_kind" | "issue_bound_only_pin" | "object_not_widenable" | "facet_never" | "not_a_facet" | … 3 more
    item: integer | null
    kind: string | null
    facet: string | null
  }[]
}

Response 400 · `bad_request` — the path, query or body failed validation. `details` carries the Zod issues, one per offending field.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 401 · `unauthorized` — no credential, or one that is expired, revoked or not valid for this resource. `mfa_required` when the credential is good but a second factor is owed.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 403 · `forbidden` — the credential is valid and its scopes or this principal’s membership do not reach this resource. Scopes are re-intersected with live memberships on every request, so this can appear for a token that worked yesterday.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 404 · `not_found` — no such resource, OR one this principal cannot see. The two are deliberately one answer: a 403 would confirm the existence of something whose identifier is guessable.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 429 · `rate_limited` or `quota_exceeded` — over a ceiling. `Retry-After` says when to come back, and `x-ratelimit-limit` / `-remaining` / `-reset` describe the bucket.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 500 · `internal_error` — an unhandled failure on this side. The message is always generic; `requestId` is the part worth quoting.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Request

curl https://api.bucker.io/orgs/{orgSlug}/task-grants/{taskGrantId}/reach \
  -H "authorization: Bearer $BUCKER_TOKEN"

GET/orgs/{orgSlug}/task-grants/{taskGrantId}/reach-grants

Requires bearerAuth

Parameters

Parameters for GET /orgs/{orgSlug}/task-grants/{taskGrantId}/reach-grants
NameInTypeNotes
orgSlugrequiredpathstringmin length 1, max length 64
taskGrantIdrequiredpathstringmin length 1, max length 64

Response 200

{
  data: {
    id: string
    taskGrantId: string
    items: {
      type: "object"
      kind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 2 more
      id: string
      facets: string[]
    } | {
      type: "project_wide_read"
    }[]
    addScopes: string[]
    minutes: integer
    status: "active" | "pending" | "approved_pending_exchange" | "rejected" | "expired" | "revoked" | "withdrawn"
    decidedBy: "person" | "review_mode" | "policy" | null
    approvalRequestId: string | null
    activatedAt: string | null
    expiresAt: string | null
    createdAt: string
  }[]
}

Response 400 · `bad_request` — the path, query or body failed validation. `details` carries the Zod issues, one per offending field.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 401 · `unauthorized` — no credential, or one that is expired, revoked or not valid for this resource. `mfa_required` when the credential is good but a second factor is owed.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 403 · `forbidden` — the credential is valid and its scopes or this principal’s membership do not reach this resource. Scopes are re-intersected with live memberships on every request, so this can appear for a token that worked yesterday.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 404 · `not_found` — no such resource, OR one this principal cannot see. The two are deliberately one answer: a 403 would confirm the existence of something whose identifier is guessable.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 429 · `rate_limited` or `quota_exceeded` — over a ceiling. `Retry-After` says when to come back, and `x-ratelimit-limit` / `-remaining` / `-reset` describe the bucket.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 500 · `internal_error` — an unhandled failure on this side. The message is always generic; `requestId` is the part worth quoting.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Request

curl https://api.bucker.io/orgs/{orgSlug}/task-grants/{taskGrantId}/reach-grants \
  -H "authorization: Bearer $BUCKER_TOKEN"

POST/orgs/{orgSlug}/task-grants/{taskGrantId}/reach-grants/{reachGrantId}/revoke

Requires bearerAuth

Parameters

Parameters for POST /orgs/{orgSlug}/task-grants/{taskGrantId}/reach-grants/{reachGrantId}/revoke
NameInTypeNotes
orgSlugrequiredpathstringmin length 1, max length 64
taskGrantIdrequiredpathstringmin length 1, max length 64
reachGrantIdrequiredpathstringmin length 1, max length 64

Response 200

{
  id: string
  taskGrantId: string
  items: {
    type: "object"
    kind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 2 more
    id: string
    facets: string[]
  } | {
    type: "project_wide_read"
  }[]
  addScopes: string[]
  minutes: integer
  status: "active" | "pending" | "approved_pending_exchange" | "rejected" | "expired" | "revoked" | "withdrawn"
  decidedBy: "person" | "review_mode" | "policy" | null
  approvalRequestId: string | null
  activatedAt: string | null
  expiresAt: string | null
  createdAt: string
}

Response 400 · `bad_request` — the path, query or body failed validation. `details` carries the Zod issues, one per offending field.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 401 · `unauthorized` — no credential, or one that is expired, revoked or not valid for this resource. `mfa_required` when the credential is good but a second factor is owed.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 403 · `forbidden` — the credential is valid and its scopes or this principal’s membership do not reach this resource. Scopes are re-intersected with live memberships on every request, so this can appear for a token that worked yesterday.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 404 · `not_found` — no such resource, OR one this principal cannot see. The two are deliberately one answer: a 403 would confirm the existence of something whose identifier is guessable.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 429 · `rate_limited` or `quota_exceeded` — over a ceiling. `Retry-After` says when to come back, and `x-ratelimit-limit` / `-remaining` / `-reset` describe the bucket.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 500 · `internal_error` — an unhandled failure on this side. The message is always generic; `requestId` is the part worth quoting.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Request

curl -X POST https://api.bucker.io/orgs/{orgSlug}/task-grants/{taskGrantId}/reach-grants/{reachGrantId}/revoke \
  -H "authorization: Bearer $BUCKER_TOKEN"

POST/orgs/{orgSlug}/task-grants/{taskGrantId}/reach-requests

Requires bearerAuth

Parameters

Parameters for POST /orgs/{orgSlug}/task-grants/{taskGrantId}/reach-requests
NameInTypeNotes
orgSlugrequiredpathstringmin length 1, max length 64
taskGrantIdrequiredpathstringmin length 1, max length 64

Request body (required) · application/json

{
  items: {
    type: "object"
    kind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 2 more
    id: string
    facets: string[]
  } | {
    type: "project_wide_read"
  }[]
  minutes?: integer
  reason: string
}

Response 201

{
  status: "active"
  reachGrant: {
    id: string
    taskGrantId: string
    items: {
      type: "object"
      kind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 2 more
      id: string
      facets: string[]
    } | {
      type: "project_wide_read"
    }[]
    addScopes: string[]
    minutes: integer
    status: "active" | "pending" | "approved_pending_exchange" | "rejected" | "expired" | "revoked" | "withdrawn"
    decidedBy: "person" | "review_mode" | "policy" | null
    approvalRequestId: string | null
    activatedAt: string | null
    expiresAt: string | null
    createdAt: string
  }
} | {
  status: "pending"
  reachGrant: {
    id: string
    taskGrantId: string
    items: {
      type: "object"
      kind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 2 more
      id: string
      facets: string[]
    } | {
      type: "project_wide_read"
    }[]
    addScopes: string[]
    minutes: integer
    status: "active" | "pending" | "approved_pending_exchange" | "rejected" | "expired" | "revoked" | "withdrawn"
    decidedBy: "person" | "review_mode" | "policy" | null
    approvalRequestId: string | null
    activatedAt: string | null
    expiresAt: string | null
    createdAt: string
  }
  approvalRequestId: string
  expiresAt: string
}

Response 400 · `bad_request` — the path, query or body failed validation. `details` carries the Zod issues, one per offending field.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 401 · `unauthorized` — no credential, or one that is expired, revoked or not valid for this resource. `mfa_required` when the credential is good but a second factor is owed.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 403 · `forbidden` — the credential is valid and its scopes or this principal’s membership do not reach this resource. Scopes are re-intersected with live memberships on every request, so this can appear for a token that worked yesterday.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 404 · `not_found` — no such resource, OR one this principal cannot see. The two are deliberately one answer: a 403 would confirm the existence of something whose identifier is guessable.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 429 · `rate_limited` or `quota_exceeded` — over a ceiling. `Retry-After` says when to come back, and `x-ratelimit-limit` / `-remaining` / `-reset` describe the bucket.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 500 · `internal_error` — an unhandled failure on this side. The message is always generic; `requestId` is the part worth quoting.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Request

curl -X POST https://api.bucker.io/orgs/{orgSlug}/task-grants/{taskGrantId}/reach-requests \
  -H "authorization: Bearer $BUCKER_TOKEN" \
  -H 'content-type: application/json' \
  -d '{ … }'

POST/orgs/{orgSlug}/task-grants/{taskGrantId}/revoke

Requires bearerAuth

Parameters

Parameters for POST /orgs/{orgSlug}/task-grants/{taskGrantId}/revoke
NameInTypeNotes
orgSlugrequiredpathstringmin length 1, max length 64
taskGrantIdrequiredpathstringmin length 1, max length 64

Response 200

{
  id: string
  agentId: string
  objectKind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 1 more
  objectRef: string
  projectId: string | null
  purpose: "investigate" | "propose"
  scopes: string[]
  expiresAt: string
  revokedAt: string | null
  createdAt: string
  createdByPrincipalId: string
  active: boolean
  budgets: {
    kind: string
    limit: integer
    consumed: integer
  }[]
  productionWrite: boolean
}

Response 400 · `bad_request` — the path, query or body failed validation. `details` carries the Zod issues, one per offending field.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 401 · `unauthorized` — no credential, or one that is expired, revoked or not valid for this resource. `mfa_required` when the credential is good but a second factor is owed.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 403 · `forbidden` — the credential is valid and its scopes or this principal’s membership do not reach this resource. Scopes are re-intersected with live memberships on every request, so this can appear for a token that worked yesterday.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 404 · `not_found` — no such resource, OR one this principal cannot see. The two are deliberately one answer: a 403 would confirm the existence of something whose identifier is guessable.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 429 · `rate_limited` or `quota_exceeded` — over a ceiling. `Retry-After` says when to come back, and `x-ratelimit-limit` / `-remaining` / `-reset` describe the bucket.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 500 · `internal_error` — an unhandled failure on this side. The message is always generic; `requestId` is the part worth quoting.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Request

curl -X POST https://api.bucker.io/orgs/{orgSlug}/task-grants/{taskGrantId}/revoke \
  -H "authorization: Bearer $BUCKER_TOKEN"

GET/orgs/{orgSlug}/task-grants/{taskGrantId}/state

Requires bearerAuth

Parameters

Parameters for GET /orgs/{orgSlug}/task-grants/{taskGrantId}/state
NameInTypeNotes
orgSlugrequiredpathstringmin length 1, max length 64
taskGrantIdrequiredpathstringmin length 1, max length 64

Response 200

{
  taskGrantId: string
  state: {
    checked: string[]
    notChecked: string[]
    hypotheses: {
      text: string
      status: "open" | "supported" | "refuted"
      confidence?: "low" | "medium" | "high"
    }[]
    pendingApprovals: string[]
    note?: string
  }
  tokenEstimate: integer
  version: integer
  updatedAt: string
  active: boolean
}

Response 400 · `bad_request` — the path, query or body failed validation. `details` carries the Zod issues, one per offending field.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 401 · `unauthorized` — no credential, or one that is expired, revoked or not valid for this resource. `mfa_required` when the credential is good but a second factor is owed.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 403 · `forbidden` — the credential is valid and its scopes or this principal’s membership do not reach this resource. Scopes are re-intersected with live memberships on every request, so this can appear for a token that worked yesterday.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 404 · `not_found` — no such resource, OR one this principal cannot see. The two are deliberately one answer: a 403 would confirm the existence of something whose identifier is guessable.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 429 · `rate_limited` or `quota_exceeded` — over a ceiling. `Retry-After` says when to come back, and `x-ratelimit-limit` / `-remaining` / `-reset` describe the bucket.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 500 · `internal_error` — an unhandled failure on this side. The message is always generic; `requestId` is the part worth quoting.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Request

curl https://api.bucker.io/orgs/{orgSlug}/task-grants/{taskGrantId}/state \
  -H "authorization: Bearer $BUCKER_TOKEN"

PUT/orgs/{orgSlug}/task-grants/{taskGrantId}/state

Requires bearerAuth

Parameters

Parameters for PUT /orgs/{orgSlug}/task-grants/{taskGrantId}/state
NameInTypeNotes
orgSlugrequiredpathstringmin length 1, max length 64
taskGrantIdrequiredpathstringmin length 1, max length 64

Request body (required) · application/json

{
  state: {
    checked?: string[]
    notChecked?: string[]
    hypotheses?: {
      text: string
      status?: "open" | "supported" | "refuted"
      confidence?: "low" | "medium" | "high"
    }[]
    pendingApprovals?: string[]
    note?: string
  }
  expectedVersion?: integer
}

Response 200

{
  taskGrantId: string
  state: {
    checked: string[]
    notChecked: string[]
    hypotheses: {
      text: string
      status: "open" | "supported" | "refuted"
      confidence?: "low" | "medium" | "high"
    }[]
    pendingApprovals: string[]
    note?: string
  }
  tokenEstimate: integer
  version: integer
  updatedAt: string
  active: boolean
}

Response 400 · `bad_request` — the path, query or body failed validation. `details` carries the Zod issues, one per offending field.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 401 · `unauthorized` — no credential, or one that is expired, revoked or not valid for this resource. `mfa_required` when the credential is good but a second factor is owed.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 403 · `forbidden` — the credential is valid and its scopes or this principal’s membership do not reach this resource. Scopes are re-intersected with live memberships on every request, so this can appear for a token that worked yesterday.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 404 · `not_found` — no such resource, OR one this principal cannot see. The two are deliberately one answer: a 403 would confirm the existence of something whose identifier is guessable.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 429 · `rate_limited` or `quota_exceeded` — over a ceiling. `Retry-After` says when to come back, and `x-ratelimit-limit` / `-remaining` / `-reset` describe the bucket.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 500 · `internal_error` — an unhandled failure on this side. The message is always generic; `requestId` is the part worth quoting.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Request

curl -X PUT https://api.bucker.io/orgs/{orgSlug}/task-grants/{taskGrantId}/state \
  -H "authorization: Bearer $BUCKER_TOKEN" \
  -H 'content-type: application/json' \
  -d '{ … }'

POST/orgs/{orgSlug}/task-grants/reach-preview

Requires bearerAuth

Parameters

Parameters for POST /orgs/{orgSlug}/task-grants/reach-preview
NameInTypeNotes
orgSlugrequiredpathstringmin length 1, max length 64

Request body (required) · application/json

{
  agentId: string
  objectKind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 1 more
  objectRef: string
  purpose: "investigate" | "propose"
  audience?: string
  reach?: {
    type: "object"
    kind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 2 more
    id: string
    facets: string[]
  } | {
    type: "project_wide_read"
  }[]
  expiresInMinutes?: integer
}

Response 200

{
  pin: {
    kind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 1 more
    ref: string
    label: string | null
    level: "project" | "org"
    org: {
      slug: string
      name: string
    }
    project: {
      id: string
      slug: string
      name: string
    } | null
  }
  taskGrantId: string | null
  purpose: "investigate" | "propose"
  expiresAt: string | null
  active: boolean
  surfaces: "api" | "mcp"[]
  scopes: string[]
  scopesPendingExchange: boolean
  read: {
    via: "pin" | "project_meta" | "project_wide" | "edge" | "child" | "widening"
    kind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 3 more
    id: string | null
    label: string | null
    count: integer | null
    capped: boolean
    sample: {
      id: string
      label: string | null
    }[]
    facets: {
      name: string
      key: string
      why: string
      access: "read" | "write"
      limited: boolean
    }[]
    expiresAt: string | null
    decidedBy: "person" | "review_mode" | "policy" | null
  }[]
  write: {
    via: "pin" | "project_meta" | "project_wide" | "edge" | "child" | "widening"
    kind: "issue" | "release" | "alert_rule" | "monitor" | "service" | "flag" | "dashboard" | "status_page" | … 3 more
    id: string | null
    label: string | null
    count: integer | null
    capped: boolean
    sample: {
      id: string
      label: string | null
    }[]
    facets: {
      name: string
      key: string
      why: string
      access: "read" | "write"
      limited: boolean
    }[]
    expiresAt: string | null
    decidedBy: "person" | "review_mode" | "policy" | null
  }[]
  projectWide: boolean
  orgWideNote: {
    projects: integer
  } | null
  cannot: "other_objects" | "other_projects" | "project_lists" | "org_data" | "people_and_billing" | "approve_or_merge" | "publish" | "change_anything"[]
  widening: {
    requestable: boolean
    maxMinutes: integer
    reviewModeMayDecide: boolean
    personDecides: "writes" | "project_wide" | "other_reads"[]
    facets: {
      name: string
      key: string
      access: "read" | "write"
      decidedBy: "review_mode" | "person"[]
    }[]
    projectWideAvailable: boolean
    active: {
      id: string
      taskGrantId: string
      items: object[]
      addScopes: string[]
      minutes: integer
      status: "active" | "pending" | "approved_pending_exchange" | "rejected" | "expired" | "revoked" | "withdrawn"
      decidedBy: "person" | "review_mode" | "policy" | null
      approvalRequestId: string | null
      activatedAt: string | null
      expiresAt: string | null
      createdAt: string
    }[]
    pending: {
      id: string
      taskGrantId: string
      items: object[]
      addScopes: string[]
      minutes: integer
      status: "active" | "pending" | "approved_pending_exchange" | "rejected" | "expired" | "revoked" | "withdrawn"
      decidedBy: "person" | "review_mode" | "policy" | null
      approvalRequestId: string | null
      activatedAt: string | null
      expiresAt: string | null
      createdAt: string
    }[]
  }
  blockers: "no_rights" | "reach_invalid"[]
  reachProblems: string[]
  reachProblemCodes: {
    code: "kind_has_no_reach" | "org_level_no_project" | "issue_bound_no_project" | "not_a_reach_kind" | "issue_bound_only_pin" | "object_not_widenable" | "facet_never" | "not_a_facet" | … 3 more
    item: integer | null
    kind: string | null
    facet: string | null
  }[]
}

Response 400 · `bad_request` — the path, query or body failed validation. `details` carries the Zod issues, one per offending field.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 401 · `unauthorized` — no credential, or one that is expired, revoked or not valid for this resource. `mfa_required` when the credential is good but a second factor is owed.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 403 · `forbidden` — the credential is valid and its scopes or this principal’s membership do not reach this resource. Scopes are re-intersected with live memberships on every request, so this can appear for a token that worked yesterday.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 404 · `not_found` — no such resource, OR one this principal cannot see. The two are deliberately one answer: a 403 would confirm the existence of something whose identifier is guessable.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 429 · `rate_limited` or `quota_exceeded` — over a ceiling. `Retry-After` says when to come back, and `x-ratelimit-limit` / `-remaining` / `-reset` describe the bucket.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Response 500 · `internal_error` — an unhandled failure on this side. The message is always generic; `requestId` is the part worth quoting.

{
  error: {
    code: "bad_request" | "conflict" | "forbidden" | "internal_error" | "mfa_required" | "not_found" | "payload_too_large" | "quota_exceeded" | … 7 more
    message: string
    details?: unknown
    requestId?: string
  }
}

Request

curl -X POST https://api.bucker.io/orgs/{orgSlug}/task-grants/reach-preview \
  -H "authorization: Bearer $BUCKER_TOKEN" \
  -H 'content-type: application/json' \
  -d '{ … }'