# Ping

Checks that a publishable key is valid and that the License API can be reached. The answer names the product of the key.

`GET /v1/ping`

## Use cases

- Check a new publishable key before you put it in a build of your application.
- Check that your application can reach the License API.

Ping changes no license, device or process.

## Authentication

Send the publishable key of the product. See [Authentication](../authentication/).

## Request

| Header | Required | Description |
| --- | --- | --- |
| `Seatify-Publishable-Key` | Yes | The publishable key of the product. |
| `Seatify-Nonce` | No | A new random value that the signature includes. See [Signed responses](../#signed-responses). |
| `Seatify-Signing-Key` | No | The key ID of the signing key in your application. See [Signed responses](../#signed-responses). |

The request has no body.

## Response

| Field | Type | Description |
| --- | --- | --- |
| `message` | string | Always `pong`. |
| `api` | string | Always `license`. |
| `product` | object | The product of the publishable key. |

The `product` object has these fields:

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | The ID of the product. |
| `name` | string | The name of the product. |
| `code` | string | The code of the product. |

## Errors

| Status | Reason | Description |
| --- | --- | --- |
| 400 | `The signing key is not known.` | Your organization has no signing key with the ID in `Seatify-Signing-Key`. |
| 400 | `The nonce must be at most 255 characters.` | The value of `Seatify-Nonce` is too long. |
| 401 | `A publishable key is required.` | The request has no `Seatify-Publishable-Key` header, or the header is empty. |
| 401 | `The publishable key is not valid.` | No product has this key. |
| 429 | `There are too many requests. Try again later.` | See [Rate limits](../#rate-limits). |

## Last used

Every request with a publishable key counts as a use of the key. A ping counts too. The dashboard shows when each key was last used. A retired key that is still used shows a recent date.

## Example

{{< tabs >}}
{{< tab name="curl" >}}
```bash
curl https://license.seatify.dev/v1/ping \
  -H "Seatify-Publishable-Key: $SEATIFY_PUBLISHABLE_KEY"
```
{{< /tab >}}
{{< tab name="Swift" >}}
```swift
import Foundation

struct Ping: Decodable {
    struct Product: Decodable {
        let id: String
        let name: String
        let code: String
    }

    let message: String
    let api: String
    let product: Product
}

var request = URLRequest(url: URL(string: "https://license.seatify.dev/v1/ping")!)
request.setValue(publishableKey, forHTTPHeaderField: "Seatify-Publishable-Key")

let (data, _) = try await URLSession.shared.data(for: request)
let ping = try JSONDecoder().decode(Ping.self, from: data)
```
{{< /tab >}}
{{< tab name="C#" >}}
```csharp
using System.Net.Http.Json;

using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Seatify-Publishable-Key", publishableKey);

var ping = await client.GetFromJsonAsync<Ping>("https://license.seatify.dev/v1/ping");

record Product(string Id, string Name, string Code);
record Ping(string Message, string Api, Product Product);
```
{{< /tab >}}
{{< tab name="Go" >}}
```go
req, err := http.NewRequest("GET", "https://license.seatify.dev/v1/ping", nil)
if err != nil {
	return err
}
req.Header.Set("Seatify-Publishable-Key", publishableKey)

res, err := http.DefaultClient.Do(req)
if err != nil {
	return err
}
defer res.Body.Close()

var ping struct {
	Message string `json:"message"`
	API     string `json:"api"`
	Product struct {
		ID   string `json:"id"`
		Name string `json:"name"`
		Code string `json:"code"`
	} `json:"product"`
}
err = json.NewDecoder(res.Body).Decode(&ping)
```
{{< /tab >}}
{{< tab name="JavaScript" >}}
```javascript
const response = await fetch("https://license.seatify.dev/v1/ping", {
  headers: { "Seatify-Publishable-Key": publishableKey },
});
const ping = await response.json();
```
{{< /tab >}}
{{< /tabs >}}

```json
{
  "message": "pong",
  "api": "license",
  "product": {
    "id": "<product id>",
    "name": "Atlas Server",
    "code": "ATLAS"
  }
}
```

## Signed answer

A ping answer is signed like every other answer with the status 200. With the `Seatify-Nonce` header, the answer carries these headers:

```text
Date: Sat, 26 Sep 2026 11:20:47 GMT
Digest: sha-256=<SHA-256 of the body in Base64>
Seatify-Nonce: dd3c79ab-0581-45b2-aee6-6ddd7cf2095d
Seatify-Signature: keyid="<key id>", algorithm="ed25519", signature="<signature in Base64>", headers="(request-target) host date digest seatify-nonce"
```

Ping changes no license, so it is a safe call to test your signature checks. See [Verify signed responses](../../guides/signatures/verify-signed-responses/).

