Skip to main content
POST
/
push_notifications
/
create
Create notification
curl --request POST \
  --url https://app.xmenu.it/api/push_notifications/create \
  --header 'Content-Type: application/json' \
  --header 'X-Client-Id: <api-key>' \
  --header 'X-Client-Secret: <api-key>' \
  --data '
{
  "title": "<string>",
  "message": "<string>",
  "subrestaurant_code": "<string>",
  "subrestaurant_uid": "<string>"
}
'
{
"success": true,
"uid": "<string>",
"error": "<string>",
"message": "<string>"
}
write:push_notifications

Authorizations

X-Client-Id
string
header
required

Client ID for API Client authentication (must be used together with Client Secret)

X-Client-Secret
string
header
required

Client Secret for API Client authentication (must be used together with Client ID)

Body

application/json
title
string
required

Push notification title (maximum 50 characters)

Maximum string length: 50
message
string
required

Push notification body text (maximum 500 characters)

Maximum string length: 500
subrestaurant_code
string

Subrestaurant identification code for location-specific delivery (alternative to subrestaurant_uid)

subrestaurant_uid
string

Subrestaurant unique identifier for location-specific delivery (alternative to subrestaurant_code)

Response

Operation response

success
boolean
required

Operation result: true if successful, false if failed

uid
string

Unique identifier of the created notification (present only on success)

error
string

Error code if the operation failed. Possible values:

  • MAX_LENGTH_EXCEEDED = Character limit exceeded for title or message
  • SUBRESTAURANT_NOT_FOUND = Subrestaurant not found

See Error codes for general error codes that may also occur.

message
string

Human-readable error description if the operation failed