# Links and conversions

Source: https://jointextkit.com/docs/links
Index: https://jointextkit.com/llms.txt

Know which link got clicked and which text made the sale. In the console this
is **Clicks** in the left menu. Links in texts are tracked with
`shorten_links: true` ([Link shortening](/docs/messages#link-shortening));
broadcasts do it by default.

## Make a link to copy

```bash
curl -X POST https://api.jointextkit.com/v1/links \
  -H "Authorization: Bearer $TEXTKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/sale", "name": "Fall sale"}'
```

```json
{ "object": "link", "url": "https://example.com/sale", "name": "Fall sale", "short_url": "https://txtkto.com/Ab3dEf9h", "clicks": 0, "conversions": 0, "value_cents": 0 }
```

Put `short_url` in a text, an ad, an email or a bio. The same `url` again
returns the same link. Public shorteners and look-alike domains are refused.
If you paste it into a text yourself, the destination must be one your
registration allows, as with any link.

`GET /v1/links` lists every tracked destination with its texts, clicks,
conversions and value.

## Report a conversion

Tracked links open your site with `?tk=<click id>` on the URL. Save that
value, in your checkout or a cookie, and send it when someone buys:

```bash
curl -X POST https://api.jointextkit.com/v1/conversions \
  -H "Authorization: Bearer $TEXTKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"click_id": "Ab3dEf9h", "value_cents": 4900, "external_id": "order_1042"}'
```

| Field | Type | Notes |
|---|---|---|
| `click_id` | string | Required. The `tk` value. |
| `value_cents` | integer | Optional. What it was worth, in US cents. |
| `name` | string | Optional. What happened, like `purchase`. |
| `external_id` | string | Optional. Your id. The same id twice counts once. |

Use a key from the same mode as the link: a test key can't reach a live link.
`GET /v1/conversions` returns the latest 100.

## Use your own domain

Links go on our domain with no setup. To use your own, go to **Clicks → Domain**
or follow [Link shortening](/docs/messages#link-shortening).

## From an agent

The [MCP server](/docs/mcp) has `create_link`, `list_links`,
`record_conversion` and `list_conversions`.
