Atualizar Chat App
curl --request PATCH \
--url https://api.notifique.dev/v1/chat/apps/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Mi App",
"status": "ACTIVE",
"allowedOrigins": [
"https://app.tusitio.com"
],
"allowClientCreateDirect": false,
"allowClientCreateGroup": false,
"allowClientAddMembers": false
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Mi App',
status: 'ACTIVE',
allowedOrigins: ['https://app.tusitio.com'],
allowClientCreateDirect: false,
allowClientCreateGroup: false,
allowClientAddMembers: false
})
};
fetch('https://api.notifique.dev/v1/chat/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/chat/apps/{id}"
payload = {
"name": "Mi App",
"status": "ACTIVE",
"allowedOrigins": ["https://app.tusitio.com"],
"allowClientCreateDirect": False,
"allowClientCreateGroup": False,
"allowClientAddMembers": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/chat/apps/{id}"
payload := strings.NewReader("{\n \"name\": \"Mi App\",\n \"status\": \"ACTIVE\",\n \"allowedOrigins\": [\n \"https://app.tusitio.com\"\n ],\n \"allowClientCreateDirect\": false,\n \"allowClientCreateGroup\": false,\n \"allowClientAddMembers\": false\n}")
req, _ := http.NewRequest("PATCH", 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": "clxxapp...",
"name": "Mi App",
"publicKey": "pk_live_...",
"signingSecret": "<string>",
"status": "ACTIVE",
"allowedOrigins": [
"<string>"
],
"allowClientCreateDirect": true,
"allowClientCreateGroup": true,
"allowClientAddMembers": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"allowedMessageTypes": [
"text"
],
"allowEdit": true,
"allowDeleteForEveryone": true,
"allowUserManageCapabilities": true,
"defaultEnabledMessageTypes": [
"text"
],
"defaultEditEnabled": true,
"defaultDeleteForEveryoneEnabled": true
}
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}Chat Apps
Atualizar Chat App
Nombre, estado, orígenes, flags JWT y techo de capacidades. Alcance: chat:apps:manage.
PATCH
/
v1
/
chat
/
apps
/
{id}
Atualizar Chat App
curl --request PATCH \
--url https://api.notifique.dev/v1/chat/apps/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Mi App",
"status": "ACTIVE",
"allowedOrigins": [
"https://app.tusitio.com"
],
"allowClientCreateDirect": false,
"allowClientCreateGroup": false,
"allowClientAddMembers": false
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Mi App',
status: 'ACTIVE',
allowedOrigins: ['https://app.tusitio.com'],
allowClientCreateDirect: false,
allowClientCreateGroup: false,
allowClientAddMembers: false
})
};
fetch('https://api.notifique.dev/v1/chat/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/chat/apps/{id}"
payload = {
"name": "Mi App",
"status": "ACTIVE",
"allowedOrigins": ["https://app.tusitio.com"],
"allowClientCreateDirect": False,
"allowClientCreateGroup": False,
"allowClientAddMembers": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.notifique.dev/v1/chat/apps/{id}"
payload := strings.NewReader("{\n \"name\": \"Mi App\",\n \"status\": \"ACTIVE\",\n \"allowedOrigins\": [\n \"https://app.tusitio.com\"\n ],\n \"allowClientCreateDirect\": false,\n \"allowClientCreateGroup\": false,\n \"allowClientAddMembers\": false\n}")
req, _ := http.NewRequest("PATCH", 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": "clxxapp...",
"name": "Mi App",
"publicKey": "pk_live_...",
"signingSecret": "<string>",
"status": "ACTIVE",
"allowedOrigins": [
"<string>"
],
"allowClientCreateDirect": true,
"allowClientCreateGroup": true,
"allowClientAddMembers": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"allowedMessageTypes": [
"text"
],
"allowEdit": true,
"allowDeleteForEveryone": true,
"allowUserManageCapabilities": true,
"defaultEnabledMessageTypes": [
"text"
],
"defaultEditEnabled": true,
"defaultDeleteForEveryoneEnabled": true
}
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}{
"success": false,
"error": "<string>",
"code": "<string>",
"message": "<string>"
}Autorizações
ntfChatBearerAuthntfChatApiKeyHeader
API Key sk_live_… / sk_test_… ou JWT do usuário do chat (eyJ…).
Parâmetros de caminho
Corpo
application/json
Opções disponíveis:
ACTIVE, DISABLED Opções disponíveis:
text, image, audio, file Opções disponíveis:
text, image, audio, file Esta página foi útil?

