> ## Documentation Index
> Fetch the complete documentation index at: https://docs.commenda.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Credential Lookup

> Look up whether credentials exist for a corporation and portal

Check whether a corporation already has stored credentials for a specific tax portal. Use this to avoid prompting users for credentials they've already provided.

## Path parameters

<ParamField path="portal_id" type="string" required>
  The portal ID to look up credentials for.

  Example: `"PORTAL_CA_CDTFA"`
</ParamField>

## Query parameters

<ParamField query="corporation_id" type="string" required>
  The corporation ID to check credentials for.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://transaction-tax.api.in.commenda.io/api/v1/registrations/v2/credentials/by-portal/PORTAL_CA_CDTFA?corporation_id=550e8400-e29b-41d4-a716-446655440000' \
    --header 'Authorization: Bearer <your_token>'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Credential found theme={null}
  {
    "data": {
      "credential_id": "cred_abc123def456",
      "found": true
    }
  }
  ```

  ```json 200 - No credential theme={null}
  {
    "data": {
      "found": false
    }
  }
  ```
</ResponseExample>

<Note>
  This endpoint returns `found: false` (not an error) when no credentials exist for the portal and corporation combination.
</Note>

## Related

* [Portal Fields](/engine/indirect-tax/registrations/v2/content/portal-fields-POST) — Get credential field requirements for a portal
* [Update Registration](/engine/indirect-tax/registrations/v2/registrations-v2-id-POST) — Attach a credential to a registration
