Skip to main content
DELETE
/
organizations
/
{id}
/
certificates
Delete Certificates
curl --request DELETE \
  --url https://api.example.com/organizations/{id}/certificates \
  --header 'Authorization: <authorization>'
{
  "204": {},
  "400": {},
  "401": {},
  "403": {},
  "404": {}
}

Description

Deletes the CSD (Certificado de Sello Digital) certificate and private key files from an organization. This removes the files from S3 and clears all certificate metadata from the database. Only the organization owner can perform this action.

Authorization

Authorization
string
required
Bearer token for authentication

Path Parameters

id
string
required
The unique ID of the organization

Example Request

curl -X DELETE "https://api.timbrix.com/organizations/123e4567-e89b-12d3-a456-426614174000/certificates" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response Codes

204
No Content
Certificates deleted successfully
400
Bad Request
No certificates found to delete
401
Unauthorized
Authentication required
403
Forbidden
Access denied. Only organization owners can delete certificates
404
Not Found
Organization not found

Security

⚠️ OWNER ONLY: Only the organization OWNER can delete CSD certificates. Admins and members cannot perform this action. ⚠️ IRREVERSIBLE: This action permanently deletes the certificate files from S3. Make sure you have backup copies before deleting.

Notes

  • This operation deletes both the certificate (.cer) and private key (.key) files
  • All certificate metadata is cleared from the database (serial number, expiration date, password)
  • The organization will not be able to sign invoices until new certificates are uploaded
  • Returns 400 if no certificates exist for the organization