# Link settings, the link secret and revoking links

> Decide who may open your number's public conversation pages, make the secret your own server signs links with, and list, check and revoke the shared links of a number, from the dashboard or the API.

Every conversation on your number has a public page (see [the public conversation link](/guides/conversation-links)). The link settings decide who may open those pages, hold the secret your own systems sign links with, and list the shared links of the number so you can see who opened one and revoke it.

Everything here is on the dashboard under **Integrations → Link utilities**, and in the API under `/v1/{number}/links/...`.

<a id="who"></a>

## Who may open the conversation pages

| `conversation_links` | Who can open a conversation page |
| --- | --- |
| `open` (the default) | Anyone with the link, as before. |
| `login` | Only people signed in to app2email who work on this number: the owner, the members and the team inbox users. Everyone else gets "Conversation not found". |
| `off` | Nobody. Every conversation page of the number answers "Conversation not found". |

The links themselves never change, so switching back to `open` brings every link back. With `login` or `off`, the photo thumbnails in forwarded e-mails stop loading too, because they come from the same pages. To switch off the page of one contact only, see [switch the link off for one contact](/guides/conversation-links#switch-off).

```bash
curl -X PUT "https://api.app2email.com/v1/YOUR_NUMBER/links/settings" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"conversation_links": "login"}'
```

Only the settings you send change. `GET /v1/{number}/links/settings` shows them all, with the defaults for the ones never changed. Both need a key with the `settings:manage` scope.

<a id="settings"></a>

## The other settings

| Setting | Default | What it does |
| --- | --- | --- |
| `max_signed_days` | `30` | The longest life, in days (1 to 365), of a contact link your own server signs with the link secret. |
| `preview` | `generic` | What a pasted shared link shows in a chat app: `generic` (a title and our logo, nothing about the contact), `details` (the contact's name, last activity and reply window, never message text) or `off`. |
| `embed_origins` | `[]` | The sites that may show a shared conversation inside their own page: full `https://` addresses without a path or `*`, at most 10. Empty: no site may. |
| `reply_sends_per_hour` | `0` | The most messages one shared link with `reply` may send in an hour. 0 = no limit. |
| `status_link_text` | `false` | `true`: message status pages also show the message text. |
| `window_event_lead_minutes` | `60` | When the [window-closing event](/guides/window-closing-event) comes: 15 to 720 minutes before a contact's window closes, 0 = off. |
| `window_event_only_unanswered` | `true` | That event only while the contact's message is unanswered. |
| `verify_resend_cooldown_seconds` | `0` | [Verification codes](/guides/verification#pumping): seconds before a new code may go to the same number. 0 = off. |
| `verify_hourly_per_recipient` | `0` | Verification codes: the most to one number per hour. 0 = off. |
| `verify_allowed_calling_codes` | `[]` | Verification codes only to these calling codes, eg `["61", "44"]`. Empty: every country. |

<a id="secret"></a>

## The link secret

`POST /v1/{number}/links/secret` makes the number's link secret: `a2e_lk_` followed by 43 characters. Your own server uses it to sign links, so people without an app2email login can open one conversation until the link expires.

- **It is shown once**, in that answer (and on the dashboard right after you make it). app2email keeps it encrypted and never shows it again. Keep it on your server only: never in a web page, an app or an e-mail.
- **Rotating:** call it again for a new secret. The previous one keeps working for 7 days (`previous_valid_until`), so you can switch your system over without broken links.
- There is no MCP tool for this call on purpose: a secret belongs on your server, not in an AI agent's transcript.

<a id="shared"></a>

## Shared links: list, check, revoke

A shared link opens one conversation, allows only what it was made for (`read`, `media`, `reply`, `summary`, `export`) and always expires. app2email stores only a fingerprint of it, so a lost link cannot be shown again. How to make one, and the contact links, status pages and badges: [shared links](/guides/shared-links).

| Call | Scope | What it does |
| --- | --- | --- |
| `GET /v1/{number}/links` | `messages:read` | The shared links, newest first: contact, permissions, label, expiry, last use, number of uses. `contact=`, `kind=` and `include_revoked=true` filter the list. |
| `GET /v1/{number}/links/{id}/access` | `messages:read` | When the link was opened, with the kind of browser and a `viewer` value, plus today's uses and places. |
| `DELETE /v1/{number}/links/{id}` | `settings:manage` | Revokes one link. Whoever has it gets "not found" from now on. |
| `POST /v1/{number}/links/revoke-all` | `settings:manage` | Revokes every shared link of the number at once, and every signed status or badge link too. The conversation pages are not affected (use `conversation_links` for those). |

**No IP address is stored.** `viewer` is the same for the same network on the same day and different the next day, so "opened 9 times from 3 places today" can be seen without keeping anyone's address. Uses are kept for 180 days.

AI agents can do the same with the hosted MCP tools `get_link_settings`, `update_link_settings`, `list_links`, `get_link_access`, `revoke_link` and `revoke_all_links`.

<a id="dashboard"></a>

## On the dashboard

**Integrations → Link utilities** shows all of the above, plus the recent views of your conversation pages. Everyone on the number can look; the owner and admins change the settings, make the secret and revoke every link; members can revoke a single link. Every change is in the audit log.

<a id="errors"></a>

## Errors

| Code | Status | Meaning |
| --- | --- | --- |
| `invalid_link_setting` | 400 | A setting is unknown or has a value it cannot take. The message names it. |
| `invalid_link_request` | 400 | A filter of the link list is not valid. |
| `shared_link_not_found` | 404 | There is no shared link with that id on the number. |
| `sandbox_key` | 403 | A sandbox key can read the settings and the links, but not change them. |
| `linkutil_not_ready` | 503 | The link settings are waiting for a database update on app2email's side. The conversation links work as before. |

The complete list is on [the errors page](/api/errors).
