# License my data

URL: /products/data/license-my-data · Id: `guide:license-my-data`

> Say "license the full dataset for $12,000 a year" and get an Offer whose license says what the buyer may do with the records.

A data license is an [Offer](/business/nouns/offer) whose terms say what a buyer may do with the records: use them, show them, or resell them. The price follows the rights.

Needs: [Sell my data](/products/data/sell-my-data) · [Open a bank account](/systems/finance/open-a-bank-account)

**Before it runs**

- Who says yes: You. Your agent shows you the run and waits for your [Approval](/business/nouns/approval).
- You leave the chat: Never: it all happens in the chat.

## What you get
- 1 Offer with a redistribution license at $12,000 a year (Offer)
- 1 license terms on the Offer’s page and in each buyer’s Agreement (Agreement)
- 1 weekly bulk file in the buyer’s Portal (File)
- 1 attribution line every buyer shows with the records (Offer)

## Your agent does
**For agents**

- Guide: `guide:license-my-data`, status `beta`. Page: [/products/data/license-my-data.md](/products/data/license-my-data.md).
- Approval: ask the founder first. Show the run, then wait for their Approval; a refusal ends it.
- Leaves the chat: never.
- Needs first: [Sell my data](/products/data/sell-my-data), [Open a bank account](/systems/finance/open-a-bank-account).
- Run: call the steps in order, each through the API, SDK, CLI or MCP tab below; a later step passes the `$id` an earlier one returns. Each value marked example is the sample business’s: pass the founder’s own.

| Step | Verb | Inputs (type, required, this guide’s value) | Returns |
| --- | --- | --- | --- |
| 1 | [`Offer.create`](/business/nouns/offer/create) (`verb:Offer.create`) | `price` money, required: example `{"amount":12000,"currency":"USD"}`; `terms` text: example `"Yearly, billed in advance. Weekly bulk delivery. Records may be resold inside your own product, with the attribution line."`; `interval` string: example `"year"`; `license` string: example `"redistribute"`; `attribution` text: example `"Renewal data from Leaseline"` | `offer` Offer |
| 2 | [`Offer.publish`](/business/nouns/offer/publish) (`verb:Offer.publish`) | `offer` Offer (an id), required: the `$id` step 1 returns | `offer` Offer |

Returns: the last call answers with `offer` and its `action`, whose `status` is `done`, `pending` (waiting on an Approval or a Worker), `failed`, `canceled` or `refused`:

```json
{
  "api": "https://api.sb/leaseline.app",
  "offer": {
    "$id": "https://api.sb/leaseline.app/offers/offer_1",
    "$type": "Offer",
    "price": {
      "amount": 12000,
      "currency": "USD"
    },
    "interval": "year",
    "license": "redistribute",
    "attribution": "Renewal data from Leaseline",
    "terms": "Yearly, billed in advance. Weekly bulk delivery. Records may be resold inside your own product, with the attribution line."
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/action_1",
    "operation": "Offer.publish",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/action_1"
  }
}
```

Next: offer “Make it private to one buyer”, or “Add a display license at $3,000 a year”.

Calls: `Offer.create` → `Offer.publish`

Ask:

```text
License the full renewal dataset for $12,000 a year.
Let a buyer resell our records.
Sell a redistribution license.
```

API:

```bash
# 1. Offer.create
OFFER=$(curl -X POST https://api.sb/leaseline.app/offers \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"price":{"amount":12000,"currency":"USD"},"interval":"year","license":"redistribute","attribution":"Renewal data from Leaseline","terms":"Yearly, billed in advance. Weekly bulk delivery. Records may be resold inside your own product, with the attribution line."}' | jq -r '.offer["$id"] | split("/") | last')

# 2. Offer.publish
curl -X POST https://api.sb/leaseline.app/offers/$OFFER/publish \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
```

SDK:

```ts
import { $ } from 'startup-builder'

const offer = await $.Offer.create({ price: { amount: 12000, currency: 'USD' }, interval: 'year', license: 'redistribute', attribution: 'Renewal data from Leaseline', terms: 'Yearly, billed in advance. Weekly bulk delivery. Records may be resold inside your own product, with the attribution line.' })
await $.Offer.publish({ offer: offer.$id })
```

CLI:

```bash
OFFER=$(npx startup-builder do Offer.create --json '{"price":{"amount":12000,"currency":"USD"},"interval":"year","license":"redistribute","attribution":"Renewal data from Leaseline","terms":"Yearly, billed in advance. Weekly bulk delivery. Records may be resold inside your own product, with the attribution line."}' | jq -r '.offer["$id"] | split("/") | last')
npx startup-builder do Offer.publish --json '{"offer":"'"$OFFER"'"}'
```

MCP:

```json
{
  "name": "do",
  "arguments": {
    "code": "const offer = await $.Offer.create({ price: { amount: 12000, currency: 'USD' }, interval: 'year', license: 'redistribute', attribution: 'Renewal data from Leaseline', terms: 'Yearly, billed in advance. Weekly bulk delivery. Records may be resold inside your own product, with the attribution line.' })\nreturn await $.Offer.publish({ offer: offer.$id })"
  }
}
```

## Change it
- Make it private to one buyer.
- Add a display license at $3,000 a year.
- Deliver to their warehouse every Monday.

## Under the hood
- Systems: [Datasets](/systems/datasets), [Billing](/systems/billing)
- Nouns: [Offer](/business/nouns/offer), [Dataset](/business/nouns/dataset), [Agreement](/business/nouns/agreement)
- Events: `Offer.created`, [`Offer.published`](/business/events/Offer.published)
- Stripe objects: `Product`, `Price`