Skip to main content
DELETE
Delete or close organization (owner only)
Deletes an organization, or closes it when it has production CFDI. An organization with stamped production CFDI is never erased: Timbrix must keep those CFDI available for the period required by the Código Fiscal de la Federación. In that case the organization is closed instead, and you can reopen it later.

Authentication

This endpoint requires authentication via Bearer token:
  • Authorization: Bearer <token>

Permissions

Only the organization owner can delete or close it. Use Close Preview to see which of the two will happen.

Path Parameters

Delete vs. close

When an organization is deleted, its Stripe subscription is canceled immediately, without proration or refund. If a production CFDI is stamped while the delete is running, the organization is closed instead and the response is status: "closed". When an organization is closed:
  • Its CFDI stay readable and downloadable by members until retainedUntil (31 December of the 6th year after stamping, Mexico City time).
  • The Stripe subscription is scheduled to cancel at the end of the billing period.
  • API keys, webhooks and OAuth apps are deactivated.
  • Any write on the organization fails with 403 ORGANIZATION_CLOSED.

What happens to your data after closing

  • Certificate (CSD): the certificate, the private key and its password are deleted right after the organization is closed or deleted. If you reopen it, you must upload the CSD again.
  • After 90 days: customers, products, webhooks (and their delivery history), API keys, OAuth apps and pending invitations are deleted. Invoices with their XML and PDF files, series, members, legal data and the organization itself are kept.
  • Reopening: if you reopen before 90 days, you recover everything except the CSD. After 90 days, only the invoices remain. Closing the organization again reschedules the cleanup.
The Close Preview response includes certificateWillBeDeleted and dataPurgeDays so you can warn your users before closing. GET /organizations/{id} returns data_purge_at (when the cleanup will run) and data_purged_at (when it ran). Closing is refused with 409 ORGANIZATION_HAS_PENDING_OPERATIONS while a stamp or a cancellation is still pending.

Example Request

Example Response

closedAt and retainedUntil are UTC instants (ISO 8601). In this example, 2033-01-01T05:59:59.000Z is 31 December 2032, 23:59:59 America/Mexico_City time. Show it in that time zone, not in UTC. Status: 200 OK. Previously this endpoint returned 204 No Content.

Common Errors

403 Forbidden

Only the owner can delete the organization.

404 Not Found

409 ORGANIZATION_HAS_PENDING_OPERATIONS

A stamp or cancellation is still pending. Try again once it finishes.

409 CONFLICT

The owner of the organization changed while the request was running. Check its current state and retry.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Response

{ status: 'deleted' } when deleted permanently, or { status: 'closed', closedAt, retainedUntil } when closed.

status
enum<string>
required

deleted: the organization had no production CFDI and was permanently deleted. closed: it has production CFDI, so it was closed (read-only) and its CFDI are retained.

Available options:
deleted,
closed
Example:

"closed"

closedAt
string

Present when status is closed.

Example:

"2026-10-23T16:00:00.000Z"

retainedUntil
string

Present when status is closed: CFDI are retained and downloadable until this date.

Example:

"2033-01-01T05:59:59.000Z"