# Switch an AI agent off

```http
DELETE https://trydimmi.com/api/v1/ai/agents/{agent}/publications
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `ai:write`.

## Path parameters

- `agent` (string, required): Id of the AI agent, starting with aia_, such as aia_01jx2m8k4t. Find it with GET /ai/agents.

## Response 200 (OK)

- `data` (object, required)
  - `agent` (object, required)
    - `action_scope` (object, required)
      - `ids` (string[] | null, required): With mode selected: ids of the procedures or actions the agent may use.
      - `mode` (string, required): all when the agent may use every one; selected when only the ones in ids.
    - `actions_enabled` (boolean, required): Whether the agent may use the workspace's actions at all.
    - `always_handoff_tag_ids` (string[] | null, required): Ids of the tags that always send a conversation to the team, such as tag_... Empty when none.
    - `answer_key_id` (string | null, required): Id of the provider connection the answer model runs on, such as aik_... Null when none is chosen.
    - `answer_model` (string | null, required): Id of the model that writes the agent's answers. Null when none is chosen, and then the agent cannot go live.
    - `assigned_behavior` (string, required): What the agent does in a conversation a teammate holds: skip_when_human_active, never_when_assigned or always.
    - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
    - `default_language` (string, required): Language tag the agent falls back to, such as en.
    - `description` (string, required): What the live agent handles. Other agents read it to know when to pass a conversation to this one.
    - `draft` (object, required)
      - `action_scope` (object, required)
        - `ids` (string[] | null, required): With mode selected: ids of the procedures or actions the agent may use.
        - `mode` (string, required): all when the agent may use every one; selected when only the ones in ids.
      - `always_handoff_tag_ids` (string[] | null, required): Ids of the tags that always send a conversation to a person, each starting with tag_.
      - `answer_key_id` (string | null, required): Id of the provider key the agent answers with (starts with aik_). Null when it uses the key every agent shares.
      - `answer_model` (string | null, required): The model the agent answers with. Null when it uses the shared model.
      - `assigned_behavior` (string, required): What the agent does in a conversation a teammate holds: skip_when_human_active, never_when_assigned or always.
      - `default_language` (string, required): Language tag the agent answers in when the customer's language is unknown, such as en.
      - `description` (string, required): What the agent handles. Other agents read it to know when to pass a conversation to this one.
      - `enabled_channels` (string[] | null, required): The kinds of channel the agent answers on, such as widget, email and api.
      - `fallback_key_id` (string | null, required): Id of the provider key used when the answer key fails (starts with aik_). Null when there is none.
      - `fallback_model` (string | null, required): The model used when the answer model fails. Null when there is none.
      - `guidance` (string, required): How the agent talks and what it does, in the team's own words.
      - `handoff_mode` (string, required): full when the agent answers from the knowledge; triage_only when it only sorts the conversation and hands it to a person.
      - `handoff_team_id` (string | null, required): Id of the team a handed-over conversation goes to (starts with team_). Null when it goes to no team.
      - `include_contact_context` (string, required): How much of the customer's record the agent reads: none or basic.
      - `knowledge_scope` (object, required)
        - `help_center_ids` (string[] | null, required): With mode selected: ids of the help centers the agent may search, each starting with hc_.
        - `mode` (string, required): all when the agent may search every help center and knowledge source; selected when only the ones listed.
        - `source_ids` (string[] | null, required): With mode selected: ids of the knowledge sources the agent may search, each starting with ks_.
      - `languages` (string[] | null, required): Language tags the agent answers in, such as en or pt-BR.
      - `link_allowlist` (string[] | null, required): Hosts the agent may link to, such as example.com or *.example.com.
      - `max_ai_replies` (integer, required): Most replies the agent sends in one conversation before it hands over.
      - `name` (string, required): What the team calls the agent.
      - `pii_redaction` (boolean, required): true when personal data is masked in text before it is sent to the model provider.
      - `placement` (object, required)
        - `channel_connection_ids` (string[] | null, required): Ids of the channel connections whose new conversations the agent takes, each starting with chn_.
        - `channel_room_ids` (string[] | null, required): Ids of the Slack channels whose new conversations the agent takes, each starting with chr_.
        - `inbox_ids` (string[] | null, required): Ids of the inboxes whose new conversations the agent takes, each starting with inbox_.
      - `procedure_scope` (object, required)
        - `ids` (string[] | null, required): With mode selected: ids of the procedures or actions the agent may use.
        - `mode` (string, required): all when the agent may use every one; selected when only the ones in ids.
      - `product_name` (string | null, required): The product's name as the agent says it. Null when it uses the workspace's name.
      - `raise_priority_on_handoff` (boolean, required): true when a conversation becomes high priority as the agent hands it over.
      - `require_citations` (boolean, required): true when the agent answers only with what it can cite from the knowledge.
      - `schedule` (string, required): When the agent answers: always, outside_office_hours or inside_office_hours.
      - `streaming` (boolean, required): true when the agent's reply appears in the messenger as it is written.
      - `tone` (string, required): How the agent sounds: friendly, professional or concise.
      - `transfer_agent_ids` (string[] | null, required): Ids of the agents this one may pass a conversation to, each starting with aia_.
      - `unknown_behavior` (string, required): What the agent does when it cannot answer: offer_handoff, handoff or say_unknown.
    - `enabled` (boolean, required): Whether the agent is switched on and answers customers.
    - `enabled_channels` (string[] | null, required): Channels the agent answers on: any of widget, email, api and slack. With none the agent is not ready.
    - `fallback_key_id` (string | null, required): Id of the provider connection the fallback model runs on, such as aik_... Null when no fallback is set.
    - `fallback_model` (string | null, required): Id of the model used as a fallback for answers. Null when none is set.
    - `grounding_mode` (string, required): How answers are kept to the sources: citations or verify.
    - `guidance` (string, required): The team's own instructions to the agent, in plain text up to 2000 characters. Empty when none.
    - `handoff_mode` (string, required): The agent's role in a conversation: full (it answers) or triage_only (it only sorts the conversation and hands it to a person).
    - `handoff_team_id` (string | null, required): Id of the team a conversation goes to when the agent hands off, such as team_... Null when no team is set.
    - `has_unpublished_changes` (boolean, required): true when the draft differs from what customers meet, so a publish would change something.
    - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
    - `include_contact_context` (string, required): How much the agent reads about the contact: none, basic or allowlist.
    - `is_default` (boolean, required): true for the one agent that answers every conversation no other agent takes.
    - `knowledge_scope` (object, required)
      - `help_center_ids` (string[] | null, required): With mode selected: ids of the help centers the agent may search, each starting with hc_.
      - `mode` (string, required): all when the agent may search every help center and knowledge source; selected when only the ones listed.
      - `source_ids` (string[] | null, required): With mode selected: ids of the knowledge sources the agent may search, each starting with ks_.
    - `languages` (string[] | null, required): Language tags set for the agent, such as ["en","de"]. Empty when none are set.
    - `link_allowlist` (string[] | null, required): Host names set as allowed for links in the agent's answers, such as docs.example.com or *.example.com. Empty when none.
    - `live_version` (integer, required): Number of the version customers meet now. 0 before the first publish.
    - `lock_version` (integer, required): Counts the agent's saves. Send it back with an edit to refuse the edit when someone else saved in between.
    - `max_ai_replies` (integer, required): The most replies the agent gives in one conversation before it hands off to the team, from 1 to 50. Defaults to 5.
    - `max_output_tokens` (integer, required): The most tokens the agent may write in one answer. Defaults to 600.
    - `name` (string, required): The name the agent goes by with customers, 1 to 60 characters.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `pii_redaction` (boolean, required): Whether redaction of personal data is switched on for the agent.
    - `placement` (object, required)
      - `channel_connection_ids` (string[] | null, required): Ids of the channel connections whose new conversations the agent takes, each starting with chn_.
      - `channel_room_ids` (string[] | null, required): Ids of the Slack channels whose new conversations the agent takes, each starting with chr_.
      - `inbox_ids` (string[] | null, required): Ids of the inboxes whose new conversations the agent takes, each starting with inbox_.
    - `procedure_scope` (object, required)
      - `ids` (string[] | null, required): With mode selected: ids of the procedures or actions the agent may use.
      - `mode` (string, required): all when the agent may use every one; selected when only the ones in ids.
    - `product_name` (string | null, required): The name of the product the agent supports, up to 80 characters. Null when not set.
    - `published_at` (string | null, required): When the agent was last published. Null when it never was.
    - `raise_priority_on_handoff` (boolean, required): Whether a conversation's priority is raised when the agent hands it to the team.
    - `require_citations` (boolean, required): Whether the agent's answers must cite their sources.
    - `role` (string, required): The kind of work the agent was made for, taken from its template, such as support, billing or developer.
    - `schedule` (string, required): When the agent may answer: always, outside_office_hours or inside_office_hours.
    - `status` (string, required): Where the agent stands: draft (never published), live or paused.
    - `streaming` (boolean, required): Whether answers are streamed to the customer as they are written.
    - `template` (string | null, required): Key of the template the agent started from, such as support. Null when it started empty.
    - `tone` (string, required): How the agent sounds: friendly, professional or concise.
    - `transfer_agent_ids` (string[] | null, required): Ids of the agents the live agent may pass a conversation to, each starting with aia_.
    - `unknown_behavior` (string, required): What the agent does when it cannot answer: offer_handoff, handoff or say_unknown.
    - `updated_at` (string, required): When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `catalog` (object, required): The models that can be picked, as lists keyed by provider such as dimmi or chatgpt. Each entry has the model id, display name and prices.
  - `keys` (object[] | null, required): The workspace's provider connections, without their secrets.
    - `auth_type` (string, required): How the connection signs in to the provider: api_key, aws_iam, bedrock_api_key, none, managed or oauth.
    - `base_url` (string | null, required): The provider's address for this connection, for providers that need one. Null when the provider's default is used.
    - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
    - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
    - `key_hint` (string | null, required): Dots and the last four characters of the stored key, such as ••••a1b2, to tell keys apart. Null when no key is stored.
    - `last_used_at` (string | null, required): When the connection was last used for a model call. Null when never.
    - `last_validated_at` (string | null, required): When the connection was last checked against the provider. Null when never.
    - `models` (string[] | null, required): Ids of the models the provider offered when the connection last validated. Empty when it listed none.
    - `models_count` (integer, required): How many models are in the models list.
    - `name` (string, required): The name the team gave this provider connection.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
    - `provider` (string, required): Which model provider this connects to, such as dimmi (built in), anthropic, openai, chatgpt or openai_compatible.
    - `region` (string | null, required): The provider region this connection uses, for providers that have regions. Null otherwise.
    - `source` (string, required): Where the connection came from: dashboard, api, env or system.
    - `status` (string, required): Whether the connection works: unverified (never checked), valid, invalid or error.
    - `status_reason` (string | null, required): A short safe explanation of the status, such as "never validated" or "connected". Null when there is none.
    - `updated_at` (string, required): When it last changed, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `managed` (boolean, required): True when the workspace has dimmi's built-in provider connection.
  - `prompt_version` (string, required): The version of the prompts the agent's answers use.
  - `providers` (object[] | null, required): The model providers the workspace could connect, each with its id, name and how it signs in.
    - `auth_type` (string, required): How the AI provider is connected: managed (built in), api_key or oauth.
    - `available` (boolean, required): True when this server can actually serve the provider; false when it is not set up here.
    - `docs_url` (string, required): Where to get a key for the provider. Empty when there is no such page.
    - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
    - `key_required` (boolean, required): True when connecting the provider needs an API key.
    - `name` (string, required): The provider's name for the picker, such as Anthropic or OpenAI.
  - `readiness_errors` (string[] | null, required): Why the agent cannot go live, in plain English: "answer model not configured" or "no channels enabled". Empty when ready.
  - `ready` (boolean, required): True when the agent could go live: it has a usable answer model and at least one channel.
  - `settings` (object, required)
    - `answer_key_id` (string | null, required): Id of the provider key every agent answers with until it picks its own (starts with aik_). Null when none is set.
    - `answer_model` (string | null, required): The model every agent answers with until it picks its own. Null when none is set.
    - `classifier_key_id` (string | null, required): Id of the provider key that sorts each customer message before an agent answers (starts with aik_). Null when none is set.
    - `classifier_model` (string | null, required): The model that sorts each customer message. Null when none is set.
    - `fallback_key_id` (string | null, required): Id of the provider key used when an agent's answer key fails (starts with aik_). Null when there is none.
    - `fallback_model` (string | null, required): The model used when an agent's answer model fails. Null when there is none.
    - `monthly_spend_cap_micros` (integer | null, required): Most the workspace may spend on dimmi in a month, in millionths of a US dollar. Null when there is no cap.
    - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `ties` (object[] | null, required): What still relies on the agent: workflows and series that name it, places it answers on and agents that may transfer to it. The agent can be archived only once this is empty.
    - `id` (string, required): The id of what relies on the agent, such as wf_..., chn_... or aia_....
    - `kind` (string, required): What relies on the agent: workflow, series, connection, room, inbox or agent.
    - `name` (string, required): Its name.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request DELETE \
  --url 'https://trydimmi.com/api/v1/ai/agents/{agent}/publications' \
  --header 'Authorization: Bearer <token>'
```

