> ## Documentation Index
> Fetch the complete documentation index at: https://sendcloud.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a file upload for the return portal

> Upload an image for use in the return portal.

<Warning>
  **API v2 is entering maintenance mode.** New users should start with API v3 to access our latest features and improved performance. Already using v2? Don't worry, your current integration remains fully functional. Read more about [maintenance mode](/docs/getting-started/api-version-guide), or check out the [migration guide for API v3](/docs/getting-started/migration-guidelines-for-api-v3).
</Warning>

This endpoint allows users to upload media that may be used during the return creation purposes. The response from this endpoint contains filenames used to identify the files in later requests.

Currently only images are supported.

Note:

* Files are only kept for 48 hours after upload, unless used somewhere else (for example, when creating a return).
* The URLs returned in this response will only be available for 48 hours.
* The endpoint allows a maximum of 10 files, so groups larger than that should be batched.
* Files should be smaller than 10MB.

<Note>
  This API is currently in in beta, and may change in the near future.
</Note>


## OpenAPI

````yaml /.openapi/v2/return-portal/openapi.yaml post /brand/{brand_domain}/return-portal/uploads
openapi: 3.1.0
info:
  title: Return portal
  version: 2.0.0
  description: >-
    The Return portal API provides you with the tools to manage your own return
    portal, and create returns through that portal.
  contact:
    name: Sendcloud API Support
    url: https://www.sendcloud.dev
    email: contact@sendcloud.com
  termsOfService: https://www.sendcloud.com/terms-conditions/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://panel.sendcloud.sc/api/v2
    description: Sendcloud Production
security: []
tags:
  - name: Return portal
    description: Sendcloud's Return portal
paths:
  /brand/{brand_domain}/return-portal/uploads:
    parameters:
      - schema:
          type: string
        name: brand_domain
        in: path
        required: true
        description: The brand domain, found in the brand or return portal settings
    post:
      tags:
        - Return portal
      summary: Create a file upload for the return portal
      description: Upload an image for use in the return portal.
      operationId: sc-public-v2-scp-post-uploads
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              additionalProperties:
                type: string
                format: binary
                description: The files to be uploaded, with a maximum file size of 10MB.
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  required:
                    - name
                    - filename
                    - path
                  properties:
                    filename:
                      type: string
                      description: >-
                        An identifier for the file, used to reference the file
                        in later requests.
                    name:
                      type: string
                      description: The name sent when uploading the file.
                    path:
                      type: string
                      format: uri
                      description: >-
                        A URL that can be used to view the uploaded file. Only
                        valid for 48 hours.
              examples:
                FileUpload:
                  summary: File was uploaded
                  value:
                    - filename: 1dca5757ed2a47dd89ddc99ce308e6b4.webp
                      name: product-12345-abc
                      path: >-
                        https://cdn.example.com/link/1dca5757ed2a47dd89ddc99ce308e6b4.webp
                    - filename: ed013a200348477bb2c79fc27bb33dc8.webp
                      name: product-67891-cde
                      path: >-
                        https://cdn.example.com/link/ed013a200348477bb2c79fc27bb33dc8.webp
        '400':
          $ref: '#/components/responses/400'
      security:
        - JWTtoken: []
components:
  responses:
    '400':
      description: Bad Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                    description: The code of the error
                    example: invalid_postal_code
                  request:
                    type: string
                    description: The requested path
                    example: api/v2/brand/devtest/return-portal/outgoing
                  message:
                    type: string
                    description: A message describing the error
                    example: The postal code you provided is invalid.
  securitySchemes:
    JWTtoken:
      type: http
      scheme: bearer
      description: The JWT generated when starting the Return Portal process

````