Toggle platform
curl --request PUT \
--url https://api.example.com/api/projects/{projectId}/platformsimport requests
url = "https://api.example.com/api/projects/{projectId}/platforms"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.example.com/api/projects/{projectId}/platforms', 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.example.com/api/projects/{projectId}/platforms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/projects/{projectId}/platforms"
req, _ := http.NewRequest("PUT", url, nil)
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.example.com/api/projects/{projectId}/platforms")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/projects/{projectId}/platforms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_bodyPlatforms
Toggle platform
Enable or disable a messaging platform for a project.
PUT
/
api
/
projects
/
{projectId}
/
platforms
Toggle platform
curl --request PUT \
--url https://api.example.com/api/projects/{projectId}/platformsimport requests
url = "https://api.example.com/api/projects/{projectId}/platforms"
response = requests.put(url)
print(response.text)const options = {method: 'PUT'};
fetch('https://api.example.com/api/projects/{projectId}/platforms', 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.example.com/api/projects/{projectId}/platforms",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/projects/{projectId}/platforms"
req, _ := http.NewRequest("PUT", url, nil)
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.example.com/api/projects/{projectId}/platforms")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/projects/{projectId}/platforms")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
response = http.request(request)
puts response.read_bodyRequest
curl -u "$PROJECT_ID:$PROJECT_SECRET" \
-X PUT "https://api.interactions.co.in/api/projects/$PROJECT_ID/platforms" \
-H "Content-Type: application/json" \
-d '{
"platform": "imessage",
"enabled": true
}'
Body parameters
| Field | Type | Required | Description |
|---|---|---|---|
platform | string | Yes | imessage, whatsapp, or whatsapp_business |
enabled | boolean | Yes | Enable or disable |
Response
{
"succeed": true,
"data": {
"name": "imessage",
"enabled": true
}
}
CLI equivalent
sky skyline platforms enable imessage
sky skyline platforms disable imessage
⌘I