NAV Navbar
shell ruby python javascript php go
  • Başlangıç!
  • Token Oluşturma
  • Duyuru Listeleri
  • Üyeler
  • Başlangıç!

    Mail2Inbox API tercih ettiğiniz için teşekkür ederiz. Mail2Inbox API servisini kullanarak duyuru listelerinizi ve üyelerinizi yönetebilirsiniz. Ayrıca transactional e-posta gönderimlerinizi de yapabilirsiniz.

    Token Adresi

    https://api.mail2inbox.com/token

    API Adresi

    https://api.mail2inbox.com/api

    Token Oluşturma

    ##USERNAME## bilgisini kullanıcı adınız, ##PASSWORD## bilgisini şifrenizin base64 ile encode edilmiş hali olarak değiştirmelisiniz.

    require 'uri'
    require 'net/http'
    
    url = URI("https://api.mail2inbox.com/token")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["content-type"] = 'application/x-www-form-urlencoded'
    request.body = "grant_type=password&username=##USERNAME##&password=##PASSWORD##"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.mail2inbox.com/token"
    
    payload = "grant_type=password&username=##USERNAME##&password=##PASSWORD##"
    headers = {'content-type': 'application/x-www-form-urlencoded'}
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl --request POST \
      --url https://api.mail2inbox.com/token \
      --header 'content-type: application/x-www-form-urlencoded' \
      --data 'grant_type=password&username=##USERNAME##&password=##PASSWORD##'
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.mail2inbox.com/token",
      "method": "POST",
      "headers": {
        "content-type": "application/x-www-form-urlencoded"
      },
      "data": {
        "grant_type": "password",
        "username": "##USERNAME##",
        "password": "##PASSWORD##"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.mail2inbox.com/token",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "grant_type=password&username=##USERNAME##&password=##PASSWORD##",
      CURLOPT_HTTPHEADER => array(
        "content-type: application/x-www-form-urlencoded"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.mail2inbox.com/token"
        payload := strings.NewReader("grant_type=password&username=##USERNAME##&password=##PASSWORD##")
        req, _ := http.NewRequest("POST", url, payload)
        req.Header.Add("content-type", "application/x-www-form-urlencoded")
        res, _ := http.DefaultClient.Do(req)
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
        fmt.Println(res)
        fmt.Println(string(body))
    }
    

    Şifrenizi base64 ile encode etmeyi unutmayınız.

    Tüm API servisini kullanmadan önce token oluşturuması gereklidir.

    Üretmiş olduğunuz token belli bir süre geçerlidir. Süresi biten tokenlar ile API servisi kullanılamaz.

    Oluşturmuş olduğunuz token bilgisini kullanarak diğer API servis isteklerinin heeader bilgisine aşağıdaki gibi eklemeniz gerekmektedir.

    Authorization Bearer TOKENBILGISI

    HTTP Request

    POST https://api.mail2inbox.com/token

    Query Parameters

    Parametre Description
    grant_type Bu parametre sabit değere sahip olup, password olarak gönderilmelidir.
    username Mail2Inbox kullanıcı adı.
    password Mail2Inbox hesap şifrenizin base64 ile encode edilmiş hali.

    Result

    Geri dönüş aşağıdaki gibi json formatında olacaktır:

    {
        "access_token": "TOKENBILGISI",
        "token_type": "bearer",
        "expires_in": 86399,
        ".issued": "Thu, 27 Jul 2017 14:11:56 GMT",
        ".expires": "Fri, 28 Jul 2017 14:11:56 GMT"
    }
    

    Geri dönüş bilgisi json formatında olacaktır.

    Parametre Description
    access_token Size özel olarak oluşturulan token bilgisidir.
    token_type Token bilgisi. bearer olarak döner.
    expires_in Bitmesine kalan saniye.
    .issued Oluşturulma zamanı
    .expires Biteceği zaman

    Duyuru Listeleri

    Listeleme

    require 'uri'
    require 'net/http'
    
    url = URI("https://api.mail2inbox.com/api/List")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["authorization"] = 'Bearer TOKEN'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.mail2inbox.com/api/List"
    
    headers = {'authorization': 'Bearer TOKEN'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    curl --request GET \
      --url https://api.mail2inbox.com/api/List \
      --header 'authorization: Bearer TOKEN'
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.mail2inbox.com/api/List",
      "method": "GET",
      "headers": {
        "authorization": "Bearer TOKEN"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.mail2inbox.com/api/List",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "authorization: Bearer TOKEN"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.mail2inbox.com/api/List"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("authorization", "Bearer TOKEN")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    Geri dönüş aşağıdaki gibi json formatında olacaktır:

    {
        "Items": [
            {
                "Name": "TEST",
                "AddDate": "2016-11-26T22:13:10.387",
                "MemberCount": 1,
                "Id": 1,
                "Err": null
            }
        ],
        "Id": 0,
        "Err": null
    }
    

    Bu servisi kullanarak hesabınızda tanımlı olan tüm listeleri alabilirsiniz.

    HTTP Request

    GET https://api.mail2inbox.com/api/List

    Result

    Parametre Açıklama
    Items Liste içeriği parametrede gelir.
    Items.Name Liste adı.
    Items.AddDate Listenin eklenme zamanı.
    Items.MemberCount Liste içindeki üye sayısı.
    Items.Id Liste Id.
    Err İstek sırasında hata oluşursa, oluşan hata bilgisini içerir.

    Sorgulama

    require 'uri'
    require 'net/http'
    
    url = URI("https://api.mail2inbox.com/api/List/<ID>")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["authorization"] = 'Bearer TOKEN'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.mail2inbox.com/api/List/<ID>"
    
    headers = {'authorization': 'Bearer TOKEN'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    curl --request GET \
      --url https://api.mail2inbox.com/api/List/<ID> \
      --header 'authorization: Bearer TOKEN'
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.mail2inbox.com/api/List/<ID>",
      "method": "GET",
      "headers": {
        "authorization": "Bearer TOKEN"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.mail2inbox.com/api/List/<ID>",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "authorization: Bearer TOKEN"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.mail2inbox.com/api/List/73"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("authorization", "Bearer TOKEN")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    }
    

    Geri dönüş aşağıdaki gibi json formatında olacaktır:

    {
        "Name": "TEST",
        "AddDate": "2016-11-26T22:13:10.387",
        "MemberCount": 1,
        "Id": 1,
        "Err": null
    }
    

    Bu servisi kullanarak ile belirtilen liste bilgisine erişilebilir.

    HTTP Request

    GET https://api.mail2inbox.com/api/List/<ID>

    Query Parametreleri

    Parametre Açıklama
    Id Liste Id.

    Result

    Parametre Açıklama
    Name Liste adı.
    AddDate Listenin eklenme zamanı.
    MemberCount Liste içindeki üye sayısı.
    Id Liste Id.
    Err İstek sırasında hata oluşursa, oluşan hata bilgisini içerir.

    Ekleme

    require 'uri'
    require 'net/http'
    
    url = URI("https://api.mail2inbox.com/api/List")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["authorization"] = 'Bearer TOKEN'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request.body = "Name=Deneme"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.mail2inbox.com/api/List"
    
    payload = "Name=Deneme"
    headers = {
        'authorization': "Bearer TOKEN",
        'content-type': "application/x-www-form-urlencoded"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl --request POST \
      --url https://api.mail2inbox.com/api/List \
      --header 'authorization: Bearer TOKEN' \
      --header 'content-type: application/x-www-form-urlencoded' \
      --data Name=Deneme
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.mail2inbox.com/api/List",
      "method": "POST",
      "headers": {
        "authorization": "Bearer TOKEN",
        "content-type": "application/x-www-form-urlencoded"
      },
      "data": {
        "Name": "Deneme"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.mail2inbox.com/api/List",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "Name=Deneme",
      CURLOPT_HTTPHEADER => array(
        "authorization: Bearer TOKEN",
        "content-type: application/x-www-form-urlencoded"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.mail2inbox.com/api/List"
    
        payload := strings.NewReader("Name=Deneme")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("authorization", "Bearer TOKEN")
        req.Header.Add("content-type", "application/x-www-form-urlencoded")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    Geri dönüş aşağıdaki gibi json formatında olacaktır:

    {
        "Id": 1,
        "Err": null
    }
    

    Yeni liste oluşturmak için bu servis kullanılır.

    HTTP Request

    POST https://api.mail2inbox.com/api/List

    Query Parametreleri

    Parametre Açıklama
    Name Liste Adı.

    Result

    Parametre Açıklama
    Id Oluşturulan liste Id.
    Err İstek sırasında hata oluşursa, oluşan hata bilgisini içerir.

    Değiştirme

    require 'uri'
    require 'net/http'
    
    url = URI("https://api.mail2inbox.com/api/List/<ID>")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Put.new(url)
    request["authorization"] = 'Bearer TOKEN'
    request["content-type"] = 'application/x-www-form-urlencoded'
    request.body = "Name=Deneme2"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.mail2inbox.com/api/List/<ID>"
    
    payload = "Name=Deneme2"
    headers = {
        'authorization': "Bearer TOKEN",
        'content-type': "application/x-www-form-urlencoded"
        }
    
    response = requests.request("PUT", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl --request PUT \
      --url https://api.mail2inbox.com/api/List/<ID> \
      --header 'authorization: Bearer TOKEN' \
      --data Name=Deneme2
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.mail2inbox.com/api/List/<ID>",
      "method": "PUT",
      "headers": {
        "authorization": "Bearer TOKEN"
      },
      "data": {
        "Name": "Deneme2"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.mail2inbox.com/api/List/<ID>",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "PUT",
      CURLOPT_POSTFIELDS => "Name=Deneme2",
      CURLOPT_HTTPHEADER => array(
        "authorization: Bearer TOKEN"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.mail2inbox.com/api/List/<ID>"
    
        payload := strings.NewReader("Name=Deneme2")
    
        req, _ := http.NewRequest("PUT", url, payload)
    
        req.Header.Add("authorization", "Bearer TOKEN")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    Geri dönüş aşağıdaki gibi json formatında olacaktır:

    {
        "Id": 1,
        "Err": null
    }
    

    Varolan liste bilgilerini değiştirmek için kullanılır.

    HTTP Request

    PUT https://api.mail2inbox.com/api/List/<ID>

    Query Parametreleri

    Parametre Açıklama
    Id Düzenleme yapılacak listenin Id bilgisi.
    Name Liste Adı.

    Result

    Parametre Açıklama
    Id Düzenlenen liste Id.
    Err İstek sırasında hata oluşursa, oluşan hata bilgisini içerir.

    Silme

    require 'uri'
    require 'net/http'
    
    url = URI("https://api.mail2inbox.com/api/List/<ID>")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Delete.new(url)
    request["authorization"] = 'Bearer TOKEN'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.mail2inbox.com/api/List/<ID>"
    
    headers = {'authorization': 'Bearer TOKEN'}
    
    response = requests.request("DELETE", url, headers=headers)
    
    print(response.text)
    
    curl --request DELETE \
      --url https://api.mail2inbox.com/api/List/<ID> \
      --header 'authorization: Bearer TOKEN'
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.mail2inbox.com/api/List/<ID>",
      "method": "DELETE",
      "headers": {
        "authorization": "Bearer TOKEN"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.mail2inbox.com/api/List/<ID>",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "DELETE",
      CURLOPT_HTTPHEADER => array(
        "authorization: Bearer TOKEN"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.mail2inbox.com/api/List/<ID>"
    
        req, _ := http.NewRequest("DELETE", url, nil)
    
        req.Header.Add("authorization", "Bearer TOKEN")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    Geri dönüş aşağıdaki gibi json formatında olacaktır:

    {
        "Id": 1,
        "Err": null
    }
    

    Varolan listeyi silmek için bu servis kullanılır.

    HTTP Request

    DELETE https://api.mail2inbox.com/api/List/<ID>

    Query Parametreleri

    Parametre Açıklama
    Id Silinecek listenin Id bilgisi.

    Result

    Parametre Açıklama
    Id Silinen liste Id.
    Err İstek sırasında hata oluşursa, oluşan hata bilgisini içerir.

    Üyeler

    Listeleme

    require 'uri'
    require 'net/http'
    
    url = URI("https://api.mail2inbox.com/api/List/<ID>/members")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["authorization"] = 'Bearer TOKEN'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.mail2inbox.com/api/List/<ID>/members"
    
    headers = {'authorization': 'Bearer TOKEN'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    curl --request GET \
      --url https://api.mail2inbox.com/api/List/<ID>/members \
      --header 'authorization: Bearer TOKEN'
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.mail2inbox.com/api/List/<ID>/members",
      "method": "GET",
      "headers": {
        "authorization": "Bearer TOKEN"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.mail2inbox.com/api/List/<ID>/members",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "authorization: Bearer TOKEN"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.mail2inbox.com/api/List/<ID>/members"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("authorization", "Bearer TOKEN")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    Geri dönüş aşağıdaki gibi json formatında olacaktır:

    {
        "Items": [
            {
                "Email": "eposta@domain.com",
                "FirstName": "AD",
                "LastName": "SOYAD",
                "AddDate": "2017-07-27T16:05:40.537",
                "Uid": "4d1de2c1-1f2d-45ac-82db-5933b912bd45",
                "Id": 1,
                "Err": null
            },
        ],
        "Id": 0,
        "Err": null
    }
    

    Bu servisi kullanarak parametresi ile belirtilen listedeki üyelerin tam listesine ulaşılabilir.

    HTTP Request

    GET https://api.mail2inbox.com/api/List/<ID>/members

    Query Parametreleri

    Parametre Açıklama
    Id Üye listesi getirilecek listesnin Id bilgisi.

    Result

    Parametre Açıklama
    Items Liste içinde bulunan üyeleri barındırır.
    Items.Email Üye e-posta adresi.
    Items.FirstName Üye adı.
    Items.LastName Üye soyadı.
    Items.Email Liste adı.
    Items.AddDate Ekleme zamanı.
    Items.Id Üye Id.
    Err İstek sırasında hata oluşursa, oluşan hata bilgisini içerir.

    Sorgulama

    require 'uri'
    require 'net/http'
    
    url = URI("https://api.mail2inbox.com/api/member/<ID>")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Get.new(url)
    request["authorization"] = 'Bearer TOKEN'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.mail2inbox.com/api/member/<ID>"
    
    headers = {'authorization': 'Bearer TOKEN'}
    
    response = requests.request("GET", url, headers=headers)
    
    print(response.text)
    
    curl --request GET \
      --url https://api.mail2inbox.com/api/member/<ID> \
      --header 'authorization: Bearer TOKEN'
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.mail2inbox.com/api/member/<ID>",
      "method": "GET",
      "headers": {
        "authorization": "Bearer TOKEN"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.mail2inbox.com/api/member/<ID>",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "GET",
      CURLOPT_HTTPHEADER => array(
        "authorization: Bearer TOKEN"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.mail2inbox.com/api/member/<ID>"
    
        req, _ := http.NewRequest("GET", url, nil)
    
        req.Header.Add("authorization", "Bearer TOKEN")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    Geri dönüş aşağıdaki gibi json formatında olacaktır:

    {
        "Email": "eposta@domain.com",
        "FirstName": "AD",
        "LastName": "SOYAD",
        "AddDate": "2017-07-27T16:05:40.537",
        "Uid": "4d1de2c1-1f2d-45ac-82db-5933b912bd45",
        "Id": 1,
        "Err": null
    }
    

    Bu servisi kullanarak ile üyenin bilgisine erişilebilir.

    HTTP Request

    GET https://api.mail2inbox.com/api/member/<ID>

    Query Parametreleri

    Parametre Açıklama
    Id Üye Id.

    Result

    Parametre Açıklama
    Email Üye e-posta adresi.
    FirstName Üye adı.
    LastName Üye soyadı.
    Email Liste adı.
    AddDate Ekleme zamanı.
    Id Üye Id.
    Err İstek sırasında hata oluşursa, oluşan hata bilgisini içerir.

    Ekleme

    require 'uri'
    require 'net/http'
    
    url = URI("https://api.mail2inbox.com/api/Member")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Post.new(url)
    request["authorization"] = 'Bearer TOKEN'
    request["content-type"] = 'application/json'
    request.body = "{\r\"Email\":\"eposta@domain.com\",\r\"FirstName\":\"Ad\",\r\"LastName\":\"Soyad\",\r\"ListId\":ListeId,\r\"Attributes\": [\r\t{\r\t\t\"Id\":6,\r\t\t\"Value\":\"CEP TELİ\"\r\t},\r\t{\r\t\t\"Id\":7,\r\t\t\"Value\":13\r\t},\r\t{\r\t\t\"Id\":8,\r\t\t\"Value\":\"ABC\"\r\t},\r\t{\r\t\t\"Id\":9,\r\t\t\"Value\":\"AA, BB\"\r\t}\r\t]\r}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.mail2inbox.com/api/Member"
    
    payload = "{\r\"Email\":\"eposta@domain.com\",\r\"FirstName\":\"Ad\",\r\"LastName\":\"Soyad\",\r\"ListId\":ListeId,\r\"Attributes\": [\r\t{\r\t\t\"Id\":6,\r\t\t\"Value\":\"CEP TELİ\"\r\t},\r\t{\r\t\t\"Id\":7,\r\t\t\"Value\":13\r\t},\r\t{\r\t\t\"Id\":8,\r\t\t\"Value\":\"ABC\"\r\t},\r\t{\r\t\t\"Id\":9,\r\t\t\"Value\":\"AA, BB\"\r\t}\r\t]\r}"
    headers = {
        'authorization': "Bearer TOKEN",
        'content-type': "application/json"
        }
    
    response = requests.request("POST", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl --request POST \
      --url https://api.mail2inbox.com/api/Member \
      --header 'authorization: Bearer TOKEN' \
      --header 'content-type: application/json' \
      --data '{
    "Email":"eposta@domain.com",
    "FirstName":"Ad",
    "LastName":"Soyad",
    "ListId":ListeId,
    "Attributes": [
        {
            "Id":6,
            "Value":"CEP TELİ"
        },
        {
            "Id":7,
            "Value":13
        },
        {
            "Id":8,
            "Value":"ABC"
        },
        {
            "Id":9,
            "Value":"AA, BB"
        }
        ]
    }'
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.mail2inbox.com/api/Member",
      "method": "POST",
      "headers": {
        "authorization": "Bearer TOKEN",
        "content-type": "application/json"
      },
      "processData": false,
      "data": "{\r\"Email\":\"eposta@domain.com\",\r\"FirstName\":\"Ad\",\r\"LastName\":\"Soyad\",\r\"ListId\":ListeId,\r\"Attributes\": [\r\t{\r\t\t\"Id\":6,\r\t\t\"Value\":\"CEP TELİ\"\r\t},\r\t{\r\t\t\"Id\":7,\r\t\t\"Value\":13\r\t},\r\t{\r\t\t\"Id\":8,\r\t\t\"Value\":\"ABC\"\r\t},\r\t{\r\t\t\"Id\":9,\r\t\t\"Value\":\"AA, BB\"\r\t}\r\t]\r}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.mail2inbox.com/api/Member",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "POST",
      CURLOPT_POSTFIELDS => "{\r\"Email\":\"eposta@domain.com\",\r\"FirstName\":\"Ad\",\r\"LastName\":\"Soyad\",\r\"ListId\":ListeId,\r\"Attributes\": [\r\t{\r\t\t\"Id\":6,\r\t\t\"Value\":\"CEP TELİ\"\r\t},\r\t{\r\t\t\"Id\":7,\r\t\t\"Value\":13\r\t},\r\t{\r\t\t\"Id\":8,\r\t\t\"Value\":\"ABC\"\r\t},\r\t{\r\t\t\"Id\":9,\r\t\t\"Value\":\"AA, BB\"\r\t}\r\t]\r}",
      CURLOPT_HTTPHEADER => array(
        "authorization: Bearer TOKEN",
        "content-type: application/json"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.mail2inbox.com/api/Member"
    
        payload := strings.NewReader("{\r\"Email\":\"eposta@domain.com\",\r\"FirstName\":\"Ad\",\r\"LastName\":\"Soyad\",\r\"ListId\":ListeId,\r\"Attributes\": [\r\t{\r\t\t\"Id\":6,\r\t\t\"Value\":\"CEP TELİ\"\r\t},\r\t{\r\t\t\"Id\":7,\r\t\t\"Value\":13\r\t},\r\t{\r\t\t\"Id\":8,\r\t\t\"Value\":\"ABC\"\r\t},\r\t{\r\t\t\"Id\":9,\r\t\t\"Value\":\"AA, BB\"\r\t}\r\t]\r}")
    
        req, _ := http.NewRequest("POST", url, payload)
    
        req.Header.Add("authorization", "Bearer TOKEN")
        req.Header.Add("content-type", "application/json")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    Geri dönüş aşağıdaki gibi json formatında olacaktır:

    {
        "Id": 1,
        "Err": null
    }
    

    Yeni üye oluşturmak için bu servis kullanılır.

    HTTP Request

    POST https://api.mail2inbox.com/api/Member

    Query Parametreleri

    Parametre Açıklama
    Email Üye e-posta adresi.
    FirstName Üye adı.
    LastName Üye soyadı.
    ListId Üyenin ekleneceği liste Id bilgisi.
    Attributes Liste şeklinde üyeye ait özellikleri barındırır.
    Attributes.Id Özellik Id
    Attributes.Value Özellik değeri

    Result

    Parametre Açıklama
    Id Oluşturulan üyenin Id bilgisi.
    Err İstek sırasında hata oluşursa, oluşan hata bilgisini içerir.

    Değiştirme

    require 'uri'
    require 'net/http'
    
    url = URI("https://api.mail2inbox.com/api/Member/<ID>")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Put.new(url)
    request["authorization"] = 'Bearer TOKEN'
    request["content-type"] = 'application/json'
    request.body = "{\r\"Email\":\"eposta@domain.com\",\r\"FirstName\":\"Ad\",\r\"LastName\":\"Soyad\",\r\"Attributes\": [\r\t{\r\t\t\"Id\":6,\r\t\t\"Value\":\"CEP TELİ\"\r\t},\r\t{\r\t\t\"Id\":7,\r\t\t\"Value\":13\r\t},\r\t{\r\t\t\"Id\":8,\r\t\t\"Value\":\"ABC\"\r\t},\r\t{\r\t\t\"Id\":9,\r\t\t\"Value\":\"AA, BB\"\r\t}\r\t]\r}"
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.mail2inbox.com/api/Member/<ID>"
    
    payload = "{\r\"Email\":\"eposta@domain.com\",\r\"FirstName\":\"Ad\",\r\"LastName\":\"Soyad\",\r\"Attributes\": [\r\t{\r\t\t\"Id\":6,\r\t\t\"Value\":\"CEP TELİ\"\r\t},\r\t{\r\t\t\"Id\":7,\r\t\t\"Value\":13\r\t},\r\t{\r\t\t\"Id\":8,\r\t\t\"Value\":\"ABC\"\r\t},\r\t{\r\t\t\"Id\":9,\r\t\t\"Value\":\"AA, BB\"\r\t}\r\t]\r}"
    headers = {
        'authorization': "Bearer TOKEN",
        'content-type': "application/json"
        }
    
    response = requests.request("PUT", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl --request PUT \
      --url https://api.mail2inbox.com/api/Member/<ID> \
      --header 'authorization: Bearer TOKEN' \
      --header 'content-type: application/json' \
      --data '{
    "Email":"eposta@domain.com",
    "FirstName":"Ad",
    "LastName":"Soyad",
    "Attributes": [
        {
            "Id":6,
            "Value":"CEP TELİ"
        },
        {
            "Id":7,
            "Value":13
        },
        {
            "Id":8,
            "Value":"ABC"
        },
        {
            "Id":9,
            "Value":"AA, BB"
        }
        ]
    }'
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.mail2inbox.com/api/Member/<ID>",
      "method": "PUT",
      "headers": {
        "authorization": "Bearer TOKEN",
        "content-type": "application/json"
      },
      "processData": false,
      "data": "{\r\"Email\":\"eposta@domain.com\",\r\"FirstName\":\"Ad\",\r\"LastName\":\"Soyad\",\r\"Attributes\": [\r\t{\r\t\t\"Id\":6,\r\t\t\"Value\":\"CEP TELİ\"\r\t},\r\t{\r\t\t\"Id\":7,\r\t\t\"Value\":13\r\t},\r\t{\r\t\t\"Id\":8,\r\t\t\"Value\":\"ABC\"\r\t},\r\t{\r\t\t\"Id\":9,\r\t\t\"Value\":\"AA, BB\"\r\t}\r\t]\r}"
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.mail2inbox.com/api/Member/<ID>",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "PUT",
      CURLOPT_POSTFIELDS => "{\r\"Email\":\"eposta@domain.com\",\r\"FirstName\":\"Ad\",\r\"LastName\":\"Soyad\",\r\"Attributes\": [\r\t{\r\t\t\"Id\":6,\r\t\t\"Value\":\"CEP TELİ\"\r\t},\r\t{\r\t\t\"Id\":7,\r\t\t\"Value\":13\r\t},\r\t{\r\t\t\"Id\":8,\r\t\t\"Value\":\"ABC\"\r\t},\r\t{\r\t\t\"Id\":9,\r\t\t\"Value\":\"AA, BB\"\r\t}\r\t]\r}",
      CURLOPT_HTTPHEADER => array(
        "authorization: Bearer TOKEN",
        "content-type: application/json"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "strings"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.mail2inbox.com/api/Member/<ID>"
    
        payload := strings.NewReader("{\r\"Email\":\"eposta@domain.com\",\r\"FirstName\":\"Ad\",\r\"LastName\":\"Soyad\",\r\"Attributes\": [\r\t{\r\t\t\"Id\":6,\r\t\t\"Value\":\"CEP TELİ\"\r\t},\r\t{\r\t\t\"Id\":7,\r\t\t\"Value\":13\r\t},\r\t{\r\t\t\"Id\":8,\r\t\t\"Value\":\"ABC\"\r\t},\r\t{\r\t\t\"Id\":9,\r\t\t\"Value\":\"AA, BB\"\r\t}\r\t]\r}")
    
        req, _ := http.NewRequest("PUT", url, payload)
    
        req.Header.Add("authorization", "Bearer TOKEN")
        req.Header.Add("content-type", "application/json")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    Geri dönüş aşağıdaki gibi json formatında olacaktır:

    {
        "Id": 1,
        "Err": null
    }
    

    Mevcut üye bilgilerini güncellemek için kullanılır.

    HTTP Request

    PUT https://api.mail2inbox.com/api/Member/<ID>

    Query Parametreleri

    Parametre Açıklama
    Email Üye e-posta adresi.
    FirstName Üye adı.
    LastName Üye soyadı.
    Attributes Liste şeklinde üyeye ait özellikleri barındırır.
    Attributes.Id Özellik Id
    Attributes.Value Özellik değeri

    Result

    Parametre Açıklama
    Id Düzenlenen üye Id bilgisi.
    Err İstek sırasında hata oluşursa, oluşan hata bilgisini içerir.

    Silme

    require 'uri'
    require 'net/http'
    
    url = URI("https://api.mail2inbox.com/api/Member/<ID>")
    
    http = Net::HTTP.new(url.host, url.port)
    
    request = Net::HTTP::Delete.new(url)
    request["authorization"] = 'Bearer TOKEN'
    
    response = http.request(request)
    puts response.read_body
    
    import requests
    
    url = "https://api.mail2inbox.com/api/Member/<ID>"
    
    payload = ""
    headers = {'authorization': 'Bearer TOKEN'}
    
    response = requests.request("DELETE", url, data=payload, headers=headers)
    
    print(response.text)
    
    curl --request DELETE \
      --url https://api.mail2inbox.com/api/Member/<ID> \
      --header 'authorization: Bearer TOKEN'
    
    var settings = {
      "async": true,
      "crossDomain": true,
      "url": "https://api.mail2inbox.com/api/Member/<ID>",
      "method": "DELETE",
      "headers": {
        "authorization": "Bearer TOKEN"
      }
    }
    
    $.ajax(settings).done(function (response) {
      console.log(response);
    });
    
    <?php
    
    $curl = curl_init();
    
    curl_setopt_array($curl, array(
      CURLOPT_URL => "https://api.mail2inbox.com/api/Member/<ID>",
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_ENCODING => "",
      CURLOPT_MAXREDIRS => 10,
      CURLOPT_TIMEOUT => 30,
      CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
      CURLOPT_CUSTOMREQUEST => "DELETE",
      CURLOPT_POSTFIELDS => "",
      CURLOPT_HTTPHEADER => array(
        "authorization: Bearer TOKEN"
      ),
    ));
    
    $response = curl_exec($curl);
    $err = curl_error($curl);
    
    curl_close($curl);
    
    if ($err) {
      echo "cURL Error #:" . $err;
    } else {
      echo $response;
    }
    
    package main
    
    import (
        "fmt"
        "net/http"
        "io/ioutil"
    )
    
    func main() {
    
        url := "https://api.mail2inbox.com/api/Member/<ID>"
    
        req, _ := http.NewRequest("DELETE", url, nil)
    
        req.Header.Add("authorization", "Bearer TOKEN")
    
        res, _ := http.DefaultClient.Do(req)
    
        defer res.Body.Close()
        body, _ := ioutil.ReadAll(res.Body)
    
        fmt.Println(res)
        fmt.Println(string(body))
    
    }
    

    Geri dönüş aşağıdaki gibi json formatında olacaktır:

    {
        "Id": 1,
        "Err": null
    }
    

    Mevcut üyeyi silmek için bu servis kullanılır.

    HTTP Request

    DELETE https://api.mail2inbox.com/api/Member/<ID>

    Query Parametreleri

    Parametre Açıklama
    Id Silinecek üyenin Id bilgisi.

    Result

    Parametre Açıklama
    Id Silinen üyenin Id.
    Err İstek sırasında hata oluşursa, oluşan hata bilgisini içerir.