Stop asking your user for their Social Security card, which almost nobody can find. You send their CURP and their Social Security Number (NSS) arrives at your system.
Technical questions? Talk to an engineer on WhatsApp — 0% bots.
Pick a scenario and see what your system receives:
Fictional data with the exact structure the API returns. None of it belongs to a real person.
The NSS is eleven digits almost nobody remembers, printed on a card almost nobody can find. Asking for it in a form costs you drop-off; typing it by hand costs errors. The CURP, on the other hand, you already have.
It is common for the NSS lookup to appear in a catalog or in some documentation and not exist when it is time to integrate. So before talking to us, there are three things you can check on your own.
You do not keep a request open or your user waiting in front of the screen. You send the query with an address of yours, called a webhook, and we deliver the result there as soon as it is ready.
First time using a webhook? We explain it step by step → · See all IMSS services →
No response leaves you guessing. The type field names the case with a stable code and your backend decides with a switch.
| type | What happened | What to do |
|---|---|---|
SUCCESS | The person's NSS was found. All 11 digits are included. | Proceed. Use it for registration. |
PERSON_WITHOUT_NSS | The CURP exists, but has no NSS assigned. | Review. It usually means the person was never registered with IMSS. |
CURP_NOT_FOUND | IMSS could not find that CURP. | Review. Check the CURP against RENAPO. |
IMSS_INCONSISTENT_DATA | The CURP exists, but its data is inconsistent at IMSS. | Review. The person must clarify it with the institute. |
IMSS_OPERATION_LIMIT | IMSS applied a temporary limit to that query. | Retry later. |
SERVICE_UNAVAILABLE | IMSS is not available. | Retry. Not charged. |
INVALID_REQUEST | The CURP is malformed or the webhook is missing. Answered immediately, when you create the query. | Fix the request. Not charged. |
You send the CURP and your webhook address. Same envelope as every OrigoID service.
const res = await fetch("https://api.origoid.com/mex/social-security/v1/imss-nss-lookup-async", { method: "POST", headers: { "x-api-key": process.env.ORIGOID_API_KEY, "content-type": "application/json", }, body: JSON.stringify({ curp: "XEXX010101HNEXXXA4", webhook: { url: "https://your-domain.com/hooks/origoid" }, }), }); const receipt = await res.json(); // type: "ACCEPTED"
import os, requests res = requests.post( "https://api.origoid.com/mex/social-security/v1/imss-nss-lookup-async", headers={"x-api-key": os.environ["ORIGOID_API_KEY"]}, json={ "curp": "XEXX010101HNEXXXA4", "webhook": {"url": "https://your-domain.com/hooks/origoid"}, }, timeout=30, ) receipt = res.json() # type: "ACCEPTED"
curl -X POST https://api.origoid.com/mex/social-security/v1/imss-nss-lookup-async \ -H "x-api-key: $ORIGOID_API_KEY" \ -H "content-type: application/json" \ -d '{"curp": "XEXX010101HNEXXXA4", "webhook": {"url": "https://your-domain.com/hooks/origoid"}}'
{
"status": "OK",
"type": "ACCEPTED",
"transactionId": "39b972d3-20a8-539a-acfb-70657588df9b",
"billable": false
}
{
"status": "OK",
"type": "SUCCESS",
"message": "NSS found",
"data": { "nss": "00000000000" },
"transactionId": "39b972d3-20a8-539a-acfb-70657588df9b",
"billable": true
}
For employment verification the CURP is also enough: you get the employer, the base salary and the contributed days of the period.
We prepared a guide that explains it without jargon: what it is, what your system needs to receive the result and how to get it working.
The NSS is rarely the goal: it is the requirement that holds up a registration. What matters is getting it without stopping your user and knowing clearly what happened when it does not exist.
OrigoID is not IMSS and does not act on its behalf: it is a technical means of querying and cross-checking against that source. The accuracy and currency of the information depend on the institute itself.
Yes. You send the CURP and receive the 11-digit Social Security Number. You do not need the card or any other detail about the person.
At your webhook. When you create the query you get a receipt with an ID; when the result is ready we send it to your address with that same ID.
The response says so with PERSON_WITHOUT_NSS: the CURP exists but has no NSS assigned, which usually means the person was never registered with IMSS. That is useful information, not an error.
Mostly to register people for payroll or social security without asking for extra documents, and to confirm an NSS the user typed.
2 credits per resolved query. The receipt is not charged. Plans are published.
No. The result is delivered to your webhook and we do not keep it afterwards. Zero retention across all our regions.
Courtesy credits to query in production. Access is enabled after a brief validation of your company.