# auth.md — UFOSEND / X Lead Connect

This document tells AI agents and automated clients how authentication works
for anything under `ufosend.com` and for the messaging API behind it.

## 1. ufosend.com itself needs no authentication

`https://ufosend.com` is a public content site (product pages, blog, company
information) in English (`en-HK`) and Traditional Chinese (`zh-HK`). Every page
is readable without credentials, and a Markdown representation of each page is
available by sending `Accept: text/markdown`.

There is **no OAuth 2.0 authorization server and no OpenID Connect provider on
this origin**, so `/.well-known/openid-configuration`,
`/.well-known/oauth-authorization-server` and
`/.well-known/oauth-protected-resource` are intentionally absent here — publishing
them would advertise an issuer that does not exist. Do not attempt an OAuth flow
against `ufosend.com`.

## 2. The messaging API is a separate origin and uses API keys

| | |
|---|---|
| API base URL | `https://api.connect.xleadfunnel.com` |
| Product name | X Lead Connect (SMS / MMS / eDM / WhatsApp) |
| Documentation | <https://api-doc.connect.xleadfunnel.com/> (every page also served as Markdown at `<page-id>.md`) |
| Machine-readable catalog | <https://ufosend.com/.well-known/api-catalog> |
| Auth scheme | Static API key in a request header |
| Header | `x-api-key: YOUR_API_KEY` |
| Token type | Long-lived account credential. Not a bearer token, not refreshable, not scoped per-request. |

Example:

```bash
curl -X POST "https://api.connect.xleadfunnel.com/v1/sms/send" \
     -H "Content-Type: application/json" \
     -H "x-api-key: YOUR_API_KEY" \
     -d '{"sender":"XLEAD","country_code":"852","mobile":"91234567","content":"Hello"}'
```

## 3. How an agent obtains a credential

There is **no machine-callable registration endpoint**. A person signs up and
applies for the API key in the dashboard; the key is activated after X Lead's
internal approval. Neither step can be completed programmatically.

Provisioning path:

1. A human representative of the organisation opens an account at
   <https://xleadfunnel.com/signup?s=messaging> (self-serve) or submits an enquiry at
   <https://ufosend.com/en/contact/>.
2. They apply for an API key inside the account dashboard on
   `xleadfunnel.com`. The key becomes usable once the application is approved,
   and is visible only to authenticated account users.
3. Destination rules then apply per region. Taiwan (`886`) takes no `sender`
   field, so an approved key can send there straight away. Hong Kong (`852`)
   additionally requires an OFCA-registered `#` Sender ID tied to the account —
   a corporate identity check with its own paperwork (see
   <https://ufosend.com/en/sms/> for the walkthrough).

An agent acting on behalf of a customer should therefore expect the API key to
be supplied to it as configuration by that customer, not fetched at runtime.

## 4. Credential handling

- Send the key only over TLS 1.2+ to `api.connect.xleadfunnel.com`.
- Treat it as a secret: never place it in client-side code, public repositories,
  URLs or logs.
- Rotation and revocation are performed by the account owner in the
  `xleadfunnel.com` dashboard; there is no public revocation endpoint.
- Requests are attributed to the owning account and are billed per message, so
  do not use a key for exploratory or load-testing traffic without the account
  owner's consent.

## 5. Contact

- Enquiries: <https://ufosend.com/en/contact/> · <https://ufosend.com/zh/contact/>
- Agent skills index: <https://ufosend.com/.well-known/agent-skills/index.json>
