# Upload public key
Upload a public key for validating signatures and sending signed bulk files. For detailed instructions on creating a public key, refer to the [Create public and private keys](doc:file-signature-and-encryption#creating-public-and-private-keys) section in File signature and encryption.
# OpenAPI definition
```json
{
"openapi": "3.0.0",
"info": {
"title": "Banking - Transaction banking",
"version": "0.9.0",
"description": "Transaction banking API",
"contact": {
"name": "API Support",
"url": "https://developers.pismo.io/support/"
},
"license": {
"name": "Copyright Pismo"
}
},
"servers": [
{
"url": "https://sandbox.pismolabs.io",
"description": "Sandbox API server for testing"
}
],
"security": [
{
"BearerAuth": []
}
],
"tags": [
{
"name": "Bulk payment files",
"description": "Bulk payment file endpoints"
}
],
"components": {
"schemas": {
"ErrorCode": {
"description": "Error code\n`minLength: 1`\n`maxLength: 12`\n",
"type": "string",
"minLength": 1,
"maxLength": 12,
"example": "WPMT0017"
},
"ErrorMessage": {
"description": "Error message\n`minLength: 1`\n`maxLength: 1000`\n",
"type": "string",
"minLength": 1,
"maxLength": 1000,
"example": "Invalid JSON payload received: Error unmarshalling request"
},
"ErrorResponse": {
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/ErrorCode"
},
"message": {
"$ref": "#/components/schemas/ErrorMessage"
}
}
},
"KeyMaterial": {
"type": "string",
"description": "Public-key encoded in DER and base64 formats",
"example": "MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAsdRPlk9sW4I79X8hDarn82E9/6AZmEpHrG/IAdUkpaHHsQdvELnFySTAWtw5dNPIdBrYyn1jA6+Cf1dKuTjYxqt+TufMVsBbEbRobXHQezu8JajkkCgW9mzVweVP5qVpUFiryH3jHr3sPD8P8nDuKEzVe8Q83mmSt2YKyg95vkHl6iIrbM11whdZS5jy5VzV++P5BLTVvpPbrDFK/OStxStO7JjI0Lhz8zXqIDhopkOHtP9Ai/gFtdKZB3BefYFHTJFNifzyu8CGAZ00wLVfx61eRCi2cFBsW0HngTT+fLoELyvyxfpKmgkV+3eCMr8CkyEIxEpWNCxkOBxGk5LKMUHMka6YfurS0jXKNGi93wKJX3N1h93sPw4QHtRvqTm07zj8S9drSN6qa8B1u6kltWB+FckdOAqDWt2HBme0cy61xWK2REqXUPqywSrN1w2HitCoJOORUjf5zwUyzoGFMHjW9r7eChr8wsidu34DsMQNf6Lu9OzER2kCbhZlRMKZAgMBAAE="
},
"PublicKeyExpiresAt": {
"type": "string",
"description": "Expiration date and time of the public key. If not provided, it is set to 6 months from the date of submission.",
"example": "2025-05-21T12:27:00Z"
},
"PublicKeyID": {
"type": "string",
"description": "ID of the public key. Only digits, letters, hyphens, and underscores are allowed, and cannot exceed 60 characters.",
"maximum": 60,
"example": "b6cdccc4-f6bf-4218-9e5e-7fb8f66008e3"
},
"UploadPublicKeyRequest": {
"description": "Create public key payload request",
"type": "object",
"example": {
"id": "string",
"key_material": "string",
"expires_at": "string"
},
"properties": {
"id": {
"$ref": "#/components/schemas/PublicKeyID"
},
"key_material": {
"$ref": "#/components/schemas/KeyMaterial"
},
"expires_at": {
"$ref": "#/components/schemas/PublicKeyExpiresAt"
}
},
"required": [
"id",
"key_material"
]
},
"UploadPublicKeyResponse": {
"description": "Upload public key response",
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/PublicKeyID"
}
}
}
},
"responses": {
"401Unauthorized": {
"description": "Access token is missing or invalid"
},
"403Forbidden": {
"description": "The request has been lost"
},
"500InternalServer": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Generic internal error": {
"value": {
"code": "ECMN9999",
"message": "Internal error"
}
}
}
}
}
}
},
"securitySchemes": {
"BearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
}
},
"paths": {
"/corporate/v1/bulk-payments/keys": {
"post": {
"summary": "Upload public key",
"description": "Upload a public key for validating signatures and sending signed bulk files. For detailed instructions on creating a public key, refer to the [Create public and private keys](https://developers.pismo.io/pismo-docs/docs/file-signature-and-encryption#creating-public-and-private-keys) section in File signature and encryption.\n",
"operationId": "post-bulk-keys",
"parameters": [],
"tags": [
"Bulk payment files"
],
"requestBody": {
"description": "Upload public key request body",
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UploadPublicKeyRequest"
},
"examples": {
"New public key": {
"value": {
"id": "b6cdccc4-f6bf-4218-9e5e-7fb8f66008e3",
"key_material": "MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIBigKCAYEAsdRPlk9sW4I79X8hDarn82E9/6AZmEpHrG/IAdUkpaHHsQdvELnFySTAWtw5dNPIdBrYyn1jA6+Cf1dKuTjYxqt+TufMVsBbEbRobXHQezu8JajkkCgW9mzVweVP5qVpUFiryH3jHr3sPD8P8nDuKEzVe8Q83mmSt2YKyg95vkHl6iIrbM11whdZS5jy5VzV++P5BLTVvpPbrDFK/OStxStO7JjI0Lhz8zXqIDhopkOHtP9Ai/gFtdKZB3BefYFHTJFNifzyu8CGAZ00wLVfx61eRCi2cFBsW0HngTT+fLoELyvyxfpKmgkV+3eCMr8CkyEIxEpWNCxkOBxGk5LKMUHMka6YfurS0jXKNGi93wKJX3N1h93sPw4QHtRvqTm07zj8S9drSN6qa8B1u6kltWB+FckdOAqDWt2HBme0cy61xWK2REqXUPqywSrN1w2HitCoJOORUjf5zwUyzoGFMHjW9r7eChr8wsidu34DsMQNf6Lu9OzER2kCbhZlRMKZAgMBAAE=",
"expires_at": "2025-05-21T12:27:00Z"
}
}
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UploadPublicKeyResponse"
},
"examples": {
"Example hierarchy level structure": {
"value": {
"id": "b6cdccc4-f6bf-4218-9e5e-7fb8f66008e3"
}
}
}
}
}
},
"400": {
"description": "A Bad Request validation error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Invalid JSON payload": {
"value": {
"code": "WBPK0001",
"message": "Invalid JSON payload received: Error unmarshalling request"
}
},
"id required": {
"value": {
"code": "WBPK0002",
"message": "id is a required field"
}
},
"id exceed size": {
"value": {
"code": "WBPK0002",
"message": "name must be a maximum of 60 characters in length"
}
},
"key_material required": {
"value": {
"code": "WBPK0002",
"message": "key_material is a required field"
}
},
"key_material invalid": {
"value": {
"code": "WBPK0002",
"message": "key_material must be encoded in DER and a Base64 format string"
}
},
"expires_at invalid": {
"value": {
"code": "WBPK0004",
"message": "expires_at must not be in the past"
}
},
"id already registered": {
"value": {
"code": "WBPK0005",
"message": "Key with id {id} already registered"
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/401Unauthorized"
},
"403": {
"$ref": "#/components/responses/403Forbidden"
},
"500": {
"$ref": "#/components/responses/500InternalServer"
}
}
}
}
}
}
```