curl --request PUT \
--url https://api.messaging.phonovation.com/subscriptions/1/subscription/{channel}/{subscriptionId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Updated group",
"profile": {
"profileId": "NOTIF-98765"
},
"events": [
"DELIVERY"
],
"criteria": [
{
"applicationId": "production",
"entityId": "entity1"
},
{
"applicationId": "production",
"entityId": "entity2"
},
{
"applicationId": "test",
"entityId": "entity1"
}
],
"resources": [
"1234"
],
"users": [
"user1",
"user2"
]
}
'import requests
url = "https://api.messaging.phonovation.com/subscriptions/1/subscription/{channel}/{subscriptionId}"
payload = {
"name": "Updated group",
"profile": { "profileId": "NOTIF-98765" },
"events": ["DELIVERY"],
"criteria": [
{
"applicationId": "production",
"entityId": "entity1"
},
{
"applicationId": "production",
"entityId": "entity2"
},
{
"applicationId": "test",
"entityId": "entity1"
}
],
"resources": ["1234"],
"users": ["user1", "user2"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.messaging.phonovation.com/subscriptions/1/subscription/{channel}/{subscriptionId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"name\": \"Updated group\",\n \"profile\": {\n \"profileId\": \"NOTIF-98765\"\n },\n \"events\": [\n \"DELIVERY\"\n ],\n \"criteria\": [\n {\n \"applicationId\": \"production\",\n \"entityId\": \"entity1\"\n },\n {\n \"applicationId\": \"production\",\n \"entityId\": \"entity2\"\n },\n {\n \"applicationId\": \"test\",\n \"entityId\": \"entity1\"\n }\n ],\n \"resources\": [\n \"1234\"\n ],\n \"users\": [\n \"user1\",\n \"user2\"\n ]\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.put("https://api.messaging.phonovation.com/subscriptions/1/subscription/{channel}/{subscriptionId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated group\",\n \"profile\": {\n \"profileId\": \"NOTIF-98765\"\n },\n \"events\": [\n \"DELIVERY\"\n ],\n \"criteria\": [\n {\n \"applicationId\": \"production\",\n \"entityId\": \"entity1\"\n },\n {\n \"applicationId\": \"production\",\n \"entityId\": \"entity2\"\n },\n {\n \"applicationId\": \"test\",\n \"entityId\": \"entity1\"\n }\n ],\n \"resources\": [\n \"1234\"\n ],\n \"users\": [\n \"user1\",\n \"user2\"\n ]\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/subscriptions/1/subscription/{channel}/{subscriptionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Updated group',
'profile' => [
'profileId' => 'NOTIF-98765'
],
'events' => [
'DELIVERY'
],
'criteria' => [
[
'applicationId' => 'production',
'entityId' => 'entity1'
],
[
'applicationId' => 'production',
'entityId' => 'entity2'
],
[
'applicationId' => 'test',
'entityId' => 'entity1'
]
],
'resources' => [
'1234'
],
'users' => [
'user1',
'user2'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Updated group',
profile: {profileId: 'NOTIF-98765'},
events: ['DELIVERY'],
criteria: [
{applicationId: 'production', entityId: 'entity1'},
{applicationId: 'production', entityId: 'entity2'},
{applicationId: 'test', entityId: 'entity1'}
],
resources: ['1234'],
users: ['user1', 'user2']
})
};
fetch('https://api.messaging.phonovation.com/subscriptions/1/subscription/{channel}/{subscriptionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"subscriptionId": "ABC-123-DEF",
"profile": {
"profileId": "NOTIF-32395",
"security": {
"authId": "NEWAUTH-9291"
}
}
}Update subscription
This method allows you to update the subscription. You can change its properties and provide an ID of a profile if you wish to change it.
Required scope: Enable one of: subscriptions:manage.
curl --request PUT \
--url https://api.messaging.phonovation.com/subscriptions/1/subscription/{channel}/{subscriptionId} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Updated group",
"profile": {
"profileId": "NOTIF-98765"
},
"events": [
"DELIVERY"
],
"criteria": [
{
"applicationId": "production",
"entityId": "entity1"
},
{
"applicationId": "production",
"entityId": "entity2"
},
{
"applicationId": "test",
"entityId": "entity1"
}
],
"resources": [
"1234"
],
"users": [
"user1",
"user2"
]
}
'import requests
url = "https://api.messaging.phonovation.com/subscriptions/1/subscription/{channel}/{subscriptionId}"
payload = {
"name": "Updated group",
"profile": { "profileId": "NOTIF-98765" },
"events": ["DELIVERY"],
"criteria": [
{
"applicationId": "production",
"entityId": "entity1"
},
{
"applicationId": "production",
"entityId": "entity2"
},
{
"applicationId": "test",
"entityId": "entity1"
}
],
"resources": ["1234"],
"users": ["user1", "user2"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)using RestSharp;
var options = new RestClientOptions("https://api.messaging.phonovation.com/subscriptions/1/subscription/{channel}/{subscriptionId}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"name\": \"Updated group\",\n \"profile\": {\n \"profileId\": \"NOTIF-98765\"\n },\n \"events\": [\n \"DELIVERY\"\n ],\n \"criteria\": [\n {\n \"applicationId\": \"production\",\n \"entityId\": \"entity1\"\n },\n {\n \"applicationId\": \"production\",\n \"entityId\": \"entity2\"\n },\n {\n \"applicationId\": \"test\",\n \"entityId\": \"entity1\"\n }\n ],\n \"resources\": [\n \"1234\"\n ],\n \"users\": [\n \"user1\",\n \"user2\"\n ]\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
HttpResponse<String> response = Unirest.put("https://api.messaging.phonovation.com/subscriptions/1/subscription/{channel}/{subscriptionId}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Updated group\",\n \"profile\": {\n \"profileId\": \"NOTIF-98765\"\n },\n \"events\": [\n \"DELIVERY\"\n ],\n \"criteria\": [\n {\n \"applicationId\": \"production\",\n \"entityId\": \"entity1\"\n },\n {\n \"applicationId\": \"production\",\n \"entityId\": \"entity2\"\n },\n {\n \"applicationId\": \"test\",\n \"entityId\": \"entity1\"\n }\n ],\n \"resources\": [\n \"1234\"\n ],\n \"users\": [\n \"user1\",\n \"user2\"\n ]\n}")
.asString();<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.messaging.phonovation.com/subscriptions/1/subscription/{channel}/{subscriptionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Updated group',
'profile' => [
'profileId' => 'NOTIF-98765'
],
'events' => [
'DELIVERY'
],
'criteria' => [
[
'applicationId' => 'production',
'entityId' => 'entity1'
],
[
'applicationId' => 'production',
'entityId' => 'entity2'
],
[
'applicationId' => 'test',
'entityId' => 'entity1'
]
],
'resources' => [
'1234'
],
'users' => [
'user1',
'user2'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Updated group',
profile: {profileId: 'NOTIF-98765'},
events: ['DELIVERY'],
criteria: [
{applicationId: 'production', entityId: 'entity1'},
{applicationId: 'production', entityId: 'entity2'},
{applicationId: 'test', entityId: 'entity1'}
],
resources: ['1234'],
users: ['user1', 'user2']
})
};
fetch('https://api.messaging.phonovation.com/subscriptions/1/subscription/{channel}/{subscriptionId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"subscriptionId": "ABC-123-DEF",
"profile": {
"profileId": "NOTIF-32395",
"security": {
"authId": "NEWAUTH-9291"
}
}
}Authorizations
This is the most secure authorization type and the one with the most flexibility.
API keys can be generated by calling the dedicated API method. Furthermore, API keys can have a limited scope and cover only some API methods. Lastly, they can be revoked at any time. This range of possibilities makes API keys well suited for separating the API access rights across multiple applications or use cases. Finally, the loss of an API key is easily manageable.
You can manage your API keys from GUI, or programmatically with dedicated API.
API key Authorization header example:
Authorization: App 003026bbc133714df1834b8638bb496e-8f4b3d9a-e931-478d-a994-28a725159ab9
Path Parameters
ID of the subscription you want to modify.
Channel name. A separate subscription is needed for each channel.
AGENT_OS, APPLE_MESSAGES_FOR_BUSINESS, BLOCKLIST, CUSTOMER_ENGAGEMENT, EMAIL, FACEBOOK, KAKAO_ALIM, KAKAO_BRAND_MESSAGE, LINE, MMS, MOBILE_IDENTITY, MOBILE_PUSH, NUMBER_LOOKUP, OPEN_CHANNEL, RCS, REGISTRATION, SMS, VIBER, VOICE_VIDEO, WEB_PUSH, WHATSAPP, ZALO Body
- AgentOS
- Apple Messages For Business
- Blocklist
- Customer Engagement
- Email
- Facebook
- Kakao Alim
- Kakao Brand Message
- Line
- MMS
- Mobile Identity
- Mobile Push
- Number Lookup
- Open Channel
- RCS
- Registration
- SMS
- Viber
- Voice and Video
- Web Push
- Whatsapp
- Zalo
Subscription group.
Notification profile object holding settings for your webhook URL and a reference to security settings.
Show child attributes
Show child attributes
List of events available for subscription. Note that a set of events available for each channel is different; subscription to events that are unavailable for a certain channel will be ignored. For more details, see the availability table. In case you are configuring inbound Subscription please check all the details available here.
255CONVERSATION_AGENT_STATUS_UPDATED, CONVERSATION_ASSIGNMENT_UPDATED, CONVERSATION_CREATED, CONVERSATION_CUSTOMER_UPDATED, CONVERSATION_FORM_FIELD_UPDATED, CONVERSATION_FORM_UPDATED, CONVERSATION_MESSAGE_DELETED, CONVERSATION_MESSAGE_RECEIVED, CONVERSATION_MESSAGE_SENT, CONVERSATION_MESSAGE_UPDATED, CONVERSATION_NOTE_ADDED, CONVERSATION_NOTE_REMOVED, CONVERSATION_NOTE_UPDATED, CONVERSATION_PRIORITY_UPDATED, CONVERSATION_QUEUE_UPDATED, CONVERSATION_SLA_POLICY_UPDATED, CONVERSATION_STATUS_UPDATED, CONVERSATION_SUMMARY_UPDATED, CONVERSATION_TAG_ADDED, CONVERSATION_TAG_REMOVED, CONVERSATION_TOPIC_UPDATED, MOBILE_APP_APP_LAUNCH, MOBILE_APP_DEPERSONALIZE, MOBILE_APP_INSTALL, MOBILE_APP_PERSONALIZE, MOBILE_APP_UNINSTALL, PEOPLE_CUSTOM_AND_TEMPLATE_EVENTS, PERSON_ATTRIBUTE_CHANGED, PERSON_CONTACT_INFORMATION_CREATED, PERSON_CONTACT_INFORMATION_DELETED, PERSON_CONTACT_INFORMATION_UPDATED, PERSON_CREATED, PERSON_DELETED, PERSON_MERGED, PERSON_TAG_ADDED, PERSON_TAG_DELETED, WEB_SDK_PAGE_VIEW, WEB_SDK_SESSION_ENDED, WEB_SDK_SESSION_STARTED Subscription group name.
1 - 255Subscription group identifier. Subscriptions with different group IDs for the same event will each receive the event independently, enabling multi-webhook delivery.
255Application and Entity pair to match. You can set the rule to match only Application or only Entity if necessary, omitting the other item.
255Show child attributes
Show child attributes
List of resources to match. At the moment, this could be a sender name (whether numeric or alpha) used on message submit.
255List of resources to match. At the moment, this could be a sender name (whether numeric or alpha) used on message submit.
255List of users to match. You can provide usernames from your account.
255List of users to match. You can provide usernames from your account.
255List of keywords to match. Route inbound messages by their first word. A customer texting STOP or ORDER to your number triggers only the subscriptions matching that keyword.
255List of keywords to match. Route inbound messages by their first word. A customer texting STOP or ORDER to your number triggers only the subscriptions matching that keyword.
50