# Search for CIMD Client Registrations API

API documentation for the FusionAuth Search for CIMD Client Registrations API.

> For the index of this section of the site, see [llms.txt](https://fusionauth.io/docs/llms.txt)

Available since `1.70.0`

This API is used to search for CIMD client registrations and may be called using the `GET` or `POST` HTTP methods. Examples of each are provided below. The `POST` method is provided to allow for a richer request object without worrying about exceeding the maximum length of a URL. Calling this API with either the `GET` or `POST` HTTP method will provide the same search results given the same query parameters.

To find the registration for a specific client, search by its `client_id` URL with the **clientId** parameter.

Note

Unlike deleting a registration, this operation does not require the CIMD feature to be enabled on your license.

## Request

[API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#api-key-authentication)

Search for CIMD Client Registrations

`GET /api/cimd/registration/search?cimdDomainId={cimdDomainId}&clientId={clientId}&tenantId={tenantId}`

#### Request Headers

`X-FusionAuth-TenantId`

*   Type: `String`
*   Optional

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon other values in the request or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See [Making an API request using a Tenant Id](https://fusionauth.io/docs/apis/authentication.md#making-an-api-request-using-a-tenant-id) for additional information.

### Request Parameters

`cimdDomainId`

*   Type: `UUID`
*   Optional

Restricts the results to registrations created through the given [CIMD domain](https://fusionauth.io/docs/get-started/core-concepts/types/cimd-domains.md).

`clientId`

*   Type: `String`
*   Optional

The client's `client_id` URL. This must be an exact match. Wildcards aren't supported.

`numberOfResults`

*   Type: `Integer`
*   Optional
*   Defaults to `25`

The number of results to return from the search.

`orderBy`

*   Type: `String`
*   Optional
*   Defaults to `insertInstant DESC`

The database field to order the search results as well as an order direction.

The possible values are:

*   `id` - the unique Id of the registration
*   `insertInstant` - the [instant](https://fusionauth.io/docs/reference/data-types.md#instants) when the registration was created

The order direction is optional. Possible values of the order direction are `ASC` or `DESC`. If omitted, the default sort order is `ASC`.

For example, to order the results by the insert instant in an ascending order, use `insertInstant ASC`.

`startRow`

*   Type: `Integer`
*   Optional
*   Defaults to `0`

The offset into the total results. In order to paginate the results, increment this value by the **numberOfResults** for subsequent requests.

For example, if the total search results are greater than the page size designated by **numberOfResults**, set this value to `25` to retrieve results 26 through 50, assuming the default page size.

`tenantId`

*   Type: `UUID`
*   Optional

Restricts the results to registrations belonging to the given Tenant. This parameter will be overridden if the request contains an `X-FusionAuth-TenantId` header, or if the supplied API key is scoped to a specific Tenant.

[API Key Authentication](https://fusionauth.io/docs/apis/authentication.md#api-key-authentication)

Search for CIMD Client Registrations

`POST /api/cimd/registration/search`

#### Request Headers

`X-FusionAuth-TenantId`

*   Type: `String`
*   Optional

The unique Id of the tenant used to scope this API request.

The tenant Id is not required on this request even when more than one tenant has been configured because the tenant can be identified based upon other values in the request or it is otherwise not required.

Specify a tenant Id on this request when you want to ensure the request is scoped to a specific tenant. The tenant Id may be provided through this header or by using a tenant locked API key to achieve the same result.

See [Making an API request using a Tenant Id](https://fusionauth.io/docs/apis/authentication.md#making-an-api-request-using-a-tenant-id) for additional information.

When calling the API using a `POST` request you will send the search criteria in a JSON request body.

### Request Body

`search.cimdDomainId`

*   Type: `UUID`
*   Optional

Restricts the results to registrations created through the given [CIMD domain](https://fusionauth.io/docs/get-started/core-concepts/types/cimd-domains.md).

`search.clientId`

*   Type: `String`
*   Optional

The client's `client_id` URL. This must be an exact match. Wildcards aren't supported.

`search.numberOfResults`

*   Type: `Integer`
*   Optional
*   Defaults to `25`

The number of results to return from the search.

`search.orderBy`

*   Type: `String`
*   Optional
*   Defaults to `insertInstant DESC`

The database field to order the search results as well as an order direction.

The possible values are:

*   `id` - the unique Id of the registration
*   `insertInstant` - the [instant](https://fusionauth.io/docs/reference/data-types.md#instants) when the registration was created

The order direction is optional. Possible values of the order direction are `ASC` or `DESC`. If omitted, the default sort order is `ASC`.

For example, to order the results by the insert instant in an ascending order, use `insertInstant ASC`.

`search.startRow`

*   Type: `Integer`
*   Optional
*   Defaults to `0`

The offset into the total results. In order to paginate the results, increment this value by the **numberOfResults** for subsequent requests.

For example, if the total search results are greater than the page size designated by **numberOfResults**, set this value to `25` to retrieve results 26 through 50, assuming the default page size.

`search.tenantId`

*   Type: `UUID`
*   Optional

Restricts the results to registrations belonging to the given Tenant. This parameter will be overridden if the request contains an `X-FusionAuth-TenantId` header, or if the supplied API key is scoped to a specific Tenant.

Example JSON Request

```json
{
  "search": {
    "clientId": "https://claude.ai/oauth/mcp-oauth-client-metadata",
    "numberOfResults": 25,
    "orderBy": "insertInstant DESC",
    "startRow": 0
  }
}
```

## Response

The response for this API contains the CIMD client registrations matching the search criteria in paginated format.

*Response Codes*

| Code | Description |
| --- | --- |
| 200 | The request was successful. The response will contain a JSON body. |
| 400 | The request was invalid and/or malformed. The response will contain an [Errors](https://fusionauth.io/docs/apis/errors.md) JSON Object with the specific errors. This status will also be returned if a paid FusionAuth license is required and is not present. |
| 401 | You did not supply a valid Authorization header. The header was omitted or your API key was not valid. The response will be empty. See [Authentication](https://fusionauth.io/docs/apis/authentication.md). |
| 500 | There was an internal error. A stack trace is provided and logged in the FusionAuth log files. The response will be empty. |

### Response Body

`total`

*   Type: `Integer`

The total number of CIMD client registrations matching the search criteria. Use this value along with the **numberOfResults** and **startRow** parameters to paginate the results.

`registrations[x].cacheExpirationInstant`

*   Type: `Long`

The [instant](https://fusionauth.io/docs/reference/data-types.md#instants) when the cached copy of the client's metadata document expires. After this instant, the registration enters the `Grace` state. See [CIMD Registration Caching And Lifecycle](https://fusionauth.io/docs/lifecycle/authenticate-users/oauth/cimd-registration-lifecycle.md).

`registrations[x].cimdDomainId`

*   Type: `UUID`

The Id of the [CIMD domain](https://fusionauth.io/docs/get-started/core-concepts/types/cimd-domains.md) the client registered through.

`registrations[x].clientIdUrl`

*   Type: `String`

The client's `client_id` URL.

`registrations[x].clientName`

*   Type: `String`

The `client_name` value from the client's metadata document.

`registrations[x].clientUri`

*   Type: `String`

The `client_uri` value from the client's metadata document.

`registrations[x].data`

*   Type: `Object`

An object that can hold any information about the registration that should be persisted.

`registrations[x].graceExpirationInstant`

*   Type: `Long`

The [instant](https://fusionauth.io/docs/reference/data-types.md#instants) when the registration's grace period ends. After this instant, the registration enters the `Expired` state, and FusionAuth eventually deletes it. See [The Grace Period](https://fusionauth.io/docs/lifecycle/authenticate-users/oauth/cimd-registration-lifecycle.md#the-grace-period).

`registrations[x].id`

*   Type: `UUID`

The unique Id of the registration.

`registrations[x].insertInstant`

*   Type: `Long`

The [instant](https://fusionauth.io/docs/reference/data-types.md#instants) when FusionAuth created the registration.

`registrations[x].jwtPopulateLambdaId`

*   Type: `UUID`

The Id of the JWT populate lambda for this client, as set by the domain's [registration lambda](https://fusionauth.io/docs/extend/code/lambdas/cimd-client-registration.md). Only present when the registration lambda set a value.

`registrations[x].lastUpdateInstant`

*   Type: `Long`

The [instant](https://fusionauth.io/docs/reference/data-types.md#instants) when FusionAuth last updated the registration.

`registrations[x].overridesByResource`

*   Type: `Object`

The scope decisions for each `resource` the client has used, keyed by the `resource` value. The domain's [registration lambda](https://fusionauth.io/docs/extend/code/lambdas/cimd-client-registration.md) makes these decisions, or FusionAuth copies the domain's settings when the domain has no registration lambda.

`registrations[x].overridesByResource[resource].providedScopePolicy`

*   Type: `Object`

The standard OpenID Connect scopes this client may request for the `resource`. See the CIMD domain's **providedScopePolicy** in the [CIMD Domain API](https://fusionauth.io/docs/apis/cimd-domains/create-a-cimd-domain.md) for the structure.

`registrations[x].overridesByResource[resource].scopes`

*   Type: `Array<Object>`

The custom OAuth scopes this client may request for the `resource`. See the CIMD domain's **scopes** in the [CIMD Domain API](https://fusionauth.io/docs/apis/cimd-domains/create-a-cimd-domain.md) for the structure.

`registrations[x].redirectUris`

*   Type: `Array<String>`

The `redirect_uris` values from the client's metadata document.

`registrations[x].state`

*   Type: `String`

The state of the registration, calculated from **cacheExpirationInstant** and **graceExpirationInstant** when FusionAuth builds the response. The possible values are:

*   `Active` - The cached copy of the client's metadata document hasn't expired.
*   `Grace` - The cached copy has expired, but the grace period hasn't ended.
*   `Expired` - The grace period has ended.

`registrations[x].tenantId`

*   Type: `UUID`

The Id of the Tenant the client registered in.

Example JSON Response

```json
{
  "registrations": [
    {
      "cacheExpirationInstant": 1792683600123,
      "cimdDomainId": "3c1f9a2b-7d4e-4b6a-9c8d-1e2f3a4b5c6d",
      "clientIdUrl": "https://claude.ai/oauth/mcp-oauth-client-metadata",
      "clientName": "Claude",
      "clientUri": "https://claude.ai",
      "data": {},
      "graceExpirationInstant": 1792683900123,
      "id": "8f3c2a1e-5b7d-4e9f-a1c3-2d4e6f8a0b1c",
      "insertInstant": 1792680000123,
      "lastUpdateInstant": 1792680000123,
      "overridesByResource": {
        "https://mcp.example.com/mcp": {
          "providedScopePolicy": {
            "address": {
              "enabled": false,
              "required": false
            },
            "email": {
              "enabled": true,
              "required": false
            },
            "phone": {
              "enabled": false,
              "required": false
            },
            "profile": {
              "enabled": true,
              "required": false
            }
          },
          "scopes": [
            {
              "defaultConsentDetail": "Read your calendar events.",
              "defaultConsentMessage": "View your calendar",
              "description": "Read access to calendar events.",
              "name": "calendar:read",
              "required": false
            }
          ]
        }
      },
      "redirectUris": [
        "https://claude.ai/api/mcp/auth_callback"
      ],
      "state": "Active",
      "tenantId": "30663132-6464-6665-3032-326466613934"
    }
  ],
  "total": 1
}
```
---

## Other pages in Cimd Client Registrations

> For the full index of this section, see [Apis](https://fusionauth.io/docs/llms-apis.txt).

- [Delete a CIMD Client Registration API](https://fusionauth.io/docs/apis/cimd-client-registrations/delete-a-cimd-client-registration.md): API documentation for the FusionAuth Delete a CIMD Client Registration API.
- [CIMD Client Registration API](https://fusionauth.io/docs/apis/cimd-client-registrations.md): Learn about the APIs for retrieving, searching for, and deleting CIMD client registrations.
- [Retrieve a CIMD Client Registration API](https://fusionauth.io/docs/apis/cimd-client-registrations/retrieve-a-cimd-client-registration.md): API documentation for the FusionAuth Retrieve a CIMD Client Registration API.
