All URIs are relative to https://api.sendinblue.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 |
FileList crmFilesGet(entity, entityIds, dateFrom, dateTo, offset, limit, sort)
Get all files
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.FilesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
FilesApi apiInstance = new FilesApi();
String entity = "entity_example"; // String | Filter by file entity type
String entityIds = "entityIds_example"; // String | Filter by file entity IDs
Integer dateFrom = 56; // Integer | dateFrom to date range filter type (timestamp in milliseconds)
Integer dateTo = 56; // Integer | dateTo to date range filter type (timestamp in milliseconds)
Long offset = 789L; // Long | Index of the first document of the page
Long limit = 50L; // Long | Number of documents per page
String sort = "sort_example"; // String | Sort the results in the ascending/descending order. Default order is **descending** by creation if `sort` is not passed
try {
FileList result = apiInstance.crmFilesGet(entity, entityIds, dateFrom, dateTo, offset, limit, sort);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FilesApi#crmFilesGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
entity | String | Filter by file entity type | [optional] [enum: companies, deals, contacts] |
entityIds | String | Filter by file entity IDs | [optional] |
dateFrom | Integer | dateFrom to date range filter type (timestamp in milliseconds) | [optional] |
dateTo | Integer | dateTo to date range filter type (timestamp in milliseconds) | [optional] |
offset | Long | Index of the first document of the page | [optional] |
limit | Long | Number of documents per page | [optional] [default to 50] |
sort | String | Sort the results in the ascending/descending order. Default order is descending by creation if `sort` is not passed | [optional] [enum: asc, desc] |
- Content-Type: application/json
- Accept: application/json
FileData crmFilesIdDataGet(id)
Get file details
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.FilesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
FilesApi apiInstance = new FilesApi();
String id = "id_example"; // String | File id to get file data.
try {
FileData result = apiInstance.crmFilesIdDataGet(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FilesApi#crmFilesIdDataGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | File id to get file data. |
- Content-Type: application/json
- Accept: application/json
crmFilesIdDelete(id)
Delete a file
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.FilesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
FilesApi apiInstance = new FilesApi();
String id = "id_example"; // String | File id to delete.
try {
apiInstance.crmFilesIdDelete(id);
} catch (ApiException e) {
System.err.println("Exception when calling FilesApi#crmFilesIdDelete");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | File id to delete. |
null (empty response body)
- Content-Type: application/json
- Accept: application/json
FileDownloadableLink crmFilesIdGet(id)
Download a file
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.FilesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
FilesApi apiInstance = new FilesApi();
String id = "id_example"; // String | File id to download.
try {
FileDownloadableLink result = apiInstance.crmFilesIdGet(id);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FilesApi#crmFilesIdGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
id | String | File id to download. |
- Content-Type: application/json
- Accept: application/json
FileData crmFilesPost(file, dealId, contactId, companyId)
Upload a file
// Import classes:
//import sendinblue.ApiClient;
//import sendinblue.ApiException;
//import sendinblue.Configuration;
//import sendinblue.auth.*;
//import sibApi.FilesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api-key
ApiKeyAuth apiKey = (ApiKeyAuth) defaultClient.getAuthentication("api-key");
apiKey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apiKey.setApiKeyPrefix("Token");
// Configure API key authorization: partner-key
ApiKeyAuth partnerKey = (ApiKeyAuth) defaultClient.getAuthentication("partner-key");
partnerKey.setApiKey("YOUR PARTNER KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//partnerKey.setApiKeyPrefix("Token");
FilesApi apiInstance = new FilesApi();
File file = new File("/path/to/file.txt"); // File | File data to create a file.
String dealId = "dealId_example"; // String | Deal id linked to a file
Long contactId = 789L; // Long | Contact id linked to a file
String companyId = "companyId_example"; // String | Company id linked to a file
try {
FileData result = apiInstance.crmFilesPost(file, dealId, contactId, companyId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling FilesApi#crmFilesPost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
file | File | File data to create a file. | |
dealId | String | Deal id linked to a file | [optional] |
contactId | Long | Contact id linked to a file | [optional] |
companyId | String | Company id linked to a file | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json