Skip to main content
POST
/
mcp
/
keys
/
Create an MCP API key
curl --request POST \
  --url https://earthcare.network/api/v1/mcp/keys/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "organization_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "claude-code"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "plaintext": "ecn_mcp_…",
  "key_prefix": "ecn_mcp_ab12",
  "endpoint": "<string>",
  "is_active": true,
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

DRF user token. Format: Token <token>

Body

application/json
organization_id
string<uuid>
required
name
string
required
Example:

"claude-code"

Response

201 - application/json

Key created (secret shown once)

id
string<uuid>
name
string
plaintext
string

The full secret — shown ONCE, not retrievable later

Example:

"ecn_mcp_…"

key_prefix
string
Example:

"ecn_mcp_ab12"

endpoint
string<uri>

The MCP endpoint to use this key against

is_active
boolean
created_at
string<date-time>