Skip to content

Latest commit

 

History

History
167 lines (108 loc) · 5.74 KB

FilesApi.md

File metadata and controls

167 lines (108 loc) · 5.74 KB

\FilesApi

All URIs are relative to https://api.brevo.com/v3

Method HTTP request Description
CrmFilesGet Get /crm/files Get all files
CrmFilesIdDataGet Get /crm/files/{id}/data Get file details
CrmFilesIdDelete Delete /crm/files/{id} Delete a file
CrmFilesIdGet Get /crm/files/{id} Download a file
CrmFilesPost Post /crm/files Upload a file

CrmFilesGet

FileList CrmFilesGet(ctx, optional) Get all files

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
optional *CrmFilesGetOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a CrmFilesGetOpts struct

Name Type Description Notes
entity optional.String Filter by file entity type
entityIds optional.String Filter by file entity IDs
dateFrom optional.Int32 dateFrom to date range filter type (timestamp in milliseconds)
dateTo optional.Int32 dateTo to date range filter type (timestamp in milliseconds)
offset optional.Int64 Index of the first document of the page
limit optional.Int64 Number of documents per page [default to 50]
sort optional.String Sort the results in the ascending/descending order. Default order is descending by creation if `sort` is not passed

Return type

FileList

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CrmFilesIdDataGet

FileData CrmFilesIdDataGet(ctx, id) Get file details

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string File id to get file data.

Return type

FileData

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CrmFilesIdDelete

CrmFilesIdDelete(ctx, id) Delete a file

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string File id to delete.

Return type

(empty response body)

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CrmFilesIdGet

FileDownloadableLink CrmFilesIdGet(ctx, id) Download a file

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string File id to download.

Return type

FileDownloadableLink

Authorization

api-key, partner-key

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

CrmFilesPost

FileData CrmFilesPost(ctx, file, optional) Upload a file

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
file *os.File File data to create a file.
optional *CrmFilesPostOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a CrmFilesPostOpts struct

Name Type Description Notes

dealId | optional.String| Deal id linked to a file | contactId | optional.Int64| Contact id linked to a file | companyId | optional.String| Company id linked to a file |

Return type

FileData

Authorization

api-key, partner-key

HTTP request headers

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

[Back to top] [Back to API list] [Back to Model list] [Back to README]