Atualizar app push
curl --request PUT \
--url https://api.notifique.dev/v1/push/apps/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Exemplo",
"vapidPublicKey": "clxx...",
"vapidPrivateKey": "clxx...",
"allowedOrigins": [
"string"
],
"promptConfig": {},
"fcmProjectId": "clxx...",
"fcmServiceAccountJson": "string",
"androidPackageName": "clxx...",
"apnsKeyId": "clxx...",
"apnsTeamId": "clxx...",
"apnsBundleId": "clxx...",
"apnsKeyP8": "string"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Exemplo',
vapidPublicKey: 'clxx...',
vapidPrivateKey: 'clxx...',
allowedOrigins: ['string'],
promptConfig: {},
fcmProjectId: 'clxx...',
fcmServiceAccountJson: 'string',
androidPackageName: 'clxx...',
apnsKeyId: 'clxx...',
apnsTeamId: 'clxx...',
apnsBundleId: 'clxx...',
apnsKeyP8: 'string'
})
};
fetch('https://api.notifique.dev/v1/push/apps/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/push/apps/{id}"
payload = {
"name": "Exemplo",
"vapidPublicKey": "clxx...",
"vapidPrivateKey": "clxx...",
"allowedOrigins": ["string"],
"promptConfig": {},
"fcmProjectId": "clxx...",
"fcmServiceAccountJson": "string",
"androidPackageName": "clxx...",
"apnsKeyId": "clxx...",
"apnsTeamId": "clxx...",
"apnsBundleId": "clxx...",
"apnsKeyP8": "string"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/push/apps/{id}"
payload := strings.NewReader("{\n \"name\": \"Exemplo\",\n \"vapidPublicKey\": \"clxx...\",\n \"vapidPrivateKey\": \"clxx...\",\n \"allowedOrigins\": [\n \"string\"\n ],\n \"promptConfig\": {},\n \"fcmProjectId\": \"clxx...\",\n \"fcmServiceAccountJson\": \"string\",\n \"androidPackageName\": \"clxx...\",\n \"apnsKeyId\": \"clxx...\",\n \"apnsTeamId\": \"clxx...\",\n \"apnsBundleId\": \"clxx...\",\n \"apnsKeyP8\": \"string\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"id": "clxx...",
"name": "Exemplo",
"workspaceId": "clxx...",
"vapidPublicKey": "clxx...",
"hasVapidPrivate": true,
"hasFcm": true,
"hasApns": true,
"androidPackageName": "clxx...",
"allowedOrigins": [
"string"
],
"promptConfig": {},
"createdAt": "2025-02-10T14:00:00.000Z",
"updatedAt": "2025-02-10T14:00:00.000Z"
}
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}Push Apps
Atualizar app push
Atualiza nome ou configurações do app.
PUT
/
v1
/
push
/
apps
/
{id}
Atualizar app push
curl --request PUT \
--url https://api.notifique.dev/v1/push/apps/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Exemplo",
"vapidPublicKey": "clxx...",
"vapidPrivateKey": "clxx...",
"allowedOrigins": [
"string"
],
"promptConfig": {},
"fcmProjectId": "clxx...",
"fcmServiceAccountJson": "string",
"androidPackageName": "clxx...",
"apnsKeyId": "clxx...",
"apnsTeamId": "clxx...",
"apnsBundleId": "clxx...",
"apnsKeyP8": "string"
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Exemplo',
vapidPublicKey: 'clxx...',
vapidPrivateKey: 'clxx...',
allowedOrigins: ['string'],
promptConfig: {},
fcmProjectId: 'clxx...',
fcmServiceAccountJson: 'string',
androidPackageName: 'clxx...',
apnsKeyId: 'clxx...',
apnsTeamId: 'clxx...',
apnsBundleId: 'clxx...',
apnsKeyP8: 'string'
})
};
fetch('https://api.notifique.dev/v1/push/apps/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/push/apps/{id}"
payload = {
"name": "Exemplo",
"vapidPublicKey": "clxx...",
"vapidPrivateKey": "clxx...",
"allowedOrigins": ["string"],
"promptConfig": {},
"fcmProjectId": "clxx...",
"fcmServiceAccountJson": "string",
"androidPackageName": "clxx...",
"apnsKeyId": "clxx...",
"apnsTeamId": "clxx...",
"apnsBundleId": "clxx...",
"apnsKeyP8": "string"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/push/apps/{id}"
payload := strings.NewReader("{\n \"name\": \"Exemplo\",\n \"vapidPublicKey\": \"clxx...\",\n \"vapidPrivateKey\": \"clxx...\",\n \"allowedOrigins\": [\n \"string\"\n ],\n \"promptConfig\": {},\n \"fcmProjectId\": \"clxx...\",\n \"fcmServiceAccountJson\": \"string\",\n \"androidPackageName\": \"clxx...\",\n \"apnsKeyId\": \"clxx...\",\n \"apnsTeamId\": \"clxx...\",\n \"apnsBundleId\": \"clxx...\",\n \"apnsKeyP8\": \"string\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"success": true,
"data": {
"id": "clxx...",
"name": "Exemplo",
"workspaceId": "clxx...",
"vapidPublicKey": "clxx...",
"hasVapidPrivate": true,
"hasFcm": true,
"hasApns": true,
"androidPackageName": "clxx...",
"allowedOrigins": [
"string"
],
"promptConfig": {},
"createdAt": "2025-02-10T14:00:00.000Z",
"updatedAt": "2025-02-10T14:00:00.000Z"
}
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}{
"success": false,
"error": "Bad Request",
"code": "VALIDATION_ERROR",
"message": "Campo inválido ou ausente."
}Autorizações
ntfPushBearerAuthntfPushApiKeyHeader
Authorization: Bearer sk_live_xxxxx
Parâmetros de caminho
Corpo
application/json
Maximum string length:
1024Android applicationId / package name required for public SDK registration
Resposta
Push app atualizado.
Exemplo:
true
Show child attributes
Show child attributes
Exemplo:
{
"id": "clxx...",
"name": "Exemplo",
"workspaceId": "clxx...",
"vapidPublicKey": "clxx...",
"hasVapidPrivate": true,
"hasFcm": true,
"hasApns": true,
"androidPackageName": "clxx...",
"allowedOrigins": ["string"],
"promptConfig": {},
"createdAt": "2025-02-10T14:00:00.000Z",
"updatedAt": "2025-02-10T14:00:00.000Z"
}
Esta página foi útil?

