---
updatedAt: 2025-11-12T22:18:23.000Z
agentTools:
  projectIndex: https://docs.nmp.arianee.com/llms.txt
---

# Upload Asset

This endpoint allows you to upload the media you wish to use to design your digital passports.

- URL: `POST - {{url}}/asset/pub`
    
- Body:
    
    - `image` - Media to upload
        
    - `fileId` - ID of the media
        
- Success: The asset is uploaded.
    

[For more information, read our detailed API documentation.](https://docs.nmp.arianee.com/docs/upload-assets)

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "🎨 Digital Passports Utilities",
    "contact": {},
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://{url}",
      "variables": {
        "url": {
          "default": "nmp_endpoint"
        }
      }
    }
  ],
  "paths": {
    "/assets/pub": {
      "post": {
        "tags": [
          "Assets"
        ],
        "summary": "Upload Asset",
        "description": "This endpoint allows you to upload the media you wish to use to design your digital passports.\n\n- URL: `POST - {{url}}/asset/pub`\n    \n- Body:\n    \n    - `image` - Media to upload\n        \n    - `fileId` - ID of the media\n        \n- Success: The asset is uploaded.\n    \n\n[For more information, read our detailed API documentation.](https://docs.nmp.arianee.com/docs/upload-assets)",
        "operationId": "UploadAsset",
        "parameters": [],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "encoding": {},
              "schema": {
                "required": [
                  "image",
                  "fileId"
                ],
                "type": "object",
                "properties": {
                  "image": {
                    "type": "string",
                    "description": "Asset to upload",
                    "format": "binary"
                  },
                  "fileId": {
                    "type": "string",
                    "description": "ID of the asset uploaded",
                    "example": "myassetID"
                  }
                }
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "Date": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Mon, 02 Jan 2023 05:46:08 GMT"
                  }
                }
              },
              "Content-Length": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "120"
                  }
                }
              },
              "Connection": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "keep-alive"
                  }
                }
              },
              "X-Powered-By": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Express"
                  }
                }
              },
              "Access-Control-Allow-Origin": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "*"
                  }
                }
              },
              "Vary": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Origin, Accept-Encoding"
                  }
                }
              },
              "ETag": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "W/\"78-09XTlWiAhwWkFHRyEJUpgHRbmvk\""
                  }
                }
              },
              "Strict-Transport-Security": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "max-age=15724800; includeSubDomains"
                  }
                }
              }
            },
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Success"
                    },
                    {
                      "example": {
                        "url": "https://bdh-stef.api.staging.arianee.com/pub/myviolon",
                        "message": "Your file 5548b92fdbfc5.jpg has been updated"
                      }
                    }
                  ]
                },
                "example": {
                  "url": "https://bdh-stef.api.staging.arianee.com/pub/myviolon",
                  "message": "Your file 5548b92fdbfc5.jpg has been updated"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "headers": {
              "Date": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Mon, 02 Jan 2023 05:45:32 GMT"
                  }
                }
              },
              "Content-Length": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "107"
                  }
                }
              },
              "Connection": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "keep-alive"
                  }
                }
              },
              "X-Powered-By": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Express"
                  }
                }
              },
              "Access-Control-Allow-Origin": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "*"
                  }
                }
              },
              "Vary": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Origin, Accept-Encoding"
                  }
                }
              },
              "ETag": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "W/\"6b-sQVwN75X5rwSde4e/s+VAqjnBoM\""
                  }
                }
              },
              "Strict-Transport-Security": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "max-age=15724800; includeSubDomains"
                  }
                }
              }
            },
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ErrorIDalreadyexists1"
                    },
                    {
                      "example": {
                        "message": "Error: You cannot upload this asset because another asset with same ressourceId already exist"
                      }
                    }
                  ]
                },
                "example": {
                  "message": "Error: You cannot upload this asset because another asset with same ressourceId already exist"
                }
              }
            }
          }
        },
        "deprecated": false,
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ErrorIDalreadyexists1": {
        "title": "ErrorIDalreadyexists1",
        "required": [
          "message"
        ],
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          }
        },
        "example": {
          "message": "Error: You cannot upload this asset because another asset with same ressourceId already exist"
        }
      },
      "Success": {
        "title": "Success",
        "required": [
          "url",
          "message"
        ],
        "type": "object",
        "properties": {
          "url": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "example": {
          "url": "https://bdh-stef.api.staging.arianee.com/pub/myviolon",
          "message": "Your file 5548b92fdbfc5.jpg has been updated"
        }
      }
    },
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      }
    }
  },
  "security": [],
  "tags": [
    {
      "name": "Assets"
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```