Skip to content

Document DELETE /admins/remove - #633

Merged
robertlangner-fin merged 3 commits into
mainfrom
robert/document-remove-admin-endpoint
Aug 26, 2026
Merged

Document DELETE /admins/remove#633
robertlangner-fin merged 3 commits into
mainfrom
robert/document-remove-admin-endpoint

Conversation

@robertlangner-fin

Copy link
Copy Markdown
Contributor

Why?

The DELETE /admins/remove endpoint has been live and callable on the public API for a long time, but was never added to the OpenAPI spec. This documents the existing behavior — no code or behavior changes.

How?

Adds the /admins/remove path to the Preview spec with its parameters, success response, and the coded error responses the endpoint actually returns.

Generated with Claude Code

The endpoint has shipped and been callable for a long time (app/controllers/api/v3/admins_controller.rb#remove
in intercom/intercom) but was never added to the spec. Adds the path,
parameters, and coded error responses actually returned by the controller.
No behaviour change.
@robertlangner-fin

Copy link
Copy Markdown
Contributor Author

Companion to intercom/developer-docs#1110

@robertlangner-fin

robertlangner-fin commented Aug 25, 2026

Copy link
Copy Markdown
Contributor Author

Documents intercom/intercom#563277.

Comment thread descriptions/0/api.intercom.io.yaml Outdated
type: integer
- name: reassign_messages_admin_id
in: query
required: false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark reassign_messages_admin_id, reassign_owner_admin_id and reassign_articles_author_id as required.

Leaving any of them out returns 404, not 200. single_admin(nil) returns nil (app/controllers/api/v3/admins_controller.rb:188) and ensure_admin_is_human raises admin_not_found on nil (:257). The three calls are at :73-75.

So DELETE /admins/remove?admin_id=123 on its own fails.

Worth checking whether reassign_conversations_admin_id behaves the same way when omitted.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing worth noting: the command underneath actually treats three of these as optional — there's
even a # Reassignment for replies is optional comment in permissions/delete.rb:113. It's the
controller's upfront checks that make them mandatory. Probably worth fixing there at some point, but
separate PR.

Review feedback on #633: the controller rejects a nil for every reassignment
param, so `required: false` advertised a call shape that returns 404. The
pre-flight checks at app/controllers/api/v3/admins_controller.rb:72-75 run
before Permissions::Delete and reject all four.

reassign_replies_teams stays optional — it has no pre-flight check.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@robertlangner-fin
robertlangner-fin merged commit b7d4970 into main Aug 26, 2026
3 checks passed
@robertlangner-fin
robertlangner-fin deleted the robert/document-remove-admin-endpoint branch August 26, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants