# Create an API token

`POST /service/@id/tinopay/api-tokens` · TinoPay, service owner's sign-in token

Returns 201 `{id, name, last_used_at, created_at, token}`: `token` (64 characters) appears only in this response; show it to the customer once, do not store or log it. Not retried on network errors (each call creates a token): read the list again and revoke any extra token.

## HTTP request

| Item | Value |
| --- | --- |
| URL | `https://api.tino.vn/service/@id/tinopay/api-tokens` |
| Method | `POST` |
| Authentication | the TinoPay service owner's sign-in token (`Authorization: Bearer <token>`); the `/v1` gateway does not expose TinoPay yet |
| Content-Type | `application/json` |

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | int | yes | TinoPay service ID |
| `name` | body | string | — | — |

## Example request

```bash
curl -X POST "https://api.tino.vn/service/100001/tinopay/api-tokens" \
  -H "Authorization: Bearer $TINO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Website"
}'
```

`$TINO_TOKEN` is the TinoPay service owner's sign-in token. Path parameters in the example are sample values.

SDK ([SDK & examples](/en/docs/sdk)): no dedicated function yet, use `client.request("POST", "/service/@id/tinopay/api-tokens")`.

## Example response

```json
{
 "data": {
  "id": 3,
  "name": "Website",
  "last_used_at": null,
  "created_at": "2026-10-20T10:00:00+07:00",
  "token": "<token>"
 }
}
```

Sample built from the TinoPay API v1 documentation (Tino relays TinoPay data as is); values are examples.
