Add a new Email Address
curl-request
$ curl 'http://localhost:8080/configuration/email' -i -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{
"identifier" : "ce343Hyx2cj9kB",
"host" : "smtp.example.com",
"port" : "8443",
"protocol" : "smtp",
"username" : "user@example.com",
"app_password" : "tliyNlrgTsakVrPX",
"smtp_auth" : "true",
"start_tls" : "true",
"state" : "ACTIVE"
}'
http-request
POST /configuration/email HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 254
{
"identifier" : "ce343Hyx2cj9kB",
"host" : "smtp.example.com",
"port" : "8443",
"protocol" : "smtp",
"username" : "user@example.com",
"app_password" : "tliyNlrgTsakVrPX",
"smtp_auth" : "true",
"start_tls" : "true",
"state" : "ACTIVE"
}
httpie-request
$ echo '{
"identifier" : "ce343Hyx2cj9kB",
"host" : "smtp.example.com",
"port" : "8443",
"protocol" : "smtp",
"username" : "user@example.com",
"app_password" : "tliyNlrgTsakVrPX",
"smtp_auth" : "true",
"start_tls" : "true",
"state" : "ACTIVE"
}' | http POST 'http://localhost:8080/configuration/email' 'Accept:application/json' 'Content-Type:application/json'
Path | Type | Description |
---|---|---|
|
|
EmailConfiguration’s identifier |
|
|
EmailConfiguration’s host |
|
|
EmailConfiguration’s port |
|
|
EmailConfiguration’s protocol |
|
|
EmailConfiguration’s username |
|
|
EmailConfiguration’s app_password |
|
|
EmailConfiguration’s smtp authentication |
|
|
EmailConfiguration’s start tls |
|
|
EmailConfiguration’s state |
http-response
HTTP/1.1 201 Created
Add a new SMS Gateway
curl-request
$ curl 'http://localhost:8080/configuration/sms' -i -X POST -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{
"identifier" : "cF0Td0Ehez",
"auth_token" : "ivT3CFHsMGiAfya6pMslHzEY",
"account_sid" : "e9qLXF3gWOYrjDs8mdUcPief",
"sender_number" : "+233 27 309 4932",
"state" : "DEACTIVATED"
}'
http-request
POST /configuration/sms HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 191
{
"identifier" : "cF0Td0Ehez",
"auth_token" : "ivT3CFHsMGiAfya6pMslHzEY",
"account_sid" : "e9qLXF3gWOYrjDs8mdUcPief",
"sender_number" : "+233 27 309 4932",
"state" : "DEACTIVATED"
}
httpie-request
$ echo '{
"identifier" : "cF0Td0Ehez",
"auth_token" : "ivT3CFHsMGiAfya6pMslHzEY",
"account_sid" : "e9qLXF3gWOYrjDs8mdUcPief",
"sender_number" : "+233 27 309 4932",
"state" : "DEACTIVATED"
}' | http POST 'http://localhost:8080/configuration/sms' 'Accept:application/json' 'Content-Type:application/json'
Path | Type | Description |
---|---|---|
|
|
Configuration Id for SMS Gateway |
|
|
SMS API authentication token |
|
|
SMS API account SID |
|
|
SMS API sender number |
|
|
The state of the Gateway ACTIVE for Gateway to be used DEACTIVATED for inactive gateways |
http-response
HTTP/1.1 201 Created
Delete an Email Address Configuration
curl-request
$ curl 'http://localhost:8080/configuration/email/23KHi8YZq0smH5' -i -X DELETE -H 'Accept: application/json' -H 'Content-Type: application/json'
http-request
DELETE /configuration/email/23KHi8YZq0smH5 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
httpie-request
$ http DELETE 'http://localhost:8080/configuration/email/23KHi8YZq0smH5' 'Accept:application/json' 'Content-Type:application/json'
http-response
HTTP/1.1 200 OK
Delete an SMS Gateway
curl-request
$ curl 'http://localhost:8080/configuration/sms/UluzL7JW60' -i -X DELETE -H 'Accept: application/json' -H 'Content-Type: application/json'
http-request
DELETE /configuration/sms/UluzL7JW60 HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
httpie-request
$ http DELETE 'http://localhost:8080/configuration/sms/UluzL7JW60' 'Accept:application/json' 'Content-Type:application/json'
http-response
HTTP/1.1 200 OK
Find Configuration for an Email Address
curl-request
$ curl 'http://localhost:8080/configuration/email/emailtesty' -i -H 'Accept: */*' -H 'Content-Type: application/json'
http-request
GET /configuration/email/emailtesty HTTP/1.1
Accept: */*
Content-Type: application/json
Host: localhost:8080
httpie-request
$ http GET 'http://localhost:8080/configuration/email/emailtesty' 'Accept:*/*' 'Content-Type:application/json'
http-response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 194
{"identifier":"emailtesty","host":"smtp.google.com","port":"1233","protocol":"smtp","username":"example","app_password":"4wcl2U0h0zg8Js0Y","smtp_auth":"true","start_tls":"true","state":"ACTIVE"}
Find an SMS Gateway
curl-request
$ curl 'http://localhost:8080/configuration/sms/OwpT' -i -H 'Accept: */*' -H 'Content-Type: application/json'
http-request
GET /configuration/sms/OwpT HTTP/1.1
Accept: */*
Content-Type: application/json
Host: localhost:8080
httpie-request
$ http GET 'http://localhost:8080/configuration/sms/OwpT' 'Accept:*/*' 'Content-Type:application/json'
http-response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 128
{"identifier":"OwpT","auth_token":"7iGm5mCf","account_sid":"uIaIQ4p4","sender_number":"+309483932","state":"ACTIVE","type":null}
Update an Email Address Configuration
curl-request
$ curl 'http://localhost:8080/configuration/sms' -i -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{
"identifier" : "zG13mCdRz0meL5",
"host" : "new.host.com",
"port" : "554",
"protocol" : "pop3",
"username" : "newaddress@example.com",
"app_password" : "changePassword",
"smtp_auth" : "false",
"start_tls" : "false",
"state" : "ACTIVE"
}'
http-request
PUT /configuration/sms HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 255
{
"identifier" : "zG13mCdRz0meL5",
"host" : "new.host.com",
"port" : "554",
"protocol" : "pop3",
"username" : "newaddress@example.com",
"app_password" : "changePassword",
"smtp_auth" : "false",
"start_tls" : "false",
"state" : "ACTIVE"
}
httpie-request
$ echo '{
"identifier" : "zG13mCdRz0meL5",
"host" : "new.host.com",
"port" : "554",
"protocol" : "pop3",
"username" : "newaddress@example.com",
"app_password" : "changePassword",
"smtp_auth" : "false",
"start_tls" : "false",
"state" : "ACTIVE"
}' | http PUT 'http://localhost:8080/configuration/sms' 'Accept:application/json' 'Content-Type:application/json'
http-response
HTTP/1.1 202 Accepted
Update an SMS Gateway Configuration
curl-request
$ curl 'http://localhost:8080/configuration/sms' -i -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{
"identifier" : "DfgckBvC1U",
"auth_token" : "TfvP5TADCWFg1HvOKDCzpeif",
"account_sid" : "OCLWkquACjI36KMZ6L02Xf08",
"sender_number" : "+233 27 309 4932",
"state" : "DEACTIVATED"
}'
http-request
PUT /configuration/sms HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: localhost:8080
Content-Length: 191
{
"identifier" : "DfgckBvC1U",
"auth_token" : "TfvP5TADCWFg1HvOKDCzpeif",
"account_sid" : "OCLWkquACjI36KMZ6L02Xf08",
"sender_number" : "+233 27 309 4932",
"state" : "DEACTIVATED"
}
httpie-request
$ echo '{
"identifier" : "DfgckBvC1U",
"auth_token" : "TfvP5TADCWFg1HvOKDCzpeif",
"account_sid" : "OCLWkquACjI36KMZ6L02Xf08",
"sender_number" : "+233 27 309 4932",
"state" : "DEACTIVATED"
}' | http PUT 'http://localhost:8080/configuration/sms' 'Accept:application/json' 'Content-Type:application/json'
http-response
HTTP/1.1 202 Accepted