> ## Documentation Index
> Fetch the complete documentation index at: https://docs.9pic.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Ping

> Verify your API key, host, and event mapping in one round trip

## Overview

Ping is the safest first call when wiring up an integration. It validates your API key, host allowlist, organisation ownership, and event ownership in one request, and returns a stable success body without touching any photo or search data.

Use it from a smoke test, a deploy health check, or a "Test Connection" button in your integration UI.

## Endpoint

```
GET /api/v1/ext/{org_id}/event/{event_id}/ping
```

## Path Parameters

| Parameter  | Type   | Required | Description                             |
| ---------- | ------ | -------- | --------------------------------------- |
| `org_id`   | number | Yes      | Your organisation ID.                   |
| `event_id` | number | Yes      | The event you want to verify access to. |

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -i \
    -H "X-API-Key: <your_9pic_api_key>" \
    "https://api.9pic.ai/api/v1/ext/903/event/456/ping"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.9pic.ai/api/v1/ext/903/event/456/ping",
      headers={"X-API-Key": "<your_9pic_api_key>"},
  )
  print(response.status_code, response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.9pic.ai/api/v1/ext/903/event/456/ping",
    { headers: { "X-API-Key": "<your_9pic_api_key>" } }
  );
  console.log(response.status, await response.json());
  ```
</CodeGroup>

## Example Response

```json theme={null}
{
  "responseType": "success",
  "message": "pong",
  "data": {
    "status": "ok",
    "org_id": 903,
    "event_id": 456
  }
}
```

## Response Models

Ping uses the standard envelope from [Conventions](/api-reference/conventions#response-envelope). The endpoint payload inside `data` is:

| Field           | Type   | Description                               |
| --------------- | ------ | ----------------------------------------- |
| `data.status`   | string | Always `"ok"` on a 200 response.          |
| `data.org_id`   | number | The `org_id` from the URL, echoed back.   |
| `data.event_id` | number | The `event_id` from the URL, echoed back. |

## Error Responses

| Status | Meaning                                                                                |
| ------ | -------------------------------------------------------------------------------------- |
| `401`  | API key is missing.                                                                    |
| `403`  | API key is invalid/inactive, token/org/event ownership mismatch, or host not approved. |
| `404`  | Event configuration not found.                                                         |
| `429`  | Rate limit exceeded. Back off and retry.                                               |
| `500`  | Internal failure.                                                                      |

See [Errors](/api-reference/errors) for canonical descriptions and retry guidance.
