├── mailinblue.suo
├── V1.0
├── mailinblue.suo
├── Newtonsoft.Json.dll
├── test
│ ├── bin
│ │ └── Debug
│ │ │ ├── test.exe
│ │ │ ├── test.pdb
│ │ │ ├── mailinblue.dll
│ │ │ ├── mailinblue.pdb
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── test.exe.config
│ ├── obj
│ │ └── Debug
│ │ │ ├── test.exe
│ │ │ ├── test.pdb
│ │ │ ├── ResolveAssemblyReference.cache
│ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ │ └── test.csproj.FileListAbsolute.txt
│ ├── app.config
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── test.csproj
├── mailinblue
│ ├── bin
│ │ └── Debug
│ │ │ ├── mailinblue.dll
│ │ │ ├── mailinblue.pdb
│ │ │ └── Newtonsoft.Json.dll
│ ├── obj
│ │ └── Debug
│ │ │ ├── mailinblue.dll
│ │ │ ├── mailinblue.pdb
│ │ │ ├── ResolveAssemblyReference.cache
│ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ │ └── mailinblue.csproj.FileListAbsolute.txt
│ ├── mailinblue.csproj.user
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── mailinblue.csproj
│ └── Program.cs
├── .gitignore
├── mailinblue.sln
└── README.md
├── V2.0
├── mailinblue.suo
├── Newtonsoft.Json.dll
├── test
│ ├── bin
│ │ └── Debug
│ │ │ ├── test.exe
│ │ │ ├── test.pdb
│ │ │ ├── mailinblue.dll
│ │ │ ├── mailinblue.pdb
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── test.exe.config
│ ├── obj
│ │ └── Debug
│ │ │ ├── test.exe
│ │ │ ├── test.pdb
│ │ │ ├── ResolveAssemblyReference.cache
│ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ │ └── test.csproj.FileListAbsolute.txt
│ ├── app.config
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── test.csproj
├── mailinblue
│ ├── bin
│ │ └── Debug
│ │ │ ├── mailinblue.dll
│ │ │ ├── mailinblue.pdb
│ │ │ └── Newtonsoft.Json.dll
│ ├── obj
│ │ └── Debug
│ │ │ ├── mailinblue.dll
│ │ │ ├── mailinblue.pdb
│ │ │ ├── ResolveAssemblyReference.cache
│ │ │ ├── DesignTimeResolveAssemblyReferencesInput.cache
│ │ │ └── mailinblue.csproj.FileListAbsolute.txt
│ ├── mailinblue.csproj.user
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── mailinblue.csproj
│ └── Program.cs
├── .gitignore
├── mailinblue.sln
└── README.md
├── LICENSE.md
└── README.md
/mailinblue.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/mailinblue.suo
--------------------------------------------------------------------------------
/V1.0/mailinblue.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/mailinblue.suo
--------------------------------------------------------------------------------
/V2.0/mailinblue.suo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/mailinblue.suo
--------------------------------------------------------------------------------
/V1.0/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/V2.0/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/V1.0/test/bin/Debug/test.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/test/bin/Debug/test.exe
--------------------------------------------------------------------------------
/V1.0/test/bin/Debug/test.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/test/bin/Debug/test.pdb
--------------------------------------------------------------------------------
/V1.0/test/obj/Debug/test.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/test/obj/Debug/test.exe
--------------------------------------------------------------------------------
/V1.0/test/obj/Debug/test.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/test/obj/Debug/test.pdb
--------------------------------------------------------------------------------
/V2.0/test/bin/Debug/test.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/test/bin/Debug/test.exe
--------------------------------------------------------------------------------
/V2.0/test/bin/Debug/test.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/test/bin/Debug/test.pdb
--------------------------------------------------------------------------------
/V2.0/test/obj/Debug/test.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/test/obj/Debug/test.exe
--------------------------------------------------------------------------------
/V2.0/test/obj/Debug/test.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/test/obj/Debug/test.pdb
--------------------------------------------------------------------------------
/V1.0/test/bin/Debug/mailinblue.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/test/bin/Debug/mailinblue.dll
--------------------------------------------------------------------------------
/V1.0/test/bin/Debug/mailinblue.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/test/bin/Debug/mailinblue.pdb
--------------------------------------------------------------------------------
/V2.0/test/bin/Debug/mailinblue.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/test/bin/Debug/mailinblue.dll
--------------------------------------------------------------------------------
/V2.0/test/bin/Debug/mailinblue.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/test/bin/Debug/mailinblue.pdb
--------------------------------------------------------------------------------
/V1.0/test/bin/Debug/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/test/bin/Debug/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/V2.0/test/bin/Debug/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/test/bin/Debug/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/V1.0/mailinblue/bin/Debug/mailinblue.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/mailinblue/bin/Debug/mailinblue.dll
--------------------------------------------------------------------------------
/V1.0/mailinblue/bin/Debug/mailinblue.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/mailinblue/bin/Debug/mailinblue.pdb
--------------------------------------------------------------------------------
/V1.0/mailinblue/obj/Debug/mailinblue.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/mailinblue/obj/Debug/mailinblue.dll
--------------------------------------------------------------------------------
/V1.0/mailinblue/obj/Debug/mailinblue.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/mailinblue/obj/Debug/mailinblue.pdb
--------------------------------------------------------------------------------
/V2.0/mailinblue/bin/Debug/mailinblue.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/mailinblue/bin/Debug/mailinblue.dll
--------------------------------------------------------------------------------
/V2.0/mailinblue/bin/Debug/mailinblue.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/mailinblue/bin/Debug/mailinblue.pdb
--------------------------------------------------------------------------------
/V2.0/mailinblue/obj/Debug/mailinblue.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/mailinblue/obj/Debug/mailinblue.dll
--------------------------------------------------------------------------------
/V2.0/mailinblue/obj/Debug/mailinblue.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/mailinblue/obj/Debug/mailinblue.pdb
--------------------------------------------------------------------------------
/V1.0/mailinblue/bin/Debug/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/mailinblue/bin/Debug/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/V2.0/mailinblue/bin/Debug/Newtonsoft.Json.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/mailinblue/bin/Debug/Newtonsoft.Json.dll
--------------------------------------------------------------------------------
/V1.0/test/obj/Debug/ResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/test/obj/Debug/ResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/V2.0/test/obj/Debug/ResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/test/obj/Debug/ResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/V1.0/mailinblue/obj/Debug/ResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/mailinblue/obj/Debug/ResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/V1.0/test/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/V2.0/mailinblue/obj/Debug/ResolveAssemblyReference.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/mailinblue/obj/Debug/ResolveAssemblyReference.cache
--------------------------------------------------------------------------------
/V2.0/test/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/V1.0/test/bin/Debug/test.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/V2.0/test/bin/Debug/test.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/V1.0/test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/V2.0/test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/test/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/V1.0/mailinblue/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V1.0/mailinblue/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/V2.0/mailinblue/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mailin-api/mailin-api-csharp/HEAD/V2.0/mailinblue/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
--------------------------------------------------------------------------------
/V1.0/mailinblue/mailinblue.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ShowAllFiles
5 |
6 |
--------------------------------------------------------------------------------
/V2.0/mailinblue/mailinblue.csproj.user:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | ProjectFiles
5 |
6 |
--------------------------------------------------------------------------------
/V1.0/test/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using mailinblue;
3 |
4 | namespace test
5 | {
6 | class Program
7 | {
8 | public static void Main(string[] args)
9 | {
10 | API test = new mailinblue.API("","");
11 | Console.Write(test.get_processes());
12 | Console.ReadKey(true);
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/V2.0/test/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using mailinblue;
6 |
7 | namespace test
8 | {
9 | class Program
10 | {
11 | public static void Main(string[] args)
12 | {
13 | API test = new mailinblue.API("");
14 | Dictionary data = new Dictionary();
15 | data.Add("page", 1);
16 | data.Add("page_limit", 3);
17 | Object getProcesses = test.get_processes(data);
18 | Console.WriteLine(getProcesses);
19 | Console.ReadKey(true);
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/V1.0/.gitignore:
--------------------------------------------------------------------------------
1 | #OS junk files
2 | [Tt]humbs.db
3 | *.DS_Store
4 |
5 | #Visual Studio files
6 | *.[Oo]bj
7 | *.user
8 | *.aps
9 | *.pch
10 | *.vspscc
11 | *.vssscc
12 | *_i.c
13 | *_p.c
14 | *.ncb
15 | *.suo
16 | *.tlb
17 | *.tlh
18 | *.bak
19 | *.[Cc]ache
20 | *.ilk
21 | *.log
22 | *.lib
23 | *.sbr
24 | *.sdf
25 | *.opensdf
26 | *.unsuccessfulbuild
27 | ipch/
28 | obj/
29 | Ankh.NoLoad
30 |
31 | #MonoDevelop
32 | *.pidb
33 | *.userprefs
34 |
35 | #Tooling
36 | _ReSharper*/
37 | *.resharper
38 | [Tt]est[Rr]esult*
39 | *.sass-cache
40 |
41 | #Project files
42 |
43 | #Subversion files
44 | .svn
45 |
46 | # Office Temp Files
47 | ~$*
48 |
49 | #NuGet
50 | packages/
51 |
52 | #ncrunch
53 | *ncrunch*
54 | *crunch*.local.xml
55 |
56 | # visual studio database projects
57 | *.dbmdl
58 |
59 | #Test files
60 | *.testsettings
--------------------------------------------------------------------------------
/V2.0/.gitignore:
--------------------------------------------------------------------------------
1 | #OS junk files
2 | [Tt]humbs.db
3 | *.DS_Store
4 |
5 | #Visual Studio files
6 | *.[Oo]bj
7 | *.user
8 | *.aps
9 | *.pch
10 | *.vspscc
11 | *.vssscc
12 | *_i.c
13 | *_p.c
14 | *.ncb
15 | *.suo
16 | *.tlb
17 | *.tlh
18 | *.bak
19 | *.[Cc]ache
20 | *.ilk
21 | *.log
22 | *.lib
23 | *.sbr
24 | *.sdf
25 | *.opensdf
26 | *.unsuccessfulbuild
27 | ipch/
28 | obj/
29 | Ankh.NoLoad
30 |
31 | #MonoDevelop
32 | *.pidb
33 | *.userprefs
34 |
35 | #Tooling
36 | _ReSharper*/
37 | *.resharper
38 | [Tt]est[Rr]esult*
39 | *.sass-cache
40 |
41 | #Project files
42 |
43 | #Subversion files
44 | .svn
45 |
46 | # Office Temp Files
47 | ~$*
48 |
49 | #NuGet
50 | packages/
51 |
52 | #ncrunch
53 | *ncrunch*
54 | *crunch*.local.xml
55 |
56 | # visual studio database projects
57 | *.dbmdl
58 |
59 | #Test files
60 | *.testsettings
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 SendinBlue
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/V1.0/test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | #region Using directives
2 |
3 | using System;
4 | using System.Reflection;
5 | using System.Runtime.InteropServices;
6 |
7 | #endregion
8 |
9 | // General Information about an assembly is controlled through the following
10 | // set of attributes. Change these attribute values to modify the information
11 | // associated with an assembly.
12 | [assembly: AssemblyTitle("test")]
13 | [assembly: AssemblyDescription("")]
14 | [assembly: AssemblyConfiguration("")]
15 | [assembly: AssemblyCompany("")]
16 | [assembly: AssemblyProduct("test")]
17 | [assembly: AssemblyCopyright("Copyright 2013")]
18 | [assembly: AssemblyTrademark("")]
19 | [assembly: AssemblyCulture("")]
20 |
21 | // This sets the default COM visibility of types in the assembly to invisible.
22 | // If you need to expose a type to COM, use [ComVisible(true)] on that type.
23 | [assembly: ComVisible(false)]
24 |
25 | // The assembly version has following format :
26 | //
27 | // Major.Minor.Build.Revision
28 | //
29 | // You can specify all the values or you can use the default the Revision and
30 | // Build Numbers by using the '*' as shown below:
31 | [assembly: AssemblyVersion("1.0.*")]
32 |
--------------------------------------------------------------------------------
/V2.0/test/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | #region Using directives
2 |
3 | using System;
4 | using System.Reflection;
5 | using System.Runtime.InteropServices;
6 |
7 | #endregion
8 |
9 | // General Information about an assembly is controlled through the following
10 | // set of attributes. Change these attribute values to modify the information
11 | // associated with an assembly.
12 | [assembly: AssemblyTitle("test")]
13 | [assembly: AssemblyDescription("")]
14 | [assembly: AssemblyConfiguration("")]
15 | [assembly: AssemblyCompany("")]
16 | [assembly: AssemblyProduct("test")]
17 | [assembly: AssemblyCopyright("Copyright 2013")]
18 | [assembly: AssemblyTrademark("")]
19 | [assembly: AssemblyCulture("")]
20 |
21 | // This sets the default COM visibility of types in the assembly to invisible.
22 | // If you need to expose a type to COM, use [ComVisible(true)] on that type.
23 | [assembly: ComVisible(false)]
24 |
25 | // The assembly version has following format :
26 | //
27 | // Major.Minor.Build.Revision
28 | //
29 | // You can specify all the values or you can use the default the Revision and
30 | // Build Numbers by using the '*' as shown below:
31 | [assembly: AssemblyVersion("1.0.*")]
32 |
--------------------------------------------------------------------------------
/V1.0/mailinblue/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | #region Using directives
2 |
3 | using System;
4 | using System.Reflection;
5 | using System.Runtime.InteropServices;
6 |
7 | #endregion
8 |
9 | // General Information about an assembly is controlled through the following
10 | // set of attributes. Change these attribute values to modify the information
11 | // associated with an assembly.
12 | [assembly: AssemblyTitle("mailinblue")]
13 | [assembly: AssemblyDescription("")]
14 | [assembly: AssemblyConfiguration("")]
15 | [assembly: AssemblyCompany("")]
16 | [assembly: AssemblyProduct("mailinblue")]
17 | [assembly: AssemblyCopyright("Copyright 2013")]
18 | [assembly: AssemblyTrademark("")]
19 | [assembly: AssemblyCulture("")]
20 |
21 | // This sets the default COM visibility of types in the assembly to invisible.
22 | // If you need to expose a type to COM, use [ComVisible(true)] on that type.
23 | [assembly: ComVisible(false)]
24 |
25 | // The assembly version has following format :
26 | //
27 | // Major.Minor.Build.Revision
28 | //
29 | // You can specify all the values or you can use the default the Revision and
30 | // Build Numbers by using the '*' as shown below:
31 | [assembly: AssemblyVersion("1.0.*")]
32 |
--------------------------------------------------------------------------------
/V2.0/mailinblue/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | #region Using directives
2 |
3 | using System;
4 | using System.Reflection;
5 | using System.Runtime.InteropServices;
6 |
7 | #endregion
8 |
9 | // General Information about an assembly is controlled through the following
10 | // set of attributes. Change these attribute values to modify the information
11 | // associated with an assembly.
12 | [assembly: AssemblyTitle("mailinblue")]
13 | [assembly: AssemblyDescription("")]
14 | [assembly: AssemblyConfiguration("")]
15 | [assembly: AssemblyCompany("")]
16 | [assembly: AssemblyProduct("mailinblue")]
17 | [assembly: AssemblyCopyright("Copyright 2013")]
18 | [assembly: AssemblyTrademark("")]
19 | [assembly: AssemblyCulture("")]
20 |
21 | // This sets the default COM visibility of types in the assembly to invisible.
22 | // If you need to expose a type to COM, use [ComVisible(true)] on that type.
23 | [assembly: ComVisible(false)]
24 |
25 | // The assembly version has following format :
26 | //
27 | // Major.Minor.Build.Revision
28 | //
29 | // You can specify all the values or you can use the default the Revision and
30 | // Build Numbers by using the '*' as shown below:
31 | [assembly: AssemblyVersion("1.0.*")]
32 |
--------------------------------------------------------------------------------
/V2.0/mailinblue.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | # SharpDevelop 4.3
5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mailinblue", "mailinblue\mailinblue.csproj", "{6E918CDB-2EDD-481A-A1E2-82ABA20F71EB}"
6 | EndProject
7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test\test.csproj", "{11F50CD3-3B06-4517-9C88-2FB05D568ED1}"
8 | EndProject
9 | Global
10 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
11 | Debug|Any CPU = Debug|Any CPU
12 | Release|Any CPU = Release|Any CPU
13 | EndGlobalSection
14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
15 | {6E918CDB-2EDD-481A-A1E2-82ABA20F71EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {6E918CDB-2EDD-481A-A1E2-82ABA20F71EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {6E918CDB-2EDD-481A-A1E2-82ABA20F71EB}.Release|Any CPU.Build.0 = Release|Any CPU
18 | {6E918CDB-2EDD-481A-A1E2-82ABA20F71EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {11F50CD3-3B06-4517-9C88-2FB05D568ED1}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {11F50CD3-3B06-4517-9C88-2FB05D568ED1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {11F50CD3-3B06-4517-9C88-2FB05D568ED1}.Release|Any CPU.Build.0 = Release|Any CPU
22 | {11F50CD3-3B06-4517-9C88-2FB05D568ED1}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | EndGlobalSection
24 | EndGlobal
25 |
--------------------------------------------------------------------------------
/V1.0/mailinblue.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 2010
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "mailinblue", "mailinblue\mailinblue.csproj", "{6E918CDB-2EDD-481A-A1E2-82ABA20F71EB}"
5 | EndProject
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test\test.csproj", "{11F50CD3-3B06-4517-9C88-2FB05D568ED1}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {6E918CDB-2EDD-481A-A1E2-82ABA20F71EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {6E918CDB-2EDD-481A-A1E2-82ABA20F71EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {6E918CDB-2EDD-481A-A1E2-82ABA20F71EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {6E918CDB-2EDD-481A-A1E2-82ABA20F71EB}.Release|Any CPU.Build.0 = Release|Any CPU
18 | {11F50CD3-3B06-4517-9C88-2FB05D568ED1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
19 | {11F50CD3-3B06-4517-9C88-2FB05D568ED1}.Debug|Any CPU.Build.0 = Debug|Any CPU
20 | {11F50CD3-3B06-4517-9C88-2FB05D568ED1}.Release|Any CPU.ActiveCfg = Release|Any CPU
21 | {11F50CD3-3B06-4517-9C88-2FB05D568ED1}.Release|Any CPU.Build.0 = Release|Any CPU
22 | EndGlobalSection
23 | GlobalSection(SolutionProperties) = preSolution
24 | HideSolutionNode = FALSE
25 | EndGlobalSection
26 | EndGlobal
27 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SendinBlue C# Library
2 |
3 | This is the SendinBlue C# library. It implements the various exposed APIs that you can read more about on https://apidocs.sendinblue.com.
4 |
5 | SendinBlue API's use HTTP Authentication through an api key. You can create your api key from [API Console](https://my.sendinblue.com/advanced/apikey), after you sign up for an account with SendinBlue. You must use latest version 2.0, access key, for accessing APIs.
6 |
7 |
8 | ## Quickstart Guide
9 |
10 | Learn how to send email campaigns from your application using SendinBlue API.
11 |
12 | You must sign up for SendinBlue account for using APIs. All our APIs require HTTP authentication using access key, which are accessible from your [API Console](https://my.sendinblue.com/advanced/apikey).
13 |
14 | The following guides give you a start and understanding of how to use our API.
15 |
16 | * [Get all your campaigns](https://apidocs.sendinblue.com/how-to-get-all-you-campaigns/)
17 | * [Send transactional emails](https://apidocs.sendinblue.com/tutorial-sending-transactional-email/)
18 | * [Setup your webhooks](https://apidocs.sendinblue.com/how-to-setup-webhooks/)
19 |
20 |
21 | ## Support and Feedback
22 |
23 | Be sure to visit the SendinBlue official [documentation website](https://apidocs.sendinblue.com) for additional information about our API.
24 |
25 | If you find a bug, please submit the issue in [Github directly](https://github.com/mailin-api/mailin-api-csharp/issues).
26 |
27 | As always, if you need additional assistance, drop us a note [here](https://apidocs.sendinblue.com/support/).
--------------------------------------------------------------------------------
/V1.0/test/test.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {11F50CD3-3B06-4517-9C88-2FB05D568ED1}
5 | Debug
6 | AnyCPU
7 | Exe
8 | test
9 | test
10 | v4.0
11 |
12 |
13 | Properties
14 |
15 |
16 | x86
17 |
18 |
19 | bin\Debug\
20 | True
21 | Full
22 | False
23 | True
24 | DEBUG;TRACE
25 |
26 |
27 | bin\Release\
28 | False
29 | None
30 | True
31 | False
32 | TRACE
33 |
34 |
35 |
36 | ..\mailinblue\bin\Debug\mailinblue.dll
37 |
38 |
39 |
40 |
41 | 3.5
42 |
43 |
44 |
45 | 3.5
46 |
47 |
48 |
49 | 3.5
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/V1.0/test/obj/Debug/test.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\bin\Debug\test.exe
2 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\bin\Debug\test.pdb
3 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\bin\Debug\mailinblue.dll
4 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\bin\Debug\Newtonsoft.Json.dll
5 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\bin\Debug\mailinblue.pdb
6 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\obj\Debug\ResolveAssemblyReference.cache
7 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\obj\Debug\test.exe
8 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\obj\Debug\test.pdb
9 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\bin\Debug\test.exe
10 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\bin\Debug\test.pdb
11 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\bin\Debug\mailinblue.dll
12 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\bin\Debug\Newtonsoft.Json.dll
13 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\bin\Debug\mailinblue.pdb
14 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\obj\Debug\ResolveAssemblyReference.cache
15 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\obj\Debug\test.exe
16 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\obj\Debug\test.pdb
17 | C:\mailin-api-csharp\test\bin\Debug\test.exe
18 | C:\mailin-api-csharp\test\bin\Debug\test.pdb
19 | C:\mailin-api-csharp\test\bin\Debug\Newtonsoft.Json.dll
20 | C:\mailin-api-csharp\test\bin\Debug\mailinblue.pdb
21 | C:\mailin-api-csharp\test\obj\Debug\ResolveAssemblyReference.cache
22 | C:\mailin-api-csharp\test\obj\Debug\test.exe
23 | C:\mailin-api-csharp\test\obj\Debug\test.pdb
24 | C:\mailin-api-csharp\V1.0\test\bin\Debug\test.exe
25 | C:\mailin-api-csharp\V1.0\test\bin\Debug\test.pdb
26 | C:\mailin-api-csharp\V1.0\test\bin\Debug\Newtonsoft.Json.dll
27 | C:\mailin-api-csharp\V1.0\test\bin\Debug\mailinblue.pdb
28 | C:\mailin-api-csharp\V1.0\test\obj\Debug\ResolveAssemblyReference.cache
29 | C:\mailin-api-csharp\V1.0\test\obj\Debug\test.exe
30 | C:\mailin-api-csharp\V1.0\test\obj\Debug\test.pdb
31 | D:\mailin-api-csharp\V1.0\test\bin\Debug\test.exe.config
32 | D:\mailin-api-csharp\V1.0\test\bin\Debug\test.exe
33 | D:\mailin-api-csharp\V1.0\test\bin\Debug\test.pdb
34 | D:\mailin-api-csharp\V1.0\test\bin\Debug\mailinblue.dll
35 | D:\mailin-api-csharp\V1.0\test\bin\Debug\Newtonsoft.Json.dll
36 | D:\mailin-api-csharp\V1.0\test\bin\Debug\mailinblue.pdb
37 | D:\mailin-api-csharp\V1.0\test\obj\Debug\ResolveAssemblyReference.cache
38 | D:\mailin-api-csharp\V1.0\test\obj\Debug\test.exe
39 | D:\mailin-api-csharp\V1.0\test\obj\Debug\test.pdb
40 |
--------------------------------------------------------------------------------
/V2.0/test/test.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {11F50CD3-3B06-4517-9C88-2FB05D568ED1}
5 | Debug
6 | AnyCPU
7 | Exe
8 | test
9 | test
10 | v4.0
11 |
12 |
13 | Properties
14 |
15 |
16 | x86
17 |
18 |
19 | bin\Debug\
20 | True
21 | Full
22 | False
23 | True
24 | DEBUG;TRACE
25 |
26 |
27 | bin\Release\
28 | False
29 | None
30 | True
31 | False
32 | TRACE
33 |
34 |
35 |
36 | False
37 | ..\mailinblue\bin\Debug\mailinblue.dll
38 |
39 |
40 |
41 |
42 | 3.5
43 |
44 |
45 |
46 | 3.5
47 |
48 |
49 |
50 | 3.5
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
--------------------------------------------------------------------------------
/V1.0/mailinblue/mailinblue.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {6E918CDB-2EDD-481A-A1E2-82ABA20F71EB}
5 | Debug
6 | AnyCPU
7 | Library
8 | mailinblue
9 | mailinblue
10 | v4.0
11 |
12 |
13 | Properties
14 | False
15 |
16 |
17 | x86
18 |
19 |
20 | bin\Debug\
21 | True
22 | Full
23 | False
24 | True
25 | DEBUG;TRACE
26 |
27 |
28 | bin\Release\
29 | False
30 | None
31 | True
32 | False
33 | TRACE
34 |
35 |
36 |
37 |
38 | ..\Newtonsoft.Json.dll
39 |
40 |
41 |
42 | 3.5
43 |
44 |
45 |
46 | 3.5
47 |
48 |
49 |
50 |
51 | 3.5
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/V2.0/mailinblue/mailinblue.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {6E918CDB-2EDD-481A-A1E2-82ABA20F71EB}
5 | Debug
6 | AnyCPU
7 | Library
8 | mailinblue
9 | mailinblue
10 | v4.0
11 |
12 |
13 | Properties
14 | False
15 |
16 |
17 | x86
18 |
19 |
20 | bin\Debug\
21 | True
22 | Full
23 | False
24 | True
25 | DEBUG;TRACE
26 |
27 |
28 | bin\Release\
29 | False
30 | None
31 | True
32 | False
33 | TRACE
34 |
35 |
36 |
37 |
38 | ..\Newtonsoft.Json.dll
39 |
40 |
41 |
42 | 3.5
43 |
44 |
45 |
46 | 3.5
47 |
48 |
49 |
50 |
51 | 3.5
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/V2.0/test/obj/Debug/test.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\bin\Debug\test.exe
2 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\bin\Debug\test.pdb
3 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\bin\Debug\mailinblue.dll
4 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\bin\Debug\Newtonsoft.Json.dll
5 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\bin\Debug\mailinblue.pdb
6 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\obj\Debug\ResolveAssemblyReference.cache
7 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\obj\Debug\test.exe
8 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\test\obj\Debug\test.pdb
9 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\bin\Debug\test.exe
10 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\bin\Debug\test.pdb
11 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\bin\Debug\mailinblue.dll
12 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\bin\Debug\Newtonsoft.Json.dll
13 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\bin\Debug\mailinblue.pdb
14 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\obj\Debug\ResolveAssemblyReference.cache
15 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\obj\Debug\test.exe
16 | C:\Users\swati.singh\Desktop\mailin-api-csharp\test\obj\Debug\test.pdb
17 | C:\mailin-api-csharp\test\bin\Debug\test.exe
18 | C:\mailin-api-csharp\test\bin\Debug\test.pdb
19 | C:\mailin-api-csharp\test\bin\Debug\Newtonsoft.Json.dll
20 | C:\mailin-api-csharp\test\bin\Debug\mailinblue.pdb
21 | C:\mailin-api-csharp\test\obj\Debug\ResolveAssemblyReference.cache
22 | C:\mailin-api-csharp\test\obj\Debug\test.exe
23 | C:\mailin-api-csharp\test\obj\Debug\test.pdb
24 | C:\mailin-api-csharp\V2.0\test\obj\Debug\ResolveAssemblyReference.cache
25 | C:\mailin-api-csharp\V2.0\test\bin\Debug\test.exe.config
26 | C:\mailin-api-csharp\V2.0\test\bin\Debug\test.exe
27 | C:\mailin-api-csharp\V2.0\test\bin\Debug\test.pdb
28 | C:\mailin-api-csharp\V2.0\test\bin\Debug\mailinblue.dll
29 | C:\mailin-api-csharp\V2.0\test\bin\Debug\Newtonsoft.Json.dll
30 | C:\mailin-api-csharp\V2.0\test\bin\Debug\mailinblue.pdb
31 | C:\mailin-api-csharp\V2.0\test\obj\Debug\test.exe
32 | C:\mailin-api-csharp\V2.0\test\obj\Debug\test.pdb
33 | D:\mailin-api-csharp\V2.0\test\bin\Debug\test.exe.config
34 | D:\mailin-api-csharp\V2.0\test\bin\Debug\test.exe
35 | D:\mailin-api-csharp\V2.0\test\bin\Debug\test.pdb
36 | D:\mailin-api-csharp\V2.0\test\bin\Debug\mailinblue.dll
37 | D:\mailin-api-csharp\V2.0\test\bin\Debug\Newtonsoft.Json.dll
38 | D:\mailin-api-csharp\V2.0\test\bin\Debug\mailinblue.pdb
39 | D:\mailin-api-csharp\V2.0\test\obj\Debug\ResolveAssemblyReference.cache
40 | D:\mailin-api-csharp\V2.0\test\obj\Debug\test.exe
41 | D:\mailin-api-csharp\V2.0\test\obj\Debug\test.pdb
42 |
--------------------------------------------------------------------------------
/V1.0/mailinblue/obj/Debug/mailinblue.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\mailinblue\bin\Debug\mailinblue.dll
2 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\mailinblue\bin\Debug\mailinblue.pdb
3 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\mailinblue\bin\Debug\Newtonsoft.Json.dll
4 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\mailinblue\obj\Debug\ResolveAssemblyReference.cache
5 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\mailinblue\obj\Debug\mailinblue.dll
6 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\mailinblue\obj\Debug\mailinblue.pdb
7 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master\mailin-api-csharp-master\mailinblue\bin\Debug\mailinblue.dll
8 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master\mailin-api-csharp-master\mailinblue\bin\Debug\mailinblue.pdb
9 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master\mailin-api-csharp-master\mailinblue\bin\Debug\Newtonsoft.Json.dll
10 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master\mailin-api-csharp-master\mailinblue\obj\Debug\ResolveAssemblyReference.cache
11 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master\mailin-api-csharp-master\mailinblue\obj\Debug\mailinblue.dll
12 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master\mailin-api-csharp-master\mailinblue\obj\Debug\mailinblue.pdb
13 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master (1)\mailin-api-csharp-master\mailinblue\bin\Debug\mailinblue.dll
14 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master (1)\mailin-api-csharp-master\mailinblue\bin\Debug\mailinblue.pdb
15 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master (1)\mailin-api-csharp-master\mailinblue\bin\Debug\Newtonsoft.Json.dll
16 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master (1)\mailin-api-csharp-master\mailinblue\obj\Debug\ResolveAssemblyReference.cache
17 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master (1)\mailin-api-csharp-master\mailinblue\obj\Debug\mailinblue.dll
18 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master (1)\mailin-api-csharp-master\mailinblue\obj\Debug\mailinblue.pdb
19 | C:\Users\Sandeep\mailin-api-csharp\mailinblue\bin\Debug\mailinblue.dll
20 | C:\Users\Sandeep\mailin-api-csharp\mailinblue\bin\Debug\mailinblue.pdb
21 | C:\Users\Sandeep\mailin-api-csharp\mailinblue\bin\Debug\Newtonsoft.Json.dll
22 | C:\Users\Sandeep\mailin-api-csharp\mailinblue\obj\Debug\ResolveAssemblyReference.cache
23 | C:\Users\Sandeep\mailin-api-csharp\mailinblue\obj\Debug\mailinblue.dll
24 | C:\Users\Sandeep\mailin-api-csharp\mailinblue\obj\Debug\mailinblue.pdb
25 | C:\Users\swati.singh\Desktop\mailin-api-csharp\mailinblue\bin\Debug\mailinblue.dll
26 | C:\Users\swati.singh\Desktop\mailin-api-csharp\mailinblue\bin\Debug\mailinblue.pdb
27 | C:\Users\swati.singh\Desktop\mailin-api-csharp\mailinblue\bin\Debug\Newtonsoft.Json.dll
28 | C:\Users\swati.singh\Desktop\mailin-api-csharp\mailinblue\obj\Debug\ResolveAssemblyReference.cache
29 | C:\Users\swati.singh\Desktop\mailin-api-csharp\mailinblue\obj\Debug\mailinblue.dll
30 | C:\Users\swati.singh\Desktop\mailin-api-csharp\mailinblue\obj\Debug\mailinblue.pdb
31 | C:\mailin-api-csharp\mailinblue\bin\Debug\mailinblue.dll
32 | C:\mailin-api-csharp\mailinblue\bin\Debug\mailinblue.pdb
33 | C:\mailin-api-csharp\mailinblue\bin\Debug\Newtonsoft.Json.dll
34 | C:\mailin-api-csharp\mailinblue\obj\Debug\ResolveAssemblyReference.cache
35 | C:\mailin-api-csharp\mailinblue\obj\Debug\mailinblue.dll
36 | C:\mailin-api-csharp\mailinblue\obj\Debug\mailinblue.pdb
37 | C:\mailin-api-csharp\V1.0\mailinblue\bin\Debug\mailinblue.dll
38 | C:\mailin-api-csharp\V1.0\mailinblue\bin\Debug\mailinblue.pdb
39 | C:\mailin-api-csharp\V1.0\mailinblue\bin\Debug\Newtonsoft.Json.dll
40 | C:\mailin-api-csharp\V1.0\mailinblue\obj\Debug\ResolveAssemblyReference.cache
41 | C:\mailin-api-csharp\V1.0\mailinblue\obj\Debug\mailinblue.dll
42 | C:\mailin-api-csharp\V1.0\mailinblue\obj\Debug\mailinblue.pdb
43 | D:\mailin-api-csharp\V1.0\mailinblue\bin\Debug\mailinblue.dll
44 | D:\mailin-api-csharp\V1.0\mailinblue\bin\Debug\mailinblue.pdb
45 | D:\mailin-api-csharp\V1.0\mailinblue\bin\Debug\Newtonsoft.Json.dll
46 | D:\mailin-api-csharp\V1.0\mailinblue\obj\Debug\ResolveAssemblyReference.cache
47 | D:\mailin-api-csharp\V1.0\mailinblue\obj\Debug\mailinblue.dll
48 | D:\mailin-api-csharp\V1.0\mailinblue\obj\Debug\mailinblue.pdb
49 |
--------------------------------------------------------------------------------
/V2.0/mailinblue/obj/Debug/mailinblue.csproj.FileListAbsolute.txt:
--------------------------------------------------------------------------------
1 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\mailinblue\bin\Debug\mailinblue.dll
2 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\mailinblue\bin\Debug\mailinblue.pdb
3 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\mailinblue\bin\Debug\Newtonsoft.Json.dll
4 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\mailinblue\obj\Debug\ResolveAssemblyReference.cache
5 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\mailinblue\obj\Debug\mailinblue.dll
6 | C:\Users\Samsung\Documents\SharpDevelop Projects\mailinblue\mailinblue\obj\Debug\mailinblue.pdb
7 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master\mailin-api-csharp-master\mailinblue\bin\Debug\mailinblue.dll
8 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master\mailin-api-csharp-master\mailinblue\bin\Debug\mailinblue.pdb
9 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master\mailin-api-csharp-master\mailinblue\bin\Debug\Newtonsoft.Json.dll
10 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master\mailin-api-csharp-master\mailinblue\obj\Debug\ResolveAssemblyReference.cache
11 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master\mailin-api-csharp-master\mailinblue\obj\Debug\mailinblue.dll
12 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master\mailin-api-csharp-master\mailinblue\obj\Debug\mailinblue.pdb
13 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master (1)\mailin-api-csharp-master\mailinblue\bin\Debug\mailinblue.dll
14 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master (1)\mailin-api-csharp-master\mailinblue\bin\Debug\mailinblue.pdb
15 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master (1)\mailin-api-csharp-master\mailinblue\bin\Debug\Newtonsoft.Json.dll
16 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master (1)\mailin-api-csharp-master\mailinblue\obj\Debug\ResolveAssemblyReference.cache
17 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master (1)\mailin-api-csharp-master\mailinblue\obj\Debug\mailinblue.dll
18 | C:\Users\Sandeep\Downloads\mailin-api-csharp-master (1)\mailin-api-csharp-master\mailinblue\obj\Debug\mailinblue.pdb
19 | C:\Users\Sandeep\mailin-api-csharp\mailinblue\bin\Debug\mailinblue.dll
20 | C:\Users\Sandeep\mailin-api-csharp\mailinblue\bin\Debug\mailinblue.pdb
21 | C:\Users\Sandeep\mailin-api-csharp\mailinblue\bin\Debug\Newtonsoft.Json.dll
22 | C:\Users\Sandeep\mailin-api-csharp\mailinblue\obj\Debug\ResolveAssemblyReference.cache
23 | C:\Users\Sandeep\mailin-api-csharp\mailinblue\obj\Debug\mailinblue.dll
24 | C:\Users\Sandeep\mailin-api-csharp\mailinblue\obj\Debug\mailinblue.pdb
25 | C:\Users\swati.singh\Desktop\mailin-api-csharp\mailinblue\bin\Debug\mailinblue.dll
26 | C:\Users\swati.singh\Desktop\mailin-api-csharp\mailinblue\bin\Debug\mailinblue.pdb
27 | C:\Users\swati.singh\Desktop\mailin-api-csharp\mailinblue\bin\Debug\Newtonsoft.Json.dll
28 | C:\Users\swati.singh\Desktop\mailin-api-csharp\mailinblue\obj\Debug\ResolveAssemblyReference.cache
29 | C:\Users\swati.singh\Desktop\mailin-api-csharp\mailinblue\obj\Debug\mailinblue.dll
30 | C:\Users\swati.singh\Desktop\mailin-api-csharp\mailinblue\obj\Debug\mailinblue.pdb
31 | C:\mailin-api-csharp\mailinblue\bin\Debug\mailinblue.dll
32 | C:\mailin-api-csharp\mailinblue\bin\Debug\mailinblue.pdb
33 | C:\mailin-api-csharp\mailinblue\bin\Debug\Newtonsoft.Json.dll
34 | C:\mailin-api-csharp\mailinblue\obj\Debug\ResolveAssemblyReference.cache
35 | C:\mailin-api-csharp\mailinblue\obj\Debug\mailinblue.dll
36 | C:\mailin-api-csharp\mailinblue\obj\Debug\mailinblue.pdb
37 | C:\mailin-api-csharp\V2.0\mailinblue\bin\Debug\mailinblue.dll
38 | C:\mailin-api-csharp\V2.0\mailinblue\bin\Debug\mailinblue.pdb
39 | C:\mailin-api-csharp\V2.0\mailinblue\bin\Debug\Newtonsoft.Json.dll
40 | C:\mailin-api-csharp\V2.0\mailinblue\obj\Debug\ResolveAssemblyReference.cache
41 | C:\mailin-api-csharp\V2.0\mailinblue\obj\Debug\mailinblue.dll
42 | C:\mailin-api-csharp\V2.0\mailinblue\obj\Debug\mailinblue.pdb
43 | D:\mailin-api-csharp\V2.0\mailinblue\bin\Debug\mailinblue.dll
44 | D:\mailin-api-csharp\V2.0\mailinblue\bin\Debug\mailinblue.pdb
45 | D:\mailin-api-csharp\V2.0\mailinblue\bin\Debug\Newtonsoft.Json.dll
46 | D:\mailin-api-csharp\V2.0\mailinblue\obj\Debug\ResolveAssemblyReference.cache
47 | D:\mailin-api-csharp\V2.0\mailinblue\obj\Debug\mailinblue.dll
48 | D:\mailin-api-csharp\V2.0\mailinblue\obj\Debug\mailinblue.pdb
49 |
--------------------------------------------------------------------------------
/V2.0/README.md:
--------------------------------------------------------------------------------
1 | # Sendinblue C# Library
2 |
3 | This is the official Sendinblue C# library. It implements the various exposed APIs that you can read more about on https://apidocs.sendinblue.com.
4 |
5 | # Requirement
6 |
7 | * The primary dependency is Newtonsoft's JSON .NET library.
8 | * This is compatible with .NET 4.0 and above due to the usage of dynamic objects.
9 |
10 | ## About the setup
11 |
12 | * The SendinBlue project is the core wrapper library.
13 | * The test project is a sample C# console application that references the library and gets all campaigns.
14 | * You can explore the source code for all the calls, or well use the IDE autocomplete to explore more.
15 |
16 | ## Available functions
17 |
18 | List of API calls that you can make, you can click to read more about it. Please do note that the order of parameters are important.
19 |
20 | ### Campaign calls
21 |
22 | * [get_account](https://apidocs.sendinblue.com/account/#1)() - Get your account information
23 | * [get_smtp_details](https://apidocs.sendinblue.com/account/#7)() - Get your SMTP account information
24 | * [create_child_account](https://apidocs.sendinblue.com/account/#2)(data) - Create a Reseller child account
25 | * [update_child_account](https://apidocs.sendinblue.com/account/#3)(data) - Update a Reseller child account
26 | * [delete_child_account](https://apidocs.sendinblue.com/account/#4)(data) - Delete a Reseller child account
27 | * [get_reseller_child](https://apidocs.sendinblue.com/account/#5)(data) - Get Reseller child accounts
28 | * [add_remove_child_credits](https://apidocs.sendinblue.com/account/#6)(data) - Add/Remove Reseller child credits
29 | * [get_campaigns_v2](https://apidocs.sendinblue.com/campaign/#1)(data) - Get list of all campaigns or of specific type or status or both
30 | * [get_campaign_v2](https://apidocs.sendinblue.com/campaign/#1)(data) - Get specific campaign object
31 | * [create_campaign](https://apidocs.sendinblue.com/campaign/#2)(data) - Create a campaign
32 | * [delete_campaign](https://apidocs.sendinblue.com/campaign/#3)(data) - Delete a campaign
33 | * [update_campaign](https://apidocs.sendinblue.com/campaign/#4)(data) - Update campaign information
34 | * [campaign_report_email](https://apidocs.sendinblue.com/campaign/#5)(data) - Sending reports to specific emails
35 | * [campaign_recipients_export](https://apidocs.sendinblue.com/campaign/#6)(data) - Export recipients of a campaign
36 | * [send_bat_email](https://apidocs.sendinblue.com/campaign/#7)(data) - Send a test Email (bat)
37 | * [create_trigger_campaign](https://apidocs.sendinblue.com/campaign/#8)(data) - Create a trigger campaign
38 | * [update_trigger_campaign](https://apidocs.sendinblue.com/campaign/#9)(data) - Update trigger campaign information
39 | * [share_campaign](https://apidocs.sendinblue.com/campaign/#10)(data) - Get campaign share link
40 | * [update_campaign_status](https://apidocs.sendinblue.com/campaign/#11)(data) - Modify a campaign status
41 | * [get_folders](https://apidocs.sendinblue.com/folder/#1)(data) - Get list of all the folder details.
42 | * [get_folder](https://apidocs.sendinblue.com/folder/#2)(data) - Get all the folder details for folder with id
43 | * [create_folder](https://apidocs.sendinblue.com/folder/#3)(data) - Create a folder
44 | * [delete_folder](https://apidocs.sendinblue.com/folder/#4)(data) - Delete folder with folder id
45 | * [update_folder](https://apidocs.sendinblue.com/folder/#5)(data) - Update folder with folder id
46 | * [get_lists](https://apidocs.sendinblue.com/list/#1)(data) - Get all the lists
47 | * [get_list](https://apidocs.sendinblue.com/list/#2)(data) - Get information about a list
48 | * [create_list](https://apidocs.sendinblue.com/list/#3)(data) - Create a list
49 | * [delete_list](https://apidocs.sendinblue.com/list/#4)(data) - Delete a list
50 | * [update_list](https://apidocs.sendinblue.com/list/#5)(data) - Updating a list
51 | * [display_list_users](https://apidocs.sendinblue.com/list/#8)(data) - Display details of all users for the given lists
52 | * [add_users_list](https://apidocs.sendinblue.com/list/#6)(data) - Add users to a list
53 | * [delete_users_list](https://apidocs.sendinblue.com/list/#7)(data) - Delete users from a list
54 | * [get_attributes](https://apidocs.sendinblue.com/attribute/#1)() - Listing all attributes
55 | * [get_attribute](https://apidocs.sendinblue.com/attribute/#2)(data) - Listing a certain type attributes
56 | * [create_attribute](https://apidocs.sendinblue.com/attribute/#3)(data) - Creating attributes
57 | * [delete_attribute](https://apidocs.sendinblue.com/attribute/#4)(data) - Deleting attributes of the given type
58 | * [get_user](https://apidocs.sendinblue.com/user/#2)(data) - Get information about a user/email
59 | * [create_update_user](https://apidocs.sendinblue.com/user/#1)(data) - Create/Update a user information
60 | * [delete_user](https://apidocs.sendinblue.com/user/#3)(data) - Deleting user from db is not permitted but this action will unlink him from all lists
61 | * [import_users](https://apidocs.sendinblue.com/user/#4)(data) - Import users/emails
62 | * [export_users](https://apidocs.sendinblue.com/user/#5)(data) - Export users/emails
63 | * [get_processes](https://apidocs.sendinblue.com/process/#1)(data) - Get information about all background processes
64 | * [get_process](https://apidocs.sendinblue.com/process/#2)(data) - Get information about a specific process
65 | * [get_senders](https://apidocs.sendinblue.com/sender-management/#1)(data) - Get information about all/specific senders
66 | * [create_sender](https://apidocs.sendinblue.com/sender-management/#2)(data) - Create a sender
67 | * [delete_sender](https://apidocs.sendinblue.com/sender-management/#3)(data) - Delete a sender
68 | * [update_sender](https://apidocs.sendinblue.com/sender-management/#4)(data) - Update a sender
69 |
70 | ### SMTP calls
71 |
72 | * [get_report](https://apidocs.sendinblue.com/report/)(data) - Retrieve information for all report events
73 | * [get_statistics](https://apidocs.sendinblue.com/statistics/)(data) - Get aggregate statistics about emails sent
74 | * [get_webhooks](https://apidocs.sendinblue.com/webhooks/#1)(data) - Get list of all registered webhooks or of specific type
75 | * [get_webhook](https://apidocs.sendinblue.com/webhooks/#2)(data) - Get information about a webhook
76 | * [create_webhook](https://apidocs.sendinblue.com/webhooks/#3)(data) - Registering a webhook
77 | * [delete_webhook](https://apidocs.sendinblue.com/webhooks/#5)(data) - Deleting a webhook
78 | * [update_webhook](https://apidocs.sendinblue.com/webhooks/#4)(data) - Editing a webhook
79 | * [delete_bounces](https://apidocs.sendinblue.com/bounces/)(data) - Deleting bounces
80 | * [send_email](https://apidocs.sendinblue.com/tutorial-sending-transactional-email/)(data) - Sending out a transactional email
81 | * [send_transactional_template](https://apidocs.sendinblue.com/template/)(data) - Send templates created on SendinBlue, through SendinBlue smtp.
82 | * [create_template](https://apidocs.sendinblue.com/template/#2)(data) - Create a template
83 | * [update_template](https://apidocs.sendinblue.com/template/#3)(data) - Update template information
84 |
85 | ### SMS calls
86 |
87 | * [send_sms](https://apidocs.sendinblue.com/mailin-sms/#1)(data) - Sending a SMS
88 | * [create_sms_campaign](https://apidocs.sendinblue.com/mailin-sms/#2)(data) - Create a SMS campaign
89 | * [update_sms_campaign](https://apidocs.sendinblue.com/mailin-sms/#3)(data) - Update a SMS campaign
90 | * [send_bat_sms](https://apidocs.sendinblue.com/mailin-sms/#4)(data) - Send a test SMS campaign
--------------------------------------------------------------------------------
/V1.0/README.md:
--------------------------------------------------------------------------------
1 | # Sendinblue C# Library
2 |
3 | This is the official Sendinblue C# library. It implements the various exposed APIs that you can read more about on https://apidocs.sendinblue.com.
4 |
5 | # Requirement
6 |
7 | * The primary dependency is Newtonsoft's JSON .NET library.
8 | * This is compatible with .NET 4.0 and above due to the usage of dynamic objects.
9 |
10 | ## About the setup
11 |
12 | * The SendinBlue project is the core wrapper library.
13 | * The test project is a sample C# console application that references the library and gets all campaigns.
14 | * You can explore the source code for all the calls, or well use the IDE autocomplete to explore more.
15 |
16 | ## Available functions
17 |
18 | List of API calls that you can make. Please do note that the order of parameters are important.
19 |
20 | ### Campaign calls
21 |
22 | * get_account() - Get your account information
23 | * get_smtp_details() - Get your SMTP account information
24 | * create_child_account(string email, string password, string company_org, string First_name, string Last_name, Dictionary`` credits) - Create a Reseller child account
25 | * update_child_account(string child_authkey, string company_org, string First_name, string Last_name, string password) - Update a Reseller child account
26 | * delete_child_account(string child_authkey) - Delete a Reseller child account
27 | * get_child_account(Dictionary`` child_authkey) - Get Reseller child accounts
28 | * add_remove_child_credits(String child_authkey, Dictionary`` add_credits, Dictionary`` remove_credits) - Add/Remove Reseller child credits
29 | * get_campaigns(string type, string status, int page, int page_limit) - Get list of all campaigns or of specific type or status or both
30 | * get_campaign(int id) - Get specific campaign object
31 | * create_campaign(string category, string from_name, string name, string bat_sent, string html_content, string html_url, List`` listid, string scheduled_date, string subject, string from_email, string reply_to, string to_field, List`` exclude_list, string attachmentUrl, int inline_image) - Create a campaign
32 | * delete_campaign(int id) - Delete a campaign
33 | * update_campaign(string id, string category, string from_name, string name, string bat_sent, string html_content, string html_url, List`` listid, string scheduled_date, string subject, string from_email, string reply_to, string to_field, List`` exclude_list, string attachmentUrl, int inline_image) - Update campaign information
34 | * campaign_report_email(int id, string lang, string email_subject, List`` email_to, string email_content_type, List`` email_bcc, List`` email_cc, string email_body) - Sending reports to specific emails
35 | * campaign_recipients_export(int id, string notify_url, string type) - Export recipients of a campaign
36 | * send_bat_email(int id, List`` email_to) - Send a test Email (bat)
37 | * create_trigger_campaign(string category, string from_name, string name, string bat_sent, string html_content, string html_url, List`` listid, string scheduled_date, string subject, string from_email, string reply_to, string to_field, List`` exclude_list, int recurring, string attachmentUrl, int inline_image) - Create a trigger campaign
38 | * update_trigger_campaign(int id, string category, string from_name, string name, string bat_sent, string html_content, string html_url, List`` listid, string scheduled_date, string subject, string from_email, string reply_to, string to_field, List`` exclude_list, int recurring, string attachmentUrl, int inline_image) - Update trigger campaign information
39 | * campaign_share_link(List`` campaignids) - Get campaign share link
40 | * update_campaign_status(int id, string status) - Modify a campaign status
41 | * get_folders() - Get list of all the folder details.
42 | * get_folder(int id) - Get all the folder details for folder with id ``
43 | * create_folder(string name) - Create a folder
44 | * delete_folder(int id) - Delete folder with folder id ``
45 | * update_folder(int id, string name) - Update folder with folder id ``
46 | * get_lists() - Get all the lists
47 | * get_list(int id) - Get information about a list
48 | * create_list(string list_name, int list_parent) - Create a list
49 | * delete_list(int id) - Delete a list
50 | * update_list(int id, string list_name, int list_parent) - Updating a list
51 | * display_list_users(List`` listids, int page, int page_limit) - Display details of all users for the given lists
52 | * add_users_list(int id, List`` users) - Add users to a list
53 | * delete_users_list(int id, List`` users) - Delete users from a list
54 | * get_attributes() - Listing all attributes
55 | * get_attribute(string id) - Listing a certain type attributes
56 | * create_attribute(string type, Dictionary`` data) - Creating attributes
57 | * delete_attribute(string id, List`` data) - Deleting attributes of the given type
58 | * get_user(string email) - Get information about a user/email
59 | * create_update_user(string email, Dictionary`` attributes, int blacklisted, List`` listid, List`` listid_unlink, int blacklisted_sms) - Create/Update a user information
60 | * delete_user(string email) - Deleting user from db is not permitted but this action will unlink him from all lists
61 | * import_users(string url, List`` listids, string notify_url, string name, int folder_id) - Import users/emails
62 | * export_users(string export_attrib, string filter, string notify_url) - Export users/emails
63 | * get_processes() - Get information about all background processes
64 | * get_process(int id) - Get information about a specific process
65 | * get_senders(string option) - Get information about all/specific senders
66 | * create_sender(string sender_name, string sender_email, List`` ip_domain) - Create a sender
67 | * delete_sender(int id) - Delete a sender
68 | * update_sender(int id, string sender_name, string sender_email, List`` ip_domain) - Update a sender
69 |
70 | ### SMTP calls
71 |
72 | * get_report(int limit, string start_date, string end_date, int offset, string date, int days, string email) - Retrieve information for all report events
73 | * get_statistics(int aggregate, string tag, int days, string end_date, string start_date) - Get aggregate statistics about emails sent
74 | * get_webhooks() - List registered webhooks
75 | * get_webhook(int id) - Get information about a webhook
76 | * create_webhook(string url, string description, List`` events) - Registering a webhook
77 | * delete_webhook(int id) - Deleting a webhook
78 | * update_webhook(int id, string url, string description, List`` events) - Editing a webhook
79 | * delete_bounces(string start_date, string end_date, string email) - Deleting bounces
80 | * send_email(Dictionary`` to, string subject, List`` from_name, string html, string txt, Dictionary`` cc, Dictionary`` bcc, List`` replyto, Dictionary`` attachment, Dictionary`` headers) - Sending out a transactional email
81 | * send_transactional_template(int id, string to, string cc, string bcc, Dictionary`` attr, string attachmentUrl, Dictionary`` attachment) - Send templates created on Sendinblue, through Sendinblue smtp.
82 | * create_template(string from_name, string name, string bat_sent, string html_content, string html_url, string subject, string from_email, string reply_to, string to_field, int status, int attach) - Create a template
83 | * update_template(int id, string from_name, string name, string bat_sent, string html_content, string html_url, string subject, string from_email, string reply_to, string to_field, int status, int attach) - Update template information
84 |
85 | ### SMS call
86 |
87 | * send_sms(string to, string from_name, string text, string web_url, string tag, string type) - Sending a SMS
88 | * create_sms_campaign(string camp_name, string sender, string content, string bat_sent, List`` listids, List`` exclude_list, string scheduled_date) - Create a SMS campaign
89 | * update_sms_campaign(int id, string camp_name, string sender, string content, string bat_sent, List`` listids, List`` exclude_list, string scheduled_date) - Update a SMS campaign
90 | * send_bat_sms(int id, string mobilephone) - Send a test SMS campaign
--------------------------------------------------------------------------------
/V1.0/mailinblue/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Net;
4 | using System.Security.Cryptography;
5 | using System.Text;
6 | using Newtonsoft.Json;
7 | using Newtonsoft.Json.Linq;
8 | using System.Collections.Generic;
9 | using System.Dynamic;
10 | using System.Web;
11 |
12 | namespace mailinblue
13 | {
14 | public class API
15 | {
16 | public string base_url = "https://api.sendinblue.com/v1.0/";
17 | public string accessId = "";
18 | public string secretId = "";
19 | public API(string accessId, string secretId)
20 | {
21 | this.accessId = accessId;
22 | this.secretId = secretId;
23 | }
24 | static string ByteToString(byte[] buff)
25 | {
26 | string sbinary = "";
27 | for (int i = 0; i < buff.Length; i++)
28 | sbinary += buff[i].ToString("X2"); /* hex format */
29 | return sbinary;
30 | }
31 | static byte[] GetBytes(string str)
32 | {
33 | byte[] bytes = new byte[str.Length * sizeof(char)];
34 | System.Buffer.BlockCopy(str.ToCharArray(), 0, bytes, 0, bytes.Length);
35 | return bytes;
36 | }
37 | private dynamic auth_call(string resource, string method, string content)
38 | {
39 | Stream stream = new MemoryStream();
40 | string url = base_url + resource;
41 | // Create request
42 |
43 | HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
44 | // Set method
45 | request.Method = method;
46 | WebHeaderCollection headers = (request as HttpWebRequest).Headers;
47 | string httpDate = DateTime.UtcNow.ToString("ddd, dd MMM yyyy HH:mm:ss ") + "GMT";
48 | Encoding ae = new UTF8Encoding();
49 | string content_type = "application/json";
50 | string content_md5 = "";
51 | if (!content.Equals(""))
52 | {
53 | // Need to verify MD5
54 | MD5 md5 = System.Security.Cryptography.MD5.Create();
55 | byte[] hash = md5.ComputeHash(ae.GetBytes(content));
56 | StringBuilder sb = new StringBuilder();
57 | for (int i = 0; i < hash.Length; i++)
58 | {
59 | sb.Append(hash[i].ToString("X2"));
60 | }
61 | content_md5 = sb.ToString().ToLower();
62 | }
63 | string canonicalString = method + "\n" + content_md5 + "\n" + content_type + "\n" + httpDate + "\n" + url;
64 | HMACSHA1 signature = new HMACSHA1(System.Text.Encoding.ASCII.GetBytes(secretId));
65 | signature.Initialize();
66 | // Get the actual signature
67 | byte[] moreBytes = signature.ComputeHash(ae.GetBytes(canonicalString));
68 | string encodedCanonical = Convert.ToBase64String(System.Text.Encoding.ASCII.GetBytes(ByteToString(moreBytes).ToLower()));
69 | request.ContentType = content_type;
70 | request.Headers.Add("X-mailin-date", httpDate);
71 | request.Headers.Add("Authorization", accessId + ":" + encodedCanonical);
72 |
73 | if (method == "POST" || method == "PUT") {
74 | using (System.IO.Stream s = request.GetRequestStream())
75 | {
76 | using (System.IO.StreamWriter sw = new System.IO.StreamWriter(s))
77 | sw.Write(content);
78 | }
79 | }
80 | try
81 | {
82 | HttpWebResponse response;
83 | response = request.GetResponse() as HttpWebResponse;
84 | // read the response stream and put it into a byte array
85 | stream = response.GetResponseStream() as Stream;
86 | }
87 | catch (System.Net.WebException ex)
88 | {
89 | // read the response stream If status code is other than 200 and put it into a byte array
90 | stream = ex.Response.GetResponseStream() as Stream;
91 | }
92 |
93 | byte[] buffer = new byte[32 * 1024];
94 | int nRead = 0;
95 | MemoryStream ms = new MemoryStream();
96 | do
97 | {
98 | nRead = stream.Read(buffer, 0, buffer.Length);
99 | ms.Write(buffer, 0, nRead);
100 | } while (nRead > 0);
101 | // convert read bytes into string
102 | ASCIIEncoding encoding = new ASCIIEncoding();
103 | String responseString = encoding.GetString(ms.ToArray());
104 | return JObject.Parse(responseString);
105 | }
106 | private dynamic get_request(string resource, string content)
107 | {
108 | return auth_call(resource, "GET", "");
109 | }
110 | private dynamic post_request(string resource, string content)
111 | {
112 | return auth_call(resource, "POST", content);
113 | }
114 | private dynamic delete_request(string resource, string content)
115 | {
116 | return auth_call(resource, "DELETE", "");
117 | }
118 | private dynamic put_request(string resource, string content)
119 | {
120 | return auth_call(resource, "PUT", content);
121 | }
122 | public dynamic get_account()
123 | {
124 | dynamic content = new ExpandoObject();
125 | return get_request("account", JsonConvert.SerializeObject(content));
126 | }
127 | public dynamic send_sms(string to, string from_name, string text, string web_url, string tag, string type)
128 | {
129 | dynamic content = new ExpandoObject();
130 | content.text = text; content.tag = tag; content.web_url = web_url; content.from = from_name; content.to = to; content.type = type;
131 | return post_request("sms", JsonConvert.SerializeObject(content));
132 | }
133 | public dynamic get_campaigns(string type, string status, int page, int page_limit)
134 | {
135 | dynamic content = new ExpandoObject();
136 | content.type = type; content.status = status; content.page = page; content.page_limit = page_limit;
137 | String url = "type/" + type + "/status/" + status + "/page/" + page + "/page_limit/" + page_limit;
138 | return get_request("campaign/" + url ,"");
139 | }
140 | public dynamic get_campaign(int id)
141 | {
142 | dynamic content = new ExpandoObject();
143 | return get_request("campaign/" + id, JsonConvert.SerializeObject(content));
144 | }
145 | public dynamic create_campaign(string category, string from_name, string name, string bat_sent, string html_content, string html_url, List listid, string scheduled_date, string subject, string from_email, string reply_to, string to_field, List exclude_list, string attachmentUrl, int inline_image, int send_now)
146 | {
147 | dynamic content = new ExpandoObject();
148 | content.category = category; content.from_name = from_name; content.name = name; content.bat_sent = bat_sent; content.html_content = html_content; content.html_url = html_url; content.listid = listid; content.scheduled_date = scheduled_date; content.subject = subject; content.from_email = from_email; content.reply_to = reply_to; content.to_field = to_field; content.exclude_list = exclude_list; content.attachment_url = attachmentUrl; content.inline_image = inline_image; content.send_now = send_now;
149 | return post_request("campaign", JsonConvert.SerializeObject(content));
150 | }
151 | public dynamic delete_campaign(int id)
152 | {
153 | dynamic content = new ExpandoObject();
154 | return delete_request("campaign/" + id, JsonConvert.SerializeObject(content));
155 | }
156 | public dynamic update_campaign(string id, string category, string from_name, string name, string bat_sent, string html_content, string html_url, List listid, string scheduled_date, string subject, string from_email, string reply_to, string to_field, List exclude_list, string attachmentUrl, int inline_image, int send_now)
157 | {
158 | dynamic content = new ExpandoObject();
159 | content.category = category; content.from_name = from_name; content.name = name; content.bat_sent = bat_sent; content.html_content = html_content; content.html_url = html_url; content.listid = listid; content.scheduled_date = scheduled_date; content.subject = subject; content.from_email = from_email; content.reply_to = reply_to; content.to_field = to_field; content.exclude_list = exclude_list; content.attachment_url = attachmentUrl; content.inline_image = inline_image; content.send_now = send_now;
160 | return put_request("campaign/" + id, JsonConvert.SerializeObject(content));
161 | }
162 | public dynamic campaign_report_email(int id, string lang, string email_subject, List email_to, string email_content_type, List email_bcc, List email_cc, string email_body)
163 | {
164 | dynamic content = new ExpandoObject();
165 | content.lang = lang; content.email_subject = email_subject; content.email_to = email_to; content.email_content_type = email_content_type; content.email_bcc = email_bcc; content.email_cc = email_cc; content.email_body = email_body;
166 | return post_request("campaign/" + id + "/report", JsonConvert.SerializeObject(content));
167 | }
168 | public dynamic campaign_recipients_export(int id, string notify_url, string type)
169 | {
170 | dynamic content = new ExpandoObject();
171 | content.notify_url = notify_url; content.type = type;
172 | return post_request("campaign/" + id + "/recipients", JsonConvert.SerializeObject(content));
173 | }
174 | public dynamic get_processes()
175 | {
176 | dynamic content = new ExpandoObject();
177 | return get_request("process", JsonConvert.SerializeObject(content));
178 | }
179 | public dynamic get_process(int id)
180 | {
181 | dynamic content = new ExpandoObject();
182 | return get_request("process/" + id, JsonConvert.SerializeObject(content));
183 | }
184 | public dynamic get_lists()
185 | {
186 | dynamic content = new ExpandoObject();
187 | return get_request("list", JsonConvert.SerializeObject(content));
188 | }
189 | public dynamic get_list(int id)
190 | {
191 | dynamic content = new ExpandoObject();
192 | return get_request("list/" + id, JsonConvert.SerializeObject(content));
193 | }
194 | public dynamic create_list(string list_name, int list_parent)
195 | {
196 | dynamic content = new ExpandoObject();
197 | content.list_name = list_name; content.list_parent = list_parent;
198 | return post_request("list", JsonConvert.SerializeObject(content));
199 | }
200 | public dynamic delete_list(int id)
201 | {
202 | dynamic content = new ExpandoObject();
203 | return delete_request("list/" + id, JsonConvert.SerializeObject(content));
204 | }
205 | public dynamic update_list(int id, string list_name, int list_parent)
206 | {
207 | dynamic content = new ExpandoObject();
208 | content.list_name = list_name; content.list_parent = list_parent;
209 | return put_request("list/" + id, JsonConvert.SerializeObject(content));
210 | }
211 | public dynamic display_list_users(List listids, int page, int page_limit)
212 | {
213 | dynamic content = new ExpandoObject();
214 | content.listids = listids; content.page = page; content.page_limit = page_limit;
215 | return put_request("list/display", JsonConvert.SerializeObject(content));
216 | }
217 | public dynamic add_users_list(int id, List users)
218 | {
219 | dynamic content = new ExpandoObject();
220 | content.users = users;
221 | return post_request("list/" + id + "/users", JsonConvert.SerializeObject(content));
222 | }
223 | public dynamic delete_users_list(int id, List users)
224 | {
225 | dynamic content = new ExpandoObject();
226 | content.users = users;
227 | return put_request("list/" + id + "/delusers", JsonConvert.SerializeObject(content));
228 | }
229 |
230 | public dynamic send_email(Dictionary to, string subject, List from_name, string html, string txt, Dictionary cc, Dictionary bcc, List replyto, Dictionary attachment, Dictionary headers)
231 | {
232 | dynamic content = new ExpandoObject();
233 | content.cc = cc; content.text = txt; content.bcc = bcc; content.replyto = replyto; content.html = html; content.to = to; content.attachment = attachment; content.from = from_name; content.subject = subject; content.headers = headers;
234 | return post_request("email", JsonConvert.SerializeObject(content));
235 | }
236 | public dynamic get_webhooks()
237 | {
238 | dynamic content = new ExpandoObject();
239 | return get_request("webhook", JsonConvert.SerializeObject(content));
240 | }
241 | public dynamic get_webhook(int id)
242 | {
243 | dynamic content = new ExpandoObject();
244 | return get_request("webhook/" + id, JsonConvert.SerializeObject(content));
245 | }
246 | public dynamic create_webhook(string url, string description, List events)
247 | {
248 | dynamic content = new ExpandoObject();
249 | content.url = url; content.description = description; content.events = events;
250 | return post_request("webhook", JsonConvert.SerializeObject(content));
251 | }
252 | public dynamic delete_webhook(int id)
253 | {
254 | dynamic content = new ExpandoObject();
255 | return delete_request("webhook/" + id, JsonConvert.SerializeObject(content));
256 | }
257 | public dynamic update_webhook(int id, string url, string description, List events)
258 | {
259 | dynamic content = new ExpandoObject();
260 | content.url = url; content.description = description; content.events = events;
261 | return put_request("webhook/" + id, JsonConvert.SerializeObject(content));
262 | }
263 | public dynamic get_statistics(int aggregate, string tag, int days, string end_date, string start_date)
264 | {
265 | dynamic content = new ExpandoObject();
266 | content.aggregate = aggregate; content.tag = tag; content.days = days; content.end_date = end_date; content.start_date = start_date;
267 | return post_request("statistics", JsonConvert.SerializeObject(content));
268 | }
269 | public dynamic get_user(string email)
270 | {
271 | dynamic content = new ExpandoObject();
272 | return get_request("user/" + email.Trim(), JsonConvert.SerializeObject(content));
273 | }
274 | public dynamic create_user(Dictionary attributes, int blacklisted, string email, List listid)
275 | {
276 | dynamic content = new ExpandoObject();
277 | content.attributes = attributes; content.blacklisted = blacklisted; content.email = email; content.listid = listid;
278 | return post_request("user", JsonConvert.SerializeObject(content));
279 | }
280 | public dynamic delete_user(string email)
281 | {
282 | dynamic content = new ExpandoObject();
283 | return delete_request("user/" + email, JsonConvert.SerializeObject(content));
284 | }
285 | public dynamic update_user(string id, Dictionary attributes, int blacklisted, List listid, List listid_unlink)
286 | {
287 | dynamic content = new ExpandoObject();
288 | content.attributes = attributes; content.blacklisted = blacklisted; content.listid = listid; content.listid_unlink = listid_unlink;
289 | return put_request("user/" + id, JsonConvert.SerializeObject(content));
290 | }
291 |
292 | public dynamic create_update_user(string email, Dictionary attributes, int blacklisted, List listid, List listid_unlink, int blacklisted_sms)
293 | {
294 | dynamic content = new ExpandoObject();
295 | content.email = email;
296 | content.attributes = attributes;
297 | content.blacklisted = blacklisted;
298 | content.listid = listid;
299 | content.listid_unlink = listid_unlink;
300 | content.blacklisted_sms = blacklisted_sms;
301 | return put_request("user/createdituser", JsonConvert.SerializeObject(content));
302 | }
303 |
304 | public dynamic import_users(string url, List listids, string notify_url, string name, int folder_id)
305 | {
306 | dynamic content = new ExpandoObject();
307 | content.url = url; content.listids = listids; content.notify_url = notify_url; content.name = name; content.list_parent = folder_id;
308 | return post_request("user/import", JsonConvert.SerializeObject(content));
309 | }
310 | public dynamic export_users(string export_attrib, string filter, string notify_url)
311 | {
312 | dynamic content = new ExpandoObject();
313 | content.export_attrib = export_attrib; content.filter = filter; content.notify_url = notify_url;
314 | return post_request("user/export", JsonConvert.SerializeObject(content));
315 | }
316 | public dynamic get_attributes()
317 | {
318 | dynamic content = new ExpandoObject();
319 | return get_request("attribute", JsonConvert.SerializeObject(content));
320 | }
321 | public dynamic get_attribute(string id)
322 | {
323 | dynamic content = new ExpandoObject();
324 | return get_request("attribute/" + id, JsonConvert.SerializeObject(content));
325 | }
326 | public dynamic create_attribute(string type, Dictionary data)
327 | {
328 | dynamic content = new ExpandoObject();
329 | content.type = type; content.data = data;
330 | return post_request("attribute", JsonConvert.SerializeObject(content));
331 | }
332 | public dynamic delete_attribute(string id, List data)
333 | {
334 | dynamic content = new ExpandoObject();
335 | content.data = data;
336 | return post_request("attribute/" + id, JsonConvert.SerializeObject(content));
337 | }
338 | public dynamic get_report(int limit, string start_date, string end_date, int offset, string date, int days, string email, string event_name, List tags)
339 | {
340 | dynamic content = new ExpandoObject();
341 | content.limit = limit; content.start_date = start_date; content.end_date = end_date; content.offset = offset; content.date = date; content.days = days; content.email = email; content.event_name = event_name; content.tags = tags;
342 | return post_request("report", JsonConvert.SerializeObject(content));
343 | }
344 | public dynamic get_folders()
345 | {
346 | dynamic content = new ExpandoObject();
347 | return get_request("folder", JsonConvert.SerializeObject(content));
348 | }
349 | public dynamic get_folder(int id)
350 | {
351 | dynamic content = new ExpandoObject();
352 | return get_request("folder/" + id, JsonConvert.SerializeObject(content));
353 | }
354 | public dynamic create_folder(string name)
355 | {
356 | dynamic content = new ExpandoObject();
357 | content.name = name;
358 | return post_request("folder", JsonConvert.SerializeObject(content));
359 | }
360 | public dynamic delete_folder(int id)
361 | {
362 | dynamic content = new ExpandoObject();
363 | return delete_request("folder/" + id, JsonConvert.SerializeObject(content));
364 | }
365 | public dynamic update_folder(int id, string name)
366 | {
367 | dynamic content = new ExpandoObject();
368 | content.name = name;
369 | return put_request("folder/" + id, JsonConvert.SerializeObject(content));
370 | }
371 | public dynamic delete_bounces(string start_date, string end_date, string email)
372 | {
373 | dynamic content = new ExpandoObject();
374 | content.start_date = start_date; content.end_date = end_date; content.email = email;
375 | return post_request("bounces", JsonConvert.SerializeObject(content));
376 | }
377 | public dynamic send_transactional_template(int id, string to, string cc, string bcc, Dictionary attr, string attachmentUrl, Dictionary attachment)
378 | {
379 | dynamic content = new ExpandoObject();
380 | content.to = to; content.cc = cc; content.bcc = bcc; content.attr = attr; content.attachment_url = attachmentUrl; content.attachment = attachment;
381 | return put_request("template/" + id, JsonConvert.SerializeObject(content));
382 | }
383 | public dynamic campaign_share_link(List campaignids)
384 | {
385 | dynamic content = new ExpandoObject();
386 | content.camp_ids = campaignids;
387 | return post_request("campaign/sharelink", JsonConvert.SerializeObject(content));
388 | }
389 | public dynamic get_child_account(Dictionary child_authkey)
390 | {
391 | dynamic content = new ExpandoObject();
392 | content.auth_key = JsonConvert.SerializeObject(child_authkey);
393 | return post_request("account/getchild", JsonConvert.SerializeObject(content));
394 | }
395 | public dynamic add_remove_child_credits(String child_authkey, Dictionary add_credits, Dictionary remove_credits)
396 | {
397 | dynamic content = new ExpandoObject();
398 | content.auth_key = child_authkey;
399 | content.add_credit = add_credits;
400 | content.rmv_credit = remove_credits;
401 | return post_request("account/addrmvcredit", JsonConvert.SerializeObject(content));
402 | }
403 | public dynamic update_child_account(string child_authkey, string company_org, string First_name, string Last_name, string password, List associate_ip, List disassociate_ip)
404 | {
405 | dynamic content = new ExpandoObject();
406 | content.auth_key = child_authkey;
407 | content.company_org = company_org;
408 | content.first_name = First_name;
409 | content.last_name = Last_name;
410 | content.password = password;
411 | content.associate_ip = associate_ip;
412 | content.disassociate_ip = disassociate_ip;
413 | return put_request("account", JsonConvert.SerializeObject(content));
414 | }
415 | public dynamic delete_child_account(string child_authkey)
416 | {
417 | dynamic content = new ExpandoObject();
418 | return delete_request("account/" + child_authkey, JsonConvert.SerializeObject(content));
419 | }
420 | public dynamic create_child_account(string email, string password, string company_org, string First_name, string Last_name, Dictionary credits, List associate_ip)
421 | {
422 | dynamic content = new ExpandoObject();
423 | content.child_email = email;
424 | content.password = password;
425 | content.company_org = company_org;
426 | content.first_name = First_name;
427 | content.last_name = Last_name;
428 | content.credits = credits;
429 | content.associate_ip = associate_ip;
430 | return post_request("account", JsonConvert.SerializeObject(content));
431 | }
432 | public dynamic create_sender(string sender_name, string sender_email, List ip_domain)
433 | {
434 | dynamic content = new ExpandoObject();
435 | content.name = sender_name;
436 | content.email = sender_email;
437 | content.ip_domain = ip_domain;
438 | return post_request("advanced", JsonConvert.SerializeObject(content));
439 | }
440 | public dynamic delete_sender(int id)
441 | {
442 | dynamic content = new ExpandoObject();
443 | return delete_request("advanced/"+id, JsonConvert.SerializeObject(content));
444 | }
445 | public dynamic update_sender(int id, string sender_name, string sender_email, List ip_domain)
446 | {
447 | dynamic content = new ExpandoObject();
448 | content.name = sender_name;
449 | content.email = sender_email;
450 | content.ip_domain = ip_domain;
451 | return put_request("advanced/" + id, JsonConvert.SerializeObject(content));
452 | }
453 | public dynamic get_senders(string option)
454 | {
455 | dynamic content = new ExpandoObject();
456 | return get_request("advanced/index/option/"+option, JsonConvert.SerializeObject(content));
457 | }
458 | public dynamic send_bat_email(int id, List email_to)
459 | {
460 | dynamic content = new ExpandoObject();
461 | content.emails = email_to;
462 | return put_request("campaign/" + id + "/test", JsonConvert.SerializeObject(content));
463 | }
464 | public dynamic send_bat_sms(int id, string mobilephone)
465 | {
466 | dynamic content = new ExpandoObject();
467 | content.to = mobilephone;
468 | String phone = HttpUtility.UrlEncode(mobilephone);
469 | return get_request("sms/" + id + "/" + phone, "");
470 |
471 | }
472 | public dynamic create_sms_campaign(string camp_name, string sender, string content, string bat_sent, List listids, List exclude_list, string scheduled_date, int send_now)
473 | {
474 | dynamic body = new ExpandoObject();
475 | body.name = camp_name; body.sender = sender; body.content = content; body.bat = bat_sent; body.listid = listids; body.exclude_list = exclude_list; body.scheduled_date = scheduled_date; body.send_now = send_now;
476 | return post_request("sms", JsonConvert.SerializeObject(body));
477 | }
478 | public dynamic update_sms_campaign(int id, string camp_name, string sender, string content, string bat_sent, List listids, List exclude_list, string scheduled_date, int send_now)
479 | {
480 | dynamic body = new ExpandoObject();
481 | body.name = camp_name; body.sender = sender; body.content = content; body.bat = bat_sent; body.listid = listids; body.exclude_list = exclude_list; body.scheduled_date = scheduled_date; body.send_now = send_now;
482 | return put_request("sms/" + id, JsonConvert.SerializeObject(body));
483 | }
484 | public dynamic create_trigger_campaign(string category, string from_name, string name, string bat_sent, string html_content, string html_url, List listid, string scheduled_date, string subject, string from_email, string reply_to, string to_field, List exclude_list, int recurring, string attachmentUrl, int inline_image, int send_now)
485 | {
486 | dynamic content = new ExpandoObject();
487 | content.category = category; content.from_name = from_name; content.trigger_name = name; content.bat_sent = bat_sent; content.html_content = html_content; content.html_url = html_url; content.listid = listid; content.scheduled_date = scheduled_date; content.subject = subject; content.from_email = from_email; content.reply_to = reply_to; content.to_field = to_field; content.exclude_list = exclude_list; content.recurring = recurring; content.attachment_url = attachmentUrl; content.inline_image = inline_image; content.send_now = send_now;
488 | return post_request("campaign", JsonConvert.SerializeObject(content));
489 | }
490 | public dynamic update_trigger_campaign(int id, string category, string from_name, string name, string bat_sent, string html_content, string html_url, List listid, string scheduled_date, string subject, string from_email, string reply_to, string to_field, List exclude_list, int recurring, string attachmentUrl, int inline_image, int send_now)
491 | {
492 | dynamic content = new ExpandoObject();
493 | content.category = category; content.from_name = from_name; content.trigger_name = name; content.bat_sent = bat_sent; content.html_content = html_content; content.html_url = html_url; content.listid = listid; content.scheduled_date = scheduled_date; content.subject = subject; content.from_email = from_email; content.reply_to = reply_to; content.to_field = to_field; content.exclude_list = exclude_list; content.recurring = recurring; content.attachment_url = attachmentUrl; content.inline_image = inline_image; content.send_now = send_now;
494 | return put_request("campaign/" + id, JsonConvert.SerializeObject(content));
495 | }
496 | public dynamic create_template(string from_name, string name, string bat_sent, string html_content, string html_url, string subject, string from_email, string reply_to, string to_field, int status, int attach)
497 | {
498 | dynamic body = new ExpandoObject();
499 | body.from_name = from_name; body.template_name = name; body.bat = bat_sent; body.html_content = html_content; body.html_url = html_url; body.subject = subject; body.from_email = from_email; body.reply_to = reply_to; body.to_field = to_field; body.status = status; body.attachment = attach;
500 | return post_request("template", JsonConvert.SerializeObject(body));
501 | }
502 | public dynamic update_template(int id, string from_name, string name, string bat_sent, string html_content, string html_url, string subject, string from_email, string reply_to, string to_field, int status, int attach)
503 | {
504 | dynamic body = new ExpandoObject();
505 | body.from_name = from_name; body.template_name = name; body.bat = bat_sent; body.html_content = html_content; body.html_url = html_url; body.subject = subject; body.from_email = from_email; body.reply_to = reply_to; body.to_field = to_field; body.status = status; body.attachment = attach;
506 | return post_request("template/" + id, JsonConvert.SerializeObject(body));
507 | }
508 | public dynamic update_campaign_status(int id, string status)
509 | {
510 | dynamic content = new ExpandoObject();
511 | content.status = status;
512 | return put_request("campaign/" + id + "/updatecampstatus", JsonConvert.SerializeObject(content));
513 | }
514 | public dynamic get_smtp_details()
515 | {
516 | dynamic content = new ExpandoObject();
517 | return get_request("account/smtpdetail", JsonConvert.SerializeObject(content));
518 | }
519 |
520 | }
521 |
522 | }
523 |
--------------------------------------------------------------------------------
/V2.0/mailinblue/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.IO;
3 | using System.Net;
4 | using System.Text;
5 | using Newtonsoft.Json;
6 | using Newtonsoft.Json.Linq;
7 | using System.Collections.Generic;
8 | using System.Dynamic;
9 | using System.Web;
10 |
11 | namespace mailinblue
12 | {
13 | public class API
14 | {
15 | public string base_url = "https://api.sendinblue.com/v2.0/";
16 | public string accessId = "";
17 | public int timeout;
18 |
19 | public API(string accessId)
20 | {
21 | this.accessId = accessId;
22 | this.timeout = 30000; //default timeout: 30 secs
23 | }
24 | public API(string accessId, int timeout)
25 | {
26 | this.accessId = accessId;
27 | this.timeout = timeout;
28 | }
29 | private dynamic auth_call(string resource, string method, string content)
30 | {
31 | Stream stream = new MemoryStream();
32 | string url = base_url + resource;
33 | string content_type = "application/json";
34 | // Create request
35 |
36 | HttpWebRequest request = WebRequest.Create(url) as HttpWebRequest;
37 | try
38 | {
39 | if (timeout != null && (timeout <= 0 || timeout > 60000)) {
40 | throw new Exception("value not allowed for timeout");
41 | }
42 | }
43 | catch (System.Net.WebException ex)
44 | {
45 | stream = ex.Response.GetResponseStream() as Stream;
46 | }
47 |
48 | // Set method
49 | request.Method = method;
50 | request.ContentType = content_type;
51 | request.Timeout = timeout;
52 | request.Headers.Add("api-key", accessId);
53 |
54 | if (method == "POST" || method == "PUT")
55 | {
56 | using (System.IO.Stream s = request.GetRequestStream())
57 | {
58 | using (System.IO.StreamWriter sw = new System.IO.StreamWriter(s))
59 | sw.Write(content);
60 | }
61 | }
62 | try
63 | {
64 | HttpWebResponse response;
65 | response = request.GetResponse() as HttpWebResponse;
66 | // read the response stream and put it into a byte array
67 | stream = response.GetResponseStream() as Stream;
68 | }
69 | catch (System.Net.WebException ex)
70 | {
71 | if(ex.Response == null){
72 | throw new Exception("Request failed");
73 | }
74 | // read the response stream If status code is other than 200 and put it into a byte array
75 | stream = ex.Response.GetResponseStream() as Stream;
76 | }
77 |
78 | byte[] buffer = new byte[32 * 1024];
79 | int nRead = 0;
80 | MemoryStream ms = new MemoryStream();
81 | do
82 | {
83 | nRead = stream.Read(buffer, 0, buffer.Length);
84 | ms.Write(buffer, 0, nRead);
85 | } while (nRead > 0);
86 | // convert read bytes into string
87 | ASCIIEncoding encoding = new ASCIIEncoding();
88 | String responseString = encoding.GetString(ms.ToArray());
89 | if (responseString == "")
90 | {
91 | throw new Exception("Unable to read response");
92 | }
93 | return JObject.Parse(responseString);
94 | }
95 | private dynamic get_request(string resource, string content)
96 | {
97 | return auth_call(resource, "GET", "");
98 | }
99 | private dynamic post_request(string resource, string content)
100 | {
101 | return auth_call(resource, "POST", content);
102 | }
103 | private dynamic delete_request(string resource, string content)
104 | {
105 | return auth_call(resource, "DELETE", "");
106 | }
107 | private dynamic put_request(string resource, string content)
108 | {
109 | return auth_call(resource, "PUT", content);
110 | }
111 |
112 | /*
113 | Get SMTP details.
114 | No input required
115 | */
116 | public dynamic get_account()
117 | {
118 | return get_request("account", "");
119 | }
120 |
121 | /*
122 | Get SMTP details.
123 | No input required
124 | */
125 | public dynamic get_smtp_details()
126 | {
127 | return get_request("account/smtpdetail", "");
128 | }
129 |
130 | /*
131 | Get Reseller child Account.
132 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
133 | @options data {String} auth_key: 16 character authorization key of Reseller child. Example : To get the details of more than one child account, use, {"key1":"abC01De2fGHI3jkL","key2":"mnO45Pq6rSTU7vWX"} [Mandatory]
134 | */
135 | public dynamic get_reseller_child(Object data)
136 | {
137 | return post_request("account/getchildv2", JsonConvert.SerializeObject(data));
138 | }
139 |
140 | /*
141 | Add/Remove Reseller child's Email/Sms credits.
142 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
143 | @options data {String} auth_key: 16 character authorization key of Reseller child to modify credits [Mandatory]
144 | @options data {Array} add_credit: Number of email & sms credits to be added. You can assign either email or sms credits, one at a time other will remain 0. [Mandatory: if rmv_credit is empty]
145 | - email_credit {Integer} number of email credits
146 | - sms_credit {Integer} Number of sms credts
147 | @options data {Array} rmv_credit: Number of email & sms credits to be removed. You can assign either email or sms credits, one at a time other will remain 0. [Mandatory: if add_credits is empty]
148 | - email_credit {Integer} number of email credits
149 | - sms_credit {Integer} Number of sms credts
150 | */
151 | public dynamic add_remove_child_credits(Object data)
152 | {
153 | return post_request("account/addrmvcredit", JsonConvert.SerializeObject(data));
154 | }
155 |
156 | /*
157 | Delete Child Account.
158 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
159 | @options data {String} auth_key: 16 character authorization key of Reseller child to be deleted [Mandatory]
160 | */
161 | public dynamic delete_child_account(Dictionary data)
162 | {
163 | String child_authkey = data["auth_key"];
164 | return delete_request("account/" + child_authkey, "");
165 | }
166 |
167 | /*
168 | Create Child Account.
169 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
170 | @options data {String} child_email: Email address of Reseller child [Mandatory]
171 | @options data {String} password: Password of Reseller child to login [Mandatory]
172 | @options data {String} company_org: Name of Reseller child’s company [Mandatory]
173 | @options data {String} first_name: First name of Reseller child [Mandatory]
174 | @options data {String} last_name: Last name of Reseller child [Mandatory]
175 | @options data {Array} credits: Number of email & sms credits respectively, which will be assigned to the Reseller child’s account [Optional]
176 | - email_credit {Integer} number of email credits
177 | - sms_credit {Integer} Number of sms credts
178 | @options data {Array} associate_ip: Associate dedicated IPs to reseller child. You can use commas to separate multiple IPs [Optional]
179 | */
180 | public dynamic create_child_account(Object data)
181 | {
182 | return post_request("account", JsonConvert.SerializeObject(data));
183 | }
184 |
185 | /*
186 | Update Child Account.
187 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
188 | @options data {String} auth_key: 16 character authorization key of Reseller child to be modified [Mandatory]
189 | @options data {String} company_org: Name of Reseller child’s company [Optional]
190 | @options data {String} first_name: First name of Reseller child [Optional]
191 | @options data {String} last_name: Last name of Reseller child [Optional]
192 | @options data {String} password: Password of Reseller child to login [Optional]
193 | @options data {Array} associate_ip: Associate dedicated IPs to reseller child. You can use commas to separate multiple IPs [Optional]
194 | @options data {Array} disassociate_ip: Disassociate dedicated IPs from reseller child. You can use commas to separate multiple IPs [Optional]
195 | */
196 | public dynamic update_child_account(Object data)
197 | {
198 | return post_request("account", JsonConvert.SerializeObject(data));
199 | }
200 |
201 | /*
202 | Get all campaigns detail.
203 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
204 | @options data {String} type: Type of campaign. Possible values – classic, trigger, sms, template ( case sensitive ) [Optional]
205 | @options data {String} status: Status of campaign. Possible values – draft, sent, archive, queued, suspended, in_process, temp_active, temp_inactive ( case sensitive ) [Optional]
206 | @options data {Integer} page: Maximum number of records per request is 500, if there are more than 500 campaigns then you can use this parameter to get next 500 results [Optional]
207 | @options data {Integer} page_limit: This should be a valid number between 1-1000. If page limit is kept empty or >1000, default is 500 [Optional]
208 | */
209 | public dynamic get_campaigns_v2(Dictionary data)
210 | {
211 | string type = data["type"].ToString(); string status = data["status"].ToString(); string page = data["page"].ToString(); string page_limit = data["page_limit"].ToString();
212 | string url = "";
213 | if (type == "" && status == "" && page == "" && page_limit == "")
214 | {
215 | url = "campaign/detailsv2/";
216 | }
217 | else
218 | {
219 | url = "campaign/detailsv2/type/" + type + "/status/" + status + "/page/" + page + "/page_limit/" + page_limit + "/";
220 | }
221 | return get_request(url, "");
222 | }
223 |
224 | /*
225 | Get a particular campaign detail.
226 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
227 | @options data {Integer} id: Unique Id of the campaign [Mandatory]
228 | */
229 | public dynamic get_campaign_v2(Dictionary data)
230 | {
231 | string id = data["id"].ToString();
232 | return get_request("campaign/" + id + "/detailsv2/", "");
233 | }
234 |
235 | /*
236 | Create and Schedule your campaigns. It returns the ID of the created campaign.
237 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
238 | @options data {String} category: Tag name of the campaign [Optional]
239 | @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
240 | @options data {String} name: Name of the campaign [Mandatory]
241 | @options data {String} bat: Email address for test mail [Optional]
242 | @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
243 | @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
244 | @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
245 | @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
246 | @options data {String} subject: Subject of the campaign [Mandatory]
247 | @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
248 | @options data {String} reply_to: The reply to email in the campaign emails [Optional]
249 | @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM] To use the contact attributes here, these should already exist in SendinBlue account [Optional]
250 | @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
251 | @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
252 | @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
253 | @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
254 | @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
255 | */
256 | public dynamic create_campaign(Object data)
257 | {
258 | return post_request("campaign", JsonConvert.SerializeObject(data));
259 | }
260 |
261 | /*
262 | Delete your campaigns.
263 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
264 | @options data {Integer} id: Id of campaign to be deleted [Mandatory]
265 | */
266 | public dynamic delete_campaign(Dictionary data)
267 | {
268 | string id = data["id"].ToString();
269 | return delete_request("campaign/" + id, "");
270 | }
271 |
272 | /*
273 | Update your campaign.
274 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
275 | @options data {Integer} id: Id of campaign to be modified [Mandatory]
276 | @options data {String} category: Tag name of the campaign [Optional]
277 | @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
278 | @options data {String} name: Name of the campaign [Optional]
279 | @options data {String} bat: Email address for test mail [Optional]
280 | @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Optional]
281 | @options data {String} html_url: Url which content is the body of content [Optional]
282 | @options data {Array} listid These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
283 | @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
284 | @options data {String} subject: Subject of the campaign.
285 | @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
286 | @options data {String} reply_to: The reply to email in the campaign emails [Optional]
287 | @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
288 | @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
289 | @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
290 | @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
291 | @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
292 | @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
293 | */
294 | public dynamic update_campaign(Dictionary data)
295 | {
296 | string id = data["id"].ToString();
297 | return put_request("campaign/" + id, JsonConvert.SerializeObject(data));
298 | }
299 |
300 | /*
301 | Send report of Sent and Archived campaign.
302 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
303 | @options data {Integer} id: Id of campaign to send its report [Mandatory]
304 | @options data {String} lang: Language of email content. Possible values – fr (default), en, es, it & pt [Optional]
305 | @options data {String} email_subject: Message subject [Mandatory]
306 | @options data {Array} email_to: Email address of the recipient(s). Example: "test@example.net". You can use commas to separate multiple recipients [Mandatory]
307 | @options data {String} email_content_type: Body of the message in text/HTML version. Possible values – text & html [Mandatory]
308 | @options data {Array} email_bcc: Same as email_to but for Bcc [Optional]
309 | @options data {Array} email_cc: Same as email_to but for Cc [Optional]
310 | @options data {String} email_body: Body of the message [Mandatory]
311 | */
312 | public dynamic campaign_report_email(Dictionary data)
313 | {
314 | string id = data["id"].ToString();
315 | return post_request("campaign/" + id + "/report", JsonConvert.SerializeObject(data));
316 | }
317 |
318 | /*
319 | Export the recipients of a specified campaign.
320 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
321 | @options data {Integer} id: Id of campaign to export its recipients [Mandatory]
322 | @options data {String} notify_url: URL that will be called once the export process is finished [Mandatory]
323 | @options data {String} type: Type of recipients. Possible values – all, non_clicker, non_opener, clicker, opener, soft_bounces, hard_bounces & unsubscribes [Mandatory]
324 | */
325 | public dynamic campaign_recipients_export(Dictionary data)
326 | {
327 | string id = data["id"].ToString();
328 | return post_request("campaign/" + id + "/recipients", JsonConvert.SerializeObject(data));
329 | }
330 |
331 | /*
332 | Send a Test Campaign.
333 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
334 | @options data {Integer} id: Id of the campaign [Mandatory]
335 | @options data {Array} emails: Email address of recipient(s) existing in the one of the lists & should not be blacklisted. Example: "test@example.net". You can use commas to separate multiple recipients [Mandatory]
336 | */
337 | public dynamic send_bat_email(Dictionary data)
338 | {
339 | string id = data["id"].ToString();
340 | return put_request("campaign/" + id + "/test", JsonConvert.SerializeObject(data));
341 | }
342 |
343 | /*
344 | Create and schedule your Trigger campaigns.
345 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
346 | @options data {String} category: Tag name of the campaign [Optional]
347 | @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
348 | @options data {String} trigger_name: Name of the campaign [Mandatory]
349 | @options data {String} bat: Email address for test mail [Optional]
350 | @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
351 | @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
352 | @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
353 | @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
354 | @options data {String} subject: Subject of the campaign [Mandatory]
355 | @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
356 | @options data {String} reply_to: The reply to email in the campaign emails [Optional]
357 | @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
358 | @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
359 | @options data {Integer} recurring: Type of trigger campaign. Possible values = 0 (default) & 1. recurring = 0 means contact can receive the same Trigger campaign only once, & recurring = 1 means contact can receive the same Trigger campaign several times [Optional]
360 | @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
361 | @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
362 | @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
363 | @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
364 | */
365 | public dynamic create_trigger_campaign(Object data)
366 | {
367 | return post_request("campaign", JsonConvert.SerializeObject(data));
368 | }
369 |
370 | /*
371 | Update and schedule your Trigger campaigns.
372 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
373 | @options data {Integer} id: Id of Trigger campaign to be modified [Mandatory]
374 | @options data {String} category: Tag name of the campaign [Optional]
375 | @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
376 | @options data {String} trigger_name: Name of the campaign [Mandatory]
377 | @options data {String} bat Email address for test mail [Optional]
378 | @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
379 | @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
380 | @options data {Array} listid: These are the lists to which the campaign has been sent [Mandatory: if scheduled_date is not empty]
381 | @options data {String} scheduled_date: The day on which the campaign is supposed to run[Optional]
382 | @options data {String} subject: Subject of the campaign [Mandatory]
383 | @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients, please make sure that the sender details are defined here, and in case of no sender, you can add them also via API & for Shared IP clients, if sender exists]
384 | @options data {String} reply_to: The reply to email in the campaign emails [Optional]
385 | @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
386 | @options data {Array} exclude_list: These are the lists which must be excluded from the campaign [Optional]
387 | @options data {Integer} recurring: Type of trigger campaign. Possible values = 0 (default) & 1. recurring = 0 means contact can receive the same Trigger campaign only once, & recurring = 1 means contact can receive the same Trigger campaign several times [Optional]
388 | @options data {String} attachment_url: Provide the absolute url of the attachment [Optional]
389 | @options data {Integer} inline_image: Status of inline image. Possible values = 0 (default) & 1. inline_image = 0 means image can’t be embedded, & inline_image = 1 means image can be embedded, in the email [Optional]
390 | @options data {Integer} mirror_active: Status of mirror links in campaign. Possible values = 0 & 1 (default). mirror_active = 0 means mirror links are deactivated, & mirror_active = 1 means mirror links are activated, in the campaign [Optional]
391 | @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
392 | */
393 | public dynamic update_trigger_campaign(Dictionary data)
394 | {
395 | string id = data["id"].ToString();
396 | return put_request("campaign/" + id, JsonConvert.SerializeObject(data));
397 | }
398 |
399 | /*
400 | Get the Campaign name, subject and share link of the classic type campaigns only which are sent, for those which are not sent and the rest of campaign types like trigger, template & sms, will return an error message of share link not available.
401 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
402 | @options data {Array} camp_ids: Id of campaign to get share link. You can use commas to separate multiple ids [Mandatory]
403 | */
404 | public dynamic share_campaign(Object data)
405 | {
406 | return post_request("campaign/sharelinkv2", JsonConvert.SerializeObject(data));
407 | }
408 |
409 | /*
410 | Update the Campaign status.
411 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
412 | @options data {Integer} id: Id of campaign to update its status [Mandatory]
413 | @options data {String} status: Types of status. Possible values – suspended, archive, darchive, sent, queued, replicate and replicate_template ( case sensitive ) [Mandatory]
414 | */
415 | public dynamic update_campaign_status(Dictionary data)
416 | {
417 | string id = data["id"].ToString();
418 | return put_request("campaign/" + id + "/updatecampstatus", JsonConvert.SerializeObject(data));
419 | }
420 |
421 | /*
422 | Get all the processes information under the account.
423 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
424 | @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory]
425 | @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
426 | */
427 | public dynamic get_processes(Dictionary data)
428 | {
429 | string page = data["page"].ToString(); string page_limit = data["page_limit"].ToString();
430 | String url = "page/" + page + "/page_limit/" + page_limit;
431 | return get_request("process/index/" + url, "");
432 | }
433 |
434 | /*
435 | Get the process information.
436 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
437 | @options data {Integer} id: Id of process to get details [Mandatory]
438 | */
439 | public dynamic get_process(Dictionary data)
440 | {
441 | string id = data["id"].ToString();
442 | return get_request("process/" + id, "");
443 | }
444 |
445 | /*
446 | Get all lists detail.
447 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
448 | @options data {Integer} list_parent: This is the existing folder id & can be used to get all lists belonging to it [Optional]
449 | @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 processes then you can use this parameter to get next 50 results [Mandatory]
450 | @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
451 | */
452 | public dynamic get_lists(Dictionary data)
453 | {
454 | string list_parent = data["list_parent"].ToString(); string page = data["page"].ToString(); string page_limit = data["page_limit"].ToString();
455 | String url = "page/" + page + "/page_limit/" + page_limit + "/list_parent/" + list_parent;
456 | return get_request("list/index/" + url, "");
457 | }
458 |
459 | /*
460 | Get a particular list detail.
461 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
462 | @options data {Integer} id: Id of list to get details [Mandatory]
463 | */
464 | public dynamic get_list(Dictionary data)
465 | {
466 | string id = data["id"].ToString();
467 | return get_request("list/" + id, "");
468 | }
469 |
470 | /*
471 | Create a new list.
472 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
473 | @options data {String} list_name: Desired name of the list to be created [Mandatory]
474 | @options data {Integer} list_parent: Folder ID [Mandatory]
475 | */
476 | public dynamic create_list(Object data)
477 | {
478 | return post_request("list", JsonConvert.SerializeObject(data));
479 | }
480 |
481 | /*
482 | Delete a specific list.
483 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
484 | @options data {Integer} id: Id of list to be deleted [Mandatory]
485 | */
486 | public dynamic delete_list(Dictionary data)
487 | {
488 | string id = data["id"].ToString();
489 | return delete_request("list/" + id, "");
490 | }
491 |
492 | /*
493 | Update a list.
494 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
495 | @options data {Integer} id: Id of list to be modified [Mandatory]
496 | @options data {String} list_name: Desired name of the list to be modified [Optional]
497 | @options data {Integer} list_parent: Folder ID [Mandatory]
498 | */
499 | public dynamic update_list(Dictionary data)
500 | {
501 | string id = data["id"].ToString();
502 | return put_request("list/" + id, JsonConvert.SerializeObject(data));
503 | }
504 |
505 | /*
506 | Display details of all users for the given lists.
507 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
508 | @options data {Array} listids: These are the list ids to get their data. The ids found will display records [Mandatory]
509 | @options data {String} timestamp: This is date-time filter to fetch modified user records >= this time. Valid format Y-m-d H:i:s. Example: "2015-05-22 14:30:00" [Optional]
510 | @options data {Integer} page: Maximum number of records per request is 500, if in your list there are more than 500 users then you can use this parameter to get next 500 results [Optional]
511 | @options data {Integer} page_limit: This should be a valid number between 1-500 [Optional]
512 | */
513 | public dynamic display_list_users(Object data)
514 | {
515 | return put_request("list/display", JsonConvert.SerializeObject(data));
516 | }
517 |
518 |
519 | /*
520 | Add already existing users in the SendinBlue contacts to the list.
521 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
522 | @options data {Integer} id: Id of list to link users in it [Mandatory]
523 | @options data {Array} users: Email address of the already existing user(s) in the SendinBlue contacts. Example: "test@example.net". You can use commas to separate multiple users [Mandatory]
524 | */
525 | public dynamic add_users_list(Dictionary data)
526 | {
527 | string id = data["id"].ToString();
528 | return post_request("list/" + id + "/users", JsonConvert.SerializeObject(data));
529 | }
530 |
531 | /*
532 | Delete already existing users in the SendinBlue contacts from the list.
533 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
534 | @options data {Integer} id: Id of list to unlink users from it [Mandatory]
535 | @options data {Array} users: Email address of the already existing user(s) in the SendinBlue contacts to be modified. Example: "test@example.net". You can use commas to separate multiple users [Mandatory]
536 | */
537 | public dynamic delete_users_list(Dictionary data)
538 | {
539 | string id = data["id"].ToString();
540 | return put_request("list/" + id + "/delusers", JsonConvert.SerializeObject(data));
541 | }
542 |
543 | /*
544 | Send Transactional Email.
545 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
546 | @options data {Array} to: Email address of the recipient(s). It should be sent as an associative array. Example: array("to@example.net"=>"to whom"). You can use commas to separate multiple recipients [Mandatory]
547 | @options data {String} subject: Message subject [Mandatory]
548 | @options data {Array} from Email address for From header. It should be sent as an array. Example: array("from@email.com","from email") [Mandatory]
549 | @options data {String} html: Body of the message. (HTML version) [Mandatory]. To send inline images, use
, the 'src' attribute value inside {} (curly braces) should be same as the filename used in 'inline_image' parameter
550 | @options data {String} text: Body of the message. (text version) [Optional]
551 | @options data {Array} cc: Same as to but for Cc. Example: array("cc@example.net","cc whom") [Optional]
552 | @options data {Array} bcc: Same as to but for Bcc. Example: array("bcc@example.net","bcc whom") [Optional]
553 | @options data {Array} replyto: Same as from but for Reply To. Example: array("from@email.com","from email") [Optional]
554 | @options data {Array} attachment: Provide the absolute url of the attachment/s. Possible extension values = gif, png, bmp, cgm, jpg, jpeg, txt, css, shtml, html, htm, csv, zip, pdf, xml, doc, xls, ppt, tar and ez. To send attachment/s generated on the fly you have to pass your attachment/s filename & its base64 encoded chunk data as an associative array. Example: array("YourFileName.Extension"=>"Base64EncodedChunkData"). You can use commas to separate multiple attachments [Optional]
555 | @options data {Array} headers: The headers will be sent along with the mail headers in original email. Example: array("Content-Type"=>"text/html; charset=iso-8859-1"). You can use commas to separate multiple headers [Optional]
556 | @options data {Array} inline_image: Pass your inline image/s filename & its base64 encoded chunk data as an associative array. Possible extension values = gif, png, bmp, cgm, jpg and jpeg. Example: array("YourFileName.Extension"=>"Base64EncodedChunkData"). You can use commas to separate multiple inline images [Optional]
557 | */
558 | public dynamic send_email(Object data)
559 | {
560 | return post_request("email", JsonConvert.SerializeObject(data));
561 | }
562 |
563 | /*
564 | To retrieve details of all webhooks.
565 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
566 | @options data {String} is_plat: Flag to get webhooks. Possible values – 0 & 1. Example: to get Transactional webhooks, use $is_plat=0, to get Marketing webhooks, use $is_plat=1, & to get all webhooks, use $is_plat="" [Optional]
567 | */
568 | public dynamic get_webhooks(Dictionary data)
569 | {
570 | string is_plat = data["is_plat"].ToString();
571 | return get_request("webhook/index/is_plat/" + is_plat, "");
572 | }
573 |
574 | /*
575 | To retrieve details of any particular webhook.
576 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
577 | @options data {Integer} id: Id of webhook to get details [Mandatory]
578 | */
579 | public dynamic get_webhook(Dictionary data)
580 | {
581 | string id = data["id"].ToString();
582 | return get_request("webhook/" + id, "");
583 | }
584 |
585 | /*
586 | Create a Webhook.
587 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
588 | @options data {String} url: URL that will be triggered by a webhook [Mandatory]
589 | @options data {String} description: Webook description [Optional]
590 | @options data {Array} events: Set of events. You can use commas to separate multiple events. Possible values for Transcational webhook – request, delivered, hard_bounce, soft_bounce, blocked, spam, invalid_email, deferred, click, & opened and Possible Values for Marketing webhook – spam, opened, click, hard_bounce, unsubscribe, soft_bounce & list_addition ( case sensitive ) [Mandatory]
591 | @options data {Integer} is_plat: Flag to create webhook type. Possible values – 0 (default) & 1. Example: to create Transactional webhooks, use $is_plat=0, & to create Marketing webhooks, use $is_plat=1 [Optional]
592 | */
593 | public dynamic create_webhook(Object data)
594 | {
595 | return post_request("webhook", JsonConvert.SerializeObject(data));
596 | }
597 |
598 | /*
599 | Delete a webhook.
600 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
601 | @options data {Integer} id: Id of webhook to be deleted [Mandatory]
602 | */
603 | public dynamic delete_webhook(Dictionary data)
604 | {
605 | string id = data["id"].ToString();
606 | return delete_request("webhook/" + id, "");
607 | }
608 |
609 | /*
610 | Update a webhook.
611 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
612 | @options data {Integer} id: Id of webhook to be modified [Mandatory]
613 | @options data {String} url: URL that will be triggered by a webhook [Mandatory]
614 | @options data {String} description: Webook description [Optional]
615 | @options data {Array} events: Set of events. You can use commas to separate multiple events. Possible values for Transcational webhook – request, delivered, hard_bounce, soft_bounce, blocked, spam, invalid_email, deferred, click, & opened and Possible Values for Marketing webhook – spam, opened, click, hard_bounce, unsubscribe, soft_bounce & list_addition ( case sensitive ) [Mandatory]
616 | */
617 | public dynamic update_webhook(Dictionary data)
618 | {
619 | string id = data["id"].ToString();
620 | return put_request("webhook/" + id, JsonConvert.SerializeObject(data));
621 | }
622 |
623 | /*
624 | Aggregate / date-wise report of the SendinBlue SMTP account.
625 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
626 | @options data {Integer} aggregate: This is used to indicate, you are interested in all-time totals. Possible values – 0 & 1. aggregate = 0 means it will not aggregate records, and will show stats per day/date wise [Optional]
627 | @options data {String} start_date: The start date to look up statistics. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
628 | @options data {String} end_date: The end date to look up statistics. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
629 | @options data {Integer} days: Number of days in the past to include statistics ( Includes today ). It must be an integer greater than 0 [Optional]
630 | @options data {String} tag: The tag you will specify to retrieve detailed stats. It must be an existing tag that has statistics [Optional]
631 | */
632 | public dynamic get_statistics(Object data)
633 | {
634 | return post_request("statistics", JsonConvert.SerializeObject(data));
635 | }
636 |
637 | /*
638 | Get Access a specific user Information.
639 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
640 | @options data {String} email: Email address of the already existing user in the SendinBlue contacts [Mandatory]
641 | */
642 | public dynamic get_user(Dictionary data)
643 | {
644 | string email = data["email"];
645 | return get_request("user/" + email.Trim(), "");
646 | }
647 |
648 | /*
649 | Unlink existing user from all lists.
650 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
651 | @options data {String} email: Email address of the already existing user in the SendinBlue contacts to be unlinked from all lists [Mandatory]
652 | */
653 | public dynamic delete_user(Dictionary data)
654 | {
655 | string email = data["email"];
656 | return delete_request("user/" + email.Trim(), "");
657 | }
658 |
659 | /*
660 | Create a new user if an email provided as input, doesn’t exists in the contact list of your SendinBlue account, otherwise it will update the existing user.
661 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
662 | @options data {String} email: Email address of the user to be created in SendinBlue contacts. Already existing email address of user in the SendinBlue contacts to be modified [Mandatory]
663 | @options data {Array} attributes: The name of attribute present in your SendinBlue account. It should be sent as an associative array. Example: array("NAME"=>"name"). You can use commas to separate multiple attributes [Optional]
664 | @options data {Integer} blacklisted: This is used to blacklist/ Unblacklist a user. Possible values – 0 & 1. blacklisted = 1 means user has been blacklisted [Optional]
665 | @options data {Array} listid: The list id(s) to be linked from user [Optional]
666 | @options data {Array} listid_unlink: The list id(s) to be unlinked from user [Optional]
667 | @options data {Array} blacklisted_sms: This is used to blacklist/ Unblacklist a user’s SMS number. Possible values – 0 & 1. blacklisted_sms = 1 means user’s SMS number has been blacklisted [Optional]
668 | */
669 | public dynamic create_update_user(Object data)
670 | {
671 | return put_request("user/createdituser", JsonConvert.SerializeObject(data));
672 | }
673 |
674 | /*
675 | Import Users Information.
676 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
677 | @options data {String} url: The URL of the file to be imported. Possible file types – .txt, .csv [Mandatory: if body is empty]
678 | @options data {String} body: The Body with csv content to be imported. Example: ‘NAME;SURNAME;EMAIL\n"Name1";"Surname1";"example1@example.net"\n"Name2";"Surname2";"example2@example.net"‘, where \n separates each user data. You can use semicolon to separate multiple attributes [Mandatory: if url is empty]
679 | @options data {Array} listids: These are the list ids in which the the users will be imported [Mandatory: if name is empty]
680 | @options data {String} notify_url: URL that will be called once the import process is finished [Optional] In notify_url, we are sending the content using POST method
681 | @options data {String} name: This is new list name which will be created first & then users will be imported in it [Mandatory: if listids is empty]
682 | @options data {Integer} list_parent: This is the existing folder id & can be used with name parameter to make newly created list’s desired parent [Optional]
683 | */
684 | public dynamic import_users(Object data)
685 | {
686 | return post_request("user/import", JsonConvert.SerializeObject(data));
687 | }
688 |
689 | /*
690 | Export Users Information.
691 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
692 | @options data {String} export_attrib: The name of attribute present in your SendinBlue account. You can use commas to separate multiple attributes. Example: "EMAIL,NAME,SMS" [Optional]
693 | @options data {String} filter: Filter can be added to export users. Example: "{\"blacklisted\":1}", will export all blacklisted users [Mandatory]
694 | @options data {String} notify_url: URL that will be called once the export process is finished [Optional]
695 | */
696 | public dynamic export_users(Object data)
697 | {
698 | return post_request("user/export", JsonConvert.SerializeObject(data));
699 | }
700 |
701 | /*
702 | Access all the attributes information under the account.
703 | No input required
704 | */
705 | public dynamic get_attributes()
706 | {
707 | return get_request("attribute", "");
708 | }
709 |
710 | /*
711 | Access the specific type of attribute information.
712 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
713 | @options data {String} type: Type of attribute. Possible values – normal, transactional, category, calculated & global [Optional]
714 | */
715 | public dynamic get_attribute(Dictionary data)
716 | {
717 | string type = data["type"];
718 | return get_request("attribute/" + type, "");
719 | }
720 |
721 | /*
722 | Create an Attribute.
723 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
724 | @options data {String} type: Type of attribute. Possible values – normal, transactional, category, calculated & global ( case sensitive ) [Mandatory]
725 | @options data {Array} data: The name and data type of ‘normal’ & ‘transactional’ attribute to be created in your SendinBlue account. It should be sent as an associative array. Example: array(‘ATTRIBUTE_NAME1′ => ‘DATA_TYPE1′, ‘ATTRIBUTE_NAME2’=> ‘DATA_TYPE2′).
726 | The name and data value of ‘category’, ‘calculated’ & ‘global’, should be sent as JSON string. Example: ‘[{ "name":"ATTRIBUTE_NAME1", "value":"Attribute_value1" }, { "name":"ATTRIBUTE_NAME2", "value":"Attribute_value2" }]’. You can use commas to separate multiple attributes [Mandatory]
727 | */
728 | public dynamic create_attribute(Object data)
729 | {
730 | return post_request("attribute", JsonConvert.SerializeObject(data));
731 | }
732 |
733 | /*
734 | Delete a specific type of attribute information.
735 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
736 | @options data {Integer} type: Type of attribute to be deleted [Mandatory]
737 | */
738 | public dynamic delete_attribute(Dictionary data)
739 | {
740 | string type = data["type"].ToString();
741 | return post_request("attribute/" + type, JsonConvert.SerializeObject(data));
742 | }
743 |
744 |
745 | /*
746 | Get Email Event report.
747 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
748 | @options data {Integer} limit: To limit the number of results returned. It should be an integer [Optional]
749 | @options data {String} start_date: The start date to get report from. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
750 | @options data {String} end_date: The end date to get report till date. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
751 | @options data {Integer} offset: Beginning point in the list to retrieve from. It should be an integer [Optional]
752 | @options data {String} date: Specific date to get its report. Date must be in YYYY-MM-DD format and should be earlier than todays date [Optional]
753 | @options data {Integer} days: Number of days in the past (includes today). If specified, must be an integer greater than 0 [Optional]
754 | @options data {String} email: Email address to search report for [Optional]
755 | @options data {String} event: Type of event to search report for [Optional]
756 | @options data {Array} tags: The existing tags you will specify to search report for [Optional]
757 |
758 | */
759 | public dynamic get_report(Object data)
760 | {
761 | return post_request("report", JsonConvert.SerializeObject(data));
762 | }
763 |
764 | /*
765 | Get all folders detail.
766 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
767 | @options data {Integer} page: Maximum number of records per request is 50, if there are more than 50 folders then you can use this parameter to get next 50 results [Mandatory]
768 | @options data {Integer} page_limit: This should be a valid number between 1-50 [Mandatory]
769 | */
770 | public dynamic get_folders(Dictionary data)
771 | {
772 | string page = data["page"].ToString(); string page_limit = data["page_limit"].ToString();
773 | String url = "page/" + page + "/page_limit/" + page_limit;
774 | return get_request("folder/index/" + url, "");
775 | }
776 |
777 | /*
778 | Get a particular folder detail.
779 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
780 | @options data {Integer} id: Id of folder to get details [Mandatory]
781 | */
782 | public dynamic get_folder(Dictionary data)
783 | {
784 | string id = data["id"].ToString();
785 | return get_request("folder/" + id, "");
786 | }
787 |
788 | /*
789 | Create a new folder.
790 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
791 | @options data {String} name: Desired name of the folder to be created [Mandatory]
792 | */
793 | public dynamic create_folder(Object data)
794 | {
795 | return post_request("folder", JsonConvert.SerializeObject(data));
796 | }
797 |
798 | /*
799 | Delete a specific folder information.
800 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
801 | @options data {Integer} id: Id of folder to be deleted [Mandatory]
802 | */
803 | public dynamic delete_folder(Dictionary data)
804 | {
805 | string id = data["id"].ToString();
806 | return delete_request("folder/" + id, "");
807 | }
808 |
809 | /*
810 | Update an existing folder.
811 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
812 | @options data {Integer} id: Id of folder to be modified [Mandatory]
813 | @options data {String} name: Desired name of the folder to be modified [Mandatory]
814 | */
815 | public dynamic update_folder(Dictionary data)
816 | {
817 | string id = data["id"].ToString();
818 | return put_request("folder/" + id, JsonConvert.SerializeObject(data));
819 | }
820 |
821 | /*
822 | Delete any hardbounce, which actually would have been blocked due to some temporary ISP failures.
823 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
824 | @options data {String} start_date: The start date to get report from. Date must be in YYYY-MM-DD format and should be before the end_date [Optional]
825 | @options data {String} end_date: The end date to get report till date. Date must be in YYYY-MM-DD format and should be after the start_date [Optional]
826 | @options data {String} email: Email address to delete its bounces [Optional]
827 | */
828 | public dynamic delete_bounces(Object data)
829 | {
830 | return post_request("bounces", JsonConvert.SerializeObject(data));
831 | }
832 |
833 | /*
834 | Send templates created on SendinBlue, through SendinBlue SMTP (transactional mails).
835 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
836 | @options data {Integer} id: Id of the template created on SendinBlue account [Mandatory]
837 | @options data {String} to: Email address of the recipient(s). You can use pipe ( | ) to separate multiple recipients. Example: "to-example@example.net|to2-example@example.net" [Mandatory]
838 | @options data {String} cc: Same as to but for Cc [Optional]
839 | @options data {String} bcc: Same as to but for Bcc [Optional]
840 | @options data {Array} attr: The name of attribute present in your SendinBlue account. It should be sent as an associative array. Example: array("NAME"=>"name"). You can use commas to separate multiple attributes [Optional]
841 | @options data {String} attachment_url: Provide the absolute url of the attachment. Url not allowed from local machine. File must be hosted somewhere [Optional]
842 | @options data {Array} attachment: To send attachment/s generated on the fly you have to pass your attachment/s filename & its base64 encoded chunk data as an associative array [Optional]
843 | @options data {Array} headers: The headers will be sent along with the mail headers in original email. Example: array("Content-Type"=>"text/html; charset=iso-8859-1"). You can use commas to separate multiple headers [Optional]
844 | */
845 | public dynamic send_transactional_template(Dictionary data)
846 | {
847 | string id = data["id"].ToString();
848 | return put_request("template/" + id, JsonConvert.SerializeObject(data));
849 | }
850 |
851 | /*
852 | Create your Senders.
853 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
854 | @options data {String} name: Name of the sender [Mandatory]
855 | @options data {String} email: Email address of the sender [Mandatory]
856 | @options data {Array} ip_domain: Pass pipe ( | ) separated Dedicated IP and its associated Domain. Example: "1.2.3.4|mydomain.com". You can use commas to separate multiple ip_domain’s [Mandatory: Only for Dedicated IP clients, for Shared IP clients, it should be kept blank]
857 | */
858 | public dynamic create_sender(Object data)
859 | {
860 | return post_request("advanced", JsonConvert.SerializeObject(data));
861 | }
862 |
863 | /*
864 | Delete your Sender Information.
865 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
866 | @options data {Integer} id: Id of sender to be deleted [Mandatory]
867 | */
868 | public dynamic delete_sender(Dictionary data)
869 | {
870 | string id = data["id"].ToString();
871 | return delete_request("advanced/" + id, "");
872 | }
873 |
874 | /*
875 | Update your Senders.
876 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
877 | @options data {Integer} id: Id of sender to be modified [Mandatory]
878 | @options data {String} name: Name of the sender [Mandatory]
879 | @options data {Array} ip_domain: Pass pipe ( | ) separated Dedicated IP and its associated Domain. Example: "1.2.3.4|mydomain.com". You can use commas to separate multiple ip_domain’s [Mandatory: Only for Dedicated IP clients, for Shared IP clients, it should be kept blank]
880 | */
881 | public dynamic update_sender(Dictionary data)
882 | {
883 | string id = data["id"].ToString();
884 | return put_request("advanced/" + id, JsonConvert.SerializeObject(data));
885 | }
886 |
887 | /*
888 | Get Access of created senders information.
889 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
890 | @options data {String} option: Options to get senders. Possible options – IP-wise, & Domain-wise ( only for dedicated IP clients ). Example: to get senders with specific IP, use $option=’1.2.3.4′, to get senders with specific domain use, $option=’domain.com’, & to get all senders, use $option="" [Optional]
891 | */
892 | public dynamic get_senders(Dictionary data)
893 | {
894 | string option = data["option"];
895 | return get_request("advanced/index/option/" + option, "");
896 | }
897 |
898 |
899 | /*
900 | Send a Test SMS.
901 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
902 | @options data {Integer} id: Id of the SMS campaign [Mandatory]
903 | @options data {String} to: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Mandatory]
904 | */
905 | public dynamic send_bat_sms(Dictionary data)
906 | {
907 | string id = data["id"].ToString();
908 | string mobilephone = data["to"].ToString();
909 | String phone = HttpUtility.UrlEncode(mobilephone);
910 | return get_request("sms/" + id + "/" + phone, "");
911 |
912 | }
913 |
914 | /*
915 | Send a transactional SMS.
916 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
917 | @options data {String} to: The mobile number to send SMS to with country code [Mandatory]
918 | @options data {String} from: The name of the sender. The number of characters is limited to 11 (alphanumeric format) [Mandatory]
919 | @options data {String} text: The text of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Mandatory]
920 | @options data {String} web_url: The web URL that can be called once the message is successfully delivered [Optional]
921 | @options data {String} tag: The tag that you can associate with the message [Optional]
922 | @options data {String} type: Type of message. Possible values – marketing (default) & transactional. You can use marketing for sending marketing SMS, & for sending transactional SMS, use transactional type [Optional]
923 | */
924 | public dynamic send_sms(Object data)
925 | {
926 | return post_request("sms", JsonConvert.SerializeObject(data));
927 | }
928 |
929 | /*
930 | Create & Schedule your SMS campaigns.
931 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
932 | @options data {String} name: Name of the SMS campaign [Mandatory]
933 | @options data {String} sender: This allows you to customize the SMS sender. The number of characters is limited to 11 ( alphanumeric format ) [Optional]
934 | @options data {String} content: Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Optional]
935 | @options data {String} bat: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Optional]
936 | @options data {Array} listid: These are the list ids to which the SMS campaign is sent [Mandatory: if scheduled_date is not empty]
937 | @options data {Array} exclude_list: These are the list ids which will be excluded from the SMS campaign [Optional]
938 | @options data {String} scheduled_date: The day on which the SMS campaign is supposed to run [Optional]
939 | @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
940 | */
941 | public dynamic create_sms_campaign(Object data)
942 | {
943 | return post_request("sms", JsonConvert.SerializeObject(data));
944 | }
945 |
946 | /*
947 | Update your SMS campaigns.
948 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
949 | @options data {Integer} id: Id of the SMS campaign [Mandatory]
950 | @options data {String} name: Name of the SMS campaign [Optional]
951 | @options data {String} sender: This allows you to customize the SMS sender. The number of characters is limited to 11 ( alphanumeric format ) [Optional]
952 | @options data {String} content: Content of the message. The maximum characters used per SMS is 160, if used more than that, it will be counted as more than one SMS [Optional]
953 | @options data {String} bat: Mobile number with the country code to send test SMS. The mobile number defined here should belong to one of your contacts in SendinBlue account and should not be blacklisted [Optional]
954 | @options data {Array} listid: hese are the list ids to which the SMS campaign is sent [Mandatory: if scheduled_date is not empty]
955 | @options data {Array} exclude_list: These are the list ids which will be excluded from the SMS campaign [Optional]
956 | @options data {String} scheduled_date: The day on which the SMS campaign is supposed to run [Optional]
957 | @options data {Integer} send_now: Flag to send campaign now. Possible values = 0 (default) & 1. send_now = 0 means campaign can’t be send now, & send_now = 1 means campaign ready to send now [Optional]
958 | */
959 | public dynamic update_sms_campaign(Dictionary data)
960 | {
961 | string id = data["id"].ToString();
962 | return put_request("sms/" + id, JsonConvert.SerializeObject(data));
963 | }
964 |
965 | /*
966 | Create a Template.
967 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
968 | @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
969 | @options data {String} template_name: Name of the Template [Mandatory]
970 | @options data {String} bat: Email address for test mail [Optional]
971 | @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
972 | @options data {String} html_url Url: which content is the body of content [Mandatory: if html_content is empty]
973 | @options data {String} subject: Subject of the campaign [Mandatory]
974 | @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
975 | @options data {String} reply_to: The reply to email in the campaign emails [Optional]
976 | @options data {String} to_fieldv This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
977 | @options data {Integer} status: Status of template. Possible values = 0 (default) & 1. status = 0 means template is inactive, & status = 1 means template is active [Optional]
978 | @options data {Integer} attachment: Status of attachment. Possible values = 0 (default) & 1. attach = 0 means an attachment can’t be sent, & attach = 1 means an attachment can be sent, in the email [Optional]
979 | */
980 | public dynamic create_template(Object data)
981 | {
982 | return post_request("template", JsonConvert.SerializeObject(data));
983 | }
984 |
985 | /*
986 | Update a Template.
987 | @param {Object} data contains dynamic object with a collection of keys and values from Dictionary.
988 | @options data {Integer} id: Id of Template to be modified [Mandatory]
989 | @options data {String} from_name: Sender name from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
990 | @options data {String} template_name: Name of the Template [Mandatory]
991 | @options data {String} bat: Email address for test mail [Optional]
992 | @options data {String} html_content: Body of the content. The HTML content field must have more than 10 characters [Mandatory: if html_url is empty]
993 | @options data {String} html_url: Url which content is the body of content [Mandatory: if html_content is empty]
994 | @options data {String} subject: Subject of the campaign [Mandatory]
995 | @options data {String} from_email: Sender email from which the campaign emails are sent [Mandatory: for Dedicated IP clients & for Shared IP clients, if sender exists]
996 | @options data {String} reply_to: The reply to email in the campaign emails [Optional]
997 | @options data {String} to_field: This is to personalize the «To» Field. If you want to include the first name and last name of your recipient, add [PRENOM] [NOM]. To use the contact attributes here, these should already exist in SendinBlue account [Optional]
998 | @options data {Integer} status: Status of template. Possible values = 0 (default) & 1. status = 0 means template is inactive, & status = 1 means template is active [Optional]
999 | @options data {Integer} attachment: Status of attachment. Possible values = 0 (default) & 1. attach = 0 means an attachment can’t be sent, & attach = 1 means an attachment can be sent, in the email [Optional]
1000 | */
1001 | public dynamic update_template(Dictionary data)
1002 | {
1003 | string id = data["id"].ToString();
1004 | return post_request("template/" + id, JsonConvert.SerializeObject(data));
1005 | }
1006 |
1007 | }
1008 |
1009 | }
1010 |
--------------------------------------------------------------------------------