---
title: "Create a callback group"
method: POST
path: "/v2/apps/{app_id}/integrations/{integration_id}/callback_groups"
tags: ["Callback Groups"]
---

# Create a callback group

`POST /v2/apps/{app_id}/integrations/{integration_id}/callback_groups`

## Request

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

## Path parameters

- `app_id` string, uuid, required
- `integration_id` integer, required

## Request body

- PostAppsAppIdIntegrationsIntegrationIdCallbackGroupsRequest
  - `callback_group_template_id` string, uuid, required: Id of the callback group template the group is made from
  - `event_definition_id` string, uuid: Id of the event that sends the callbacks. Send event_definition_id or event; event_definition_id wins when both are sent
  - `event` string: Name of the event that sends the callbacks
  - `active` boolean: Whether Tenjin sends the callbacks
  - `callback_settings` object: A value for each of the template's required_settings, for this callback group only
  - `name` string: Name of the callback group
  - `user_filter` 'all' | 'channel' | 'channel_and_organic' | 'defer_to_template': Users the callbacks are sent for

## Response `201`

The created callback group

- CallbackGroupDocument
  - `data` CallbackGroupResource, required
    - `id` string, uuid, required
    - `type` 'callback_group', required
    - `attributes` object, required
      - `active` boolean, required: Whether Tenjin sends the callbacks
      - `callback_group_template_id` string, uuid, nullable, required: Id of the callback group template the group is made from
      - `event_definition_id` string, uuid, nullable, required: Id of the event that sends the callbacks
      - `name` string, nullable, required: Name of the callback group
      - `user_filter` 'all' | 'channel' | 'channel_and_organic' | 'defer_to_template', required: Users the callbacks are sent for
      - `app_id` string, uuid, required: Id of the app
      - `integration_id` integer, required: Id of the integration: its channel id
      - `callback_settings` object, required: Settings of this callback group only
      - `event` string, nullable, required: Name of the event that sends the callbacks
  - `links` Links, required
    - `self` string, uri, required: URL of this request
    - `first` string, uri: URL of the first page of a list
    - `prev` string, uri: URL of the previous page of a list
    - `next` string, uri: URL of the next page of a list
    - `last` string, uri: URL of the last page of a list
  - `meta` object, required: Always empty

## Other responses

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

---

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