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

# Validating Connectivity

> Learn about the endpoint used to ping the Marqeta platform from your production environment.

export const EndpointCard = ({method = "API", title, children, href, arrow = true}) => {
  const METHOD_STYLES = {
    GET: {
      bg: "mint-bg-green-400/20 dark:mint-bg-green-400/20",
      text: "mint-text-green-700 dark:mint-text-green-400",
      border: "mint-border-green-300 dark:mint-border-green-700"
    },
    POST: {
      bg: "mint-bg-blue-400/20 dark:mint-bg-blue-400/20",
      text: "mint-text-blue-700 dark:mint-text-blue-400"
    },
    PUT: {
      bg: "mint-bg-yellow-400/20 dark:mint-bg-yellow-400/20",
      text: "mint-text-yellow-700 dark:mint-text-yellow-400"
    },
    PATCH: {
      bg: "mint-bg-orange-400/20 dark:mint-bg-orange-400/20",
      text: "mint-text-orange-700 dark:mint-text-orange-400"
    },
    DELETE: {
      bg: "mint-bg-red-400/20 dark:mint-bg-red-400/20",
      text: "mint-text-red-700 dark:mint-text-red-400"
    },
    API: {
      bg: "mint-bg-black",
      text: "mint-text-white"
    }
  };
  const MethodBadge = ({method}) => {
    const style = METHOD_STYLES[method?.toUpperCase()] ?? METHOD_STYLES.GET;
    return <span className={`
          method-pill rounded-lg font-semibold px-1.5 py-0.5 text-xs leading-5 ${style.bg} ${style.text}`}>
        {method?.toUpperCase()}
      </span>;
  };
  const content = <div className="group flex items-center gap-4 border border-gray-200 dark:border-gray-700 rounded-xl p-5 hover:border-gray-400 dark:hover:border-gray-500 hover:shadow-md transition-all cursor-pointer">
      {}
      <div className="shrink-0">
        <MethodBadge method={method} />
      </div>
      {}
      <div className="flex-1 min-w-0">
        <p className="font-semibold text-gray-900 dark:text-white text-sm leading-snug">{title}</p>
        {children && <p className="mt-1 text-sm text-gray-500 dark:text-gray-400 line-clamp-2">{children}</p>}
      </div>
    </div>;
  if (!href) return content;
  return <a href={href} className="block no-underline border-b-0 mb-2">
      {content}
    </a>;
};

The `/ping` endpoint enables you to validate connectivity between your client application and the Marqeta platform. You can use these endpoints to validate connectivity to your production environment, as well as to the public or private sandbox testing environment.

<h2 id="_perform_ping">
  Perform ping
</h2>

**Action:** `GET`\
**Endpoint:** `/ping`

{/* <EndpointCard
title="Returns a heartbeat to the consumer"
path="/ping"
method="get"
/> */}

To validate that the Marqeta server is available and responsive, send a `GET` request to the `/ping` endpoint. The response indicates whether the ping was successful, the version and revision number of the environment, and a timestamp.

<h3 id="_sample_response_body">
  Sample response body
</h3>

```json JSON lines wrap theme={null}
{
  "success": true,
  "version": "1.9.8",
  "revision": "f46a5dc",
  "timestamp": "Mon Sep 18 20:16:30 UTC 2023"
}
```

<h2 id="_simulate_ping">
  Simulate ping
</h2>

**Action:** `POST`\
**Endpoint:** `/ping`

To perform an echo test, send a `POST` request to the `/ping` endpoint.

{/* <EndpointCard
title="Echo test for sending payload to server"
path="/ping"
method="post"
/> */}

<h3 id="_body_field_details">
  Body field details
</h3>

| Fields                                        | Description                                                                                   |
| --------------------------------------------- | --------------------------------------------------------------------------------------------- |
| token<br /><br />string<br /><br />Optional   | A pass-through field, enter any data.<br /><br />**Allowable Values:**<br /><br />36 char max |
| payload<br /><br />string<br /><br />Optional | Sample data.<br /><br />**Allowable Values:**<br /><br />255 char max                         |

<h3 id="_sample_request_body">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "12345",
  "payload": "This is my payload"
}
```

<h3 id="_sample_response_body_2">
  Sample response body
</h3>

```json JSON lines wrap theme={null}
{
  "success": true,
  "id": "12345",
  "payload": "This is my payload"
}
```
