# Singpass

Singapore's eID <https://www.singpass.gov.sg/main/>

## Verify

> Verify

```json
{"openapi":"3.1.0","info":{"title":"Fill Easy Services","version":"1.0.0"},"tags":[{"name":"Singpass","description":"Singapore's eID [https://www.singpass.gov.sg/main/](https://www.singpass.gov.sg/main/)"}],"servers":[{"url":"sandbox.staging-api.fill-easy.com"}],"security":[{"ClientID":[],"ClientSecret":[]}],"components":{"securitySchemes":{"ClientID":{"type":"apiKey","description":"Client ID in x-client-id header.","name":"x-client-id","in":"header"}},"schemas":{"RedirectUri":{"type":"string","description":"Redirect URI after user authorization.\n\nBrowser: https URL to your website.\n\nMobile: Universal link (your-app://) or app scheme.\n"},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string","description":"Error message"}}}},"responses":{"BadRequest":{"description":"Bad Request - Invalid input parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/sgid/request/qr":{"post":{"tags":["Singpass"],"summary":"Verify","description":"Verify","operationId":"verify","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["redirect"],"properties":{"redirect":{"$ref":"#/components/schemas/RedirectUri"},"type":{"type":"string","enum":["dynamic","static"],"description":"QR code type"},"start":{"type":"integer","format":"int64","description":"Start timestamp in milliseconds (must be >= current time)"},"end":{"type":"integer","format":"int64","description":"End timestamp in milliseconds (must be > start time)"},"duration":{"type":"integer","minimum":1,"description":"Duration in milliseconds (positive integer)"},"responseFormat":{"type":"string","enum":["url","qr","both"],"default":"both","description":"Format of the response (url, qr, or both)"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string","description":"JWT token for polling"},"url":{"type":"string","description":"Singpass verification URL"},"qrUrl":{"type":"string","description":"QR code data URL"}}}}}},"400":{"$ref":"#/components/responses/BadRequest"}}}}}}
```

## MyInfo

> \*\*MyInfo\*\* enables relying party to retrieve personal details.

```json
{"openapi":"3.1.0","info":{"title":"Fill Easy Services","version":"1.0.0"},"tags":[{"name":"Singpass","description":"Singapore's eID [https://www.singpass.gov.sg/main/](https://www.singpass.gov.sg/main/)"}],"servers":[{"url":"sandbox.staging-api.fill-easy.com"}],"security":[{"ClientID":[],"ClientSecret":[]}],"components":{"securitySchemes":{"ClientID":{"type":"apiKey","description":"Client ID in x-client-id header.","name":"x-client-id","in":"header"}},"schemas":{"RedirectUri":{"type":"string","description":"Redirect URI after user authorization.\n\nBrowser: https URL to your website.\n\nMobile: Universal link (your-app://) or app scheme.\n"}}},"paths":{"/sgid/request/auth":{"post":{"tags":["Singpass"],"summary":"MyInfo","description":"**MyInfo** enables relying party to retrieve personal details.","operationId":"myinfo","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["attributes","redirect"],"properties":{"attributes":{"type":"array","items":{"type":"string"},"description":"attributes to be requested from user"},"redirect":{"$ref":"#/components/schemas/RedirectUri"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string"},"url":{"type":"string"}}}}}},"502":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}}}}}}}
```

## MyInfo Business

> enables business-to-business use case for retrieval of corporate data and applicant's personal data.

```json
{"openapi":"3.1.0","info":{"title":"Fill Easy Services","version":"1.0.0"},"tags":[{"name":"Singpass","description":"Singapore's eID [https://www.singpass.gov.sg/main/](https://www.singpass.gov.sg/main/)"}],"servers":[{"url":"sandbox.staging-api.fill-easy.com"}],"security":[{"ClientID":[],"ClientSecret":[]}],"components":{"securitySchemes":{"ClientID":{"type":"apiKey","description":"Client ID in x-client-id header.","name":"x-client-id","in":"header"}},"schemas":{"RedirectUri":{"type":"string","description":"Redirect URI after user authorization.\n\nBrowser: https URL to your website.\n\nMobile: Universal link (your-app://) or app scheme.\n"}}},"paths":{"/sgid/request/auth-biz":{"post":{"tags":["Singpass"],"summary":"MyInfo Business","description":"enables business-to-business use case for retrieval of corporate data and applicant's personal data.","operationId":"myinfoBusiness","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"attributes":{"type":"array","description":"attributes to be requested from user","items":{"type":"string"}},"redirect":{"$ref":"#/components/schemas/RedirectUri"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"token":{"type":"string"}}}}}}}}}}}
```

## MyInfo Redirect

