# postback-api-v2

This spec is for Postback API v2 (records.in.treasuredata.com)

Version: 2.0.0

## Servers

```
https://{region}.records.in.treasuredata.com
```

Variables:
- `region`: TD region host prefix (e.g. us01, eu01, ap02)
Default: "us01"

## Security

### XTDWriteKey

Type: apiKey
In: header
Name: X-TD-Write-Key

### TD1Authorization

Format: `TD1 <APIKEY>`

Type: apiKey
In: header
Name: Authorization

## Download OpenAPI description

[postback-api-v2](https://docs.treasure.ai/_bundle/@l10n/ja/apis/postback-v2/openapi.yaml)

## Other

### POST Postback API v2

 - [POST /postback/v3/event/{database_name}/{table_name}](https://docs.treasure.ai/ja/apis/postback-v2/openapi/other/postpostbackapiv2.md): Send data in POST payload to the v2 Postback endpoint.

Authentication is header-only. Provide one of:
1. Authorization: TD1 
2. X-TD-Write-Key: 

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.

