Sha256: 388e966ec682897b69186f911519cd0ed3a0fd31a6243a4d3a720659b889c5a9

Contents?: true

Size: 1.56 KB

Versions: 15

Compression:

Stored size: 1.56 KB

Contents

# SmoochApi::AttachmentsApi

All URIs are relative to *https://api.smooch.io/v1*

Method | HTTP request | Description
------------- | ------------- | -------------
[**upload_attachment**](AttachmentsApi.md#upload_attachment) | **POST** /apps/{appId}/attachments | 


# **upload_attachment**
> AttachmentResponse upload_attachment(app_id, source, access)



Upload an attachment to Smooch to use in future messages.

### Example
```ruby
# load the gem
require 'smooch-api'
# setup authorization
SmoochApi.configure do |config|
  # Configure API key authorization: jwt
  config.api_key['Authorization'] = 'YOUR JWT'
  config.api_key_prefix['Authorization'] = 'Bearer'
end

api_instance = SmoochApi::AttachmentsApi.new

app_id = "app_id_example" # String | Identifies the app.

source = File.new("/path/to/file.txt") # File | File to be uploaded

access = "access_example" # String | Access level for the resulting file


begin
  result = api_instance.upload_attachment(app_id, source, access)
  p result
rescue SmoochApi::ApiError => e
  puts "Exception when calling AttachmentsApi->upload_attachment: #{e}"
end
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **app_id** | **String**| Identifies the app. | 
 **source** | **File**| File to be uploaded | 
 **access** | **String**| Access level for the resulting file | 

### Return type

[**AttachmentResponse**](AttachmentResponse.md)

### Authorization

[jwt](../README.md#jwt)

### HTTP request headers

 - **Content-Type**: multipart/form-data
 - **Accept**: application/json



Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
smooch-api-3.0.0 docs/AttachmentsApi.md
smooch-api-2.11.0 docs/AttachmentsApi.md
smooch-api-2.9.0 docs/AttachmentsApi.md
smooch-api-2.8.0 docs/AttachmentsApi.md
smooch-api-2.7.0 docs/AttachmentsApi.md
smooch-api-2.6.0 docs/AttachmentsApi.md
smooch-api-2.5.0 docs/AttachmentsApi.md
smooch-api-2.4.0 docs/AttachmentsApi.md
smooch-api-2.3.0 docs/AttachmentsApi.md
smooch-api-2.2.0 docs/AttachmentsApi.md
smooch-api-2.1.0 docs/AttachmentsApi.md
smooch-api-2.0.0 docs/AttachmentsApi.md
smooch-api-1.12.0 docs/AttachmentsApi.md
smooch-api-1.11.0 docs/AttachmentsApi.md
smooch-api-1.9.0 docs/AttachmentsApi.md