> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ellaworks.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ellaworks.ai/_mcp/server.

# Submit a key possession proof

POST /api/agent-index/key-proofs
Content-Type: application/json

Submit a Nostr event signed by the claimed key and containing the issued nonce. On success the key may be used for an external listing. Requires org admin.

Reference: https://docs.ellaworks.ai/api-reference/ellaworks-prm-api/agent-index/agent-index-submit-key-proof

## Authentication

- `X-API-Key` header (required) — API key supplied via the X-API-Key header. Takes precedence over bearerApiKey when both are present. Listed only on operations that actually accept a key.
- `Authorization` header (bearer token, required) — Same organization API key supplied as a Bearer token in the Authorization header (Authorization: Bearer \<key>). Compatible with OpenAI-SDK-standard clients. Accepted wherever this scheme is listed on the operation — not every endpoint; if both X-API-Key and Authorization: Bearer are present, X-API-Key wins.
- `Authorization` header (bearer token, required) — Supabase session JWT from a signed-in browser session, supplied as Authorization: Bearer \<jwt>. This is what the web app sends. It shares the Authorization header with bearerApiKey; the server distinguishes them by the ela\_ prefix on API keys.

## Request

### Body (application/json)

This endpoint expects an object.

- `orgSlug` (string, required)
- `pubkey` (string, required)
- `nonce` (string, required)
- `signedEvent` (AgentIndexKeyProofsPostRequestBodyContentApplicationJsonSchemaSignedEvent, required)

## Response

### 200

OK

- `Agent Index_agentIndexSubmitKeyProof_Response_200`

## Types

### AgentIndexKeyProofsPostRequestBodyContentApplicationJsonSchemaSignedEvent

- `id` (string, required)
- `pubkey` (string, required)
- `created_at` (double, required)
- `kind` (double, required)
- `tags` (list of list of string, required)
- `content` (string, required)
- `sig` (string, required)

## Examples

**Request**

```json
{
  "orgSlug": "string",
  "pubkey": "string",
  "nonce": "string",
  "signedEvent": {
    "id": "string",
    "pubkey": "string",
    "created_at": 1.1,
    "kind": 1.1,
    "tags": [
      [
        "string"
      ]
    ],
    "content": "string",
    "sig": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api/agent-index/key-proofs"

payload = {
    "orgSlug": "string",
    "pubkey": "string",
    "nonce": "string",
    "signedEvent": {
        "id": "string",
        "pubkey": "string",
        "created_at": 1.1,
        "kind": 1.1,
        "tags": [["string"]],
        "content": "string",
        "sig": "string"
    }
}
headers = {
    "X-API-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api/agent-index/key-proofs';
const options = {
  method: 'POST',
  headers: {'X-API-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"orgSlug":"string","pubkey":"string","nonce":"string","signedEvent":{"id":"string","pubkey":"string","created_at":1.1,"kind":1.1,"tags":[["string"]],"content":"string","sig":"string"}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api/agent-index/key-proofs"

	payload := strings.NewReader("{\n  \"orgSlug\": \"string\",\n  \"pubkey\": \"string\",\n  \"nonce\": \"string\",\n  \"signedEvent\": {\n    \"id\": \"string\",\n    \"pubkey\": \"string\",\n    \"created_at\": 1.1,\n    \"kind\": 1.1,\n    \"tags\": [\n      [\n        \"string\"\n      ]\n    ],\n    \"content\": \"string\",\n    \"sig\": \"string\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-API-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api/agent-index/key-proofs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"orgSlug\": \"string\",\n  \"pubkey\": \"string\",\n  \"nonce\": \"string\",\n  \"signedEvent\": {\n    \"id\": \"string\",\n    \"pubkey\": \"string\",\n    \"created_at\": 1.1,\n    \"kind\": 1.1,\n    \"tags\": [\n      [\n        \"string\"\n      ]\n    ],\n    \"content\": \"string\",\n    \"sig\": \"string\"\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api/agent-index/key-proofs")
  .header("X-API-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"orgSlug\": \"string\",\n  \"pubkey\": \"string\",\n  \"nonce\": \"string\",\n  \"signedEvent\": {\n    \"id\": \"string\",\n    \"pubkey\": \"string\",\n    \"created_at\": 1.1,\n    \"kind\": 1.1,\n    \"tags\": [\n      [\n        \"string\"\n      ]\n    ],\n    \"content\": \"string\",\n    \"sig\": \"string\"\n  }\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api/agent-index/key-proofs', [
  'body' => '{
  "orgSlug": "string",
  "pubkey": "string",
  "nonce": "string",
  "signedEvent": {
    "id": "string",
    "pubkey": "string",
    "created_at": 1.1,
    "kind": 1.1,
    "tags": [
      [
        "string"
      ]
    ],
    "content": "string",
    "sig": "string"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-API-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api/agent-index/key-proofs");
var request = new RestRequest(Method.POST);
request.AddHeader("X-API-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"orgSlug\": \"string\",\n  \"pubkey\": \"string\",\n  \"nonce\": \"string\",\n  \"signedEvent\": {\n    \"id\": \"string\",\n    \"pubkey\": \"string\",\n    \"created_at\": 1.1,\n    \"kind\": 1.1,\n    \"tags\": [\n      [\n        \"string\"\n      ]\n    ],\n    \"content\": \"string\",\n    \"sig\": \"string\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-API-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "orgSlug": "string",
  "pubkey": "string",
  "nonce": "string",
  "signedEvent": [
    "id": "string",
    "pubkey": "string",
    "created_at": 1.1,
    "kind": 1.1,
    "tags": [["string"]],
    "content": "string",
    "sig": "string"
  ]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api/agent-index/key-proofs")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```