---
title: "Send an API Log to ReadMe"
method: POST
path: "/request"
tags: ["API Logs"]
---

# Send an API Log to ReadMe

`POST /request`

Send an API Log to ReadMe, so that you can view developer usage metrics about your API. For more information see https://docs.readme.com/main/docs/sending-api-logs.

## Request body

- Request[]
  - `_id` string — A uuidv4 identifier for this log. If not provided we will generate one for you. This ID can be used to view the logged request and response information at `{your url}/logs/{id}`.
  - `clientIPAddress` string, required — The IP Address making the request.
  - `development` boolean
  - `group` object, required — Data about the user or project making the API call.
    - `email` string — Email associated with the API call.
    - `label` string — Human-readable description of user or project making the API call. For example this could be the company, user, or name of the project.
    - `id` union, required — The API key for your user. Note: This field is called `apiKey` in the official SDKs and in the future we will accept this parameter as `apiKey`.
      - string
      - number
  - `request` object, required — Information about the request. This data herein generally abides by the [HAR specification](http://www.softwareishard.com/blog/har-12-spec/).
    - `log` object
      - `creator` object — Information about the package or HTTP module used to log the request.
        - `name` string, required — Name of the package or HTTP module used.
        - `version` string, required — Version of the package or HTTP module.
        - `comment` string — This should architecture, platform, release, and the version of the language recording the API log and it should match the following format: `{OS architecture}-{OS platform}{OS release}/{language version}`. Our [NodeJS SDK](https://npm.im/readmeio), for example, creates `x64-darwin21.3.0/14.19.3` for Node 14.19.3 on OSX 12.
      - `entries` object[] — HTTP Requests made
        - `pageref` string — The API endpoint or page that was accessed. If you would like to group similar endpoints together you can use your route with a variable instead, e.g. the literal string `/users/{user_id}`.
        - `startedDateTime` string, date-time, required — HTTP request start time. This should be the moment the server receives the request.
        - `time` union, required — Total elapsed time in milliseconds between the `startedDateTime` and the completion of sending the response.
          - integer
          - string
        - `request` object, required
          - `method` string, required — HTTP Method
          - `url` string, required — Full URL of the request.
          - `httpVersion` string, required — Name and revision of the information protocol via which the page was requested.
          - `headers` object[], required
            - `name` string, required — The header name
            - `value` union, required — The value of the header.
              - …
          - `queryString` object[], required
            - `name` string, required — The query string parameter name.
            - `value` string, required — The query string parameter value.
          - `postData` object
            - `mimeType` string
            - `params` object[] — If the request body is url encoded (e.g. `a=b&c=d`) then those parameters are provided via the `params` array, otherwise see `text`.
              - …
            - `text` string — The string representation of the request body. Used for all cases except for a `form-encoded` body.
            - `comment` string
        - `response` object, required
          - `status` number, required — HTTP Status Code
          - `statusText` string, required — Description of the HTTP status code.
          - `headers` object[], required
            - `name` string, required — The header name
            - `value` union, required — The value of the header.
              - …
          - `content` object, required — Details about the response body.
            - `size` union — Length of the returned content in bytes.
              - …
            - `mimeType` string
            - `text` string — Response body sent from the server. This field is populated with textual content only. The text field is either HTTP decoded text or an encoded (e.g. "base64") representation of the response body. Leave out this field if the information is not available.
            - `encoding` string — Encoding used for response text field. Leave out this field if the text field is HTTP decoded (decompressed and unchunked), then transcoded from its original character set into UTF-8.

## Response `202`

API log was accepted into our queue.

---

[API](https://skmtc.dev/readme/apis/developer-metrics-api.md) · [All operations](https://skmtc.dev/readme/apis/developer-metrics-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/readme/developer-metrics-api/revisions/a5cca1b07a6d/schema)
