---
updatedAt: 2026-07-03T14:45:30.000Z
agentTools:
  projectIndex: https://developer.liveswitch.com/llms.txt
---

# Creates presigned URLs for uploading images to a conversation

**Required scope:** `conversations.write`

Creates presigned URLs for uploading images to a conversation.Supports png, jpg, jpeg, webp. Maximum 20 files per request.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "LiveSwitch Public API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://public-api.production.liveswitch.com/",
      "description": "Public API"
    }
  ],
  "paths": {
    "/v1/conversations/{id}/upload-urls/images": {
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Creates presigned URLs for uploading images to a conversation",
        "description": "**Required scope:** `conversations.write`",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/FileMetadataDto"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FileUploadResponseDto"
                }
              }
            }
          }
        },
        "security": [
          {
            "oauth2": [
              "conversations.write"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "DocumentType": {
        "enum": [
          "Image",
          "Document",
          "Video"
        ],
        "type": "string",
        "description": "Represents the type of document being uploaded"
      },
      "FileMetadataDto": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string",
            "description": "Original filename including extension",
            "nullable": true
          },
          "contentType": {
            "type": "string",
            "description": "MIME type of the file (e.g., image/jpeg, application/pdf, video/mp4)",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents metadata for a file to be uploaded"
      },
      "FileUploadResponseDto": {
        "type": "object",
        "properties": {
          "conversationId": {
            "type": "string",
            "description": "The conversation ID where files will be uploaded",
            "format": "uuid"
          },
          "totalFiles": {
            "type": "integer",
            "description": "Total number of files requested",
            "format": "int32"
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FileUploadResultDto"
            },
            "description": "Presigned URL results for each file",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Response containing presigned URLs for uploading files to LiveSwitch Contact"
      },
      "FileUploadResultDto": {
        "type": "object",
        "properties": {
          "fileName": {
            "type": "string",
            "description": "Original filename",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "description": "Error message if presigned URL generation failed",
            "nullable": true
          },
          "presignedUrl": {
            "type": "string",
            "description": "Presigned URL for uploading the file to S3",
            "nullable": true
          },
          "expiresIn": {
            "type": "integer",
            "description": "Number of seconds until the presigned URL expires",
            "format": "int32",
            "nullable": true
          },
          "documentType": {
            "$ref": "#/components/schemas/DocumentType"
          }
        },
        "additionalProperties": false,
        "description": "Represents the result of requesting a presigned URL for file upload"
      }
    },
    "securitySchemes": {
      "oauth2": {
        "type": "oauth2",
        "description": "OAuth2 authentication using Auth0 Implicit flow",
        "flows": {
          "implicit": {
            "authorizationUrl": "https://id.staging.liveswitch.com/authorize",
            "scopes": {
              "openid": "OpenID Connect scope",
              "profile": "Access to user profile",
              "email": "Access to user email",
              "me": "Access to user information",
              "contacts": "Read access to contacts",
              "contacts.write": "Write access to contacts",
              "conversations": "Read access to conversations",
              "conversations.write": "Write access to conversations",
              "organizations": "Read access to organizations",
              "webhooks": "Read access to webhooks",
              "webhooks.write": "Write access to webhooks",
              "applications": "Read access to applications",
              "applications.write": "Write access to applications",
              "forms": "Read access to forms",
              "projects": "Read access to projects",
              "projects.write": "Write access to projects",
              "recordings": "Read access to recordings",
              "documents": "Read access to documents",
              "accounts": "Read access to accounts",
              "guided-instructions": "Read access to guided instructions",
              "sparks": "Read access to Spark runs",
              "sparks.write": "Write access to Spark runs",
              "spark-templates": "Read access to installed Spark templates for the organization",
              "scribe-templates": "Read access to installed Scribe templates (legacy)"
            }
          }
        }
      },
      "bearer": {
        "type": "http",
        "description": "<p>Please enter a valid token. This shoud NOT include the Bearer: prefix, but just the token itself.</p>\n            <br/>\n             <p>To generate a token from the Swagger UI:</p>\n             <p>\n               1. Select the 'v1/tokens' endpoint in the Swagger UI<br/>\n               2. Set the 'redirect' setting to false<br/>\n               3. Fill in the values according to your application configuration<br/>\n               4. Click 'Execute'<br/>\n            </p>\n            <br/>\n            <p>\n            The response from this request will include the URL you need to generate a token. Copy/paste it into a new window and follow the instructions.\n            </p>",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "bearer": []
    }
  ]
}
```

# Sibling pages

* [Creates a conversation.](https://developer.liveswitch.com/reference/post_v1-conversations.md)
* [Retrieves a list of conversations.](https://developer.liveswitch.com/reference/get_v1-conversations.md)
* [Gets a conversation by ID.](https://developer.liveswitch.com/reference/get_v1-conversations-id.md)
* [Creates presigned URLs for uploading documents to a conversation](https://developer.liveswitch.com/reference/post_v1-conversations-id-upload-urls-documents.md)
* [Creates presigned URLs for uploading videos to a conversation](https://developer.liveswitch.com/reference/post_v1-conversations-id-upload-urls-videos.md)
* [Updates a conversation.](https://developer.liveswitch.com/reference/put_v1-conversations-id.md)
* [Run a Spark on a conversation](https://developer.liveswitch.com/reference/post_v1-conversations-conversationid-sparks.md)
* [Gets all Sparks by conversation ID](https://developer.liveswitch.com/reference/get_v1-conversations-conversationid-sparks.md)