Accept the legal documents on behalf of the active company
const url = 'https://api.emite.cr/v1/legal/company-acceptances';const options = { method: 'POST', headers: { 'user-agent': 'example', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"acceptances":[{"documentType":"terminos-y-condiciones","documentVersion":"3.0","documentHash":"sha256:abcdef0123456789..."}],"authority":true,"capacity":"holder"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.emite.cr/v1/legal/company-acceptances \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'user-agent: example' \ --data '{ "acceptances": [ { "documentType": "terminos-y-condiciones", "documentVersion": "3.0", "documentHash": "sha256:abcdef0123456789..." } ], "authority": true, "capacity": "holder" }'For the owner or an admin (legal:accept, never an API key nor a custom role), who declares the authority to bind the company (authority: true, 400 LEGAL_AUTHORITY_REQUIRED) and in which capacity (capacity: holder, legal representative or authorized by whoever represents it; 400 LEGAL_CAPACITY_REQUIRED). Records the person's own acceptance and the company's, and writes legal.accepted to the company's audit trail, in one transaction. Each document must be the served version with the hash of its text (409 OUTDATED_VERSION / HASH_MISMATCH); the Cookie Policy is announced, never accepted (400 LEGAL_DOCUMENT_NOT_REQUIRED).
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
One entry per document accepted, at most 10. When creating a company every document it must accept has to be present (400 LEGAL_ACCEPTANCE_INCOMPLETE). A version the company already accepted is left as it was and not counted again.
object
Slug of a document the company accepts: terminos-y-condiciones or politica-de-privacidad (the documents marked requiredForSignup). The Cookie Policy (politica-de-cookies) is only announced, never accepted (400 LEGAL_DOCUMENT_NOT_REQUIRED).
Example
terminos-y-condicionesThe version of the document served today (its version), up to 32 characters. Any other version is 409 OUTDATED_VERSION.
Example
3.0The SHA-256 of the exact Markdown text shown: sha256: followed by 64 hex digits, copied verbatim from the hash served with the document. It is the proof of which text was accepted; one that differs from the served text is 409 HASH_MISMATCH.
Example
sha256:abcdef0123456789...The person declares the authority to bind the company (Terms 1.3). Must be true (400 LEGAL_AUTHORITY_REQUIRED), the same declaration the emailed link asks for.
In which capacity the person declares it (Terms 1.3 and 3.2): holder (a natural person who is the taxpayer), legal_representative, or authorized by whoever represents the company. Recorded with the acceptance (400 LEGAL_CAPACITY_REQUIRED without it).
Responses
Section titled “Responses”object
How many company acceptances were written now; a version the company had already accepted is not counted.
The company's state after accepting.
object
Id of the company.
Name of the company.
The caller holds legal:accept (owner or admin).
Outside the regime, never told nor asked anything: the demo, Futura Byte, and a company operated by another Futura Byte product (it is governed by that product's documents).
Why it is outside the regime: the demo, the provider (Futura Byte) or a company operated by another Futura Byte product. Null when the regime applies.
transition if any document is in it, else notice if any is, else ok. Nothing stops in any state.
The earliest effectiveDate among the documents the company is asked or told about (Costa Rica, YYYY-MM-DD). Null when ok.
One entry per document the company must accept (the requiredForSignup ones).
object
Slug of the document (today terminos-y-condiciones or politica-de-privacidad).
Display name of the document, in Spanish.
What the company is told about this document. Nothing here stops anything — a company issues the same in every state:
ok— nothing to say (alwaysokfor an exempt company).transition— it has not entered the notice regime: it keeps the version it accepted and is asked, once, to acceptnewVersion.notice—newVersionis a recent version it has not accepted; it governs fromeffectiveDateanyway, and accepting it earlier is optional.
The version the company is asked or told about (the latest); null when ok.
The day (Costa Rica, YYYY-MM-DD) newVersion takes effect for every company; null when ok.
What kind of change newVersion is; null when ok.
The version in force today for every company of the notice regime.
The highest version of this document the company accepted, with who, when and how; null when it has accepted none.
object
The version the company accepted.
When it was accepted.
How the company accepted:
web— in the app, by an owner or admin, on behalf of the active company.company-creation— by whoever created the company, as part of creating it.email-link— by an owner or admin, through the link of a notice emailed to them.company-reopening— by whoever reopened the company after it was closed, as part of reopening it.
In which capacity the person declared the authority to bind the company.
Name of the person who accepted, as their account shows it now.
Email of the person who accepted, as their account shows it now.
The version that governs the company today: inside the notice regime, the larger of inForceVersion and the one it accepted; in the transition, the one it accepted. Null when it never accepted a version as a company (what its people accepted before governs, and no record of ours names it), and for an exempt company.
The version served today (the latest published).
What changed in newVersion (else in the served version), in Spanish.
The full served text, only while the state is not ok and only for a caller who can accept it.
object
Slug of the document: terminos-y-condiciones (Terms and Conditions), politica-de-privacidad (Privacy Policy) or politica-de-cookies (Cookie Policy).
Display name of the document, in Spanish.
The version served today, numbers separated by dots (3.0). Compare versions number by number, not as text: 3.10 comes after 3.9.
Effective date (Costa Rica, YYYY-MM-DD). A minor version governs from it; a material one governs each company from its acceptance, and from this day a company that has not accepted it cannot issue in production.
Day (Costa Rica, YYYY-MM-DD) it was published.
What kind of change this version is (none asks for an acceptance or stops anything):
adverse— it hurts the customer: published at least 30 days beforeeffectiveDate, announced by email and in the platform.non_adverse— a correction or a change in the customer's favour: it governs from its publication and is announced in the platform.required— required by a law, an authority or the security of the service: it governs from its publication, in what is strictly necessary, and is announced by email.
What changed in this version, in a sentence or two (Spanish).
The legal nature of the document: contractual (the Terms and Conditions) or regulatorio, regulatory (the privacy and cookie policies).
Whether the document must be accepted — by each person to create an account, and by each company. false for one that is only announced (the Cookie Policy).
What the document covers, in a short summary (Spanish).
sha256: followed by the SHA-256 (lowercase hex) of the exact Markdown text of the document (its markdown). Send it back verbatim as documentHash when accepting: it proves which text was accepted.
Size of the Markdown text, in bytes (UTF-8).
The full text, in Markdown.
The company's owner: whom to ask, for a member who cannot accept. Null when it has none.
object
Name of the company's owner.
Email of the company's owner.
Example
{ "company": { "exemption": "demo", "state": "ok", "documents": [ { "type": "terminos-y-condiciones", "state": "ok", "change": "adverse", "accepted": { "method": "web", "declaredCapacity": "holder" }, "document": { "type": "terminos-y-condiciones", "effectiveDate": "2026-11-11", "publishedAt": "2026-10-12", "change": "adverse", "kind": "contractual", "hash": "sha256:..." } } ] }}No session, or the caller is not a person (an API key has no user).