> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pulse-send.jiordiviera.me/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload a file

> Keeps a file you attach to many emails, like your terms or your logo: upload it once,
then pass its `file_id` in `attachments`. Send it as `multipart/form-data` in a `file`
field, or as JSON with `filename` and base64 `content`. Uploading the same content again
returns the existing file.



## OpenAPI

````yaml /openapi.json post /files
openapi: 3.1.2
info:
  title: PulseSend API
  version: 1.0.0
  description: >-
    Send transactional email over HTTP. Authenticate with a `ps_live_` or
    `ps_test_` key.
servers:
  - url: https://pulse-send.jiordiviera.me/api/v1
    description: Production
security:
  - apiKey: []
tags:
  - name: Emails
  - name: Files
  - name: Templates
paths:
  /files:
    post:
      tags:
        - Files
      summary: Upload a file
      description: >-
        Keeps a file you attach to many emails, like your terms or your logo:
        upload it once,

        then pass its `file_id` in `attachments`. Send it as
        `multipart/form-data` in a `file`

        field, or as JSON with `filename` and base64 `content`. Uploading the
        same content again

        returns the existing file.
      operationId: v1.files.store
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: The file, when you send multipart/form-data.
                filename:
                  type: string
                  description: File name with its extension, when you send JSON.
                  examples:
                    - terms-2026.pdf
                content:
                  type: string
                  description: The file encoded in base64, when you send JSON.
                content_type:
                  type: string
                  description: Media type. Guessed from the extension when omitted.
                  examples:
                    - application/pdf
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: string
components:
  securitySchemes:
    apiKey:
      type: http
      description: Your API key, `ps_live_…` or `ps_test_…`.
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.