{
  "openapi": "3.0.0",
  "info": {
    "title": "Campaign Management API",
    "version": "2.1.0",
    "description": "# Introduction\n\nThe Tenjin Campaign Management API is a collection of RESTful resources for your campaign configuration in\nTenjin, so you can manage it without the Tenjin dashboard. Use it to build internal tooling that automates\ncampaign creation and bid management.\n\n## Access to the API\n\nThe API is served from `https://api.tenjin.com`, and every path starts with the API version, for example `https://api.tenjin.com/v2/apps`.\n"
  },
  "servers": [
    {
      "url": "https://api.tenjin.com"
    }
  ],
  "tags": [
    {
      "name": "Apps"
    },
    {
      "name": "Ad Accounts"
    },
    {
      "name": "Campaigns"
    },
    {
      "name": "Channels"
    },
    {
      "name": "Callback Templates"
    },
    {
      "name": "Callbacks"
    },
    {
      "name": "S2S Callbacks"
    },
    {
      "name": "Callback Settings"
    },
    {
      "name": "Callback Group Templates"
    },
    {
      "name": "Callback Groups"
    },
    {
      "name": "Events"
    },
    {
      "name": "SK Ad Networks"
    },
    {
      "name": "Attribution Settings"
    },
    {
      "name": "SDK Keys"
    }
  ],
  "paths": {
    "/v2/ad_accounts": {
      "get": {
        "operationId": "get_ad_accounts",
        "summary": "List ad accounts",
        "deprecated": false,
        "tags": [
          "Ad Accounts"
        ],
        "parameters": [
          {
            "name": "channel_id",
            "in": "query",
            "required": false,
            "description": "Keep only ad accounts of this channel",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Search ad accounts by name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Ad accounts",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdAccountListDocument"
                },
                "examples": {
                  "Ad accounts": {
                    "value": {
                      "data": [
                        {
                          "id": "6e3fbfa6-27cc-45f2-af3f-5c9ead45280e",
                          "type": "ad_account",
                          "attributes": {
                            "name": "Facebook Account",
                            "channel_id": 3,
                            "external_id": "444509211788999"
                          }
                        },
                        {
                          "id": "6d16d36f-a074-4acd-bdf3-2d1180295b79",
                          "type": "ad_account",
                          "attributes": {
                            "name": "Chartboost Account",
                            "channel_id": 7,
                            "external_id": null
                          }
                        },
                        {
                          "id": "333c57b6-c022-496a-bd27-5d8d7caa8cae",
                          "type": "ad_account",
                          "attributes": {
                            "name": "Tapjoy Account",
                            "channel_id": 1,
                            "external_id": null
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/ad_accounts"
                      },
                      "meta": {
                        "count": 3,
                        "per_page": 25
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/ad_accounts/{id}": {
      "get": {
        "operationId": "get_ad_accounts_id",
        "summary": "Get an ad account",
        "deprecated": false,
        "tags": [
          "Ad Accounts"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the ad account",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The ad account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AdAccountDocument"
                },
                "examples": {
                  "The ad account": {
                    "value": {
                      "data": {
                        "id": "6e3fbfa6-27cc-45f2-af3f-5c9ead45280e",
                        "type": "ad_account",
                        "attributes": {
                          "name": "Facebook Account",
                          "channel_id": 3,
                          "external_id": "444509211788999"
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/ad_accounts/6e3fbfa6-27cc-45f2-af3f-5c9ead45280e"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/apps": {
      "get": {
        "operationId": "get_apps",
        "summary": "List apps",
        "deprecated": false,
        "tags": [
          "Apps"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Search apps by name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Apps",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppListDocument"
                },
                "examples": {
                  "Apps": {
                    "value": {
                      "data": [
                        {
                          "id": "e55c55ae-db64-40ad-a711-8bb3885b9581",
                          "type": "app",
                          "attributes": {
                            "name": "Another App",
                            "bundle_id": "com.this.AnotherApp",
                            "platform": "ios",
                            "public_key": "abc123456",
                            "ios_shared_secret": null,
                            "store_id": "123445678",
                            "released_on": "2017-10-03",
                            "rating": "2.0",
                            "price": 0,
                            "developer_name": "Tenjin",
                            "match_strings": [],
                            "protocol": null,
                            "facebook_referrer_decryption_key": null,
                            "created_at": "2018-05-22T21:50:20.591Z",
                            "sending_events": true,
                            "amazon_shared_secret": null,
                            "deterministic_click_attribution_window": "1d",
                            "deterministic_impression_attribution_window": "1d",
                            "probabilistic_click_attribution_window": "1d",
                            "probabilistic_impression_attribution_window": "1d"
                          }
                        },
                        {
                          "id": "5fce6a93-877c-44f7-9c56-3bfe4acbbfd5",
                          "type": "app",
                          "attributes": {
                            "name": "Dog Watcher",
                            "bundle_id": "com.this.DogWatcher",
                            "platform": "ios",
                            "public_key": null,
                            "ios_shared_secret": "3f3ff9gia1fafafab-afds",
                            "store_id": "123445678",
                            "released_on": "2017-10-03",
                            "rating": "4.3",
                            "price": 99,
                            "developer_name": "Tenjin",
                            "match_strings": [],
                            "protocol": "fb190003007235028",
                            "facebook_referrer_decryption_key": "2575590594a9cd809e5bfacf397f8c1ac730dbc38a3e137ecd1ab66591c8c3c9",
                            "created_at": "2019-05-22T21:50:20.591Z",
                            "sending_events": true,
                            "amazon_shared_secret": null,
                            "deterministic_click_attribution_window": "1d",
                            "deterministic_impression_attribution_window": "1d",
                            "probabilistic_click_attribution_window": "1d",
                            "probabilistic_impression_attribution_window": "1d"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps"
                      },
                      "meta": {
                        "count": 2,
                        "per_page": 25
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_apps",
        "summary": "Create an app",
        "description": "Send either `store_url`, or `name`, `bundle_id` and `platform`. With `store_url`, Tenjin reads the app's name, bundle id and platform from the App Store or Google Play. Of the other attributes it keeps only the attribution windows; set the rest with `PATCH /v2/apps/{id}` after the app is created.",
        "deprecated": false,
        "tags": [
          "Apps"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/post_apps_Request"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created app",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDocument"
                },
                "examples": {
                  "The created app": {
                    "value": {
                      "data": {
                        "id": "17ef8c1a-5729-456e-98db-ccc104bdf860",
                        "type": "app",
                        "attributes": {
                          "name": "This is an app",
                          "bundle_id": "com.this.IsAnApp",
                          "platform": "ios",
                          "public_key": null,
                          "ios_shared_secret": null,
                          "store_id": "655745678",
                          "released_on": "2013-09-09",
                          "rating": "4.5",
                          "price": 0,
                          "developer_name": "Tenjin",
                          "match_strings": [],
                          "protocol": null,
                          "facebook_referrer_decryption_key": null,
                          "created_at": "2019-07-21T21:50:20.591Z",
                          "sending_events": true,
                          "amazon_shared_secret": null,
                          "deterministic_click_attribution_window": "1d",
                          "deterministic_impression_attribution_window": "1d",
                          "probabilistic_click_attribution_window": "1d",
                          "probabilistic_impression_attribution_window": "1d"
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/17ef8c1a-5729-456e-98db-ccc104bdf860"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/apps/{id}": {
      "get": {
        "operationId": "get_apps_id",
        "summary": "Get an app",
        "deprecated": false,
        "tags": [
          "Apps"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The app",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDocument"
                },
                "examples": {
                  "The app": {
                    "value": {
                      "data": {
                        "id": "17ef8c1a-5729-456e-98db-ccc104bdf860",
                        "type": "app",
                        "attributes": {
                          "name": "This is an app",
                          "bundle_id": "com.this.IsAnApp",
                          "platform": "ios",
                          "public_key": null,
                          "ios_shared_secret": null,
                          "store_id": "655745678",
                          "released_on": "2013-09-09",
                          "rating": "4.5",
                          "price": 0,
                          "developer_name": "Tenjin",
                          "match_strings": [],
                          "protocol": null,
                          "facebook_referrer_decryption_key": null,
                          "created_at": "2019-07-21T21:50:20.591Z",
                          "sending_events": true,
                          "amazon_shared_secret": null,
                          "deterministic_click_attribution_window": "1d",
                          "deterministic_impression_attribution_window": "1d",
                          "probabilistic_click_attribution_window": "1d",
                          "probabilistic_impression_attribution_window": "1d"
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/17ef8c1a-5729-456e-98db-ccc104bdf860"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_apps_id",
        "summary": "Update an app",
        "deprecated": false,
        "tags": [
          "Apps"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patch_apps_id_Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated app",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AppDocument"
                },
                "examples": {
                  "The updated app": {
                    "value": {
                      "data": {
                        "id": "17ef8c1a-5729-456e-98db-ccc104bdf860",
                        "type": "app",
                        "attributes": {
                          "name": "This is an app",
                          "bundle_id": "com.this.IsAnApp",
                          "platform": "ios",
                          "public_key": null,
                          "ios_shared_secret": null,
                          "store_id": "655745678",
                          "released_on": "2013-09-09",
                          "rating": "4.5",
                          "price": 0,
                          "developer_name": "Tenjin",
                          "match_strings": [],
                          "protocol": null,
                          "facebook_referrer_decryption_key": null,
                          "created_at": "2019-07-21T21:50:20.591Z",
                          "sending_events": true,
                          "amazon_shared_secret": null,
                          "deterministic_click_attribution_window": "1d",
                          "deterministic_impression_attribution_window": "1d",
                          "probabilistic_click_attribution_window": "1d",
                          "probabilistic_impression_attribution_window": "1d"
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/17ef8c1a-5729-456e-98db-ccc104bdf860"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_apps_id",
        "summary": "Soft-delete an app",
        "deprecated": false,
        "tags": [
          "Apps"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The app is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyDocument"
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/apps/{app_id}/integrations/{integration_id}/attribution_settings": {
      "get": {
        "operationId": "get_apps_app_id_integrations_integration_id_attribution_settings",
        "summary": "Get attribution settings",
        "deprecated": false,
        "tags": [
          "Attribution Settings"
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "description": "Id of the integration: its channel id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The attribution settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttributionSettingsDocument"
                },
                "examples": {
                  "The attribution settings": {
                    "value": {
                      "data": {
                        "id": "61bf5df0-73c5-4c04-a1f4-fae9aff839c1",
                        "type": "attribution_setting",
                        "attributes": {
                          "app_id": "e5766ace-4f13-4912-91df-e404d8f8a021",
                          "integration_id": 900002,
                          "deterministic_click_attribution_window": "2d",
                          "deterministic_impression_attribution_window": "6h",
                          "probabilistic_click_attribution_window": null,
                          "probabilistic_impression_attribution_window": null
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/e5766ace-4f13-4912-91df-e404d8f8a021/integrations/900002/attribution_settings"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the organization has no ad account for the integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_apps_app_id_integrations_integration_id_attribution_settings",
        "summary": "Update attribution settings",
        "deprecated": false,
        "tags": [
          "Attribution Settings"
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "description": "Id of the integration: its channel id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patch_apps_app_id_integrations_integration_id_attribution_settings_Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated attribution settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AttributionSettingsDocument"
                },
                "examples": {
                  "The updated attribution settings": {
                    "value": {
                      "data": {
                        "id": "61bf5df0-73c5-4c04-a1f4-fae9aff839c1",
                        "type": "attribution_setting",
                        "attributes": {
                          "app_id": "e5766ace-4f13-4912-91df-e404d8f8a021",
                          "integration_id": 900002,
                          "deterministic_click_attribution_window": "2d",
                          "deterministic_impression_attribution_window": "6h",
                          "probabilistic_click_attribution_window": null,
                          "probabilistic_impression_attribution_window": null
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/e5766ace-4f13-4912-91df-e404d8f8a021/integrations/900002/attribution_settings"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the organization has no ad account for the integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/integrations/{integration_id}/callback_group_templates": {
      "get": {
        "operationId": "get_integrations_integration_id_callback_group_templates",
        "summary": "Get callback group templates",
        "deprecated": false,
        "tags": [
          "Callback Group Templates"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 0,
              "maximum": 1000
            }
          },
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "description": "Id of the integration: its channel id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Callback group templates",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackGroupTemplateListDocument"
                },
                "examples": {
                  "Callback group templates": {
                    "value": {
                      "data": [
                        {
                          "id": "5af128e0-78ae-4df7-9591-91f6f8411b83",
                          "type": "callback_group_template",
                          "attributes": {
                            "platform": "ios",
                            "allow_multiple": false,
                            "user_filter_default": "all",
                            "user_filter_editable": true,
                            "name": "Custom event",
                            "integration_id": 18,
                            "event": "open",
                            "required_settings": [
                              "event_name"
                            ],
                            "event_type": null
                          }
                        },
                        {
                          "id": "5af128e0-78ae-4df7-9591-91f6f8411b84",
                          "type": "callback_group_template",
                          "attributes": {
                            "platform": "ios",
                            "allow_multiple": false,
                            "user_filter_default": "channel",
                            "user_filter_editable": false,
                            "name": "Install",
                            "integration_id": 18,
                            "event": "open",
                            "required_settings": [],
                            "event_type": null
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/integrations/18/callback_group_templates"
                      },
                      "meta": {
                        "count": 2,
                        "per_page": 25
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/apps/{app_id}/integrations/{integration_id}/callback_groups": {
      "get": {
        "operationId": "get_apps_app_id_integrations_integration_id_callback_groups",
        "summary": "List callback groups for an integration and app pair",
        "deprecated": false,
        "tags": [
          "Callback Groups"
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "description": "Id of the integration: its channel id",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Callback groups",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackGroupListDocument"
                },
                "examples": {
                  "Callback groups": {
                    "value": {
                      "data": [
                        {
                          "id": "2bf128e0-78ae-4df7-9591-91f6ff412b85",
                          "type": "callback_group",
                          "attributes": {
                            "active": true,
                            "callback_group_template_id": "5af128e0-78ae-4df7-9591-91f6f8411b83",
                            "event_definition_id": "402a9bc4-d6e3-4e3f-8621-52193c3c3034",
                            "name": "Level 10",
                            "user_filter": "channel",
                            "app_id": "17ef8c1a-5729-456e-98db-ccc104bdf860",
                            "integration_id": 18,
                            "callback_settings": {
                              "event_name": "level_10"
                            },
                            "event": "level_10"
                          }
                        },
                        {
                          "id": "2bf128e0-78ae-4df7-9591-91f6ff412b86",
                          "type": "callback_group",
                          "attributes": {
                            "active": true,
                            "callback_group_template_id": "5af128e0-78ae-4df7-9591-91f6f8411b84",
                            "event_definition_id": "6af228e0-79ae-46f9-9591-91f7f8411e21",
                            "name": "Install",
                            "user_filter": "all",
                            "app_id": "17ef8c1a-5729-456e-98db-ccc104bdf860",
                            "integration_id": 18,
                            "callback_settings": {},
                            "event": "open"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/17ef8c1a-5729-456e-98db-ccc104bdf860/integrations/18/callback_groups"
                      },
                      "meta": {
                        "count": 2,
                        "per_page": 25
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the organization has no ad account for the integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_apps_app_id_integrations_integration_id_callback_groups",
        "summary": "Create a callback group",
        "deprecated": false,
        "tags": [
          "Callback Groups"
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "description": "Id of the integration: its channel id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/post_apps_app_id_integrations_integration_id_callback_groups_Request"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created callback group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackGroupDocument"
                },
                "examples": {
                  "The created callback group": {
                    "value": {
                      "data": {
                        "id": "2bf128e0-78ae-4df7-9591-91f6ff412b85",
                        "type": "callback_group",
                        "attributes": {
                          "active": true,
                          "callback_group_template_id": "5af128e0-78ae-4df7-9591-91f6f8411b83",
                          "event_definition_id": "402a9bc4-d6e3-4e3f-8621-52193c3c3034",
                          "name": "Level 10",
                          "user_filter": "channel",
                          "app_id": "17ef8c1a-5729-456e-98db-ccc104bdf860",
                          "integration_id": 18,
                          "callback_settings": {
                            "event_name": "level_10"
                          },
                          "event": "level_10"
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/17ef8c1a-5729-456e-98db-ccc104bdf860/integrations/18/callback_groups/2bf128e0-78ae-4df7-9591-91f6ff412b85"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the organization has no ad account for the integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/apps/{app_id}/integrations/{integration_id}/callback_groups/{id}": {
      "get": {
        "operationId": "get_apps_app_id_integrations_integration_id_callback_groups_id",
        "summary": "Get a callback group",
        "deprecated": false,
        "tags": [
          "Callback Groups"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the callback group",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "description": "Id of the integration: its channel id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The callback group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackGroupDocument"
                },
                "examples": {
                  "The callback group": {
                    "value": {
                      "data": {
                        "id": "2bf128e0-78ae-4df7-9591-91f6ff412b85",
                        "type": "callback_group",
                        "attributes": {
                          "active": true,
                          "callback_group_template_id": "5af128e0-78ae-4df7-9591-91f6f8411b83",
                          "event_definition_id": "402a9bc4-d6e3-4e3f-8621-52193c3c3034",
                          "name": "Level 10",
                          "user_filter": "channel",
                          "app_id": "17ef8c1a-5729-456e-98db-ccc104bdf860",
                          "integration_id": 18,
                          "callback_settings": {
                            "event_name": "level_10"
                          },
                          "event": "level_10"
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/17ef8c1a-5729-456e-98db-ccc104bdf860/integrations/18/callback_groups/2bf128e0-78ae-4df7-9591-91f6ff412b85"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the organization has no ad account for the integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_apps_app_id_integrations_integration_id_callback_groups_id",
        "summary": "Update a callback group",
        "deprecated": false,
        "tags": [
          "Callback Groups"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the callback group",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "description": "Id of the integration: its channel id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patch_apps_app_id_integrations_integration_id_callback_groups_id_Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated callback group",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackGroupDocument"
                },
                "examples": {
                  "The updated callback group": {
                    "value": {
                      "data": {
                        "id": "2bf128e0-78ae-4df7-9591-91f6ff412b85",
                        "type": "callback_group",
                        "attributes": {
                          "active": true,
                          "callback_group_template_id": "5af128e0-78ae-4df7-9591-91f6f8411b83",
                          "event_definition_id": "402a9bc4-d6e3-4e3f-8621-52193c3c3034",
                          "name": "Level 10",
                          "user_filter": "channel",
                          "app_id": "17ef8c1a-5729-456e-98db-ccc104bdf860",
                          "integration_id": 18,
                          "callback_settings": {
                            "event_name": "level_10"
                          },
                          "event": "level_10"
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/17ef8c1a-5729-456e-98db-ccc104bdf860/integrations/18/callback_groups/2bf128e0-78ae-4df7-9591-91f6ff412b85"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the organization has no ad account for the integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/apps/{app_id}/integrations/{integration_id}/callback_settings": {
      "get": {
        "operationId": "get_apps_app_id_integrations_integration_id_callback_settings",
        "summary": "Get callback settings",
        "deprecated": false,
        "tags": [
          "Callback Settings"
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "description": "Id of the integration: its channel id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The callback settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackSettingsDocument"
                },
                "examples": {
                  "The callback settings": {
                    "value": {
                      "data": {
                        "id": "1268b1a2-57b7-484d-a598-8fd88ea27949",
                        "type": "callback_setting",
                        "attributes": {
                          "app_id": "17ef8c1a-5729-456e-98db-ccc104bdf860",
                          "integration_id": 18,
                          "callback_settings": {
                            "game_id": "abcde12345"
                          }
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/1268b1a2-57b7-484d-a598-8fd88ea27949/integrations/18/callback_settings"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the organization has no ad account for the integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_apps_app_id_integrations_integration_id_callback_settings",
        "summary": "Update callback settings",
        "deprecated": false,
        "tags": [
          "Callback Settings"
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "integration_id",
            "in": "path",
            "required": true,
            "description": "Id of the integration: its channel id",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patch_apps_app_id_integrations_integration_id_callback_settings_Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated callback settings",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackSettingsDocument"
                },
                "examples": {
                  "The updated callback settings": {
                    "value": {
                      "data": {
                        "id": "1268b1a2-57b7-484d-a598-8fd88ea27949",
                        "type": "callback_setting",
                        "attributes": {
                          "app_id": "17ef8c1a-5729-456e-98db-ccc104bdf860",
                          "integration_id": 18,
                          "callback_settings": {
                            "game_id": "abcde12345"
                          }
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/1268b1a2-57b7-484d-a598-8fd88ea27949/integrations/18/callback_settings"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the organization has no ad account for the integration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/apps/{app_id}/callback_templates": {
      "get": {
        "operationId": "get_apps_app_id_callback_templates",
        "summary": "List callback templates for an app",
        "deprecated": false,
        "tags": [
          "Callback Templates"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 0,
              "maximum": 1000
            }
          },
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "channel_id",
            "in": "query",
            "required": false,
            "description": "Keep only callback templates of this channel",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Callback templates",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackTemplateListDocument"
                },
                "examples": {
                  "Callback templates": {
                    "value": {
                      "data": [
                        {
                          "id": "b7af0230-913b-416d-8043-06a4048cea30",
                          "type": "callback_template",
                          "attributes": {
                            "name": "Facebook install",
                            "description": "Facebook install callback template",
                            "action": "ping_on_first",
                            "event": null,
                            "customer_parameters": {
                              "remote_app_id": "Remote App ID"
                            },
                            "is_install": false,
                            "channel_id": 3,
                            "platform": "ios",
                            "required_by_channel": false
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/17ef8c1a-5729-456e-98db-ccc104bdf860/callback_templates"
                      },
                      "meta": {
                        "count": 1,
                        "per_page": 25
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/apps/{app_id}/callback_templates/{id}": {
      "get": {
        "operationId": "get_apps_app_id_callback_templates_id",
        "summary": "Get a callback template",
        "deprecated": false,
        "tags": [
          "Callback Templates"
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the callback template",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The callback template",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackTemplateDocument"
                },
                "examples": {
                  "The callback template": {
                    "value": {
                      "data": {
                        "id": "b7af0230-913b-416d-8043-06a4048cea30",
                        "type": "callback_template",
                        "attributes": {
                          "name": "Facebook install",
                          "description": "Facebook install callback template",
                          "action": "ping_on_first",
                          "event": "install",
                          "customer_parameters": {
                            "remote_app_id": "Remote App ID"
                          },
                          "is_install": false,
                          "channel_id": 3,
                          "platform": "ios",
                          "required_by_channel": false
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/17ef8c1a-5729-456e-98db-ccc104bdf860/callback_templates/b7af0230-913b-416d-8043-06a4048cea30"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/apps/{app_id}/callbacks": {
      "get": {
        "operationId": "get_apps_app_id_callbacks",
        "summary": "List callbacks for an app",
        "deprecated": false,
        "tags": [
          "Callbacks"
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "channel_id",
            "in": "query",
            "required": false,
            "description": "Keep only callbacks of this channel",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Callbacks",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackListDocument"
                },
                "examples": {
                  "Callbacks": {
                    "value": {
                      "data": [
                        {
                          "id": "1268b1a8-57b5-485d-a597-8fd88ea27849",
                          "type": "callback",
                          "attributes": {
                            "name": "Facebook install",
                            "event": "install",
                            "action": "ping_on_first",
                            "channel_id": 3,
                            "url": "https://fake.facebook.com?ida={{advertising_id}}&impId={{click_id}}&trackingPartner=tenjin&eventTime={{time_in_ms}}",
                            "http_method": "GET",
                            "active": true,
                            "customer_parameters": {
                              "remote_app_id": "test"
                            },
                            "callback_template_id": "b7af0230-913b-416d-8043-06a4048cea30",
                            "created_at": "2019-11-28T18:45:00.687Z",
                            "user_filter": "all",
                            "first_party": null
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/17ef8c1a-5729-456e-98db-ccc104bdf860/callbacks"
                      },
                      "meta": {
                        "count": 1,
                        "per_page": 25
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_apps_app_id_callbacks",
        "summary": "Create a callback",
        "deprecated": false,
        "tags": [
          "Callbacks"
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/post_apps_app_id_callbacks_Request"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created callback",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackDocument"
                },
                "examples": {
                  "The created callback": {
                    "value": {
                      "data": {
                        "id": "1268b1a8-57b5-485d-a597-8fd88ea27849",
                        "type": "callback",
                        "attributes": {
                          "name": "Facebook install",
                          "event": "install",
                          "action": "ping_on_first",
                          "channel_id": 3,
                          "url": "https://fake.facebook.com?ida={{advertising_id}}&impId={{click_id}}&trackingPartner=tenjin&eventTime={{time_in_ms}}",
                          "http_method": "GET",
                          "active": true,
                          "customer_parameters": {
                            "remote_app_id": "test"
                          },
                          "callback_template_id": "b7af0230-913b-416d-8043-06a4048cea30",
                          "created_at": "2019-11-28T18:45:00.687Z",
                          "user_filter": "all",
                          "first_party": null
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/17ef8c1a-5729-456e-98db-ccc104bdf860/callbacks/1268b1a8-57b5-485d-a597-8fd88ea27849"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/apps/{app_id}/callbacks/{id}": {
      "get": {
        "operationId": "get_apps_app_id_callbacks_id",
        "summary": "Get a callback",
        "deprecated": false,
        "tags": [
          "Callbacks"
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the callback",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The callback",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackDocument"
                },
                "examples": {
                  "The callback": {
                    "value": {
                      "data": {
                        "id": "1268b1a8-57b5-485d-a597-8fd88ea27849",
                        "type": "callback",
                        "attributes": {
                          "name": "Facebook install",
                          "event": "install",
                          "action": "ping_on_first",
                          "channel_id": 3,
                          "url": "https://fake.facebook.com?ida={{advertising_id}}&impId={{click_id}}&trackingPartner=tenjin&eventTime={{time_in_ms}}",
                          "http_method": "GET",
                          "active": true,
                          "customer_parameters": {
                            "remote_app_id": "test"
                          },
                          "callback_template_id": "b7af0230-913b-416d-8043-06a4048cea30",
                          "created_at": "2019-11-28T18:45:00.687Z",
                          "user_filter": "all",
                          "first_party": null
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/17ef8c1a-5729-456e-98db-ccc104bdf860/callbacks/1268b1a8-57b5-485d-a597-8fd88ea27849"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_apps_app_id_callbacks_id",
        "summary": "Update a callback",
        "deprecated": false,
        "tags": [
          "Callbacks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the callback",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patch_apps_app_id_callbacks_id_Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated callback",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CallbackDocument"
                },
                "examples": {
                  "The updated callback": {
                    "value": {
                      "data": {
                        "id": "1268b1a8-57b5-485d-a597-8fd88ea27849",
                        "type": "callback",
                        "attributes": {
                          "name": "Facebook install",
                          "event": "install",
                          "action": "ping_on_first",
                          "channel_id": 3,
                          "url": "https://fake.facebook.com?ida={{advertising_id}}&impId={{click_id}}&trackingPartner=tenjin&eventTime={{time_in_ms}}",
                          "http_method": "GET",
                          "active": true,
                          "customer_parameters": {
                            "remote_app_id": "test"
                          },
                          "callback_template_id": "b7af0230-913b-416d-8043-06a4048cea30",
                          "created_at": "2019-11-28T18:45:00.687Z",
                          "user_filter": "all",
                          "first_party": null
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/17ef8c1a-5729-456e-98db-ccc104bdf860/callbacks/1268b1a8-57b5-485d-a597-8fd88ea27849"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/campaigns": {
      "get": {
        "operationId": "get_campaigns",
        "summary": "List campaigns",
        "deprecated": false,
        "tags": [
          "Campaigns"
        ],
        "parameters": [
          {
            "name": "channel_id",
            "in": "query",
            "required": false,
            "description": "Keep only campaigns of this channel",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "app_id",
            "in": "query",
            "required": false,
            "description": "Keep only campaigns of this app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "platform",
            "in": "query",
            "required": false,
            "description": "Keep only campaigns of apps on this platform",
            "schema": {
              "type": "string",
              "enum": [
                "amazon",
                "android",
                "android_other",
                "ios",
                "windows",
                "unspecified"
              ]
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Search campaigns by name, short_id or remote_campaign_id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Campaigns",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignListDocument"
                },
                "examples": {
                  "Campaigns": {
                    "value": {
                      "data": [
                        {
                          "id": "41149a48-9766-4c23-7744-56cb4836a603",
                          "type": "campaign",
                          "attributes": {
                            "channel_id": 3,
                            "app_id": "17ef8c1a-5729-456e-98db-ccc104bdf860",
                            "ad_account_id": "6e3fbfa6-27cc-45f2-af3f-5c9ead45280e",
                            "name": "Facebook Campaign",
                            "short_id": "zzzk0TXwNXu7Y5Maf2aRkL",
                            "remote_campaign_id": "48249a48-9766-4c23-8c13-56cb4836d903",
                            "click_tracking_url": "https://track.tenjin.com/v0/click/zzzk0TXwNXu7Y5Maf2aRkL",
                            "impression_tracking_url": null,
                            "attribution_window": null,
                            "created_at": "2019-08-20T21:56:12.336Z",
                            "hidden": false
                          }
                        },
                        {
                          "id": "3ba367d2-62a7-4791-941c-a2a53d2832e3",
                          "type": "campaign",
                          "attributes": {
                            "channel_id": 1,
                            "app_id": "5fce6a93-877c-44f7-9c56-3bfe4acbbfd5",
                            "ad_account_id": "333c57b6-c022-496a-bd27-5d8d7caa8cae",
                            "name": "Dog Watcher -- Video - Offerwall/Featured (iOS) - AU,DE - eCPI Goal of $1.50",
                            "short_id": "bYHn2BhR5O9zgGJ6Cp1E37",
                            "remote_campaign_id": "ee8244a0-075b-406e-a4c7-0755cc844920",
                            "click_tracking_url": "https://track.tenjin.com/v0/tapjoy/cZarDzkYbGtUYM7pPM2ZCH?bundle_id=com.this.DogWatcher&platform=ios&advertising_id=TAPJOY_ADVERTISING_ID&campaign_id=TAPJOY_OFFER_ID&site_id=TAPJOY_GENERIC_SOURCE&click_id=TAPJOY_TJCID&ip_address=[ip_address]&creative_name=TAPJOY_CREATIVE_NAME",
                            "impression_tracking_url": null,
                            "attribution_window": 604800,
                            "created_at": "2019-08-12T02:08:51.252Z",
                            "hidden": false
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/campaigns"
                      },
                      "meta": {
                        "count": 2,
                        "per_page": 25
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_campaigns",
        "summary": "Create a campaign",
        "deprecated": false,
        "tags": [
          "Campaigns"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/post_campaigns_Request"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created campaign",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignDocument"
                },
                "examples": {
                  "The created campaign": {
                    "value": {
                      "data": {
                        "id": "41149a48-9766-4c23-7744-56cb4836a603",
                        "type": "campaign",
                        "attributes": {
                          "channel_id": 3,
                          "app_id": "17ef8c1a-5729-456e-98db-ccc104bdf860",
                          "ad_account_id": "6e3fbfa6-27cc-45f2-af3f-5c9ead45280e",
                          "name": "Facebook Campaign",
                          "short_id": "zzzk0TXwNXu7Y5Maf2aRkL",
                          "remote_campaign_id": "48249a48-9766-4c23-8c13-56cb4836d903",
                          "click_tracking_url": "https://tenjin.io/v0/click/zzzk0TXwNXu7Y5Maf2aRkL",
                          "impression_tracking_url": null,
                          "attribution_window": null,
                          "created_at": "2019-08-20T21:56:12.336Z",
                          "hidden": false
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/campaigns/41149a48-9766-4c23-7744-56cb4836a603"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/campaigns/{id}": {
      "get": {
        "operationId": "get_campaigns_id",
        "summary": "Get a campaign",
        "deprecated": false,
        "tags": [
          "Campaigns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the campaign",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The campaign",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignDocument"
                },
                "examples": {
                  "The campaign": {
                    "value": {
                      "data": {
                        "id": "41149a48-9766-4c23-7744-56cb4836a603",
                        "type": "campaign",
                        "attributes": {
                          "channel_id": 3,
                          "app_id": "17ef8c1a-5729-456e-98db-ccc104bdf860",
                          "ad_account_id": "6e3fbfa6-27cc-45f2-af3f-5c9ead45280e",
                          "name": "Facebook Campaign",
                          "short_id": "zzzk0TXwNXu7Y5Maf2aRkL",
                          "remote_campaign_id": "48249a48-9766-4c23-8c13-56cb4836d903",
                          "click_tracking_url": "https://tenjin.io/v0/click/zzzk0TXwNXu7Y5Maf2aRkL",
                          "impression_tracking_url": null,
                          "attribution_window": null,
                          "created_at": "2019-08-20T21:56:12.336Z",
                          "hidden": false
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/campaigns/41149a48-9766-4c23-7744-56cb4836a603"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_campaigns_id",
        "summary": "Update a campaign",
        "deprecated": false,
        "tags": [
          "Campaigns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the campaign",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patch_campaigns_id_Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated campaign",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CampaignDocument"
                },
                "examples": {
                  "The updated campaign": {
                    "value": {
                      "data": {
                        "id": "41149a48-9766-4c23-7744-56cb4836a603",
                        "type": "campaign",
                        "attributes": {
                          "channel_id": 3,
                          "app_id": "17ef8c1a-5729-456e-98db-ccc104bdf860",
                          "ad_account_id": "6e3fbfa6-27cc-45f2-af3f-5c9ead45280e",
                          "name": "Facebook Campaign",
                          "short_id": "zzzk0TXwNXu7Y5Maf2aRkL",
                          "remote_campaign_id": "48249a48-9766-4c23-8c13-56cb4836d903",
                          "click_tracking_url": "https://tenjin.io/v0/click/zzzk0TXwNXu7Y5Maf2aRkL",
                          "impression_tracking_url": null,
                          "attribution_window": null,
                          "created_at": "2019-08-20T21:56:12.336Z",
                          "hidden": false
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/campaigns/41149a48-9766-4c23-7744-56cb4836a603"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "operationId": "delete_campaigns_id",
        "summary": "Soft-delete a campaign",
        "deprecated": false,
        "tags": [
          "Campaigns"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the campaign",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The campaign is deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyDocument"
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, the campaign is not found, or it has tracked installs and cannot be deleted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/channels": {
      "get": {
        "operationId": "get_channels",
        "summary": "List channels",
        "deprecated": false,
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Search channels by name",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Channels",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelListDocument"
                },
                "examples": {
                  "Channels": {
                    "value": {
                      "data": [
                        {
                          "id": 1,
                          "type": "channel",
                          "attributes": {
                            "name": "Tapjoy",
                            "short_id": "tapjoy"
                          }
                        },
                        {
                          "id": 3,
                          "type": "channel",
                          "attributes": {
                            "name": "Facebook",
                            "short_id": "facebook"
                          }
                        },
                        {
                          "id": 7,
                          "type": "channel",
                          "attributes": {
                            "name": "Chartboost",
                            "short_id": "chartboost"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/channels"
                      },
                      "meta": {
                        "count": 3,
                        "per_page": 25
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/channels/{id}": {
      "get": {
        "operationId": "get_channels_id",
        "summary": "Get a channel",
        "deprecated": false,
        "tags": [
          "Channels"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the channel",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The channel",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ChannelDocument"
                },
                "examples": {
                  "The channel": {
                    "value": {
                      "data": {
                        "id": 3,
                        "type": "channel",
                        "attributes": {
                          "name": "Facebook",
                          "short_id": "facebook"
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/channels/3"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/apps/{app_id}/events": {
      "get": {
        "operationId": "get_apps_app_id_events",
        "summary": "List events for an app",
        "deprecated": false,
        "tags": [
          "Events"
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Events",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventListDocument"
                },
                "examples": {
                  "Events": {
                    "value": {
                      "data": [
                        {
                          "id": "402a9bc4-d6e3-4e3f-8621-52193c3c3034",
                          "type": "event",
                          "attributes": {
                            "name": "App Open",
                            "event": "open"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/17ef8c1a-5729-456e-98db-ccc104bdf860/events"
                      },
                      "meta": {
                        "count": 1,
                        "per_page": 25
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/apps/{app_id}/s2s_callbacks": {
      "get": {
        "operationId": "get_apps_app_id_s2s_callbacks",
        "summary": "List S2S callbacks for an app",
        "deprecated": false,
        "tags": [
          "S2S Callbacks"
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "S2S callbacks",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/S2SCallbackListDocument"
                },
                "examples": {
                  "S2S callbacks": {
                    "value": {
                      "data": [
                        {
                          "id": "06daaf45-8bab-4070-848b-b198024fb927",
                          "type": "s2s_callbacks",
                          "attributes": {
                            "app_id": "e3448393-bbf4-432e-9d4d-bdf640508b4c",
                            "name": "S2S Purchase",
                            "event": "purchase",
                            "url": "https://fake.tenjin.com?bundle_id={{bundle_id}}",
                            "http_method": "GET",
                            "active": true,
                            "created_at": "2024-12-18T00:01:32.473Z",
                            "action": "ping",
                            "advertising_id_filter": true,
                            "user_filter": [
                              1,
                              3,
                              5
                            ],
                            "first_party": false
                          }
                        },
                        {
                          "id": "06daaf45-8bab-4070-848b-a087913ea818",
                          "type": "s2s_callbacks",
                          "attributes": {
                            "app_id": "e3448393-bbf4-432e-9d4d-bdf640508b4c",
                            "name": "S2S Open",
                            "event": "open",
                            "url": "https://fake.tenjin.com?bundle_id={{bundle_id}}&advertising_id={{advertising_id}}",
                            "http_method": "GET",
                            "active": false,
                            "created_at": "2023-11-12T00:03:34.442Z",
                            "action": "ping_on_first",
                            "advertising_id_filter": false,
                            "user_filter": [],
                            "first_party": false
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/e3448393-bbf4-432e-9d4d-bdf640508b4c/s2s_callbacks"
                      },
                      "meta": {
                        "count": 2,
                        "per_page": 25
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, the user's role does not allow the request, or the organization has no access to S2S callbacks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "post_apps_app_id_s2s_callbacks",
        "summary": "Create an S2S callback",
        "deprecated": false,
        "tags": [
          "S2S Callbacks"
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/post_apps_app_id_s2s_callbacks_Request"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The created S2S callback",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/S2SCallbackDocument"
                },
                "examples": {
                  "The created S2S callback": {
                    "value": {
                      "data": {
                        "id": "06daaf45-8bab-4070-848b-b198024fb927",
                        "type": "s2s_callbacks",
                        "attributes": {
                          "app_id": "e3448393-bbf4-432e-9d4d-bdf640508b4c",
                          "name": "S2S Purchase",
                          "event": "purchase",
                          "url": "https://fake.tenjin.com?bundle_id={{bundle_id}}",
                          "http_method": "GET",
                          "active": true,
                          "created_at": "2024-12-18T00:01:32.473Z",
                          "action": "ping",
                          "advertising_id_filter": true,
                          "user_filter": [
                            1,
                            3,
                            5
                          ],
                          "first_party": false
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/e3448393-bbf4-432e-9d4d-bdf640508b4c/s2s_callbacks/06daaf45-8bab-4070-848b-b198024fb927"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, the user's role does not allow the request, or the organization has no access to S2S callbacks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/apps/{app_id}/s2s_callbacks/{id}": {
      "get": {
        "operationId": "get_apps_app_id_s2s_callbacks_id",
        "summary": "Get an S2S callback",
        "deprecated": false,
        "tags": [
          "S2S Callbacks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the S2S callback",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The S2S callback",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/S2SCallbackDocument"
                },
                "examples": {
                  "The S2S callback": {
                    "value": {
                      "data": {
                        "id": "06daaf45-8bab-4070-848b-b198024fb927",
                        "type": "s2s_callbacks",
                        "attributes": {
                          "app_id": "e3448393-bbf4-432e-9d4d-bdf640508b4c",
                          "name": "S2S Purchase",
                          "event": "purchase",
                          "url": "https://fake.tenjin.com?bundle_id={{bundle_id}}",
                          "http_method": "GET",
                          "active": true,
                          "created_at": "2024-12-18T00:01:32.473Z",
                          "action": "ping",
                          "advertising_id_filter": true,
                          "user_filter": [
                            1,
                            3,
                            5
                          ],
                          "first_party": false
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/e3448393-bbf4-432e-9d4d-bdf640508b4c/s2s_callbacks/06daaf45-8bab-4070-848b-b198024fb927"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, the user's role does not allow the request, or the organization has no access to S2S callbacks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "patch": {
        "operationId": "patch_apps_app_id_s2s_callbacks_id",
        "summary": "Update an S2S callback",
        "deprecated": false,
        "tags": [
          "S2S Callbacks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Id of the S2S callback",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/patch_apps_app_id_s2s_callbacks_id_Request"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated S2S callback",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/S2SCallbackDocument"
                },
                "examples": {
                  "The updated S2S callback": {
                    "value": {
                      "data": {
                        "id": "06daaf45-8bab-4070-848b-b198024fb927",
                        "type": "s2s_callbacks",
                        "attributes": {
                          "app_id": "e3448393-bbf4-432e-9d4d-bdf640508b4c",
                          "name": "S2S Purchase",
                          "event": "purchase",
                          "url": "https://fake.tenjin.com?bundle_id={{bundle_id}}",
                          "http_method": "GET",
                          "active": true,
                          "created_at": "2024-12-18T00:01:32.473Z",
                          "action": "ping",
                          "advertising_id_filter": true,
                          "user_filter": [
                            1,
                            3,
                            5
                          ],
                          "first_party": false
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/e3448393-bbf4-432e-9d4d-bdf640508b4c/s2s_callbacks/06daaf45-8bab-4070-848b-b198024fb927"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, the user's role does not allow the request, or the organization has no access to S2S callbacks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Read-only mode during maintenance; try again later",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/apps/{app_id}/sdk_keys": {
      "get": {
        "operationId": "get_apps_app_id_sdk_keys",
        "summary": "List an app's SDK keys",
        "description": "The enabled keys of the app itself, oldest first. An app with none returns an empty list. Organization-level keys are not listed.",
        "deprecated": false,
        "tags": [
          "SDK Keys"
        ],
        "parameters": [
          {
            "name": "app_id",
            "in": "path",
            "required": true,
            "description": "Id of the app",
            "schema": {
              "type": "string",
              "format": "uuid",
              "maxLength": 36
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SDK keys",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SdkKeyListDocument"
                },
                "examples": {
                  "SDK keys": {
                    "value": {
                      "data": [
                        {
                          "id": "950001",
                          "type": "sdk_key",
                          "attributes": {
                            "name": "Older Key",
                            "created_at": "2026-08-30T12:00:00.000Z",
                            "key": "recorder-sdk-older"
                          }
                        },
                        {
                          "id": "950002",
                          "type": "sdk_key",
                          "attributes": {
                            "name": "Newer Key",
                            "created_at": "2026-08-31T12:00:00.000Z",
                            "key": "recorder-sdk-newer"
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/apps/92de8255-26c4-4182-9ee4-a1e5a4dcf6c9/sdk_keys"
                      },
                      "meta": {
                        "count": 2,
                        "per_page": 25
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "More than 30 SDK key reads in a minute by one user",
            "headers": {
              "X-Retry-After": {
                "schema": {
                  "type": "integer"
                },
                "description": "Length of the rate limit period, in seconds"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/sk_ad_networks": {
      "get": {
        "operationId": "get_sk_ad_networks",
        "summary": "List SkAdNetworks",
        "deprecated": false,
        "tags": [
          "SK Ad Networks"
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "Page of results to fetch.",
            "schema": {
              "type": "integer",
              "default": 1
            }
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "description": "Number of results to return per page.",
            "schema": {
              "type": "integer",
              "default": 25,
              "minimum": 0,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SkAdNetworks",
            "headers": {
              "Link": {
                "schema": {
                  "type": "string"
                },
                "description": "URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page"
              },
              "Total": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items on all pages"
              },
              "Per-Page": {
                "schema": {
                  "type": "integer"
                },
                "description": "Number of items per page"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkAdNetworkListDocument"
                },
                "examples": {
                  "SkAdNetworks": {
                    "value": {
                      "data": [
                        {
                          "id": "4fzdc2evr5.skadnetwork",
                          "type": "sk_ad_network",
                          "attributes": {
                            "channel_id": 13
                          }
                        },
                        {
                          "id": "4pfyvq9l8r.skadnetwork",
                          "type": "sk_ad_network",
                          "attributes": {
                            "channel_id": 2
                          }
                        }
                      ],
                      "links": {
                        "self": "https://api.tenjin.com/v2/sk_ad_networks"
                      },
                      "meta": {
                        "count": 2,
                        "per_page": 25
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v2/sk_ad_networks/{id}": {
      "get": {
        "operationId": "get_sk_ad_networks_id",
        "summary": "Get a SkAdNetwork",
        "deprecated": false,
        "tags": [
          "SK Ad Networks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "SKAdNetwork id, such as `4fzdc2evr5.skadnetwork`; the part before `.skadnetwork` in any case",
            "schema": {
              "type": "string",
              "pattern": "^[a-zA-Z0-9]{10}\\.skadnetwork$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The SkAdNetwork",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkAdNetworkDocument"
                },
                "examples": {
                  "The SkAdNetwork": {
                    "value": {
                      "data": {
                        "id": "4fzdc2evr5.skadnetwork",
                        "type": "sk_ad_network",
                        "attributes": {
                          "channel_id": 13
                        }
                      },
                      "links": {
                        "self": "https://api.tenjin.com/v2/sk_ad_networks/4fzdc2evr5.skadnetwork"
                      },
                      "meta": {}
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A param is missing or invalid, a record is not found, or the request cannot be served",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials, or no access to the requested data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Invalid token, or the user's role does not allow the request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "498": {
            "description": "Expired token, or a token with an invalid signature",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AdAccountListDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdAccountResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "What went wrong"
          }
        },
        "required": [
          "error"
        ]
      },
      "AdAccountDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AdAccountResource"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "type": "object",
            "description": "Always empty"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "AppListDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AppResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "post_apps_Request": {
        "type": "object",
        "properties": {
          "store_url": {
            "type": "string",
            "description": "App Store or Google Play URL of the app, instead of name, bundle_id and platform. Tenjin reads the app from the store; a platform sent with it must match the store",
            "example": "https://play.google.com/store/apps/details?id=com.example.game"
          },
          "platform": {
            "type": "string",
            "description": "Platform of the app",
            "enum": [
              "amazon",
              "android",
              "android_other",
              "ios",
              "windows",
              "unspecified"
            ]
          },
          "name": {
            "type": "string",
            "description": "Name of the app",
            "maxLength": 255
          },
          "bundle_id": {
            "type": "string",
            "description": "Bundle id of the app in its store",
            "maxLength": 255
          },
          "public_key": {
            "type": "string",
            "description": "Google Play public key, used to validate in-app purchases"
          },
          "ios_shared_secret": {
            "type": "string",
            "description": "App Store shared secret, used to track subscription revenue"
          },
          "amazon_shared_secret": {
            "type": "string",
            "description": "Amazon Appstore shared key, used to validate in-app purchases"
          },
          "match_strings": {
            "type": "string",
            "description": "Comma-separated strings that match campaigns to the app",
            "maxLength": 255
          },
          "protocol": {
            "type": "string",
            "description": "URL scheme of the app, used for Meta deep links",
            "maxLength": 255
          },
          "facebook_referrer_decryption_key": {
            "type": "string",
            "description": "Meta install referrer decryption key, 64 characters, used to decrypt Meta attribution data of an Android app",
            "minLength": 64,
            "maxLength": 64
          },
          "destination_url": {
            "type": "string",
            "description": "Download URL of an `android_other` app"
          },
          "deterministic_click_attribution_window": {
            "type": "string",
            "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `30d`. A whole number of days is returned in days, so `24h` comes back as `1d`. Null resets it to the default",
            "nullable": true,
            "example": "1d"
          },
          "deterministic_impression_attribution_window": {
            "type": "string",
            "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `30d`. A whole number of days is returned in days, so `24h` comes back as `1d`. Null resets it to the default",
            "nullable": true,
            "example": "1d"
          },
          "probabilistic_click_attribution_window": {
            "type": "string",
            "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `3d`. A whole number of days is returned in days, so `24h` comes back as `1d`. Null resets it to the default",
            "nullable": true,
            "example": "1d"
          },
          "probabilistic_impression_attribution_window": {
            "type": "string",
            "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `3d`. A whole number of days is returned in days, so `24h` comes back as `1d`. Null resets it to the default",
            "nullable": true,
            "example": "1d"
          }
        }
      },
      "AppDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AppResource"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "type": "object",
            "description": "Always empty"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "patch_apps_id_Request": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the app",
            "maxLength": 255
          },
          "public_key": {
            "type": "string",
            "description": "Google Play public key, used to validate in-app purchases"
          },
          "ios_shared_secret": {
            "type": "string",
            "description": "App Store shared secret, used to track subscription revenue"
          },
          "amazon_shared_secret": {
            "type": "string",
            "description": "Amazon Appstore shared key, used to validate in-app purchases"
          },
          "match_strings": {
            "type": "string",
            "description": "Comma-separated strings that match campaigns to the app",
            "maxLength": 255
          },
          "protocol": {
            "type": "string",
            "description": "URL scheme of the app, used for Meta deep links",
            "maxLength": 255
          },
          "facebook_referrer_decryption_key": {
            "type": "string",
            "description": "Meta install referrer decryption key, 64 characters, used to decrypt Meta attribution data of an Android app",
            "minLength": 64,
            "maxLength": 64
          },
          "destination_url": {
            "type": "string",
            "description": "Download URL of an `android_other` app"
          },
          "deterministic_click_attribution_window": {
            "type": "string",
            "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `30d`. A whole number of days is returned in days, so `24h` comes back as `1d`. Null resets it to the default",
            "nullable": true,
            "example": "1d"
          },
          "deterministic_impression_attribution_window": {
            "type": "string",
            "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `30d`. A whole number of days is returned in days, so `24h` comes back as `1d`. Null resets it to the default",
            "nullable": true,
            "example": "1d"
          },
          "probabilistic_click_attribution_window": {
            "type": "string",
            "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `3d`. A whole number of days is returned in days, so `24h` comes back as `1d`. Null resets it to the default",
            "nullable": true,
            "example": "1d"
          },
          "probabilistic_impression_attribution_window": {
            "type": "string",
            "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `3d`. A whole number of days is returned in days, so `24h` comes back as `1d`. Null resets it to the default",
            "nullable": true,
            "example": "1d"
          }
        }
      },
      "EmptyDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Always empty"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "type": "object",
            "description": "Always empty"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "AttributionSettingsDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/AttributionSettingsResource"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "type": "object",
            "description": "Always empty"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "patch_apps_app_id_integrations_integration_id_attribution_settings_Request": {
        "type": "object",
        "properties": {
          "deterministic_click_attribution_window": {
            "type": "string",
            "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `30d`. A whole number of days is returned in days, so `24h` comes back as `1d`. Null uses the app's window",
            "nullable": true,
            "example": "1d"
          },
          "deterministic_impression_attribution_window": {
            "type": "string",
            "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `30d`. A whole number of days is returned in days, so `24h` comes back as `1d`. Null uses the app's window",
            "nullable": true,
            "example": "1d"
          },
          "probabilistic_click_attribution_window": {
            "type": "string",
            "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `3d`. A whole number of days is returned in days, so `24h` comes back as `1d`. Null uses the app's window",
            "nullable": true,
            "example": "1d"
          },
          "probabilistic_impression_attribution_window": {
            "type": "string",
            "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `3d`. A whole number of days is returned in days, so `24h` comes back as `1d`. Null uses the app's window",
            "nullable": true,
            "example": "1d"
          }
        }
      },
      "CallbackGroupTemplateListDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CallbackGroupTemplateResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "CallbackGroupListDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CallbackGroupResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "post_apps_app_id_integrations_integration_id_callback_groups_Request": {
        "type": "object",
        "properties": {
          "callback_group_template_id": {
            "type": "string",
            "format": "uuid",
            "description": "Id of the callback group template the group is made from",
            "maxLength": 36
          },
          "event_definition_id": {
            "type": "string",
            "format": "uuid",
            "description": "Id of the event that sends the callbacks. Send event_definition_id or event; event_definition_id wins when both are sent",
            "maxLength": 36
          },
          "event": {
            "type": "string",
            "description": "Name of the event that sends the callbacks"
          },
          "active": {
            "type": "boolean",
            "description": "Whether Tenjin sends the callbacks"
          },
          "callback_settings": {
            "type": "object",
            "description": "A value for each of the template's required_settings, for this callback group only"
          },
          "name": {
            "type": "string",
            "description": "Name of the callback group"
          },
          "user_filter": {
            "type": "string",
            "description": "Users the callbacks are sent for",
            "enum": [
              "all",
              "channel",
              "channel_and_organic",
              "defer_to_template"
            ]
          }
        },
        "required": [
          "callback_group_template_id"
        ]
      },
      "CallbackGroupDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CallbackGroupResource"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "type": "object",
            "description": "Always empty"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "patch_apps_app_id_integrations_integration_id_callback_groups_id_Request": {
        "type": "object",
        "properties": {
          "event_definition_id": {
            "type": "string",
            "format": "uuid",
            "description": "Id of the event that sends the callbacks. Send event_definition_id or event; event_definition_id wins when both are sent",
            "maxLength": 36
          },
          "event": {
            "type": "string",
            "description": "Name of the event that sends the callbacks"
          },
          "active": {
            "type": "boolean",
            "description": "Whether Tenjin sends the callbacks"
          },
          "callback_settings": {
            "type": "object",
            "description": "A value for each of the template's required_settings, for this callback group only"
          },
          "name": {
            "type": "string",
            "description": "Name of the callback group"
          },
          "user_filter": {
            "type": "string",
            "description": "Users the callbacks are sent for",
            "enum": [
              "all",
              "channel",
              "channel_and_organic",
              "defer_to_template"
            ]
          }
        }
      },
      "CallbackSettingsDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CallbackSettingsResource"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "type": "object",
            "description": "Always empty"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "patch_apps_app_id_integrations_integration_id_callback_settings_Request": {
        "type": "object",
        "properties": {
          "callback_settings": {
            "type": "object",
            "description": "Settings for every callback group of the app and integration, added to the current ones",
            "default": {}
          }
        }
      },
      "CallbackTemplateListDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CallbackTemplateResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "CallbackTemplateDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CallbackTemplateResource"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "type": "object",
            "description": "Always empty"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "CallbackListDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CallbackResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "post_apps_app_id_callbacks_Request": {
        "type": "object",
        "properties": {
          "callback_template_id": {
            "type": "string",
            "format": "uuid",
            "description": "Id of the callback template the callback is made from",
            "maxLength": 36
          },
          "name": {
            "type": "string",
            "description": "Name of the callback",
            "maxLength": 255
          },
          "active": {
            "type": "boolean",
            "description": "Whether Tenjin sends the callback. Defaults to true when the callback is created"
          },
          "customer_parameters": {
            "type": "object",
            "description": "A value for each parameter in the template's customer_parameters; creating a callback requires every one"
          },
          "event": {
            "type": "string",
            "description": "Event of the app that sends the callback",
            "maxLength": 255
          },
          "user_filter": {
            "type": "string",
            "description": "Users the callback is sent for",
            "enum": [
              "all",
              "channel",
              "channel_and_organic",
              "non_channel"
            ],
            "maxLength": 255
          }
        },
        "required": [
          "callback_template_id"
        ]
      },
      "CallbackDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CallbackResource"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "type": "object",
            "description": "Always empty"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "patch_apps_app_id_callbacks_id_Request": {
        "type": "object",
        "properties": {
          "callback_template_id": {
            "type": "string",
            "format": "uuid",
            "description": "Id of a callback template to move the callback to"
          },
          "name": {
            "type": "string",
            "description": "Name of the callback",
            "maxLength": 255
          },
          "active": {
            "type": "boolean",
            "description": "Whether Tenjin sends the callback. Defaults to true when the callback is created"
          },
          "customer_parameters": {
            "type": "object",
            "description": "A value for each parameter in the template's customer_parameters; creating a callback requires every one"
          },
          "event": {
            "type": "string",
            "description": "Event of the app that sends the callback",
            "maxLength": 255
          },
          "user_filter": {
            "type": "string",
            "description": "Users the callback is sent for",
            "enum": [
              "all",
              "channel",
              "channel_and_organic",
              "non_channel"
            ],
            "maxLength": 255
          }
        }
      },
      "CampaignListDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CampaignResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "post_campaigns_Request": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the campaign",
            "maxLength": 255
          },
          "app_id": {
            "type": "string",
            "format": "uuid",
            "description": "Id of the app the campaign promotes",
            "maxLength": 36
          },
          "channel_id": {
            "type": "integer",
            "description": "Id of the channel. Send channel_id, ad_account_id or both; both must name the same channel"
          },
          "ad_account_id": {
            "type": "string",
            "format": "uuid",
            "description": "Id of the ad account. Without it, Tenjin finds or creates the organization's ad account for the channel",
            "maxLength": 36
          },
          "attribution_window": {
            "type": "integer",
            "description": "Click attribution window in seconds. Absent or null uses the ad account's window. Attribution does not use it: it uses the app's attribution windows and the integration's attribution settings",
            "nullable": true
          }
        },
        "required": [
          "name",
          "app_id"
        ]
      },
      "CampaignDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/CampaignResource"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "type": "object",
            "description": "Always empty"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "patch_campaigns_id_Request": {
        "type": "object",
        "properties": {
          "attribution_window": {
            "type": "integer",
            "description": "Click attribution window in seconds. Absent or null leaves the window unchanged, so a campaign cannot go back to the ad account's window. Attribution does not use it: it uses the app's attribution windows and the integration's attribution settings",
            "nullable": true
          }
        }
      },
      "ChannelListDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ChannelResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "ChannelDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/ChannelResource"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "type": "object",
            "description": "Always empty"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "EventListDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EventResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "S2SCallbackListDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/S2SCallbackResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "post_apps_app_id_s2s_callbacks_Request": {
        "type": "object",
        "properties": {
          "event": {
            "type": "string",
            "description": "Event of the app that sends the callback"
          },
          "name": {
            "type": "string",
            "description": "Name of the S2S callback"
          },
          "url": {
            "type": "string",
            "description": "URL Tenjin calls. Macros such as `{{advertising_id}}` are filled in"
          },
          "http_method": {
            "type": "string",
            "description": "HTTP method",
            "enum": [
              "GET",
              "POST"
            ]
          },
          "action": {
            "type": "string",
            "description": "`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",
            "enum": [
              "ping",
              "ping_on_first",
              "notify_on_reengagement"
            ]
          },
          "active": {
            "type": "boolean",
            "description": "Whether Tenjin sends the callback"
          },
          "advertising_id_filter": {
            "type": "boolean",
            "description": "Only send the callback for users with a known advertising id"
          },
          "user_filter": {
            "type": "array",
            "description": "Only send the callback for users attributed to these channels; all users when empty",
            "items": {
              "type": "integer"
            }
          },
          "first_party": {
            "type": "boolean",
            "description": "Whether this is a first-party (destination belongs to the advertiser) S2S callback"
          }
        }
      },
      "S2SCallbackDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/S2SCallbackResource"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "type": "object",
            "description": "Always empty"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "patch_apps_app_id_s2s_callbacks_id_Request": {
        "type": "object",
        "properties": {
          "event": {
            "type": "string",
            "description": "Event of the app that sends the callback"
          },
          "name": {
            "type": "string",
            "description": "Name of the S2S callback"
          },
          "url": {
            "type": "string",
            "description": "URL Tenjin calls. Macros such as `{{advertising_id}}` are filled in"
          },
          "http_method": {
            "type": "string",
            "description": "HTTP method",
            "enum": [
              "GET",
              "POST"
            ]
          },
          "action": {
            "type": "string",
            "description": "`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",
            "enum": [
              "ping",
              "ping_on_first",
              "notify_on_reengagement"
            ]
          },
          "active": {
            "type": "boolean",
            "description": "Whether Tenjin sends the callback"
          },
          "advertising_id_filter": {
            "type": "boolean",
            "description": "Only send the callback for users with a known advertising id"
          },
          "user_filter": {
            "type": "array",
            "description": "Only send the callback for users attributed to these channels; all users when empty",
            "items": {
              "type": "integer"
            }
          },
          "first_party": {
            "type": "boolean",
            "description": "Whether this is a first-party (destination belongs to the advertiser) S2S callback"
          }
        }
      },
      "SdkKeyListDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SdkKeyResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "SkAdNetworkListDocument": {
        "type": "object",
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkAdNetworkResource"
            }
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "$ref": "#/components/schemas/PageMeta"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "SkAdNetworkDocument": {
        "type": "object",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/SkAdNetworkResource"
          },
          "links": {
            "$ref": "#/components/schemas/Links"
          },
          "meta": {
            "type": "object",
            "description": "Always empty"
          }
        },
        "required": [
          "data",
          "links",
          "meta"
        ]
      },
      "Links": {
        "type": "object",
        "properties": {
          "self": {
            "type": "string",
            "format": "uri",
            "description": "URL of this request"
          },
          "first": {
            "type": "string",
            "format": "uri",
            "description": "URL of the first page of a list"
          },
          "prev": {
            "type": "string",
            "format": "uri",
            "description": "URL of the previous page of a list"
          },
          "next": {
            "type": "string",
            "format": "uri",
            "description": "URL of the next page of a list"
          },
          "last": {
            "type": "string",
            "format": "uri",
            "description": "URL of the last page of a list"
          }
        },
        "required": [
          "self"
        ]
      },
      "PageMeta": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of items on all pages"
          },
          "per_page": {
            "type": "integer",
            "description": "Number of items per page"
          }
        },
        "required": [
          "count",
          "per_page"
        ]
      },
      "AdAccountResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "ad_account"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the ad account",
                "example": "Facebook Account"
              },
              "channel_id": {
                "type": "integer",
                "description": "Id of the ad account's channel",
                "example": 3
              },
              "external_id": {
                "type": "string",
                "description": "Id of the account on the ad network",
                "nullable": true,
                "example": "444509211788999"
              }
            },
            "required": [
              "name",
              "channel_id",
              "external_id"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "AppResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "app"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the app",
                "nullable": true,
                "example": "My Game"
              },
              "bundle_id": {
                "type": "string",
                "description": "Bundle id of the app in its store",
                "nullable": true,
                "example": "com.example.mygame"
              },
              "platform": {
                "type": "string",
                "description": "Platform of the app",
                "nullable": true,
                "enum": [
                  "amazon",
                  "android",
                  "android_other",
                  "ios",
                  "windows",
                  "unspecified",
                  null
                ],
                "example": "ios"
              },
              "public_key": {
                "type": "string",
                "description": "Google Play public key, used to validate in-app purchases",
                "nullable": true
              },
              "ios_shared_secret": {
                "type": "string",
                "description": "App Store shared secret, used to track subscription revenue",
                "nullable": true
              },
              "amazon_shared_secret": {
                "type": "string",
                "description": "Amazon Appstore shared key, used to validate in-app purchases",
                "nullable": true
              },
              "store_id": {
                "type": "string",
                "description": "Id of the app in its store",
                "nullable": true,
                "example": "655745678"
              },
              "released_on": {
                "type": "string",
                "format": "date",
                "description": "Release date of the app in its store",
                "nullable": true
              },
              "rating": {
                "type": "string",
                "description": "Rating of the app in its store: a decimal number as a string",
                "nullable": true,
                "example": "4.5",
                "pattern": "^\\d\\.\\d$"
              },
              "price": {
                "type": "integer",
                "description": "Price of the app in its store",
                "nullable": true,
                "example": 0,
                "minimum": 0
              },
              "developer_name": {
                "type": "string",
                "description": "Name of the app developer",
                "nullable": true,
                "example": "Example Games"
              },
              "match_strings": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Strings that match campaigns to the app",
                "example": [
                  "mygame"
                ]
              },
              "protocol": {
                "type": "string",
                "description": "URL scheme of the app, used for Meta deep links",
                "nullable": true,
                "example": "mygame"
              },
              "facebook_referrer_decryption_key": {
                "type": "string",
                "description": "Meta install referrer decryption key, used to decrypt Meta attribution data of an Android app",
                "nullable": true
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the app was added to Tenjin",
                "nullable": true
              },
              "sending_events": {
                "type": "boolean",
                "description": "Whether Tenjin has received events of the app",
                "example": true
              },
              "deterministic_click_attribution_window": {
                "type": "string",
                "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `30d`. A whole number of days is returned in days, so `24h` comes back as `1d`",
                "example": "1d"
              },
              "deterministic_impression_attribution_window": {
                "type": "string",
                "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `30d`. A whole number of days is returned in days, so `24h` comes back as `1d`",
                "example": "1d"
              },
              "probabilistic_click_attribution_window": {
                "type": "string",
                "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `3d`. A whole number of days is returned in days, so `24h` comes back as `1d`",
                "example": "1d"
              },
              "probabilistic_impression_attribution_window": {
                "type": "string",
                "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `3d`. A whole number of days is returned in days, so `24h` comes back as `1d`",
                "example": "1d"
              }
            },
            "required": [
              "name",
              "bundle_id",
              "platform",
              "public_key",
              "ios_shared_secret",
              "amazon_shared_secret",
              "store_id",
              "released_on",
              "rating",
              "price",
              "developer_name",
              "match_strings",
              "protocol",
              "facebook_referrer_decryption_key",
              "created_at",
              "sending_events",
              "deterministic_click_attribution_window",
              "deterministic_impression_attribution_window",
              "probabilistic_click_attribution_window",
              "probabilistic_impression_attribution_window"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "AttributionSettingsResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "attribution_setting"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "app_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the app"
              },
              "integration_id": {
                "type": "integer",
                "description": "Id of the integration: its channel id",
                "example": 18
              },
              "deterministic_click_attribution_window": {
                "type": "string",
                "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `30d`. A whole number of days is returned in days, so `24h` comes back as `1d`; null when the app's window applies",
                "nullable": true,
                "example": "1d"
              },
              "deterministic_impression_attribution_window": {
                "type": "string",
                "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `30d`. A whole number of days is returned in days, so `24h` comes back as `1d`; null when the app's window applies",
                "nullable": true,
                "example": "1d"
              },
              "probabilistic_click_attribution_window": {
                "type": "string",
                "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `3d`. A whole number of days is returned in days, so `24h` comes back as `1d`; null when the app's window applies",
                "nullable": true,
                "example": "1d"
              },
              "probabilistic_impression_attribution_window": {
                "type": "string",
                "description": "Duration literal: `0`, whole hours `1h` to `24h`, or whole days `1d` to `3d`. A whole number of days is returned in days, so `24h` comes back as `1d`; null when the app's window applies",
                "nullable": true,
                "example": "1d"
              }
            },
            "required": [
              "app_id",
              "integration_id",
              "deterministic_click_attribution_window",
              "deterministic_impression_attribution_window",
              "probabilistic_click_attribution_window",
              "probabilistic_impression_attribution_window"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "CallbackGroupTemplateResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "callback_group_template"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "platform": {
                "type": "string",
                "description": "Platform of the apps the template is for",
                "nullable": true,
                "enum": [
                  "amazon",
                  "android",
                  "android_other",
                  "ios",
                  "windows",
                  "unspecified",
                  null
                ],
                "example": "ios"
              },
              "allow_multiple": {
                "type": "boolean",
                "description": "Whether an app can have several callback groups from the template",
                "example": false
              },
              "user_filter_default": {
                "type": "string",
                "description": "User filter of a new callback group. `defer_to_template`: each callback uses the user filter of its callback template",
                "enum": [
                  "all",
                  "channel",
                  "channel_and_organic",
                  "defer_to_template"
                ],
                "example": "all"
              },
              "user_filter_editable": {
                "type": "boolean",
                "description": "Whether a callback group can change the template's user filter",
                "example": true
              },
              "name": {
                "type": "string",
                "description": "Name of the callback group template",
                "example": "Custom event"
              },
              "integration_id": {
                "type": "integer",
                "description": "Id of the integration: its channel id",
                "nullable": true,
                "example": 18
              },
              "event_type": {
                "type": "string",
                "description": "Display name of the standard event; null for a custom event",
                "nullable": true
              },
              "event": {
                "type": "string",
                "description": "Standard event of the template; null for a custom event, which each callback group picks",
                "nullable": true,
                "example": "open"
              },
              "required_settings": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Settings a callback group from the template needs in its callback_settings",
                "example": [
                  "event_name"
                ]
              }
            },
            "required": [
              "platform",
              "allow_multiple",
              "user_filter_default",
              "user_filter_editable",
              "name",
              "integration_id",
              "event_type",
              "event",
              "required_settings"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "CallbackGroupResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "callback_group"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "active": {
                "type": "boolean",
                "description": "Whether Tenjin sends the callbacks",
                "example": true
              },
              "callback_group_template_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the callback group template the group is made from",
                "nullable": true
              },
              "event_definition_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the event that sends the callbacks",
                "nullable": true
              },
              "name": {
                "type": "string",
                "description": "Name of the callback group",
                "nullable": true,
                "example": "Level 10"
              },
              "user_filter": {
                "type": "string",
                "description": "Users the callbacks are sent for",
                "enum": [
                  "all",
                  "channel",
                  "channel_and_organic",
                  "defer_to_template"
                ],
                "example": "channel"
              },
              "app_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the app"
              },
              "integration_id": {
                "type": "integer",
                "description": "Id of the integration: its channel id",
                "example": 18
              },
              "callback_settings": {
                "type": "object",
                "description": "Settings of this callback group only",
                "example": {
                  "event_name": "level_10"
                }
              },
              "event": {
                "type": "string",
                "description": "Name of the event that sends the callbacks",
                "nullable": true,
                "example": "level_10"
              }
            },
            "required": [
              "active",
              "callback_group_template_id",
              "event_definition_id",
              "name",
              "user_filter",
              "app_id",
              "integration_id",
              "callback_settings",
              "event"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "CallbackSettingsResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "callback_setting"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "app_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the app"
              },
              "integration_id": {
                "type": "integer",
                "description": "Id of the integration: its channel id",
                "example": 18
              },
              "callback_settings": {
                "type": "object",
                "description": "Settings for every callback group of the app and integration",
                "example": {
                  "game_id": "abcde12345"
                }
              }
            },
            "required": [
              "app_id",
              "integration_id",
              "callback_settings"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "CallbackTemplateResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "callback_template"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the callback template",
                "example": "Facebook install"
              },
              "description": {
                "type": "string",
                "description": "Short summary of the callback template",
                "nullable": true,
                "example": "Facebook install callback template"
              },
              "action": {
                "type": "string",
                "description": "What the callbacks made from the template do, such as `ping_on_first`",
                "nullable": true,
                "enum": [
                  "ping",
                  "ping_on_first",
                  "notify_on_reengagement",
                  "ping_adwords",
                  "ping_adwords_deferred",
                  "ping_adwords_post_install",
                  "fetch_adwords_reengagement",
                  "notify_adwords_reengagement",
                  "ping_amazon",
                  "ping_amazon_post_install",
                  "fetch_amazon_reengagement",
                  "notify_amazon_reengagement",
                  "ping_facebook_deferred",
                  "ping_facebook",
                  "ping_facebook_post_install",
                  "fetch_facebook_reengagement",
                  "notify_facebook_reengagement",
                  "ping_double_click_bid_manager",
                  "fetch_double_click_bid_manager_reengagement",
                  "ping_snapchat",
                  "ping_snapchat_post_install",
                  "fetch_snapchat_reengagement",
                  "notify_snapchat_reengagement",
                  "ping_tiktok",
                  "ping_tiktok_post_install",
                  "fetch_tiktok_reengagement",
                  "notify_tiktok_reengagement",
                  "san_callback",
                  null
                ],
                "example": "ping_on_first"
              },
              "event": {
                "type": "string",
                "description": "Event that sends the callbacks made from the template",
                "nullable": true,
                "example": "open"
              },
              "customer_parameters": {
                "type": "object",
                "description": "Display name of each parameter a callback sets",
                "example": {
                  "remote_app_id": "Remote App ID"
                }
              },
              "is_install": {
                "type": "boolean",
                "description": "Whether an app can have only one callback from the template",
                "example": false
              },
              "channel_id": {
                "type": "integer",
                "description": "Id of the template's channel",
                "nullable": true,
                "example": 3
              },
              "platform": {
                "type": "string",
                "description": "Platform of the apps the template is for",
                "enum": [
                  "amazon",
                  "android",
                  "android_other",
                  "ios",
                  "windows",
                  "unspecified"
                ],
                "example": "ios"
              },
              "required_by_channel": {
                "type": "boolean",
                "description": "Whether the channel's click URL shows only once the app has a callback from the template",
                "example": false
              }
            },
            "required": [
              "name",
              "description",
              "action",
              "event",
              "customer_parameters",
              "is_install",
              "channel_id",
              "platform",
              "required_by_channel"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "CallbackResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "callback"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the callback",
                "example": "Facebook install"
              },
              "event": {
                "type": "string",
                "description": "Event that sends the callback",
                "example": "open"
              },
              "action": {
                "type": "string",
                "description": "What the callback does, such as `ping` or `ping_on_first`",
                "enum": [
                  "ping",
                  "ping_on_first",
                  "notify_on_reengagement",
                  "ping_adwords",
                  "ping_adwords_deferred",
                  "ping_adwords_post_install",
                  "fetch_adwords_reengagement",
                  "notify_adwords_reengagement",
                  "ping_amazon",
                  "ping_amazon_post_install",
                  "fetch_amazon_reengagement",
                  "notify_amazon_reengagement",
                  "ping_facebook_deferred",
                  "ping_facebook",
                  "ping_facebook_post_install",
                  "fetch_facebook_reengagement",
                  "notify_facebook_reengagement",
                  "ping_double_click_bid_manager",
                  "fetch_double_click_bid_manager_reengagement",
                  "ping_snapchat",
                  "ping_snapchat_post_install",
                  "fetch_snapchat_reengagement",
                  "notify_snapchat_reengagement",
                  "ping_tiktok",
                  "ping_tiktok_post_install",
                  "fetch_tiktok_reengagement",
                  "notify_tiktok_reengagement",
                  "san_callback"
                ],
                "example": "ping_on_first"
              },
              "channel_id": {
                "type": "integer",
                "description": "Id of the callback's channel",
                "nullable": true,
                "example": 3
              },
              "url": {
                "type": "string",
                "description": "URL Tenjin calls. Macros such as `{{advertising_id}}` are filled in",
                "nullable": true,
                "example": "https://example.com/postback?advertising_id={{advertising_id}}"
              },
              "http_method": {
                "type": "string",
                "description": "HTTP method",
                "enum": [
                  "GET",
                  "POST"
                ],
                "example": "GET"
              },
              "active": {
                "type": "boolean",
                "description": "Whether Tenjin sends the callback",
                "example": true
              },
              "customer_parameters": {
                "type": "object",
                "description": "Value of each parameter the callback sets",
                "example": {
                  "remote_app_id": "1234567890"
                }
              },
              "callback_template_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the callback template the callback is made from",
                "nullable": true
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the callback was created"
              },
              "user_filter": {
                "type": "string",
                "description": "Users the callback is sent for",
                "nullable": true,
                "enum": [
                  "all",
                  "channel",
                  "channel_and_organic",
                  "non_channel",
                  null
                ],
                "example": "all"
              },
              "first_party": {
                "type": "boolean",
                "description": "Whether this is a first-party (destination belongs to the advertiser) S2S callback",
                "nullable": true
              }
            },
            "required": [
              "name",
              "event",
              "action",
              "channel_id",
              "url",
              "http_method",
              "active",
              "customer_parameters",
              "callback_template_id",
              "created_at",
              "user_filter",
              "first_party"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "CampaignResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "campaign"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "channel_id": {
                "type": "integer",
                "description": "Id of the campaign's channel",
                "example": 3
              },
              "app_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the app the campaign promotes",
                "nullable": true
              },
              "ad_account_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the campaign's ad account",
                "nullable": true
              },
              "name": {
                "type": "string",
                "description": "Name of the campaign in Tenjin",
                "nullable": true,
                "example": "Facebook Campaign"
              },
              "short_id": {
                "type": "string",
                "description": "URL-safe id of the campaign in Tenjin",
                "nullable": true,
                "example": "zzzk0TXwNXu7Y5Maf2aRkL"
              },
              "remote_campaign_id": {
                "type": "string",
                "description": "Id of the campaign on the ad network",
                "nullable": true,
                "example": "23851234567890123"
              },
              "click_tracking_url": {
                "type": "string",
                "description": "Click tracking URL of the campaign, with the ad network's macros left as is",
                "nullable": true
              },
              "impression_tracking_url": {
                "type": "string",
                "description": "Impression tracking URL of the campaign, with the ad network's macros left as is",
                "nullable": true
              },
              "attribution_window": {
                "type": "integer",
                "description": "Click attribution window in seconds. Null uses the ad account's window. Attribution does not use it: it uses the app's attribution windows and the integration's attribution settings",
                "nullable": true
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the campaign was created",
                "nullable": true
              },
              "hidden": {
                "type": "boolean",
                "description": "Whether the campaign is deleted",
                "example": false
              }
            },
            "required": [
              "channel_id",
              "app_id",
              "ad_account_id",
              "name",
              "short_id",
              "remote_campaign_id",
              "click_tracking_url",
              "impression_tracking_url",
              "attribution_window",
              "created_at",
              "hidden"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "ChannelResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "example": 3
          },
          "type": {
            "type": "string",
            "enum": [
              "channel"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the channel",
                "nullable": true,
                "example": "Facebook"
              },
              "short_id": {
                "type": "string",
                "description": "URL-safe id of the channel",
                "nullable": true,
                "example": "facebook"
              }
            },
            "required": [
              "name",
              "short_id"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "EventResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "event"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Display name of the event",
                "nullable": true,
                "example": "App Open"
              },
              "event": {
                "type": "string",
                "description": "Name of the event as the app sends it",
                "nullable": true,
                "example": "open"
              }
            },
            "required": [
              "name",
              "event"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "S2SCallbackResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "type": {
            "type": "string",
            "enum": [
              "s2s_callbacks"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "app_id": {
                "type": "string",
                "format": "uuid",
                "description": "Id of the app",
                "nullable": true
              },
              "name": {
                "type": "string",
                "description": "Name of the S2S callback",
                "example": "S2S Purchase"
              },
              "event": {
                "type": "string",
                "description": "Event that sends the callback",
                "example": "purchase"
              },
              "url": {
                "type": "string",
                "description": "URL Tenjin calls. Macros such as `{{bundle_id}}` are filled in",
                "example": "https://example.com/postback?bundle_id={{bundle_id}}"
              },
              "http_method": {
                "type": "string",
                "description": "HTTP method",
                "enum": [
                  "GET",
                  "POST"
                ],
                "example": "GET"
              },
              "active": {
                "type": "boolean",
                "description": "Whether Tenjin sends the callback",
                "example": true
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the callback was created"
              },
              "action": {
                "type": "string",
                "description": "`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",
                "enum": [
                  "ping",
                  "ping_on_first",
                  "notify_on_reengagement"
                ],
                "example": "ping"
              },
              "first_party": {
                "type": "boolean",
                "description": "Whether this is a first-party (destination belongs to the advertiser) S2S callback",
                "nullable": true,
                "example": false
              },
              "advertising_id_filter": {
                "type": "boolean",
                "description": "Only send the callback for users with a known advertising id",
                "example": true
              },
              "user_filter": {
                "type": "array",
                "items": {
                  "type": "integer"
                },
                "description": "Only send the callback for users attributed to these channels; all users when empty",
                "example": [
                  3,
                  5
                ]
              }
            },
            "required": [
              "app_id",
              "name",
              "event",
              "url",
              "http_method",
              "active",
              "created_at",
              "action",
              "first_party",
              "advertising_id_filter",
              "user_filter"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "SdkKeyResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "sdk_key"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "description": "Name of the SDK key",
                "nullable": true,
                "example": "Default"
              },
              "created_at": {
                "type": "string",
                "format": "date-time",
                "description": "When the SDK key was created"
              },
              "key": {
                "type": "string",
                "description": "The key the Tenjin SDK sends",
                "nullable": true
              }
            },
            "required": [
              "name",
              "created_at",
              "key"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      },
      "SkAdNetworkResource": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "sk_ad_network"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "channel_id": {
                "type": "integer",
                "description": "Id of the channel the SKAdNetwork id belongs to; null when unknown",
                "nullable": true,
                "example": 13
              }
            },
            "required": [
              "channel_id"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Generate an access token on the [Access Tokens](https://dashboard.tenjin.com/dashboard/access_tokens) page of the Tenjin dashboard and send it as `Authorization: Bearer <access token>`. [API access tokens](https://tenjin.com/docs/api-access-tokens/) explains them."
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "externalDocs": {
    "description": "Find out more about the Campaign Management API",
    "url": "https://tenjin.com/docs/automation-apis/#campaign-management-api"
  }
}
