Notification Custom Redirect API
info
This API is different from the Notification API as it allows you to customize the redirect URL when users click on the notification.
This API allows you to send notifications to specific users of the Woven City App.
Notifications appear in the user's OS notification panel and Woven City App notification panel.
Upon clicking on the notification, users will be redirected to the specified URL defined in the notification request.


Version Requirements
- MiniApp SDK Version: Not applicable (server-side HTTP API)
- MiniApp Runtime Engine Version:
>= 1.0.0
API Spec
{
"/mini-app-runtime/v1/notification/custom_redirect": {
"post": {
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"project_id": {
"type": "string",
"format": "uuid"
},
"redirect_to": {
"type": "string",
"maxLength": 255
},
"title": {
"type": "string",
"maxLength": 100
},
"app_level_notification_body": {
"type": "string",
"maxLength": 255
},
"os_level_notification_body": {
"type": "string",
"maxLength": 255
},
"woven_ids": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"project_id",
"redirect_to",
"title",
"app_level_notification_body",
"os_level_notification_body",
"woven_ids"
],
"additionalProperties": false
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Default Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"data": {
"type": "object",
"properties": {
"woven_ids": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"woven_ids"
],
"additionalProperties": false
},
"info": {
"type": "string",
"minLength": 1
}
},
"required": [
"success",
"data",
"info"
],
"additionalProperties": false
}
}
}
}
}
}
}
}
Sending Notification
Prerequisites:
- You received a Server Side Client secret upon creation of your first MiniApp version.
- This API is only whitelisted for specific projects. Please reach out to the MiniApp Platform Team on Woven Chat through the MiniApp Explorer Project to check if your project is whitelisted and request access if it's not.
caution
This API must be used on the backend only; please avoid using it on the frontend to not expose your client secret.
Steps (via Curl)
- Get Access Token
curl -d 'client_id={YOUR_KEYCLOAK_CLIENT_ID}' \
-d 'client_secret={YOUR_KEYCLOAK_CLIENT_SECRET}' \
-d 'grant_type=client_credentials' \
'https://id.woven-city.toyota/auth/realms/woven/protocol/openid-connect/token'
- Send Notification
Replace {ACCESS_TOKEN} with the obtained access token:
curl -X 'POST' \
'https://mini-app-api.lab.woven-city.toyota/mini-app-runtime/v1/notification/custom_redirect' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-d '{
"project_id": "REPLACE_WITH_YOUR_PROJECT_ID",
"title": "REPLACE_WITH_YOUR_TITLE (will be displayed in the OS notification panel only)",
"app_level_notification_body": "REPLACE_WITH_YOUR_APP_LEVEL_NOTIFICATION_BODY (will be displayed in Woven City App notification panel only)",
"os_level_notification_body": "REPLACE_WITH_YOUR_OS_LEVEL_NOTIFICATION_BODY (will be displayed in the OS notification panel only)",
"woven_ids": [
"REPLACE_WITH_TARGET_WOVEN_ID_1",
"REPLACE_WITH_TARGET_WOVEN_ID_2",
"REPLACE_WITH_TARGET_WOVEN_ID_N"
],
"redirect_to": "REPLACE_WITH_YOUR_DESIRED_REDIRECT_URL"
}'
Note
- The
redirect_tofield in the request body should be a valid URL and can be either:- An https URL (e.g.
https://example.org?param=value) which will redirect users to an external website when they click on the notification. - A Woven City App Deeplink (e.g.
wovenapp://feed) which will redirect users to a specific page inside the Woven City App when they click on the notification.
- An https URL (e.g.