---
name: athena-live-api
description: CLI and agent access to Athena.live's Django REST API using a user-generated bearer token.
homepage: https://athena.live/skills/athena-live-api/
metadata:
  {
    "openclaw": {
      "requires": { "auth": ["Authorization: Bearer <ATHENA_LIVE_TOKEN>"] },
      "token_page": "/account/profile/",
      "base_path": "/api/"
    }
  }
---

# Athena.live API

Use this skill when a user wants to inspect or operate Athena.live from a CLI,
script, or agent. The site owner generates a token at `/account/profile/`.
Send it on every authenticated request:

```bash
curl -H "Authorization: Bearer $ATHENA_LIVE_TOKEN" "$ATHENA_LIVE_BASE_URL/api/events/"
```

Set a base URL first:

```bash
export ATHENA_LIVE_BASE_URL="https://athena.live"
export ATHENA_LIVE_TOKEN="<token from /account/profile/>"
```

## Authentication

- Header: `Authorization: Bearer <token>`
- Token page: `/account/profile/`
- Public reads may work without auth, but create/update/delete calls require bearer auth.
- Use `Content-Type: application/json` when sending JSON bodies.

## Endpoints

| Resource | Methods | Path |
| --- | --- | --- |
| Events | GET, POST | `/api/events/` |
| Event detail | GET, PATCH, PUT, DELETE | `/api/events/{id}/` |
| Duplicate event | POST | `/api/events/{id}/duplicate/` |
| Assist event description | POST | `/api/events/assist-description/` |
| Event templates | GET, POST | `/api/event-templates/` |
| Event template detail | GET, PATCH, PUT, DELETE | `/api/event-templates/{id}/` |
| Venues | GET, POST | `/api/venues/` |
| Venue detail | GET, PATCH, PUT, DELETE | `/api/venues/{id}/` |
| Ticket types | GET, POST | `/api/ticket-types/` |
| Ticket type detail | GET, PATCH, PUT, DELETE | `/api/ticket-types/{id}/` |
| Orders | GET, POST | `/api/orders/` |
| Order detail | GET, PATCH, PUT, DELETE | `/api/orders/{id}/` |
| Payment transactions | GET, POST | `/api/payments/transactions/` |
| Payment transaction detail | GET, PATCH, PUT, DELETE | `/api/payments/transactions/{id}/` |
| Refunds | GET, POST | `/api/payments/refunds/` |
| Refund detail | GET, PATCH, PUT, DELETE | `/api/payments/refunds/{id}/` |
| Organizer payouts | GET, POST | `/api/payments/payouts/` |
| Organizer payout detail | GET, PATCH, PUT, DELETE | `/api/payments/payouts/{id}/` |
| Financial reports | GET, POST | `/api/payments/reports/` |
| Financial report detail | GET, PATCH, PUT, DELETE | `/api/payments/reports/{id}/` |
| Check-in scans | GET, POST | `/api/check-in-scans/` |
| Check-in scan detail | GET, PATCH, PUT, DELETE | `/api/check-in-scans/{id}/` |
| Event analytics | GET | `/api/analytics/events/` |
| Event analytics detail | GET | `/api/analytics/events/{id}/` |
| Marketing campaigns | GET, POST | `/api/marketing/campaigns/` |
| Marketing campaign detail | GET, PATCH, PUT, DELETE | `/api/marketing/campaigns/{id}/` |
| Promo codes | GET, POST | `/api/marketing/promo-codes/` |
| Promo code detail | GET, PATCH, PUT, DELETE | `/api/marketing/promo-codes/{id}/` |

## Common CLI Calls

List events:

```bash
curl -H "Authorization: Bearer $ATHENA_LIVE_TOKEN" "$ATHENA_LIVE_BASE_URL/api/events/"
```

Create an event:

```bash
curl -X POST "$ATHENA_LIVE_BASE_URL/api/events/" \
  -H "Authorization: Bearer $ATHENA_LIVE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Community Music Night",
    "summary": "A neighborhood showcase with local artists.",
    "description": "Doors, lineup, and details for attendees.",
    "starts_at": "2026-08-15T19:00:00Z",
    "ends_at": "2026-08-15T22:00:00Z",
    "timezone": "America/Los_Angeles",
    "capacity": 120
  }'
```

Patch an event:

```bash
curl -X PATCH "$ATHENA_LIVE_BASE_URL/api/events/123/" \
  -H "Authorization: Bearer $ATHENA_LIVE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"summary":"Updated from the CLI"}'
```

Duplicate an event:

```bash
curl -X POST "$ATHENA_LIVE_BASE_URL/api/events/123/duplicate/" \
  -H "Authorization: Bearer $ATHENA_LIVE_TOKEN"
```

Create a ticket type:

```bash
curl -X POST "$ATHENA_LIVE_BASE_URL/api/ticket-types/" \
  -H "Authorization: Bearer $ATHENA_LIVE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "event": 123,
    "name": "General Admission",
    "sales_model": "paid",
    "price_cents": 2500,
    "quantity_total": 100,
    "min_quantity_per_order": 1,
    "max_quantity_per_order": 4
  }'
```

Create a marketing promo code:

```bash
curl -X POST "$ATHENA_LIVE_BASE_URL/api/marketing/promo-codes/" \
  -H "Authorization: Bearer $ATHENA_LIVE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"event":123,"code":"LAUNCH25","discount_type":"percentage","percent_off":25}'
```

## Agent Rules

- Do not ask for a password when a bearer token is available.
- Do not print the bearer token in summaries, logs, or issue comments.
- Prefer GET first to inspect IDs before mutating resources.
- Use PATCH for small updates and POST only for creation/actions.
- If a request returns `401`, ask the user to regenerate the token at `/account/profile/`.
- If a request returns `403` or `404` for a private resource, the token user may not own or manage it.
