Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Glemynart/SaaS/llms.txt

Use this file to discover all available pages before exploring further.

The Tenant Branding API lets you read and update the corporate identity of your organization. Branding data — including the company logo, the legal representative’s name, and the representative’s digitized signature — is stored on the Tenant record and is strictly scoped to the authenticated tenant. Uploaded files are stored server-side (Cloudflare R2 compatible) and the resulting URL is saved back to the tenant record. All write endpoints require the ADMIN role.

Endpoints

Get current branding


GET /tenant-branding
Returns the current branding configuration for the authenticated tenant.

Response

nombre
string
Internal short name for the organization.
razonSocial
string
Legal business name (razón social).
nit
string
Colombian NIT (without check digit).
logoUrl
string | null
Public or storage-relative URL of the organization’s logo. null if no logo has been uploaded yet.
Full name of the legal representative. Used to populate the {{REPRESENTANTE_LEGAL}} variable in generated documents.
firmaRepresentanteUrl
string | null
Storage URL of the representative’s digitized signature image. null if no signature has been uploaded. Populates {{FIRMA_REPRESENTANTE}} in generated documents.
curl -X GET "https://api.example.com/tenant-branding" \
  -H "Authorization: Bearer {accessToken}"
Example response
{
  "nombre": "Mi Empresa",
  "razonSocial": "Mi Empresa S.A.S.",
  "nit": "900123456",
  "logoUrl": "/uploads/logos/uuid-logo-1700000000000.png",
  "representanteLegal": "Ana Gómez Rodríguez",
  "firmaRepresentanteUrl": "/uploads/firmas/uuid-firma-1700000000001.png"
}

Update branding fields


PATCH /tenant-branding
Updates editable branding fields on the tenant record. Only the fields present in the request body are modified. To update the logo or signature image, use the dedicated upload endpoints below. Required role: ADMIN

Request body

Full name of the legal representative. This value is injected into the {{REPRESENTANTE_LEGAL}} placeholder in all future generated documents.

Response

Returns the same fields as GET /tenant-branding reflecting the updated values.
curl -X PATCH "https://api.example.com/tenant-branding" \
  -H "Authorization: Bearer {accessToken}" \
  -H "Content-Type: application/json" \
  -d '{"representanteLegal": "Carlos Pérez Jiménez"}'


POST /tenant-branding/upload-logo
Uploads a new logo image for the organization. The file must be sent as multipart/form-data using the field name file. On success, the tenant’s logoUrl is updated and the new URL is returned. Required role: ADMIN

Request

PropertyValue
Content-Typemultipart/form-data
Field namefile
Accepted MIME typesimage/png, image/jpeg, image/jpg, image/webp, image/svg+xml
Maximum size5 MB
Uploads that exceed 5 MB or that use an unsupported MIME type are rejected with 400 Bad Request before the file is processed. Accepted formats are PNG, JPEG/JPG, WebP, and SVG. Ensure your client sets the correct Content-Type on the file part — browsers do this automatically, but programmatic clients (e.g. curl) require the ;type= qualifier as shown in the example below.

Response

logoUrl
string
The storage-relative URL where the uploaded logo is now accessible (e.g., /uploads/logos/{tenantId}-logo-{timestamp}.png).
curl -X POST "https://api.example.com/tenant-branding/upload-logo" \
  -H "Authorization: Bearer {accessToken}" \
  -F "file=@logo.png;type=image/png"

Upload representative signature


POST /tenant-branding/upload-firma
Uploads a digitized signature image for the legal representative. The file must be sent as multipart/form-data using the field name file. On success, the tenant’s firmaRepresentanteUrl is updated and the new URL is returned. Required role: ADMIN

Request

PropertyValue
Content-Typemultipart/form-data
Field namefile
Accepted MIME typesimage/png, image/jpeg, image/jpg, image/webp, image/svg+xml
Maximum size5 MB

Response

firmaRepresentanteUrl
string
The storage-relative URL where the uploaded signature is now accessible (e.g., /uploads/firmas/{tenantId}-firma-{timestamp}.png).
curl -X POST "https://api.example.com/tenant-branding/upload-firma" \
  -H "Authorization: Bearer {accessToken}" \
  -F "file=@firma.png;type=image/png"

Document template variables

The branding fields map directly to global placeholder variables available in DocumentTemplate and GeneratedDocument records:
Branding fieldTemplate variable
logoUrl{{LOGO_EMPRESA}}
representanteLegal{{REPRESENTANTE_LEGAL}}
firmaRepresentanteUrl{{FIRMA_REPRESENTANTE}}
These variables are resolved at document generation time using the tenant’s current branding values. The rendered content is stored as an immutable snapshot in GeneratedDocument.contenidoFinal, so subsequent branding changes do not retroactively alter already-generated documents.

Build docs developers (and LLMs) love