> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Get incentive state

Returns all incentive task statuses + totals for caller's active org

` GET /v1/incentive/state `

Get incentive state

Returns all incentive task statuses + totals for caller's active org

## Responses

### ` 200 ` — OK

Content type: ` application/json `

- ` value `: type ` object `

  - ` org_id `: type ` string `

  - ` tasks `: type ` array `

    - ` array item `: type ` object `

      - ` claimed_at `: type ` string ` — claimed_at + claimed_by intentionally NOT omitempty — emit `null` for pending tasks so the TS frontend gets a stable shape (`string | null`, never `undefined`). See useIncentiveState.ts type IncentiveTaskState.

      - ` claimed_by `: type ` string `

      - ` metadata `: type ` object `

      - ` reward_ai_credits `: type ` integer `

      - ` reward_cu `: type ` integer `

      - ` status `: type ` string `

      - ` type `: type ` string `

  - ` totals `: type ` object `

    - ` ai_earned `: type ` string `

    - ` ai_max `: type ` integer `

    - ` completion_pct `: type ` number `

    - ` cu_earned `: type ` string ` — decimal as string

    - ` cu_max `: type ` integer `

  - ` user_id `: type ` string ` — UserID is the caller's resolved user identifier — surfaced so the frontend can scope per-user client state (e.g., the Path B localStorage gate) without a separate /me round trip.

### ` 401 ` — Unauthorized

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

### ` 403 ` — Forbidden

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

## Request examples

### cURL

```curl
curl -X GET 'https://api.example.com/v1/incentive/state' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.example.com/v1/incentive/state', {
  method: 'GET',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN"
  }
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.get('https://api.example.com/v1/incentive/state', headers=headers)
print(response.json())
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.example.com/v1/incentive/state", nil)
	req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")

	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
	result, _ := io.ReadAll(resp.Body)
	fmt.Println(string(result))
}
```