Info
Welcome to the generated API reference.
Here you will find documentation to all our API endpoints that are available to Notifea clients.
Our current rate limit is set to 120 calls per minute per single IP address. If you wish to raise these limits, get in touch with us, and we will for sure figure out the best rate limit for you.
If you find any troubles or misleading information in our docs, don't hesitate and send as an email with your suggestions to [email protected].
To check our SDK libraries, check our GitHub profile
We appreciate that you are using our services,
Notifea
Prices
GET Prices
Get maximum price that client can pay for single e-mail or sms
Example request:
curl -X GET \
-G "https://api.notifea.com/v1/prices/sms?countryCode=SVK" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.notifea.com/v1/prices/sms"
);
let params = {
"countryCode": "SVK",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.notifea.com/v1/prices/sms',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'countryCode'=> 'SVK',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.notifea.com/v1/prices/sms'
params = {
'countryCode': 'SVK',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200):
{
"data": {
"value": "0.05"
},
"code": "ok"
}
Example response (422):
{
"data": {
"message": "Unable to send SMS to the given country.",
"metadata": [
"recipient"
]
},
"code": "sms.recipient.in.unsupported.country"
}
HTTP Request
GET v1/prices/{type}
URL Parameters
Parameter | Status | Description |
---|---|---|
type |
required | For what type prices should be retrieved. Type can be only sms. |
Query Parameters
Parameter | Status | Description |
---|---|---|
countryCode |
optional | For what country the prices should be returned. Works only for sms type. We expect iso3 code of a country. |
GET SMS supported countries
Returns list of countries to which Notifea clients can send SMS to
Example request:
curl -X GET \
-G "https://api.notifea.com/v1/prices/sms/supported-countries" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.notifea.com/v1/prices/sms/supported-countries"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.notifea.com/v1/prices/sms/supported-countries',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.notifea.com/v1/prices/sms/supported-countries'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"data": [
{
"id": 57,
"nice_name": "Czech Republic",
"iso3": "CZE"
},
{
"id": 193,
"nice_name": "Slovakia",
"iso3": "SVK"
}
],
"metadata": []
},
"code": "ok"
}
HTTP Request
GET v1/prices/sms/supported-countries
SMS
GET collection of sms
Requires authentication
Get paginated collection of sms ordered by date of creation (descending)
Example request:
curl -X GET \
-G "https://api.notifea.com/v1/sms?page=1&pageSize=10" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
const url = new URL(
"https://api.notifea.com/v1/sms"
);
let params = {
"page": "1",
"pageSize": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {access-token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.notifea.com/v1/sms',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
],
'query' => [
'page'=> '1',
'pageSize'=> '10',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.notifea.com/v1/sms'
params = {
'page': '1',
'pageSize': '10',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200):
{
"data": {
"paginated_data": [
{
"uuid": "e8ad60a3-d63c-447a-b2c6-2c2851709e67",
"recipient": "+421902739429",
"content": "Hello. I am using awesome Notifea services!",
"result": 1,
"delete_at": "2020-05-21T20:33:38.000000Z",
"created_at": "2020-04-21T20:33:38.000000Z",
"user_sms_sender": {
"uuid": "c6a319b0-9a4d-4d50-823c-966eb9d28c99",
"sender_name": "Notifea",
"sms_live_time": 30,
"created_at": "2020-03-21T19:03:40.000000Z"
},
"country": {
"id": 1,
"nice_name": "Slovakia"
}
}
],
"paginated_metadata": {
"current_page": 1,
"first_page_url": "http:\/\/api.notifea\/sms?page=1",
"from": 1,
"last_page": 17,
"last_page_url": "http:\/\/api.notifea\/sms?page=17",
"next_page_url": "http:\/\/api.notifea\/sms?page=2",
"path": "http:\/\/api.notifea\/sms",
"per_page": "1",
"prev_page_url": null,
"to": 1,
"total": 17
}
},
"code": "ok"
}
Example response (401):
{
"data": {
"message": "Unauthorized",
"metadata": []
},
"code": "unauthorized"
}
Example response (422):
{
"data": {
"message": "Authorization header is not valid JWT",
"metadata": []
},
"code": "authorization.header.invalid.type"
}
Example response (403):
{
"data": {
"message": "You are using an IP that is not whitelisted",
"metadata": []
},
"code": "access.token.ip.not.whitelisted"
}
Example response (403):
{
"data": {
"message": "Access token expired",
"metadata": []
},
"code": "access.token.expired"
}
Example response (429):
{
"data": {
"message": "Too many attempts. Please try again in 1 minute."
},
"code": "too.many.attempts"
}
HTTP Request
GET v1/sms
Query Parameters
Parameter | Status | Description |
---|---|---|
page |
optional | What page should be returned. Default is 1. It has to be numeric. |
pageSize |
optional | How many entities should be returned. Default is 10. It has to be numeric. Minimum 1 and maximum 100. |
GET single sms
Requires authentication
Get single sms
Example request:
curl -X GET \
-G "https://api.notifea.com/v1/sms/8fc2c850-81c0-4424-823a-aa4727441864" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
const url = new URL(
"https://api.notifea.com/v1/sms/8fc2c850-81c0-4424-823a-aa4727441864"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {access-token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.notifea.com/v1/sms/8fc2c850-81c0-4424-823a-aa4727441864',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.notifea.com/v1/sms/8fc2c850-81c0-4424-823a-aa4727441864'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"uuid": "e8ad60a3-d63c-447a-b2c6-2c2851709e67",
"recipient": "+421902739429",
"content": "Hello. I am using awesome Notifea services!",
"result": 1,
"delete_at": "2020-05-21T20:33:38.000000Z",
"created_at": "2020-04-21T20:33:38.000000Z",
"user_sms_sender": {
"uuid": "c6a319b0-9a4d-4d50-823c-966eb9d28c99",
"sender_name": "Notifea",
"sms_live_time": 30,
"created_at": "2020-03-21T19:03:40.000000Z"
},
"country": {
"id": 1,
"nice_name": "Slovakia"
}
},
"code": "ok"
}
Example response (401):
{
"data": {
"message": "Unauthorized",
"metadata": []
},
"code": "unauthorized"
}
Example response (404):
{
"data": {
"message": "sms was not found",
"metadata": []
},
"code": "sms.not.found"
}
Example response (422):
{
"data": {
"message": "Authorization header is not valid JWT",
"metadata": []
},
"code": "authorization.header.invalid.type"
}
Example response (403):
{
"data": {
"message": "You are using an IP that is not whitelisted",
"metadata": []
},
"code": "access.token.ip.not.whitelisted"
}
Example response (403):
{
"data": {
"message": "Access token expired",
"metadata": []
},
"code": "access.token.expired"
}
Example response (429):
{
"data": {
"message": "Too many attempts. Please try again in 1 minute."
},
"code": "too.many.attempts"
}
HTTP Request
GET v1/sms/{smsUUID}
URL Parameters
Parameter | Status | Description |
---|---|---|
smsUUID |
required | Unique ID of an entity. |
SEND single sms
Requires authentication
Send single SMS
Set up your webhooks if you wish to get notified after each time we send an sms. You can do so in your Sms sender overview in Webhooks sections
Successful action triggers socket event - SmsCreatedEvent.
Example request:
curl -X POST \
"https://api.notifea.com/v1/sms" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}" \
-d '{"sms_sender_id":"c6a319b0-9a4d-4d50-823c-966eb9d28c99","content":"I am using Notifea. It is awesome!","recipient":"+421902739429"}'
const url = new URL(
"https://api.notifea.com/v1/sms"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {access-token}",
};
let body = {
"sms_sender_id": "c6a319b0-9a4d-4d50-823c-966eb9d28c99",
"content": "I am using Notifea. It is awesome!",
"recipient": "+421902739429"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.notifea.com/v1/sms',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
],
'json' => [
'sms_sender_id' => 'c6a319b0-9a4d-4d50-823c-966eb9d28c99',
'content' => 'I am using Notifea. It is awesome!',
'recipient' => '+421902739429',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.notifea.com/v1/sms'
payload = {
"sms_sender_id": "c6a319b0-9a4d-4d50-823c-966eb9d28c99",
"content": "I am using Notifea. It is awesome!",
"recipient": "+421902739429"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"uuid": "e8ad60a3-d63c-447a-b2c6-2c2851709e67",
"recipient": "+421902739429",
"content": "Hello. I am using awesome Notifea services!",
"result": 1,
"delete_at": "2020-05-21T20:33:38.000000Z",
"created_at": "2020-04-21T20:33:38.000000Z",
"user_sms_sender": {
"uuid": "c6a319b0-9a4d-4d50-823c-966eb9d28c99",
"sender_name": "Notifea",
"sms_live_time": 30,
"created_at": "2020-03-21T19:03:40.000000Z"
},
"country": {
"id": 1,
"nice_name": "Slovakia"
}
},
"code": "ok"
}
Example response (401):
{
"data": {
"message": "Unauthorized",
"metadata": []
},
"code": "unauthorized"
}
Example response (422):
{
"data": {
"message": "Sms sender you are trying to send from can not be used with this access token",
"metadata": []
},
"code": "sms.sender.not.whitelisted"
}
Example response (422):
{
"data": {
"message": "SMS content violates validation rules",
"metadata": [
"content"
]
},
"code": "content.not.valid"
}
Example response (422):
{
"data": {
"message": "We were unable to parse recipient number.",
"metadata": [
"recipient"
]
},
"code": "unable.to.parse.recipient"
}
Example response (422):
{
"data": {
"message": "Unable to send SMS to the given country.",
"metadata": [
"recipient"
]
},
"code": "sms.recipient.in.unsupported.country"
}
Example response (422):
{
"data": {
"message": "Authorization header is not valid JWT",
"metadata": []
},
"code": "authorization.header.invalid.type"
}
Example response (403):
{
"data": {
"message": "You are using an IP that is not whitelisted",
"metadata": []
},
"code": "access.token.ip.not.whitelisted"
}
Example response (403):
{
"data": {
"message": "Access token expired",
"metadata": []
},
"code": "access.token.expired"
}
Example response (429):
{
"data": {
"message": "Too many attempts. Please try again in 1 minute."
},
"code": "too.many.attempts"
}
HTTP Request
POST v1/sms
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
sms_sender_id |
string | required | Unique sms_sender_id that you can find in your Sms sender overview in How to use section . |
content |
string | required | Any content you want your message to have. |
recipient |
string | required | Full mobile phone number with + and country code prefix. |
DELETE single sms
Requires authentication
Delete single sms.
Successful action triggers socket event - SmsDeletedEvent.
Example request:
curl -X DELETE \
"https://api.notifea.com/v1/sms/8fc2c850-81c0-4424-823a-aa4727441864" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
const url = new URL(
"https://api.notifea.com/v1/sms/8fc2c850-81c0-4424-823a-aa4727441864"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {access-token}",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.notifea.com/v1/sms/8fc2c850-81c0-4424-823a-aa4727441864',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.notifea.com/v1/sms/8fc2c850-81c0-4424-823a-aa4727441864'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (200):
{
"data": [],
"code": "ok"
}
Example response (401):
{
"data": {
"message": "Unauthorized",
"metadata": []
},
"code": "unauthorized"
}
Example response (404):
{
"data": {
"message": "sms was not found",
"metadata": []
},
"code": "sms.not.found"
}
Example response (422):
{
"data": {
"message": "Authorization header is not valid JWT",
"metadata": []
},
"code": "authorization.header.invalid.type"
}
Example response (403):
{
"data": {
"message": "You are using an IP that is not whitelisted",
"metadata": []
},
"code": "access.token.ip.not.whitelisted"
}
Example response (403):
{
"data": {
"message": "Access token expired",
"metadata": []
},
"code": "access.token.expired"
}
Example response (429):
{
"data": {
"message": "Too many attempts. Please try again in 1 minute."
},
"code": "too.many.attempts"
}
HTTP Request
DELETE v1/sms/{smsUUID}
URL Parameters
Parameter | Status | Description |
---|---|---|
smsUUID |
required | Unique ID of an entity. |
SMS Senders
GET collection of sms senders
Requires authentication
Get paginated collection of sms senders ordered by date of creation (descending)
Example request:
curl -X GET \
-G "https://api.notifea.com/v1/user-sms-senders?page=1&pageSize=10" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
const url = new URL(
"https://api.notifea.com/v1/user-sms-senders"
);
let params = {
"page": "1",
"pageSize": "10",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {access-token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.notifea.com/v1/user-sms-senders',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
],
'query' => [
'page'=> '1',
'pageSize'=> '10',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.notifea.com/v1/user-sms-senders'
params = {
'page': '1',
'pageSize': '10',
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
Example response (200):
{
"data": {
"paginated_data": [
{
"uuid": "e6bd8388-664b-4025-95db-e72d114c5d56",
"sender_name": "Notifea 2",
"sms_live_time": 30,
"created_at": "2021-03-21T19:13:49.000000Z",
"test_mode": 0
},
{
"uuid": "c6a319b0-9a4d-4d50-823c-966eb9d28c99",
"sender_name": "Notifea",
"sms_live_time": 24,
"created_at": "2021-03-21T19:03:40.000000Z",
"test_mode": 1
}
],
"paginated_metadata": {
"current_page": 1,
"first_page_url": "http:\/\/api.notifea\/v1\/user-sms-senders?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "http:\/\/api.notifea\/v1\/user-sms-senders?page=1",
"next_page_url": null,
"path": "http:\/\/api.notifea\/v1\/user-sms-senders",
"per_page": 10,
"prev_page_url": null,
"to": 2,
"total": 2
}
},
"code": "ok"
}
Example response (401):
{
"data": {
"message": "Unauthorized",
"metadata": []
},
"code": "unauthorized"
}
Example response (422):
{
"data": {
"message": "Authorization header is not valid JWT",
"metadata": []
},
"code": "authorization.header.invalid.type"
}
Example response (403):
{
"data": {
"message": "You are using an IP that is not whitelisted",
"metadata": []
},
"code": "access.token.ip.not.whitelisted"
}
Example response (403):
{
"data": {
"message": "Access token expired",
"metadata": []
},
"code": "access.token.expired"
}
Example response (429):
{
"data": {
"message": "Too many attempts. Please try again in 1 minute."
},
"code": "too.many.attempts"
}
HTTP Request
GET v1/user-sms-senders
Query Parameters
Parameter | Status | Description |
---|---|---|
page |
optional | What page should be returned. Default is 1. It has to be numeric. |
pageSize |
optional | How many entities should be returned. Default is 10. It has to be numeric. Minimum 1 and maximum 100. |
GET single sms sender
Requires authentication
Get single sms sender
Example request:
curl -X GET \
-G "https://api.notifea.com/v1/user-sms-senders/8fc2c850-81c0-4424-823a-aa4727441864" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
const url = new URL(
"https://api.notifea.com/v1/user-sms-senders/8fc2c850-81c0-4424-823a-aa4727441864"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {access-token}",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.notifea.com/v1/user-sms-senders/8fc2c850-81c0-4424-823a-aa4727441864',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.notifea.com/v1/user-sms-senders/8fc2c850-81c0-4424-823a-aa4727441864'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"uuid": "c6a319b0-9a4d-4d50-823c-966eb9d28c99",
"sender_name": "Notifea",
"sms_live_time": 24,
"created_at": "2020-03-21T19:03:40.000000Z",
"test_mode": 0
},
"code": "ok"
}
Example response (401):
{
"data": {
"message": "Unauthorized",
"metadata": []
},
"code": "unauthorized"
}
Example response (404):
{
"data": {
"message": "user_sms_sender was not found",
"metadata": []
},
"code": "user_sms_sender.not.found"
}
Example response (422):
{
"data": {
"message": "Authorization header is not valid JWT",
"metadata": []
},
"code": "authorization.header.invalid.type"
}
Example response (403):
{
"data": {
"message": "You are using an IP that is not whitelisted",
"metadata": []
},
"code": "access.token.ip.not.whitelisted"
}
Example response (403):
{
"data": {
"message": "Access token expired",
"metadata": []
},
"code": "access.token.expired"
}
Example response (429):
{
"data": {
"message": "Too many attempts. Please try again in 1 minute."
},
"code": "too.many.attempts"
}
HTTP Request
GET v1/user-sms-senders/{userSmsSenderUuid}
URL Parameters
Parameter | Status | Description |
---|---|---|
userSmsSenderUuid |
required | Unique ID of an entity. |
CREATE sms sender
Requires authentication
Create sms sender
This endpoint gives you ability to create unique sms sender names for you to use and afterwards track in application.
This is especially handy if you have multiple different clients and you need to send SMS on their behalf.
Successful action triggers socket event - UserSmsSenderCreatedEvent.
Example request:
curl -X POST \
"https://api.notifea.com/v1/user-sms-senders" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}" \
-d '{"sender_name":"c6a319b0-9a4d-4d50-823c-966eb9d28c99","sms_live_time":"15","test_mode":"1"}'
const url = new URL(
"https://api.notifea.com/v1/user-sms-senders"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {access-token}",
};
let body = {
"sender_name": "c6a319b0-9a4d-4d50-823c-966eb9d28c99",
"sms_live_time": "15",
"test_mode": "1"
}
fetch(url, {
method: "POST",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://api.notifea.com/v1/user-sms-senders',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
],
'json' => [
'sender_name' => 'c6a319b0-9a4d-4d50-823c-966eb9d28c99',
'sms_live_time' => '15',
'test_mode' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.notifea.com/v1/user-sms-senders'
payload = {
"sender_name": "c6a319b0-9a4d-4d50-823c-966eb9d28c99",
"sms_live_time": "15",
"test_mode": "1"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
response = requests.request('POST', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"uuid": "c6a319b0-9a4d-4d50-823c-966eb9d28c99",
"sender_name": "Notifea",
"sms_live_time": 24,
"created_at": "2020-03-21T19:03:40.000000Z",
"test_mode": 0
},
"code": "ok"
}
Example response (401):
{
"data": {
"message": "Unauthorized",
"metadata": []
},
"code": "unauthorized"
}
Example response (422):
{
"data": {
"message": "Authorization header is not valid JWT",
"metadata": []
},
"code": "authorization.header.invalid.type"
}
Example response (403):
{
"data": {
"message": "You are using an IP that is not whitelisted",
"metadata": []
},
"code": "access.token.ip.not.whitelisted"
}
Example response (403):
{
"data": {
"message": "Access token expired",
"metadata": []
},
"code": "access.token.expired"
}
Example response (429):
{
"data": {
"message": "Too many attempts. Please try again in 1 minute."
},
"code": "too.many.attempts"
}
HTTP Request
POST v1/user-sms-senders
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
sender_name |
string | required | Unique sender name that will be shown as a Sender in SMS. Must consist of max 11 chars. Only letters, numbers, dashses and underscores allowed. |
sms_live_time |
numeric | optional | Specify how long should we keep all SMS you sent in our system. You can specify live time up to 30 days. If you don't want us to store any SMS, set live time to 0. |
test_mode |
numeric | optional | Set 0 or 1 based on whether you want test mode to be enabled or disabled. |
UPDATE sms sender
Requires authentication
Update sms sender
This endpoint gives you ability to update sender name and sms live time of existing sms sender
Successful action triggers socket event - UserSmsSenderUpdatedEvent.
Example request:
curl -X PUT \
"https://api.notifea.com/v1/user-sms-senders/1" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}" \
-d '{"sender_name":"Notifea","sms_live_time":"15","test_mode":"1"}'
const url = new URL(
"https://api.notifea.com/v1/user-sms-senders/1"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {access-token}",
};
let body = {
"sender_name": "Notifea",
"sms_live_time": "15",
"test_mode": "1"
}
fetch(url, {
method: "PUT",
headers: headers,
body: body
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->put(
'https://api.notifea.com/v1/user-sms-senders/1',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
],
'json' => [
'sender_name' => 'Notifea',
'sms_live_time' => '15',
'test_mode' => '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.notifea.com/v1/user-sms-senders/1'
payload = {
"sender_name": "Notifea",
"sms_live_time": "15",
"test_mode": "1"
}
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
Example response (200):
{
"data": {
"uuid": "c6a319b0-9a4d-4d50-823c-966eb9d28c99",
"sender_name": "Notifea",
"sms_live_time": 24,
"created_at": "2020-03-21T19:03:40.000000Z",
"test_mode": 0
},
"code": "ok"
}
Example response (401):
{
"data": {
"message": "Unauthorized",
"metadata": []
},
"code": "unauthorized"
}
Example response (404):
{
"data": {
"message": "user_sms_sender was not found",
"metadata": []
},
"code": "user_sms_sender.not.found"
}
Example response (422):
{
"data": {
"message": "Authorization header is not valid JWT",
"metadata": []
},
"code": "authorization.header.invalid.type"
}
Example response (403):
{
"data": {
"message": "You are using an IP that is not whitelisted",
"metadata": []
},
"code": "access.token.ip.not.whitelisted"
}
Example response (403):
{
"data": {
"message": "Access token expired",
"metadata": []
},
"code": "access.token.expired"
}
Example response (422):
{
"data": {
"message": "SMS Sender with this name already exists",
"metadata": []
},
"code": "sms.sender.already.exists"
}
Example response (429):
{
"data": {
"message": "Too many attempts. Please try again in 1 minute."
},
"code": "too.many.attempts"
}
HTTP Request
PUT v1/user-sms-senders/{userSmsSenderUuid}
Body Parameters
Parameter | Type | Status | Description |
---|---|---|---|
sender_name |
string | required | Unique sender name that will be shown as a Sender in SMS. Must consist of max 11 chars. Only letters, numbers, dashses and underscores allowed. |
sms_live_time |
numeric | required | Specify how long should we keep all SMS you sent in our system. You can specify live time up to 30 days. If you don't want us to store any SMS, set live time to 0. |
test_mode |
numeric | optional | Set 0 or 1 based on whether you want test mode to be enabled or disabled. |
DELETE single sms sender
Requires authentication
Delete single sms sender
Successful action triggers socket event - UserSmsSenderDeletedEvent.
Example request:
curl -X DELETE \
"https://api.notifea.com/v1/user-sms-senders/8fc2c850-81c0-4424-823a-aa4727441864" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer {access-token}"
const url = new URL(
"https://api.notifea.com/v1/user-sms-senders/8fc2c850-81c0-4424-823a-aa4727441864"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {access-token}",
};
fetch(url, {
method: "DELETE",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->delete(
'https://api.notifea.com/v1/user-sms-senders/8fc2c850-81c0-4424-823a-aa4727441864',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'Authorization' => 'Bearer {access-token}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.notifea.com/v1/user-sms-senders/8fc2c850-81c0-4424-823a-aa4727441864'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {access-token}'
}
response = requests.request('DELETE', url, headers=headers)
response.json()
Example response (200):
{
"data": [],
"code": "ok"
}
Example response (401):
{
"data": {
"message": "Unauthorized",
"metadata": []
},
"code": "unauthorized"
}
Example response (404):
{
"data": {
"message": "user_sms_sender was not found",
"metadata": []
},
"code": "user_sms_sender.not.found"
}
Example response (422):
{
"data": {
"message": "Authorization header is not valid JWT",
"metadata": []
},
"code": "authorization.header.invalid.type"
}
Example response (403):
{
"data": {
"message": "You are using an IP that is not whitelisted",
"metadata": []
},
"code": "access.token.ip.not.whitelisted"
}
Example response (403):
{
"data": {
"message": "Access token expired",
"metadata": []
},
"code": "access.token.expired"
}
Example response (429):
{
"data": {
"message": "Too many attempts. Please try again in 1 minute."
},
"code": "too.many.attempts"
}
HTTP Request
DELETE v1/user-sms-senders/{userSmsSenderUuid}
URL Parameters
Parameter | Status | Description |
---|---|---|
userSmsSenderUuid |
required | Unique ID of an entity. |
Watchdog
GET status of API
Reveal status of our public API service.
If you get 200 status code back, we are doing a good job and we are up and running.
Any other status might indicate we are having some difficulties.
Example request:
curl -X GET \
-G "https://api.notifea.com/" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.notifea.com/"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.notifea.com/',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.notifea.com/'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
Example response (200):
{
"data": {
"name": "Notifea API 1.0.0"
},
"code": "ok"
}
HTTP Request
GET /
general
docs
Example request:
curl -X GET \
-G "https://api.notifea.com/docs" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
const url = new URL(
"https://api.notifea.com/docs"
);
let headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers: headers,
})
.then(response => response.json())
.then(json => console.log(json));
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://api.notifea.com/docs',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://api.notifea.com/docs'
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
HTTP Request
GET docs