Pisano Campaing Sharing APIs - Push Notification - Push Notification Sharing
Create a New Push Notification Sharing
Create a new Push Notification Sharing.
POST
/v1/push_notification_campaigns/{campaign_id}/push_notification_sharings
Authentication
Authentication Method
Token token=<API_TOKEN>
Required Header
Authorization
Request
Path Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
campaign_id |
string (uuid) | Yes | Campaign ID | campaign_id |
Headers
| Header | Required | Description | Example |
|---|---|---|---|
Content-Type |
Yes | Request content type. | application/json |
Authorization |
Yes | Pisano API token. | Token token=<API_TOKEN> |
Request Body
{
"phone_numbers": [
"<phone_number>"
],
"custom_attributes": {
"<phone_number>": {
"name": "<name>",
"external_id": "<external_id>",
"email": "<email>"
}
},
"built_in_responses": {
"<phone_number>": {
"customerDetailInfo1": "<customerDetailInfo1>",
"customerDetailInfo2": "<customerDetailInfo2>"
}
}
}
Request Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
phone_numbers |
array | Yes | Phone numbers. |
phone_numbers[] |
string | Phone number. | |
custom_attributes |
object | No | Custom attributes. |
custom_attributes.<phone>.name |
string | Customer name. | |
custom_attributes.<phone>.external_id |
string | External customer identifier. | |
custom_attributes.<phone>.email |
string | Customer email address. | |
built_in_responses |
object | No | Built-in responses. |
built_in_responses.<phone>.customerDetailInfo1 |
string | Built-in response value. | |
built_in_responses.<phone>.customerDetailInfo2 |
string | Built-in response value. |
Request Example
cURL
Request Example
curl --location 'https://<pisanoEnvironment>/v1/push_notification_campaigns/<campaignID>/push_notification_sharings' \
--header 'Authorization: <token>' \
--header 'Content-Type: application/json' \
--data '{
"phone_numbers": [
"<phone_number>"
],
"custom_attributes": {
"<phone_number>": {
"name": "<name>",
"external_id": "<external_id>",
"email": "<email>"
}
},
"built_in_responses": {
"<phone_number>": {
"customerDetailInfo1": "<customerDetailInfo1>",
"customerDetailInfo2": "<customerDetailInfo2>"
}
}
}'
Responses
200
OK
Successful.
Response Fields
| Field | Type | Required | Description |
|---|---|---|---|
status |
string | Processing status returned for the push notification sharing request. | |
delivery_time |
string | Delivery time returned for the request. | |
sidekiq_job_id |
string | Identifier of the background job. | |
correlation_id |
string | Identifier used to track and correlate the request. |
Response Example
JSON
Response Example
{
"status": "enqueued",
"delivery_time": "<delivery_time>",
"sidekiq_job_id": "<sidekiq_job_id>",
"correlation_id": "<correlation_id>"
}
400
Bad Request
An error occured.
- Error Code
13000- Error Message
- An error occured.
{"error_message":"An error occured","data":"An error occured","code":13000}
401
Unauthorized
Wrong authentication token.
- Error Code
13001- Error Message
- Wrong authentication token.
{"error_message":"Wrong authentication token","data":"Wrong authentication token","code":13001,"errors":null}
403
Forbidden
Permission denied.
- Error Code
13013- Error Message
- Permission denied.
{"error_message":"Permission denied","data":"Permission denied","code":13013,"errors":null}
Additional Information
Rate Limits
20 requests/5 sec; 40/25 sec; 80/125 sec; 160/625 sec. On-premise throttle rules can be adjusted or removed.
Usage Limitations
Best practice: trigger no more than 5,000 customers in a single request.
Notes