> For the complete documentation index, see [llms.txt](https://docs.meeco.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.meeco.me/openapi-docs/svx-api/key-management.md).

# Key Management

## Create a key for a Wallet

> Create a new cryptographic key associated with the Wallet. Keys are created using the JOSE JWK standard using attribute strings listed in the \[JOSE IANA registry]\(<https://www.iana.org/assignments/jose/jose.xhtml).\\>
> \
> Depending on the configuration of the service only certain cryptographic keys are supported.<br>

```json
{"openapi":"3.1.0","info":{"title":"SVX Wallet API","version":"4.0.1"},"servers":[{"url":"https://zyfla-wallet-sandbox.meeco.cloud","description":"SVX Wallet deployment (relative)"}],"security":[{},{"bearerAuth":[]},{"mutualTLS":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"},"mutualTLS":{"type":"mutualTLS"}},"schemas":{"JSONWebKeyPub":{"properties":{"alg":{"type":"string"},"crv":{"type":"string"},"e":{"type":"string"},"k":{"type":"string"},"kid":{"type":"string"},"kty":{"type":"string"},"n":{"type":"string"},"x":{"type":"string"},"y":{"type":"string"}},"type":"object"},"InvalidRequestPayloadError":{"properties":{"error":{"description":"Unique error identifier","enum":["invalid_request_payload"],"type":"string"},"extra_info":{"description":"Object that may contain more information about the error","type":"object"},"message":{"description":"User friendly error message","type":"string"}},"required":["error","message","extra_info"],"type":"object"}}},"paths":{"/wallets/{walletId}/keys":{"post":{"summary":"Create a key for a Wallet","description":"Create a new cryptographic key associated with the Wallet. Keys are created using the JOSE JWK standard using attribute strings listed in the [JOSE IANA registry](https://www.iana.org/assignments/jose/jose.xhtml).\n\nDepending on the configuration of the service only certain cryptographic keys are supported.\n","operationId":"KeysController_create","parameters":[{"in":"path","name":"walletId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"key":{"properties":{"crv":{"type":"string"},"kty":{"type":"string"}},"required":["kty","crv"],"type":"object"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"key":{"$ref":"#/components/schemas/JSONWebKeyPub"}},"type":"object"}}},"description":"New key successfully created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidRequestPayloadError"}}},"description":"Key could not be created"}},"tags":["Key Management"]}}}}
```

## Get a key for a Wallet

> Return the cryptographic key information for a key associated with a Wallet.\
> \
> The information returned contains only header and public attributes of the key, i.e. not the private key information which is kept in the Wallet. Key information is returned in the JOSE JWK standard using attribute strings listed in the \[JOSE IANA registry]\(<https://www.iana.org/assignments/jose/jose.xhtml>).<br>

```json
{"openapi":"3.1.0","info":{"title":"SVX Wallet API","version":"4.0.1"},"servers":[{"url":"https://zyfla-wallet-sandbox.meeco.cloud","description":"SVX Wallet deployment (relative)"}],"security":[{},{"bearerAuth":[]},{"mutualTLS":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"},"mutualTLS":{"type":"mutualTLS"}},"schemas":{"JSONWebKeyPub":{"properties":{"alg":{"type":"string"},"crv":{"type":"string"},"e":{"type":"string"},"k":{"type":"string"},"kid":{"type":"string"},"kty":{"type":"string"},"n":{"type":"string"},"x":{"type":"string"},"y":{"type":"string"}},"type":"object"},"WalletNotFoundError":{"properties":{"error":{"description":"Unique error identifier","enum":["wallet_not_found"],"type":"string"},"extra_info":{"description":"Object that may contain more information about the error","type":"object"},"message":{"description":"User friendly error message","type":"string"}},"required":["error","message","extra_info"],"type":"object"},"KeyNotFoundError":{"properties":{"error":{"description":"Unique error identifier","enum":["key_not_found"],"type":"string"},"extra_info":{"description":"Object that may contain more information about the error","type":"object"},"message":{"description":"User friendly error message","type":"string"}},"required":["error","message","extra_info"],"type":"object"}}},"paths":{"/wallets/{walletId}/keys/{keyId}":{"get":{"summary":"Get a key for a Wallet","description":"Return the cryptographic key information for a key associated with a Wallet.\n\nThe information returned contains only header and public attributes of the key, i.e. not the private key information which is kept in the Wallet. Key information is returned in the JOSE JWK standard using attribute strings listed in the [JOSE IANA registry](https://www.iana.org/assignments/jose/jose.xhtml).\n","operationId":"KeysController_get","parameters":[{"in":"path","name":"walletId","required":true,"schema":{"type":"string"}},{"in":"path","name":"keyId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"properties":{"key":{"$ref":"#/components/schemas/JSONWebKeyPub"}},"type":"object"}}},"description":"Key successfully loaded"},"404":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WalletNotFoundError"},{"$ref":"#/components/schemas/KeyNotFoundError"}]}}},"description":"Not found"}},"tags":["Key Management"]}}}}
```

## Delete a key from a Wallet

> Delete a key from a Wallet.<br>

```json
{"openapi":"3.1.0","info":{"title":"SVX Wallet API","version":"4.0.1"},"servers":[{"url":"https://zyfla-wallet-sandbox.meeco.cloud","description":"SVX Wallet deployment (relative)"}],"security":[{},{"bearerAuth":[]},{"mutualTLS":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"},"mutualTLS":{"type":"mutualTLS"}},"schemas":{"InvalidPathParamError":{"properties":{"error":{"description":"Unique error identifier","enum":["invalid_path_param"],"type":"string"},"extra_info":{"description":"Object that may contain more information about the error","type":"object"},"message":{"description":"User friendly error message","type":"string"}},"required":["error","message","extra_info"],"type":"object"},"WalletNotFoundError":{"properties":{"error":{"description":"Unique error identifier","enum":["wallet_not_found"],"type":"string"},"extra_info":{"description":"Object that may contain more information about the error","type":"object"},"message":{"description":"User friendly error message","type":"string"}},"required":["error","message","extra_info"],"type":"object"}}},"paths":{"/wallets/{walletId}/keys/{keyId}":{"delete":{"summary":"Delete a key from a Wallet","description":"Delete a key from a Wallet.\n","operationId":"KeysController_delete","parameters":[{"in":"path","name":"walletId","required":true,"schema":{"type":"string"}},{"in":"path","name":"keyId","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Key successfully removed"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvalidPathParamError"}}},"description":""},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletNotFoundError"}}},"description":""}},"tags":["Key Management"]}}}}
```

## Import a key to a Wallet

> Import an existing cryptographic key to a Wallet using the JOSE JWK notation.\
> \
> Depending on the configuration of the service only certain cryptographic keys are supported.<br>

```json
{"openapi":"3.1.0","info":{"title":"SVX Wallet API","version":"4.0.1"},"servers":[{"url":"https://zyfla-wallet-sandbox.meeco.cloud","description":"SVX Wallet deployment (relative)"}],"security":[{},{"bearerAuth":[]},{"mutualTLS":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"},"mutualTLS":{"type":"mutualTLS"}},"schemas":{"JSONWebKey":{"properties":{"crv":{"type":"string"},"d":{"type":"string"},"dp":{"type":"string"},"dq":{"type":"string"},"e":{"type":"string"},"k":{"type":"string"},"kid":{"type":"string"},"kty":{"type":"string"},"n":{"type":"string"},"p":{"type":"string"},"q":{"type":"string"},"qi":{"type":"string"},"x":{"type":"string"},"y":{"type":"string"}},"type":"object"},"JSONWebKeyPub":{"properties":{"alg":{"type":"string"},"crv":{"type":"string"},"e":{"type":"string"},"k":{"type":"string"},"kid":{"type":"string"},"kty":{"type":"string"},"n":{"type":"string"},"x":{"type":"string"},"y":{"type":"string"}},"type":"object"},"KeyNotSupportedError":{"properties":{"error":{"description":"Unique error identifier","enum":["key_not_supported"],"type":"string"},"extra_info":{"description":"Object that may contain more information about the error","type":"object"},"message":{"description":"User friendly error message","type":"string"}},"required":["error","message","extra_info"],"type":"object"},"InvalidRequestPayloadError":{"properties":{"error":{"description":"Unique error identifier","enum":["invalid_request_payload"],"type":"string"},"extra_info":{"description":"Object that may contain more information about the error","type":"object"},"message":{"description":"User friendly error message","type":"string"}},"required":["error","message","extra_info"],"type":"object"}}},"paths":{"/wallets/{walletId}/keys/import":{"post":{"summary":"Import a key to a Wallet","description":"Import an existing cryptographic key to a Wallet using the JOSE JWK notation.\n\nDepending on the configuration of the service only certain cryptographic keys are supported.\n","operationId":"KeyController_Import","parameters":[{"in":"path","name":"walletId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"key":{"$ref":"#/components/schemas/JSONWebKey"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"key":{"$ref":"#/components/schemas/JSONWebKeyPub"}},"type":"object"}}},"description":"Key has been imported"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/KeyNotSupportedError"},{"$ref":"#/components/schemas/InvalidRequestPayloadError"}]}}},"description":"Key could not be imported"}},"tags":["Key Management"]}}}}
```

## Sign data with a key from a wallet

> Create a signature based on data provided using a cryptographic key associated with a Wallet.<br>

```json
{"openapi":"3.1.0","info":{"title":"SVX Wallet API","version":"4.0.1"},"servers":[{"url":"https://zyfla-wallet-sandbox.meeco.cloud","description":"SVX Wallet deployment (relative)"}],"security":[{},{"bearerAuth":[]},{"mutualTLS":[]}],"components":{"securitySchemes":{"bearerAuth":{"bearerFormat":"JWT","scheme":"bearer","type":"http"},"mutualTLS":{"type":"mutualTLS"}},"schemas":{"InvalidRequestPayloadError":{"properties":{"error":{"description":"Unique error identifier","enum":["invalid_request_payload"],"type":"string"},"extra_info":{"description":"Object that may contain more information about the error","type":"object"},"message":{"description":"User friendly error message","type":"string"}},"required":["error","message","extra_info"],"type":"object"},"KeySigningNotSupportedError":{"properties":{"error":{"description":"Unique error identifier","enum":["key_signing_not_supported"],"type":"string"},"extra_info":{"description":"Object that may contain more information about the error","type":"object"},"message":{"description":"User friendly error message","type":"string"}},"required":["error","message","extra_info"],"type":"object"},"WalletNotFoundError":{"properties":{"error":{"description":"Unique error identifier","enum":["wallet_not_found"],"type":"string"},"extra_info":{"description":"Object that may contain more information about the error","type":"object"},"message":{"description":"User friendly error message","type":"string"}},"required":["error","message","extra_info"],"type":"object"},"KeyNotFoundError":{"properties":{"error":{"description":"Unique error identifier","enum":["key_not_found"],"type":"string"},"extra_info":{"description":"Object that may contain more information about the error","type":"object"},"message":{"description":"User friendly error message","type":"string"}},"required":["error","message","extra_info"],"type":"object"}}},"paths":{"/wallets/{walletId}/keys/{keyId}/sign":{"post":{"summary":"Sign data with a key from a wallet","description":"Create a signature based on data provided using a cryptographic key associated with a Wallet.\n","operationId":"KeyController_sign","parameters":[{"in":"path","name":"walletId","required":true,"schema":{"type":"string"}},{"in":"path","name":"keyId","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"data":{"type":"string"}},"type":"object"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"properties":{"signature":{"type":"string"}},"type":"object"}}},"description":"Key has been created"},"400":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/InvalidRequestPayloadError"},{"$ref":"#/components/schemas/KeySigningNotSupportedError"}]}}},"description":"Data could not be signed"},"404":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/WalletNotFoundError"},{"$ref":"#/components/schemas/KeyNotFoundError"}]}}},"description":"Not found"}},"tags":["Key Management"]}}}}
```
