Skip to content

Offboard: revoke this partner's keys and clear the managed-by link

POST
/v1/partner/tenants/{id}/detach
curl --request POST \
--url https://api.emite.cr/v1/partner/tenants/example/detach \
--header 'Content-Type: application/json' \
--data '{ "orphan": false }'

Requires the tenant to have an owner membership (grant-access completed) OR an explicit orphan: true acknowledgment (409 PARTNER_DETACH_REQUIRES_OWNER otherwise). Revokes, with no grace, every data-plane key this partner minted for the company, and clears the link: the company leaves this partner's plan and count, its events stop reaching this partner's webhooks, and its /partner/tenants/:id routes answer 404. Fiscal history is never deleted.

id
required
string
x-partner-key
string

Partner app credential (ecp_*)

Media typeapplication/json
object
orphan

Acknowledgment required to detach a company that has no owner yet (grant-access never completed): nobody could reach its fiscal history afterwards. Without it, such a detach answers 409 PARTNER_DETACH_REQUIRES_OWNER.

boolean
Media typeapplication/json
object
detached
required

Always true: this partner no longer manages the company, and its routes under /partner/tenants/:id answer 404 PARTNER_TENANT_NOT_FOUND from now on.

boolean
revokedKeys
required

How many data-plane keys this partner had minted for the company, in both environments, that still worked — one in a rotation grace included — and stopped working with this call.

number
Example
{
"detached": true,
"revokedKeys": 2
}