Treasure Data Postback API

JSON event ingestion endpoint used by the JavaScript, iOS, Android, React Native and Cordova SDKs for small, frequent payloads.

Operations 1

POST /postback/v3/event/{database_name}/{table_name} POST Postback API v2 #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/treasure-data-postback-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

treasure-data-postback-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: api-v2 Postback API
  description: This spec is for Postback API v2 (records.in.treasuredata.com)
  version: 2.0.0
servers:
- url: https://{region}.records.in.treasuredata.com
  variables:
    region:
      default: us01
      description: TD region host prefix (e.g. us01, eu01, ap02)
security:
- TD1Authorization: []
- XTDWriteKey: []
tags:
- name: Postback
paths:
  /postback/v3/event/{database_name}/{table_name}:
    parameters:
    - in: path
      name: database_name
      schema:
        type: string
      required: true
      description: Name of the database the table is in. Name may contain letters, numbers or _ .
    - in: path
      name: table_name
      schema:
        type: string
      required: true
      description: Name of the table to log data to. Name may contain letters, numbers or _ .
    post:
      summary: POST Postback API v2
      operationId: postPostbackAPIv2
      description: '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`.'
      requestBody:
        description: '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.

          '
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: true
            examples:
              generic:
                summary: Generic Example
                value:
                  param1: value1
                  param2: value2
              td:
                summary: TD Example
                value:
                  td_global_id: xxxxx
                  td_ua: user agent
      responses:
        '200':
          $ref: '#/components/responses/200'
        '400':
          $ref: '#/components/responses/400'
        '403':
          $ref: '#/components/responses/403'
        '413':
          $ref: '#/components/responses/413'
      tags:
      - Postback
components:
  responses:
    '200':
      description: Success.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AllResponse'
    '413':
      description: Payload Too Large (request body exceeds 1,048,064 bytes)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AllResponse'
    '403':
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AllResponse'
    '400':
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AllResponse'
  schemas:
    AllResponse:
      type: object
      title: Response
      description: response for all objects
      properties:
        Content-Type:
          type: string
          example: application/json
        Date:
          type: string
          format: date-time
          example: Wed, DD MM YYYY xx:yy:zz GMT
        Strict-Transport-Security:
          type: string
          example: max-age=31536000
        Content-Length:
          type: integer
          example: 2
        Connection:
          type: string
          example: keep-alive
  securitySchemes:
    XTDWriteKey:
      type: apiKey
      in: header
      name: X-TD-Write-Key
    TD1Authorization:
      type: apiKey
      in: header
      name: Authorization
      description: 'Format: `TD1 <APIKEY>`'