---
title: "Public key invalid — Anis Developers"
description: "The public key you submitted is not a usable P-256 public key. (A proof of possession that does not verify is not refused — it comes back with `proofState: \"failed\"`.)"
url: https://developers.anis.ly/errors/key-proof-invalid/
language: en
---

> Every page of this documentation: https://developers.anis.ly/llms.txt

[Error codes](https://developers.anis.ly/errors.md) · Enrolling a key

# Public key invalid

- **Code:** `key_proof_invalid`
- **Status:** 422
- **If this was an order:** Never returned when buying
- **Send it again unchanged?** No — change something first
- **.NET SDK:** `EnrollmentRefusedException`

## What it means

The public key you submitted is not a usable P-256 public key. (A proof of possession that does not verify is not refused — it comes back with `proofState: "failed"`.)

## What to do

- Send only the public half: `kty` `EC`, `crv` `P-256`, and `x` and `y` of exactly 32 bytes each, base64url without padding.
- Do not send a private member (`d`).

## Where you can meet it

- POST [Submit a public key](https://developers.anis.ly/reference/submit-key.md) `/v1/enrollments/{invitationId}/keys`

## Example

The body of the refusal. Its `type` is the address of this page.

```
{
  "type": "https://developers.anis.ly/errors/key-proof-invalid",
  "title": "Public key invalid",
  "status": 422,
  "code": "key_proof_invalid",
  "requestId": "01J9R2K8T4V6XQ0M3B7C5D9E1F"
}
```
