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

# Public Endpoint - StatsD Metrics

This StatsD API endpoint is provided to add additional metrics to AppSignal, where an existing integration can't be used or the language used isn't supported (yet).

This endpoint is meant for integrations that send aggregated metrics over a small period, it's preferred to send one request every 5 seconds with 100 metrics than 100 requests per 5 minutes with one metric each.

## Endpoint

Request method: `POST`

| Endpoint                                                                                       | Description              |
| ---------------------------------------------------------------------------------------------- | ------------------------ |
| [https://appsignal-endpoint.net/metrics/statsd](https://appsignal-endpoint.net/metrics/statsd) | Accepts (Dog)StatsD data |

## URL parameters

| Parameter | Type   | Description                                                                                           |
| --------- | ------ | ----------------------------------------------------------------------------------------------------- |
| api\_key  | String | **Front-end** API key, can be found in [App settings](https://appsignal.com/redirect-to/app?to=info). |

```shell Shell theme={null}
https://appsignal-endpoint.net/metrics/statsd?api_key=<api_key>
```

## Body parameters

The post body should contain (Dog)StatsD formatted metrics separated by a newline.

For example:

<CodeGroup>
  ```shell Shell theme={null}
  login_count:1|c|#hostname:frontend1
  stripe_api_duration:19|ms|#function:payment,domain:appsignal
  cpu_usage:55.1|g|#hostname:frontend1,cpu:0
  ```
</CodeGroup>

Here is a complete example on how to send these metrics using `cURL`. (Note the use of single quotes for the `--data` option and the leading `$`. Only then will line breaks work in the `--data` value.)

<CodeGroup>
  ```shell Shell theme={null}
  curl -H "Content-Type: text/plain"  -X POST --data $'login_count:10|c|#hostname:frontend1\nstripe_api_duration:19|ms|#function:payment,domain:appsignal' "https://appsignal-endpoint.net/metrics/statsd?api_key=FRONTEND-API-KEY"
  ```
</CodeGroup>

<Tip>
  **Note**: This endpoint is optimized for large amounts of traffic and does not
  validate the API key or payload, a `200` (`OK`) response is returned when the
  body size is within the `200k` limit. This doesn't mean the request is
  accepted when received.
</Tip>
