---
title: "Add Team Callbacks"
method: POST
path: "/team/{team_id}/callback"
tags: ["team management"]
---

# Add Team Callbacks

`POST /team/{team_id}/callback`

Add a success/failure callback to a team

Use this if if you want different teams to have different success/failure callbacks

Parameters:
- callback_name (str, required): The name of the callback to add, e.g. "langfuse", "langsmith", "gcs", "newrelic". The value is validated against the callbacks that support team-scoped credentials
- callback_type (Literal["success", "failure", "success_and_failure"], required): The type of callback to add. One of:
    - "success": Callback for successful LLM calls
    - "failure": Callback for failed LLM calls
    - "success_and_failure": Callback for both successful and failed LLM calls
- callback_vars (StandardCallbackDynamicParams, required): A dictionary of variables to pass to the callback
    - langfuse_public_key: The public key for the Langfuse callback
    - langfuse_secret_key: The secret key for the Langfuse callback
    - langfuse_secret: The secret for the Langfuse callback
    - langfuse_host: The host for the Langfuse callback
    - langfuse_environment: The tracing environment for the Langfuse callback (lowercase; falls back to LANGFUSE_TRACING_ENVIRONMENT)
    - gcs_bucket_name: The name of the GCS bucket
    - gcs_path_service_account: The path to the GCS service account
    - langsmith_api_key: The API key for the Langsmith callback
    - langsmith_project: The project for the Langsmith callback
    - langsmith_base_url: The base URL for the Langsmith callback
    - newrelic_api_key: The ingest license key for the team's New Relic account; routes both LLM/agent traces and cost metrics to that account. Requires the proxy to run with LITELLM_OTEL_V2=true, otherwise this callback is rejected with a 400
    - newrelic_region: The New Relic region for the team's account ("us" or "eu"), riding the team's own key

Example curl:
```
curl -X POST 'http:/localhost:4000/team/dbe2f686-a686-4896-864a-4c3924458709/callback'         -H 'Content-Type: application/json'         -H 'Authorization: Bearer sk-1234'         -d '{
    "callback_name": "langfuse",
    "callback_type": "success",
    "callback_vars": {"langfuse_public_key": "pk-lf-xxxx1", "langfuse_secret_key": "sk-xxxxx"}
    
}'
```

This means for the team where team_id = dbe2f686-a686-4896-864a-4c3924458709, all LLM calls will be logged to langfuse using the public key pk-lf-xxxx1 and the secret key sk-xxxxx

## Path parameters

- `team_id` string, required

## Headers

- `litellm-changed-by` string, nullable — The litellm-changed-by header enables tracking of actions performed by authorized users on behalf of other users, providing an audit trail for accountability

## Request body

- AddTeamCallback
  - `callback_name` string, required
  - `callback_type` 'success' | 'failure' | 'success_and_failure', nullable
  - `callback_vars` object, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-18** `082b5fabd909` — 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status

[Change history](https://skmtc.dev/flock/apis/litellm-api/changes/team/:team_id/callback/post.md)

---

[API](https://skmtc.dev/flock/apis/litellm-api.md) · [All operations](https://skmtc.dev/flock/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/flock/apis/litellm-api/revisions/7ed45f30a5f0?raw)
