Skip to content

Latest commit

 

History

History
803 lines (518 loc) · 29.7 KB

ContactsApi.md

File metadata and controls

803 lines (518 loc) · 29.7 KB

sib_api_v3_sdk.ContactsApi

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

Method HTTP request Description
AddContactToList Post /contacts/lists/{listId}/contacts/add Add existing contacts to a list
CreateAttribute Post /contacts/attributes/{attributeCategory}/{attributeName} Create contact attribute
CreateContact Post /contacts Create a contact
CreateDoiContact Post /contacts/doubleOptinConfirmation Create Contact via DOI (Double-Opt-In) Flow
CreateFolder Post /contacts/folders Create a folder
CreateList Post /contacts/lists Create a list
DeleteAttribute Delete /contacts/attributes/{attributeCategory}/{attributeName} Delete an attribute
DeleteContact Delete /contacts/{identifier} Delete a contact
DeleteFolder Delete /contacts/folders/{folderId} Delete a folder (and all its lists)
DeleteList Delete /contacts/lists/{listId} Delete a list
GetAttributes Get /contacts/attributes List all attributes
GetContactInfo Get /contacts/{identifier} Get a contact's details
GetContactStats Get /contacts/{identifier}/campaignStats Get email campaigns' statistics for a contact
GetContacts Get /contacts Get all the contacts
GetContactsFromList Get /contacts/lists/{listId}/contacts Get contacts in a list
GetFolder Get /contacts/folders/{folderId} Returns a folder's details
GetFolderLists Get /contacts/folders/{folderId}/lists Get lists in a folder
GetFolders Get /contacts/folders Get all folders
GetList Get /contacts/lists/{listId} Get a list's details
GetLists Get /contacts/lists Get all the lists
ImportContacts Post /contacts/import Import contacts
RemoveContactFromList Post /contacts/lists/{listId}/contacts/remove Delete a contact from a list
RequestContactExport Post /contacts/export Export contacts
UpdateAttribute Put /contacts/attributes/{attributeCategory}/{attributeName} Update contact attribute
UpdateContact Put /contacts/{identifier} Update a contact
UpdateFolder Put /contacts/folders/{folderId} Update a folder
UpdateList Put /contacts/lists/{listId} Update a list

AddContactToList

PostContactInfo AddContactToList(ctx, body, listId) Add existing contacts to a list

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body AddContactToList Emails addresses OR IDs of the contacts
listId int64 Id of the list

Return type

PostContactInfo

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]

CreateAttribute

CreateAttribute(ctx, body, attributeCategory, attributeName) Create contact attribute

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body CreateAttribute Values to create an attribute
attributeCategory string Category of the attribute
attributeName string Name of the attribute

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]

CreateContact

CreateUpdateContactModel CreateContact(ctx, body) Create a contact

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body CreateContact Values to create a contact

Return type

CreateUpdateContactModel

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]

CreateDoiContact

CreateDoiContact(ctx, body) Create Contact via DOI (Double-Opt-In) Flow

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body CreateDoiContact Values to create the Double opt-in (DOI) contact

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]

CreateFolder

CreateModel CreateFolder(ctx, body) Create a folder

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body CreateUpdateFolder Name of the folder

Return type

CreateModel

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]

CreateList

CreateModel CreateList(ctx, body) Create a list

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body CreateList Values to create a list

Return type

CreateModel

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]

DeleteAttribute

DeleteAttribute(ctx, attributeCategory, attributeName) Delete an attribute

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
attributeCategory string Category of the attribute
attributeName string Name of the existing attribute

Return type

(empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

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

DeleteContact

DeleteContact(ctx, identifier) Delete a contact

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
identifier string Email (urlencoded) OR ID of the contact

Return type

(empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

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

DeleteFolder

DeleteFolder(ctx, folderId) Delete a folder (and all its lists)

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
folderId int64 Id of the folder

Return type

(empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

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

DeleteList

DeleteList(ctx, listId) Delete a list

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
listId int64 Id of the list

Return type

(empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

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

GetAttributes

GetAttributes GetAttributes(ctx, ) List all attributes

Required Parameters

This endpoint does not need any parameter.

Return type

GetAttributes

Authorization

api-key, partner-key

HTTP request headers

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

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

GetContactInfo

GetExtendedContactDetails GetContactInfo(ctx, identifier) Get a contact's details

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
identifier string Email (urlencoded) OR ID of the contact OR its SMS attribute value

Return type

GetExtendedContactDetails

Authorization

api-key, partner-key

HTTP request headers

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

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

GetContactStats

GetContactCampaignStats GetContactStats(ctx, identifier, optional) Get email campaigns' statistics for a contact

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
identifier string Email (urlencoded) OR ID of the contact
optional *ContactsApiGetContactStatsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ContactsApiGetContactStatsOpts struct

Name Type Description Notes

startDate | optional.String| Mandatory if endDate is used. Starting date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be lower than equal to endDate | endDate | optional.String| Mandatory if startDate is used. Ending date (YYYY-MM-DD) of the statistic events specific to campaigns. Must be greater than equal to startDate |

Return type

GetContactCampaignStats

Authorization

api-key, partner-key

HTTP request headers

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

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

GetContacts

GetContacts GetContacts(ctx, optional) Get all the contacts

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a ContactsApiGetContactsOpts struct

Name Type Description Notes
limit optional.Int64 Number of documents per page [default to 50]
offset optional.Int64 Index of the first document of the page [default to 0]
modifiedSince optional.String Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result.
sort optional.String Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed [default to desc]

Return type

GetContacts

Authorization

api-key, partner-key

HTTP request headers

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

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

GetContactsFromList

GetContacts GetContactsFromList(ctx, listId, optional) Get contacts in a list

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
listId int64 Id of the list
optional *ContactsApiGetContactsFromListOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ContactsApiGetContactsFromListOpts struct

Name Type Description Notes

modifiedSince | optional.String| Filter (urlencoded) the contacts modified after a given UTC date-time (YYYY-MM-DDTHH:mm:ss.SSSZ). Prefer to pass your timezone in date-time format for accurate result. | limit | optional.Int64| Number of documents per page | [default to 50] offset | optional.Int64| Index of the first document of the page | [default to 0] sort | optional.String| Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [default to desc]

Return type

GetContacts

Authorization

api-key, partner-key

HTTP request headers

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

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

GetFolder

GetFolder GetFolder(ctx, folderId) Returns a folder's details

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
folderId int64 id of the folder

Return type

GetFolder

Authorization

api-key, partner-key

HTTP request headers

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

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

GetFolderLists

GetFolderLists GetFolderLists(ctx, folderId, optional) Get lists in a folder

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
folderId int64 Id of the folder
optional *ContactsApiGetFolderListsOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ContactsApiGetFolderListsOpts struct

Name Type Description Notes

limit | optional.Int64| Number of documents per page | [default to 10] offset | optional.Int64| Index of the first document of the page | [default to 0] sort | optional.String| Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [default to desc]

Return type

GetFolderLists

Authorization

api-key, partner-key

HTTP request headers

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

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

GetFolders

GetFolders GetFolders(ctx, limit, offset, optional) Get all folders

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
limit int64 Number of documents per page [default to 10]
offset int64 Index of the first document of the page [default to 0]
optional *ContactsApiGetFoldersOpts optional parameters nil if no parameters

Optional Parameters

Optional parameters are passed through a pointer to a ContactsApiGetFoldersOpts struct

Name Type Description Notes

sort | optional.String| Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed | [default to desc]

Return type

GetFolders

Authorization

api-key, partner-key

HTTP request headers

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

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

GetList

GetExtendedList GetList(ctx, listId) Get a list's details

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
listId int64 Id of the list

Return type

GetExtendedList

Authorization

api-key, partner-key

HTTP request headers

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

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

GetLists

GetLists GetLists(ctx, optional) Get all the lists

Required Parameters

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

Optional Parameters

Optional parameters are passed through a pointer to a ContactsApiGetListsOpts struct

Name Type Description Notes
limit optional.Int64 Number of documents per page [default to 10]
offset optional.Int64 Index of the first document of the page [default to 0]
sort optional.String Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed [default to desc]

Return type

GetLists

Authorization

api-key, partner-key

HTTP request headers

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

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

ImportContacts

CreatedProcessId ImportContacts(ctx, body) Import contacts

It returns the background process ID which on completion calls the notify URL that you have set in the input.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body RequestContactImport Values to import contacts in Sendinblue. To know more about the expected format, please have a look at ``https://help.sendinblue.com/hc/en-us/articles/209499265-Build-contacts-lists-for-your-email-marketing-campaigns``

Return type

CreatedProcessId

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]

RemoveContactFromList

PostContactInfo RemoveContactFromList(ctx, body, listId) Delete a contact from a list

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body RemoveContactFromList Emails addresses OR IDs of the contacts
listId int64 Id of the list

Return type

PostContactInfo

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]

RequestContactExport

CreatedProcessId RequestContactExport(ctx, body) Export contacts

It returns the background process ID which on completion calls the notify URL that you have set in the input. File will be available in csv.

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body RequestContactExport Values to request a contact export

Return type

CreatedProcessId

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]

UpdateAttribute

UpdateAttribute(ctx, body, attributeCategory, attributeName) Update contact attribute

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body UpdateAttribute Values to update an attribute
attributeCategory string Category of the attribute
attributeName string Name of the existing attribute

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]

UpdateContact

UpdateContact(ctx, body, identifier) Update a contact

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body UpdateContact Values to update a contact
identifier string Email (urlencoded) OR ID of the contact

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]

UpdateFolder

UpdateFolder(ctx, body, folderId) Update a folder

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body CreateUpdateFolder Name of the folder
folderId int64 Id of the folder

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]

UpdateList

UpdateList(ctx, body, listId) Update a list

Required Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
body UpdateList Values to update a list
listId int64 Id of the list

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]