Create an enrollment link
PlannedDesigned and scheduled for the v1 API. The contract can still change; the route is not served yet.
Creates a new signed enrollment link for the worker, valid for 7 days. Any previous link stops working. Use it when the first link expired, or when the worker has something to do again, such as renewing their e.firma (renew_efirma). The current link always comes in enrollment when you get the worker.
Needs the workers:write scope.
oauth2 workers:writeAuthorizationBearer <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:write
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 <= 255Created
application/json- response
status*stringpending while the link works, completed once the worker gave consent and uploaded what the services need, expired when the link ran out unused.
"pending""completed""expired"url*|nullexpires_at*|nullcompleted_at*|nullcurl -X POST 'https://api.dev.b2b.heru.app/v1/workers/wrk_01m4ra8w0he5esnnsew0v9ffkv/enrollment' \ -H 'Idempotency-Key: try-it-0001'{ "status": "pending", "url": "https://enroll.heru.app/w/Tq9vM3xK7pLc2RbN8wZa?expires=1792161012&signature=4b8e1d07c3", "expires_at": "2026-10-22T09:30:12.000Z", "completed_at": null}Register a workerPOST
Registers the person and returns `enrollment.url`, a signed link valid for 7 days. There the worker accepts heru's terms and privacy notice and, when the services you enabled need it, uploads their e.firma. Everything that acts on the worker's SAT account (CSD generation and direct invoicing) requires this consent. Needs the `workers:write` scope.
Remove a workerDEL
Stops all services for the worker. Records already issued are kept as the law requires. Needs the `workers:write` scope.