> This is the URL that \`/sgid/request/auth\` returns.\
> It stores a cookie on the user's browser and redirects to Singpass authorization site.

```json
{"openapi":"3.1.0","info":{"title":"Fill Easy Services","version":"1.0.0"},"tags":[{"name":"Singpass","description":"Singapore's eID [https://www.singpass.gov.sg/main/](https://www.singpass.gov.sg/main/)"}],"servers":[{"url":"sandbox.staging-api.fill-easy.com"}],"security":[],"paths":{"/sgid/redirect":{"get":{"tags":["Singpass"],"summary":"MyInfo Redirect","operationId":"sgidRedirect","description":"This is the URL that `/sgid/request/auth` returns.\nIt stores a cookie on the user's browser and redirects to Singpass authorization site.","parameters":[{"in":"query","name":"client_id","required":true,"schema":{"type":"string"}},{"in":"query","name":"code_challenge","required":true,"schema":{"type":"string"}},{"in":"query","name":"scope","required":false,"allowReserved":true,"schema":{"type":"string"},"description":"v4 flow — space-separated scopes forwarded to /auth."},{"in":"query","name":"redirect_uri","required":false,"allowReserved":true,"schema":{"type":"string"},"description":"v4 flow — callback URL forwarded to /auth. Passed through without re-encoding."},{"in":"query","name":"request_uri","required":false,"allowReserved":true,"schema":{"type":"string"},"description":"v5 (FAPI 2.0) flow — opaque reference returned by the PAR endpoint (e.g. a URN)."}],"responses":{"302":{"description":"Redirect to Singpass authorization"}}}}}}
```

## MyInfo Callback

> This is the callback URL that Singpass redirects to after user authorizes the data request.

```json
{"openapi":"3.1.0","info":{"title":"Fill Easy Services","version":"1.0.0"},"tags":[{"name":"Singpass","description":"Singapore's eID [https://www.singpass.gov.sg/main/](https://www.singpass.gov.sg/main/)"}],"servers":[{"url":"sandbox.staging-api.fill-easy.com"}],"security":[],"paths":{"/sgid/callback/person":{"get":{"tags":["Singpass"],"description":"This is the callback URL that Singpass redirects to after user authorizes the data request.","summary":"MyInfo Callback","operationId":"callbackPerson","parameters":[{"in":"query","name":"code","required":false,"schema":{"type":"string"}},{"in":"query","name":"state","required":false,"schema":{"type":"string"}},{"in":"query","name":"error","required":false,"schema":{"type":"string"}},{"in":"query","name":"error_description","allowReserved":true,"required":false,"schema":{"type":"string"}}],"responses":{"302":{"description":"Redirect to client application"}}}}}}
```

## Biz Callback

> This is the callback URL that Singpass redirects to after user authorizes the data request.

```json
{"openapi":"3.1.0","info":{"title":"Fill Easy Services","version":"1.0.0"},"tags":[{"name":"Singpass","description":"Singapore's eID [https://www.singpass.gov.sg/main/](https://www.singpass.gov.sg/main/)"}],"servers":[{"url":"sandbox.staging-api.fill-easy.com"}],"security":[],"paths":{"/sgid/callback/person-biz":{"get":{"tags":["Singpass"],"description":"This is the callback URL that Singpass redirects to after user authorizes the data request.","summary":"Biz Callback","operationId":"callbackPersonBiz","responses":{"302":{"description":"Redirect to client application"}}}}}}
```

## Verify Callback

> This is the callback URL that Singpass redirects to after user authorizes the data request.

```json
{"openapi":"3.1.0","info":{"title":"Fill Easy Services","version":"1.0.0"},"tags":[{"name":"Singpass","description":"Singapore's eID [https://www.singpass.gov.sg/main/](https://www.singpass.gov.sg/main/)"}],"servers":[{"url":"sandbox.staging-api.fill-easy.com"}],"security":[],"paths":{"/sgid/callback/verify":{"get":{"tags":["Singpass"],"description":"This is the callback URL that Singpass redirects to after user authorizes the data request.","summary":"Verify Callback","operationId":"callbackVerify","responses":{"302":{"description":"Redirect to client application"}}}}}}
```

## GET /sgid/jwks.json

> jwks.json

```json
{"openapi":"3.1.0","info":{"title":"Fill Easy Services","version":"1.0.0"},"tags":[{"name":"Singpass","description":"Singapore's eID [https://www.singpass.gov.sg/main/](https://www.singpass.gov.sg/main/)"}],"servers":[{"url":"sandbox.staging-api.fill-easy.com"}],"security":[],"paths":{"/sgid/jwks.json":{"get":{"tags":["Singpass"],"summary":"jwks.json","operationId":"jwks","responses":{"200":{"description":"JWK Set","content":{"application/json":{"schema":{"type":"object","required":["keys"],"properties":{"keys":{"type":"array","items":{"type":"object","additionalProperties":true}}}}}}}}}}}}
```

## Poll Data

> That endpoint is used to obtain the requested data.

```json
{"openapi":"3.1.0","info":{"title":"Fill Easy Services","version":"1.0.0"},"tags":[{"name":"Singpass","description":"Singapore's eID [https://www.singpass.gov.sg/main/](https://www.singpass.gov.sg/main/)"}],"servers":[{"url":"sandbox.staging-api.fill-easy.com"}],"security":[{"ClientID":[],"ClientSecret":[]}],"components":{"securitySchemes":{"ClientID":{"type":"apiKey","description":"Client ID in x-client-id header.","name":"x-client-id","in":"header"}}},"paths":{"/sgid/callback/client":{"post":{"tags":["Singpass"],"summary":"Poll Data","description":"That endpoint is used to obtain the requested data.","operationId":"singpassPoll","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"The token received on the first request."}},"required":["token"]}}}},"responses":{"200":{"description":"OK - Data successfully retrieved","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Status message"},"url":{"type":"string","description":"URL that should be shown to the user (usually as a QR code)"},"token":{"type":"string","description":"Used to poll requested data"}}}}}},"202":{"description":"Pending - Data not yet available","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Bad Request - Invalid request body. Ensure that your request body complies with the requirements.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["Invalid request body"]}}}}}},"401":{"description":"No credentials - Unauthorized. Ensure that you use the correct authorization process.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["Unauthorized"]}}}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fill-easy.com/singpass.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
