# JSON Web Key Set

`GET /core/.well-known/jwks.json`

Endpoints:

- `https://api.test.neobits.ai/core/.well-known/jwks.json`
- `https://api.prod.neobits.ai/core/.well-known/jwks.json`

Authentication: none.

Retrieves the JSON Web Key Set containing the public keys used to verify access tokens. Select the key whose `kid` matches the `kid` in the token header.

## Responses

### 200 JSON Web Key Set

Content type: `application/json`

```json
{
  "type": "object",
  "title": "JwksResponse",
  "properties": {
    "keys": {
      "type": "array",
      "description": "Array of JWK objects",
      "items": {
        "type": "object",
        "title": "JsonWebKey",
        "properties": {
          "kty": {
            "type": "string",
            "description": "Key type",
            "example": "RSA"
          },
          "kid": {
            "type": "string",
            "description": "Key ID. Tokens carry the same value in the `kid` header.",
            "example": "uayMam8yjZZR8G1B_6ilQW9IswtefxWWAizvh-WhbGg"
          },
          "n": {
            "type": "string",
            "description": "RSA modulus"
          },
          "e": {
            "type": "string",
            "description": "RSA exponent",
            "example": "AQAB"
          }
        }
      }
    }
  }
}
```

### 404 OAuth 2.0 Not Found

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "OAuth2NotFoundResponse",
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "A single ASCII error code",
      "enum": [
        "invalid_request",
        "not_found"
      ],
      "example": "not_found"
    },
    "error_code": {
      "type": "integer",
      "description": "Numeric error code for programmatic handling",
      "example": 404
    },
    "error_uri": {
      "type": "string",
      "format": "uri",
      "description": "A URI identifying a human-readable web page with information about the error",
      "example": "https://docs.neobits.ai"
    },
    "error_description": {
      "type": "string",
      "description": "Human-readable ASCII text providing additional information",
      "example": "The requested resource was not found."
    },
    "error_timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp when the error occurred",
      "example": "2025-06-25T15:29:49.992Z"
    }
  },
  "required": [
    "error"
  ]
}
```

### 429 OAuth 2.0 Too Many Requests. When the rate limit rejects a request, the response carries `Retry-After` and no `error_timestamp` or `X-Request-ID`, as the request never reached the API.

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "Retry-After": {
      "description": "Seconds to wait before retrying. Sent when the rate limit rejects a request.",
      "schema": {
        "type": "integer",
        "example": 60
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "OAuth2TooManyRequestsResponse",
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "A single ASCII error code",
      "enum": [
        "too_many_requests"
      ],
      "example": "too_many_requests"
    },
    "error_code": {
      "type": "string",
      "description": "Error code for programmatic handling, in the format HTTP_STATUS-SEQUENCE",
      "example": "429-000"
    },
    "error_uri": {
      "type": "string",
      "format": "uri",
      "description": "A URI identifying a human-readable web page with information about the error",
      "example": "https://docs.neobits.ai/api-reference/errors"
    },
    "error_description": {
      "type": "string",
      "description": "Human-readable ASCII text providing additional information",
      "example": "Too many requests. Please try again later."
    },
    "error_timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp when the error occurred",
      "example": "2025-06-25T15:29:49.992Z"
    }
  },
  "required": [
    "error"
  ]
}
```

### 500 OAuth 2.0 Internal Server Error

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "OAuth2InternalServerErrorResponse",
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "A single ASCII error code",
      "enum": [
        "server_error"
      ],
      "example": "server_error"
    },
    "error_code": {
      "type": "integer",
      "description": "Numeric error code for programmatic handling",
      "example": 500
    },
    "error_uri": {
      "type": "string",
      "format": "uri",
      "description": "A URI identifying a human-readable web page with information about the error",
      "example": "https://docs.neobits.ai"
    },
    "error_description": {
      "type": "string",
      "description": "Human-readable ASCII text providing additional information",
      "example": "The authorization server encountered an unexpected condition."
    },
    "error_timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp when the error occurred",
      "example": "2025-06-25T15:29:49.992Z"
    }
  },
  "required": [
    "error"
  ]
}
```

### 503 OAuth 2.0 Service Unavailable

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "OAuth2ServiceUnavailableResponse",
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "A single ASCII error code",
      "enum": [
        "temporarily_unavailable"
      ],
      "example": "temporarily_unavailable"
    },
    "error_code": {
      "type": "integer",
      "description": "Numeric error code for programmatic handling",
      "example": 503
    },
    "error_uri": {
      "type": "string",
      "format": "uri",
      "description": "A URI identifying a human-readable web page with information about the error",
      "example": "https://docs.neobits.ai"
    },
    "error_description": {
      "type": "string",
      "description": "Human-readable ASCII text providing additional information",
      "example": "The authorization server is currently unable to handle the request."
    },
    "error_timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp when the error occurred",
      "example": "2025-06-25T15:29:49.992Z"
    }
  },
  "required": [
    "error"
  ]
}
```

### 504 OAuth 2.0 Gateway Timeout

Response headers and links:

```json
{
  "headers": {
    "Content-Type": {
      "description": "The content type of the response.",
      "example": "application/json; charset=utf-8",
      "schema": {
        "type": "string",
        "enum": [
          "application/json; charset=utf-8"
        ]
      }
    },
    "X-Request-ID": {
      "description": "UUID generated on each request. Provide this id to customer support if an error occurs.",
      "schema": {
        "type": "string",
        "format": "uuid",
        "example": "0679c533-5061-496e-8dc5-df786f04a209"
      }
    }
  }
}
```

Content type: `application/json`

```json
{
  "title": "OAuth2TimeoutResponse",
  "type": "object",
  "properties": {
    "error": {
      "type": "string",
      "description": "A single ASCII error code",
      "enum": [
        "temporarily_unavailable"
      ],
      "example": "temporarily_unavailable"
    },
    "error_code": {
      "type": "integer",
      "description": "Numeric error code for programmatic handling",
      "example": 504
    },
    "error_uri": {
      "type": "string",
      "format": "uri",
      "description": "A URI identifying a human-readable web page with information about the error",
      "example": "https://docs.neobits.ai"
    },
    "error_description": {
      "type": "string",
      "description": "Human-readable ASCII text providing additional information",
      "example": "The authorization server did not receive a timely response."
    },
    "error_timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp when the error occurred",
      "example": "2025-06-25T15:29:49.992Z"
    }
  },
  "required": [
    "error"
  ]
}
```