cURL
curl --request PUT \
--url https://api-dev.messagefy.io/api/v1/Admin/Channel/{id} \
--header 'Content-Type: application/json; v=1.0' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"status": 123,
"channelTypeId": 123,
"parameters": {}
}
'import requests
url = "https://api-dev.messagefy.io/api/v1/Admin/Channel/{id}"
payload = {
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"status": 123,
"channelTypeId": 123,
"parameters": {}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json; v=1.0"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json; v=1.0'},
body: JSON.stringify({
channelId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '<string>',
status: 123,
channelTypeId: 123,
parameters: {}
})
};
fetch('https://api-dev.messagefy.io/api/v1/Admin/Channel/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-dev.messagefy.io/api/v1/Admin/Channel/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'channelId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'description' => '<string>',
'status' => 123,
'channelTypeId' => 123,
'parameters' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json; v=1.0",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-dev.messagefy.io/api/v1/Admin/Channel/{id}"
payload := strings.NewReader("{\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": 123,\n \"channelTypeId\": 123,\n \"parameters\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json; v=1.0")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api-dev.messagefy.io/api/v1/Admin/Channel/{id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json; v=1.0")
.body("{\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": 123,\n \"channelTypeId\": 123,\n \"parameters\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.messagefy.io/api/v1/Admin/Channel/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json; v=1.0'
request.body = "{\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": 123,\n \"channelTypeId\": 123,\n \"parameters\": {}\n}"
response = http.request(request)
puts response.read_body{
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"feedbackChannelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account": {
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"status": {
"accountStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canManageChildObjects": true,
"canSendAndReceiveMessage": true
},
"organization": {
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"status": {
"organizationStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canManageChildObjects": true,
"canSendAndReceiveMessage": true
},
"accountCount": 123,
"channelCount": 123,
"deviceRunningCount": 123,
"channelConnectedCount": 123,
"apiKeyCount": 123,
"createdAt": "2023-11-07T05:31:56Z"
},
"channelCount": 123,
"deviceRunningCount": 123,
"channelConnectedCount": 123,
"financialManagerCount": 123,
"apiKeyCount": 123
},
"channelType": {
"channelTypeId": 123,
"key": "<string>",
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"configurationSchemaUrl": "<string>",
"requiredFeedbackChannel": true,
"canBeFeedbackChannel": true,
"requireReceiverChannel": true,
"canBeReceiverChannel": true,
"maxConsumptionTimeSeconds": 123,
"maxMessages": 123,
"maxConcurrentConsumers": 123,
"idleTimeoutInSeconds": 123,
"prefetchCount": 123
},
"status": {
"channelStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canSendAndReceiveMessage": true,
"canConfigure": true,
"canReceiveInboundMessages": true,
"isTerminalDeletionState": true,
"canBeDeprovisioned": true
},
"provider": {
"providerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"channelTypeId": 123,
"channelTypeKey": "<string>",
"channelTypeName": "<string>",
"priority": 123,
"dockerImage": "<string>",
"platform": "<string>",
"maxChannelsPerInstance": 123,
"requiresCluster": true,
"requiresMessageBroker": true,
"requiresDatabase": true,
"maxConsumptionTimeSeconds": 123,
"maxMessages": 123,
"maxConcurrentConsumers": 123,
"idleTimeoutInSeconds": 123,
"prefetchCount": 123
},
"parameters": {},
"createdAt": "2023-11-07T05:31:56Z",
"devices": [
{
"deviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"dockerImage": "<string>",
"status": {
"resourceStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canUse": true,
"isDefault": true,
"isAllocated": true,
"canDelete": true,
"isTransitioning": true,
"canMoveOrUpgrade": true
},
"cluster": {
"clusterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"status": {
"resourceStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canUse": true,
"isDefault": true,
"isAllocated": true,
"canDelete": true,
"isTransitioning": true,
"canMoveOrUpgrade": true
},
"maxInstances": 123,
"factoryKey": "<string>",
"tags": [
"<string>"
]
},
"clusterInstanceName": "<string>",
"messageBroker": {
"messageBrokerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"status": {
"resourceStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canUse": true,
"isDefault": true,
"isAllocated": true,
"canDelete": true,
"isTransitioning": true,
"canMoveOrUpgrade": true
},
"maxInstances": 123,
"tags": [
"<string>"
],
"outboundShovelConfigured": true,
"outboundShovelEnabled": true
},
"messageBrokerQueueName": "<string>",
"database": {
"databaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"status": {
"resourceStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canUse": true,
"isDefault": true,
"isAllocated": true,
"canDelete": true,
"isTransitioning": true,
"canMoveOrUpgrade": true
},
"maxInstances": 123,
"tags": [
"<string>"
]
},
"databaseSchema": "<string>",
"provider": {
"providerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"channelTypeId": 123,
"channelTypeKey": "<string>",
"channelTypeName": "<string>",
"priority": 123,
"dockerImage": "<string>",
"platform": "<string>",
"maxChannelsPerInstance": 123,
"requiresCluster": true,
"requiresMessageBroker": true,
"requiresDatabase": true,
"maxConsumptionTimeSeconds": 123,
"maxMessages": 123,
"maxConcurrentConsumers": 123,
"idleTimeoutInSeconds": 123,
"prefetchCount": 123
}
}
],
"deviceRunningCount": 123,
"isConnected": true,
"stateUpdatedAt": "2023-11-07T05:31:56Z",
"feedbackChannelSummary": {
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"channelType": "<string>",
"provider": "<string>"
},
"channelsSendingFeedback": [
{
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"channelType": "<string>",
"provider": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Canais
Atualizar Canal
Atualiza os dados de um canal existente
PUT
/
api
/
v1
/
Admin
/
Channel
/
{id}
cURL
curl --request PUT \
--url https://api-dev.messagefy.io/api/v1/Admin/Channel/{id} \
--header 'Content-Type: application/json; v=1.0' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"status": 123,
"channelTypeId": 123,
"parameters": {}
}
'import requests
url = "https://api-dev.messagefy.io/api/v1/Admin/Channel/{id}"
payload = {
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"status": 123,
"channelTypeId": 123,
"parameters": {}
}
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json; v=1.0"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json; v=1.0'},
body: JSON.stringify({
channelId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '<string>',
status: 123,
channelTypeId: 123,
parameters: {}
})
};
fetch('https://api-dev.messagefy.io/api/v1/Admin/Channel/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-dev.messagefy.io/api/v1/Admin/Channel/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'channelId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'description' => '<string>',
'status' => 123,
'channelTypeId' => 123,
'parameters' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json; v=1.0",
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-dev.messagefy.io/api/v1/Admin/Channel/{id}"
payload := strings.NewReader("{\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": 123,\n \"channelTypeId\": 123,\n \"parameters\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json; v=1.0")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api-dev.messagefy.io/api/v1/Admin/Channel/{id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json; v=1.0")
.body("{\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": 123,\n \"channelTypeId\": 123,\n \"parameters\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.messagefy.io/api/v1/Admin/Channel/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json; v=1.0'
request.body = "{\n \"channelId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": 123,\n \"channelTypeId\": 123,\n \"parameters\": {}\n}"
response = http.request(request)
puts response.read_body{
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"feedbackChannelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"account": {
"accountId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"status": {
"accountStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canManageChildObjects": true,
"canSendAndReceiveMessage": true
},
"organization": {
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"status": {
"organizationStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canManageChildObjects": true,
"canSendAndReceiveMessage": true
},
"accountCount": 123,
"channelCount": 123,
"deviceRunningCount": 123,
"channelConnectedCount": 123,
"apiKeyCount": 123,
"createdAt": "2023-11-07T05:31:56Z"
},
"channelCount": 123,
"deviceRunningCount": 123,
"channelConnectedCount": 123,
"financialManagerCount": 123,
"apiKeyCount": 123
},
"channelType": {
"channelTypeId": 123,
"key": "<string>",
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"configurationSchemaUrl": "<string>",
"requiredFeedbackChannel": true,
"canBeFeedbackChannel": true,
"requireReceiverChannel": true,
"canBeReceiverChannel": true,
"maxConsumptionTimeSeconds": 123,
"maxMessages": 123,
"maxConcurrentConsumers": 123,
"idleTimeoutInSeconds": 123,
"prefetchCount": 123
},
"status": {
"channelStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canSendAndReceiveMessage": true,
"canConfigure": true,
"canReceiveInboundMessages": true,
"isTerminalDeletionState": true,
"canBeDeprovisioned": true
},
"provider": {
"providerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"channelTypeId": 123,
"channelTypeKey": "<string>",
"channelTypeName": "<string>",
"priority": 123,
"dockerImage": "<string>",
"platform": "<string>",
"maxChannelsPerInstance": 123,
"requiresCluster": true,
"requiresMessageBroker": true,
"requiresDatabase": true,
"maxConsumptionTimeSeconds": 123,
"maxMessages": 123,
"maxConcurrentConsumers": 123,
"idleTimeoutInSeconds": 123,
"prefetchCount": 123
},
"parameters": {},
"createdAt": "2023-11-07T05:31:56Z",
"devices": [
{
"deviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"dockerImage": "<string>",
"status": {
"resourceStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canUse": true,
"isDefault": true,
"isAllocated": true,
"canDelete": true,
"isTransitioning": true,
"canMoveOrUpgrade": true
},
"cluster": {
"clusterId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"status": {
"resourceStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canUse": true,
"isDefault": true,
"isAllocated": true,
"canDelete": true,
"isTransitioning": true,
"canMoveOrUpgrade": true
},
"maxInstances": 123,
"factoryKey": "<string>",
"tags": [
"<string>"
]
},
"clusterInstanceName": "<string>",
"messageBroker": {
"messageBrokerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"status": {
"resourceStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canUse": true,
"isDefault": true,
"isAllocated": true,
"canDelete": true,
"isTransitioning": true,
"canMoveOrUpgrade": true
},
"maxInstances": 123,
"tags": [
"<string>"
],
"outboundShovelConfigured": true,
"outboundShovelEnabled": true
},
"messageBrokerQueueName": "<string>",
"database": {
"databaseId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"status": {
"resourceStatusId": 123,
"name": "<string>",
"icon": "<string>",
"description": "<string>",
"canUse": true,
"isDefault": true,
"isAllocated": true,
"canDelete": true,
"isTransitioning": true,
"canMoveOrUpgrade": true
},
"maxInstances": 123,
"tags": [
"<string>"
]
},
"databaseSchema": "<string>",
"provider": {
"providerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"icon": "<string>",
"channelTypeId": 123,
"channelTypeKey": "<string>",
"channelTypeName": "<string>",
"priority": 123,
"dockerImage": "<string>",
"platform": "<string>",
"maxChannelsPerInstance": 123,
"requiresCluster": true,
"requiresMessageBroker": true,
"requiresDatabase": true,
"maxConsumptionTimeSeconds": 123,
"maxMessages": 123,
"maxConcurrentConsumers": 123,
"idleTimeoutInSeconds": 123,
"prefetchCount": 123
}
}
],
"deviceRunningCount": 123,
"isConnected": true,
"stateUpdatedAt": "2023-11-07T05:31:56Z",
"feedbackChannelSummary": {
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"channelType": "<string>",
"provider": "<string>"
},
"channelsSendingFeedback": [
{
"channelId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"channelType": "<string>",
"provider": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
Chave de API fornecida pelo painel administrativo do MessageFy. Enviada no header de cada requisição. O gateway APISIX valida a chave e injeta os headers X-Consumer-* automaticamente.
Path Parameters
Body
application/json; v=1.0text/json; v=1.0application/*+json; v=1.0
Response
OK
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes