Grant an add-on to a sub-account.
curl --request POST \
--url https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/addons \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"plan": "9b1e4c7a-0000-4000-8000-000000000000",
"quantity": 2
}
'import requests
url = "https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/addons"
payload = {
"plan": "9b1e4c7a-0000-4000-8000-000000000000",
"quantity": 2
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({plan: '9b1e4c7a-0000-4000-8000-000000000000', quantity: 2})
};
fetch('https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/addons', 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://dash.dmly.io/api/agency/v1/workspaces/{workspace}/addons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'plan' => '9b1e4c7a-0000-4000-8000-000000000000',
'quantity' => 2
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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://dash.dmly.io/api/agency/v1/workspaces/{workspace}/addons"
payload := strings.NewReader("{\n \"plan\": \"9b1e4c7a-0000-4000-8000-000000000000\",\n \"quantity\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/addons")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"plan\": \"9b1e4c7a-0000-4000-8000-000000000000\",\n \"quantity\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/addons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"plan\": \"9b1e4c7a-0000-4000-8000-000000000000\",\n \"quantity\": 2\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}{
"message": "<string>"
}Grant an add-on to a sub-account.
Grants an add-on (e.g. extra contacts / social account / teammate) on top of the base plan. plan is required and must be an enabled add-on plan belonging to the agency; quantity is optional (integer 1-1000, default 1). Idempotent per (workspace, add-on plan): a repeat grant SETS the quantity rather than stacking a second row. Returns data { uuid, name, kind, quantity, granted_total } — 201 when newly created, 200 when an existing grant was updated.
POST
/
workspaces
/
{workspace}
/
addons
Grant an add-on to a sub-account.
curl --request POST \
--url https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/addons \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"plan": "9b1e4c7a-0000-4000-8000-000000000000",
"quantity": 2
}
'import requests
url = "https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/addons"
payload = {
"plan": "9b1e4c7a-0000-4000-8000-000000000000",
"quantity": 2
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({plan: '9b1e4c7a-0000-4000-8000-000000000000', quantity: 2})
};
fetch('https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/addons', 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://dash.dmly.io/api/agency/v1/workspaces/{workspace}/addons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'plan' => '9b1e4c7a-0000-4000-8000-000000000000',
'quantity' => 2
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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://dash.dmly.io/api/agency/v1/workspaces/{workspace}/addons"
payload := strings.NewReader("{\n \"plan\": \"9b1e4c7a-0000-4000-8000-000000000000\",\n \"quantity\": 2\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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))
}HttpResponse<String> response = Unirest.post("https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/addons")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"plan\": \"9b1e4c7a-0000-4000-8000-000000000000\",\n \"quantity\": 2\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dash.dmly.io/api/agency/v1/workspaces/{workspace}/addons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"plan\": \"9b1e4c7a-0000-4000-8000-000000000000\",\n \"quantity\": 2\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
agencyApiKeyAuthagencyBearerAuth
Your agency API key (dmly_ag_…). It authenticates the acting agency and scopes every request to that agency's own sub-accounts and plans.
Path Parameters
Workspace id.
Response
Success.
Was this page helpful?
⌘I

