---
title: "Create an S2S callback"
method: POST
path: "/v2/apps/{app_id}/s2s_callbacks"
tags: ["S2S Callbacks"]
---

# Create an S2S callback

`POST /v2/apps/{app_id}/s2s_callbacks`

## Request

- Base URL: `https://api.tenjin.com`
- URL: `https://api.tenjin.com/v2/apps/{app_id}/s2s_callbacks`
- Auth: HTTP bearer

## Path parameters

- `app_id` string, uuid, required

## Request body

- PostAppsAppIdS2sCallbacksRequest
  - `event` string: Event of the app that sends the callback
  - `name` string: Name of the S2S callback
  - `url` string: URL Tenjin calls. Macros such as `{{advertising_id}}` are filled in
  - `http_method` 'GET' | 'POST': HTTP method
  - `action` 'ping' | 'ping_on_first' | 'notify_on_reengagement': `ping` to notify on every event; `ping_on_first` to notify on install and `notify_on_reengagement` on reengagement, both for the open event only
  - `active` boolean: Whether Tenjin sends the callback
  - `advertising_id_filter` boolean: Only send the callback for users with a known advertising id
  - `user_filter` integer[]: Only send the callback for users attributed to these channels; all users when empty
  - `first_party` boolean: Whether this is a first-party (destination belongs to the advertiser) S2S callback

## Response `201`

The created S2S callback

- S2SCallbackDocument
  - `data` S2SCallbackResource, required
    - `id` string, uuid, required
    - `type` 's2s_callbacks', required
    - `attributes` object, required
      - `app_id` string, uuid, nullable, required: Id of the app
      - `name` string, required: Name of the S2S callback
      - `event` string, required: Event that sends the callback
      - `url` string, required: URL Tenjin calls. Macros such as `{{bundle_id}}` are filled in
      - `http_method` 'GET' | 'POST', required: HTTP method
      - `active` boolean, required: Whether Tenjin sends the callback
      - `created_at` string, date-time, required: When the callback was created
      - `action` 'ping' | 'ping_on_first' | 'notify_on_reengagement', required: `ping` to notify on every event; `ping_on_first` to notify on install and `notify_on_reengagement` on reengagement, both for the open event only
      - `first_party` boolean, nullable, required: Whether this is a first-party (destination belongs to the advertiser) S2S callback
      - `advertising_id_filter` boolean, required: Only send the callback for users with a known advertising id
      - `user_filter` integer[], required: Only send the callback for users attributed to these channels; all users when empty
  - `links` Links, required
    - `self` string, uri, required: URL of this request
    - `first` string, uri: URL of the first page of a list
    - `prev` string, uri: URL of the previous page of a list
    - `next` string, uri: URL of the next page of a list
    - `last` string, uri: URL of the last page of a list
  - `meta` object, required: Always empty

## Other responses

- `400`: A param is missing or invalid, a record is not found, or the request cannot be served
- `401`: Missing or invalid credentials, or no access to the requested data
- `403`: Invalid token, the user's role does not allow the request, or the organization has no access to S2S callbacks
- `498`: Expired token, or a token with an invalid signature
- `503`: Read-only mode during maintenance; try again later

---

[API](https://skmtc.dev/tenjin/apis/campaign-management-api.md) - [All operations](https://skmtc.dev/tenjin/apis/campaign-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tenjin/apis/campaign-management-api/revisions/e3cae1a03a92?raw)
