curl https://production.methodfi.com/teams/mle/public_keys \
-X POST \
-H "Method-Version: 2026-03-30" \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"type": "direct",
"contact": "security@yourcompany.com",
"jwk": {
"kid": "your-unique-key-id",
"kty": "RSA",
"alg": "RSA-OAEP-256",
"use": "enc",
"n": "s3C9N7Vz...J7c",
"e": "AQAB"
},
"well_known_endpoint": null
}'
const key = await method.teams.mle.publicKeys.create({
type: 'direct',
contact: 'security@yourcompany.com',
jwk: {
kid: 'your-unique-key-id',
kty: 'RSA',
alg: 'RSA-OAEP-256',
use: 'enc',
n: 's3C9N7Vz...J7c',
e: 'AQAB'
},
well_known_endpoint: null
});
key = method.teams.mle.public_keys.create({
'type': 'direct',
'contact': 'security@yourcompany.com',
'jwk': {
'kid': 'your-unique-key-id',
'kty': 'RSA',
'alg': 'RSA-OAEP-256',
'use': 'enc',
'n': 's3C9N7Vz...J7c',
'e': 'AQAB'
},
'well_known_endpoint': None
})
{
"success": true,
"data": {
"id": "team_jwk_12345",
"type": "direct",
"jwk": {
"kid": "your-unique-key-id",
"kty": "RSA",
"alg": "RSA-OAEP-256",
"use": "enc",
"n": "s3C9N7Vz...J7c",
"e": "AQAB"
},
"well_known_endpoint": null,
"status": "active",
"contact": "security@yourcompany.com",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
"message": null
}
Team JWKS
Create MLE Public Key
POST
/
teams
/
mle
/
public_keys
curl https://production.methodfi.com/teams/mle/public_keys \
-X POST \
-H "Method-Version: 2026-03-30" \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"type": "direct",
"contact": "security@yourcompany.com",
"jwk": {
"kid": "your-unique-key-id",
"kty": "RSA",
"alg": "RSA-OAEP-256",
"use": "enc",
"n": "s3C9N7Vz...J7c",
"e": "AQAB"
},
"well_known_endpoint": null
}'
const key = await method.teams.mle.publicKeys.create({
type: 'direct',
contact: 'security@yourcompany.com',
jwk: {
kid: 'your-unique-key-id',
kty: 'RSA',
alg: 'RSA-OAEP-256',
use: 'enc',
n: 's3C9N7Vz...J7c',
e: 'AQAB'
},
well_known_endpoint: null
});
key = method.teams.mle.public_keys.create({
'type': 'direct',
'contact': 'security@yourcompany.com',
'jwk': {
'kid': 'your-unique-key-id',
'kty': 'RSA',
'alg': 'RSA-OAEP-256',
'use': 'enc',
'n': 's3C9N7Vz...J7c',
'e': 'AQAB'
},
'well_known_endpoint': None
})
{
"success": true,
"data": {
"id": "team_jwk_12345",
"type": "direct",
"jwk": {
"kid": "your-unique-key-id",
"kty": "RSA",
"alg": "RSA-OAEP-256",
"use": "enc",
"n": "s3C9N7Vz...J7c",
"e": "AQAB"
},
"well_known_endpoint": null,
"status": "active",
"contact": "security@yourcompany.com",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
"message": null
}
Creates a new public key registration for Message Level Encryption. You can register your key using either direct registration (providing the JWK directly) or well-known endpoint registration (providing a URL where Method can fetch your JWKS).
Each key ID (
kid) can only be registered once. Choose either direct or well-known registration for each unique key.Body
Well-Known Endpoint Requirements
If usingtype: "well_known", your endpoint must return a JWKS that meets these requirements:
- Must have a top-level field named
keysthat has a list as its value. - For a JWK (an item in list of
keys) to be valid the following must be met:- JWK must be an object
- JWK must have a field named
ktyand it must be equal toRSA - JWK must have a field
nand it must be a string that is validnfor a JWK in accordance to the RFC - JWK must have a field
eand it must be a string that is validefor a JWK in accordance to the RFC - JWK can optionally have a field named
algbut if it is provided the value must beRSA-OAEP-256 - JWK must have a field
kidand it must be a string that is a valididwhich will be passed ascidwhen making requests to Method
Returns
Returns the created public key registration object with an assigned ID and active status.curl https://production.methodfi.com/teams/mle/public_keys \
-X POST \
-H "Method-Version: 2026-03-30" \
-H "Authorization: Bearer sk_WyZEWVfTcH7GqmPzUPk65Vjc" \
-H "Content-Type: application/json" \
-d '{
"type": "direct",
"contact": "security@yourcompany.com",
"jwk": {
"kid": "your-unique-key-id",
"kty": "RSA",
"alg": "RSA-OAEP-256",
"use": "enc",
"n": "s3C9N7Vz...J7c",
"e": "AQAB"
},
"well_known_endpoint": null
}'
const key = await method.teams.mle.publicKeys.create({
type: 'direct',
contact: 'security@yourcompany.com',
jwk: {
kid: 'your-unique-key-id',
kty: 'RSA',
alg: 'RSA-OAEP-256',
use: 'enc',
n: 's3C9N7Vz...J7c',
e: 'AQAB'
},
well_known_endpoint: null
});
key = method.teams.mle.public_keys.create({
'type': 'direct',
'contact': 'security@yourcompany.com',
'jwk': {
'kid': 'your-unique-key-id',
'kty': 'RSA',
'alg': 'RSA-OAEP-256',
'use': 'enc',
'n': 's3C9N7Vz...J7c',
'e': 'AQAB'
},
'well_known_endpoint': None
})
{
"success": true,
"data": {
"id": "team_jwk_12345",
"type": "direct",
"jwk": {
"kid": "your-unique-key-id",
"kty": "RSA",
"alg": "RSA-OAEP-256",
"use": "enc",
"n": "s3C9N7Vz...J7c",
"e": "AQAB"
},
"well_known_endpoint": null,
"status": "active",
"contact": "security@yourcompany.com",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
"message": null
}