# POST Postback API v2

Send data in POST payload to the v2 Postback endpoint.
Authentication is **header-only**. Provide one of:
1. `Authorization: TD1 <APIKEY>`
2. `X-TD-Write-Key: <APIKEY>`

URL-path keys (`?td_write_key=...`) accepted by the legacy endpoint are **not** supported here. If both headers are sent, `Authorization` takes precedence.
Note: Requests with an invalid API key return a 200 HTTP status code. This behavior is intentional and ensures a fast response, preventing ingestion from being canceled due to slow response. After the response is returned, the endpoint performs asynchronous validations. If the API key is invalid, an authentication failure will be raised despite the initial 200 status.
Maximum request body size is 1,048,064 bytes; larger payloads are rejected with `413`.

Endpoint: POST /postback/v3/event/{database_name}/{table_name}
Version: 2.0.0
Security: TD1Authorization, XTDWriteKey

## Security:

  - `TD1Authorization` (unknown)
    apiKey in header Authorization

  - `XTDWriteKey` (unknown)
    apiKey in header X-TD-Write-Key

## Path parameters:

  - `database_name` (string, required)
    Name of the database the table is in. Name may contain letters, numbers or _ .

  - `table_name` (string, required)
    Name of the table to log data to. Name may contain letters, numbers or _ .

## Request body:

  - `application/json` (unknown)
    The body of the request can be any key value pairs you want to send. Specify JSON as a body. The JSON content immediately becomes a record in Treasure Data. Also include `Content-Type: application/json` in HTTP request headers.
Suggested Parameters:
**td_record_time**: UNIX timestamp value, to set time column in Treasure Data. If it's not specified, the time records were received is used instead. Received timestamps that are older than 7 days, and newer than 3 days ahead of the current date are ignored.
**td_global_id**: TD global ID 
**td_ua**: user-agent
Parameter values are processed as the data type string, and cannot be changed at the ingestion time.

## Request examples:

  - `Generic Example` (unknown)

  - `TD Example` (unknown)

## Response 200:

  - `200` (unknown)
    Success.

## Response 200 fields (application/json):

  - `Content-Type` (string)
    Example: application/json

  - `Date` (string)
    Example: Wed, DD MM YYYY xx:yy:zz GMT

  - `Strict-Transport-Security` (string)
    Example: max-age=31536000

  - `Content-Length` (integer)
    Example: 2

  - `Connection` (string)
    Example: keep-alive

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `Content-Type` (string)
    Example: application/json

  - `Date` (string)
    Example: Wed, DD MM YYYY xx:yy:zz GMT

  - `Strict-Transport-Security` (string)
    Example: max-age=31536000

  - `Content-Length` (integer)
    Example: 2

  - `Connection` (string)
    Example: keep-alive

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `Content-Type` (string)
    Example: application/json

  - `Date` (string)
    Example: Wed, DD MM YYYY xx:yy:zz GMT

  - `Strict-Transport-Security` (string)
    Example: max-age=31536000

  - `Content-Length` (integer)
    Example: 2

  - `Connection` (string)
    Example: keep-alive

## Response 413:

  - `413` (unknown)
    Payload Too Large (request body exceeds 1,048,064 bytes)

## Response 413 fields (application/json):

  - `Content-Type` (string)
    Example: application/json

  - `Date` (string)
    Example: Wed, DD MM YYYY xx:yy:zz GMT

  - `Strict-Transport-Security` (string)
    Example: max-age=31536000

  - `Content-Length` (integer)
    Example: 2

  - `Connection` (string)
    Example: keep-alive