## Example response

```json
{
  "data": {
    "agent": {
      "action_scope": {
        "ids": [
          "<string>"
        ],
        "mode": "<string>"
      },
      "actions_enabled": true,
      "always_handoff_tag_ids": [
        "<string>"
      ],
      "answer_key_id": "<string>",
      "answer_model": "<string>",
      "assigned_behavior": "<string>",
      "created_at": "2026-11-01T09:30:00Z",
      "default_language": "<string>",
      "description": "<string>",
      "draft": {
        "action_scope": {
          "ids": [],
          "mode": "<string>"
        },
        "always_handoff_tag_ids": [
          "<string>"
        ],
        "answer_key_id": "<string>",
        "answer_model": "<string>",
        "assigned_behavior": "<string>",
        "default_language": "<string>",
        "description": "<string>",
        "enabled_channels": [
          "<string>"
        ],
        "fallback_key_id": "<string>",
        "fallback_model": "<string>",
        "guidance": "<string>",
        "handoff_mode": "<string>",
        "handoff_team_id": "<string>",
        "include_contact_context": "<string>",
        "knowledge_scope": {
          "help_center_ids": [],
          "mode": "<string>",
          "source_ids": []
        },
        "languages": [
          "<string>"
        ],
        "link_allowlist": [
          "<string>"
        ],
        "max_ai_replies": 123,
        "name": "<string>",
        "pii_redaction": true,
        "placement": {
          "channel_connection_ids": [],
          "channel_room_ids": [],
          "inbox_ids": []
        },
        "procedure_scope": {
          "ids": [],
          "mode": "<string>"
        },
        "product_name": "<string>",
        "raise_priority_on_handoff": true,
        "require_citations": true,
        "schedule": "<string>",
        "streaming": true,
        "tone": "<string>",
        "transfer_agent_ids": [
          "<string>"
        ],
        "unknown_behavior": "<string>"
      },
      "enabled": true,
      "enabled_channels": [
        "<string>"
      ],
      "fallback_key_id": "<string>",
      "fallback_model": "<string>",
      "grounding_mode": "<string>",
      "guidance": "<string>",
      "handoff_mode": "<string>",
      "handoff_team_id": "<string>",
      "has_unpublished_changes": true,
      "id": "<string>",
      "include_contact_context": "<string>",
      "is_default": true,
      "knowledge_scope": {
        "help_center_ids": [
          "<string>"
        ],
        "mode": "<string>",
        "source_ids": [
          "<string>"
        ]
      },
      "languages": [
        "<string>"
      ],
      "link_allowlist": [
        "<string>"
      ],
      "live_version": 123,
      "lock_version": 123,
      "max_ai_replies": 123,
      "max_output_tokens": 123,
      "name": "<string>",
      "object": "<string>",
      "pii_redaction": true,
      "placement": {
        "channel_connection_ids": [
          "<string>"
        ],
        "channel_room_ids": [
          "<string>"
        ],
        "inbox_ids": [
          "<string>"
        ]
      },
      "procedure_scope": {
        "ids": [
          "<string>"
        ],
        "mode": "<string>"
      },
      "product_name": "<string>",
      "published_at": "2026-11-01T09:30:00Z",
      "raise_priority_on_handoff": true,
      "require_citations": true,
      "role": "<string>",
      "schedule": "<string>",
      "status": "<string>",
      "streaming": true,
      "template": "<string>",
      "tone": "<string>",
      "transfer_agent_ids": [
        "<string>"
      ],
      "unknown_behavior": "<string>",
      "updated_at": "2026-11-01T09:30:00Z"
    },
    "catalog": {
      "<key>": [
        {
          "context_tokens": 123,
          "display_name": "<string>",
          "family": "<string>",
          "id": "<string>",
          "suggested": []
        }
      ]
    },
    "keys": [
      {
        "auth_type": "<string>",
        "base_url": "<string>",
        "created_at": "2026-11-01T09:30:00Z",
        "id": "<string>",
        "key_hint": "<string>",
        "last_used_at": "2026-11-01T09:30:00Z",
        "last_validated_at": "2026-11-01T09:30:00Z",
        "models": [
          "<string>"
        ],
        "models_count": 123,
        "name": "<string>",
        "object": "<string>",
        "provider": "<string>",
        "region": "<string>",
        "source": "<string>",
        "status": "<string>",
        "status_reason": "<string>",
        "updated_at": "2026-11-01T09:30:00Z"
      }
    ],
    "managed": true,
    "prompt_version": "<string>",
    "providers": [
      {
        "auth_type": "<string>",
        "available": true,
        "docs_url": "<string>",
        "id": "<string>",
        "key_required": true,
        "name": "<string>"
      }
    ],
    "readiness_errors": [
      "<string>"
    ],
    "ready": true,
    "settings": {
      "answer_key_id": "<string>",
      "answer_model": "<string>",
      "classifier_key_id": "<string>",
      "classifier_model": "<string>",
      "fallback_key_id": "<string>",
      "fallback_model": "<string>",
      "monthly_spend_cap_micros": 123,
      "object": "<string>"
    },
    "ties": [
      {
        "id": "<string>",
        "kind": "<string>",
        "name": "<string>"
      }
    ]
  }
}
```

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
