Request the worker's CSD
BuildingIn development for the v1 API. The contract is set; the route is not served yet.
Requests the worker's Certificado de Sello Digital from the SAT using their e.firma, so they can issue invoices directly. Needs consent and an active e.firma. Asynchronous; worker.updated fires when it is ready. Never call it twice for the same worker: the SAT issues a new certificate each time.
Needs the workers:csd scope.
oauth2 workers:csdAuthorizationBearer <token>OAuth 2.0 client credentials. Exchange your client_id and client_secret at /oauth/token of the environment for a bearer token valid for one hour. The playground of every operation asks for your own client and keeps it in your browser tab only.
Scope: workers:csd
id*stringThe worker id.
^wrk_[0-7][0-9a-hjkmnp-tv-z]{25}$Idempotency-Key*stringUnique per operation. Retrying with the same key returns the original result for 24 hours.
length <= 255Accepted
application/json- response
id*string^wrk_[0-7][0-9a-hjkmnp-tv-z]{25}$external_id*stringYour own id for this person, merchant or record. Echoed back in every response and webhook.
length <= 128status*stringpending until the worker completes the enrollment page; in_progress while heru validates them with the SAT or requests their CSD; ready when every service you enabled is in order; blocked when the worker has something to do, listed in open_actions; not_evaluated when the worker has no service that heru checks; removed after DELETE /workers/{id}.
"ready""pending""in_progress""blocked""not_evaluated""removed"curp*stringCURP, 18 characters.
^[A-Z]{4}[0-9]{6}[HM][A-Z]{5}[A-Z0-9][0-9]$rfc?|nullname?|Name as registered with the SAT, once heru validated the worker.
postal_code?|Postal code of the tax address.
regimes?array<>services*array<>The services you enabled for the worker. ready means all of them are in order.
efirma*csd*open_actions*array<>What the worker must do before they are ready: give_consent and upload_efirma on the enrollment page; renew_efirma when their e.firma expired; confirm_regime when their tax regime does not allow the services you enabled; update_postal_code when their tax address changed with the SAT. Empty when there is nothing to do.
enrollment*consent_at?|When the worker accepted heru's terms and privacy notice on the enrollment page. Null until then.
compliant_at?|When the worker last became ready. Null if they have never been.
created_at*stringWhen you registered the worker.
date-timeupdated_at*stringLast change of any field. Use it with updated_since in the workers feed.
date-timeremoved_at?|When you removed the worker. Null while active.
curl -X POST 'https://api.dev.b2b.heru.app/v1/workers/wrk_01m4rg5d0pf4w1z6f9r2g8x7mt/csd' \ -H 'Idempotency-Key: try-it-0001'{ "id": "wrk_01m4ra8w0he5esnnsew0v9ffkv", "external_id": "DRV-000088213", "status": "in_progress", "curp": "HEGL900101HDFRRS06", "rfc": "HEGL900101K44", "name": "JOSE LUIS HERNANDEZ GARCIA", "postal_code": "06600", "regimes": [ { "code": "625", "description": "Régimen de las Actividades Empresariales con ingresos a través de Plataformas Tecnológicas" } ], "services": [ "fiscal_validation", "efirma", "invoicing" ], "efirma": { "active": true, "valid_from": "2024-03-02", "valid_to": "2028-03-02" }, "csd": { "active": false, "valid_from": null, "valid_to": null }, "open_actions": [], "enrollment": { "status": "completed", "url": null, "expires_at": null, "completed_at": "2026-10-09T14:29:40.118Z" }, "consent_at": "2026-10-09T14:29:40.118Z", "compliant_at": null, "created_at": "2026-10-09T14:22:51.604Z", "updated_at": "2026-10-09T14:33:12.507Z", "removed_at": null}Workers compliance feedGET
Incremental feed of every worker you sent us. Call it with `updated_since` to sync only what changed. Needs the `workers:read` scope.
Sign a document with the worker's e.firmaPOST
For digital contracts. You send the PDF; the worker reviews and signs it with their e.firma on a hosted page. You get the signed document and the certificate data. Needs the `signatures:write` scope.