Get Organization Info
This endpoint returns the organization’s info. It is used in many places across the UI. It returns the name in the navbar and the public key of the organization’s distribution account.
curl --request GET \
--url https://api.example.com/organization \
--header 'Authorization: <api-key>'import requests
url = "https://api.example.com/organization"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.example.com/organization', 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/organization",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/organization"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/organization")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/organization")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"name": "Stellar Aid",
"logo_url": "https://stellar-disbursement-platform-backend-dev.stellar.org/organization/logo",
"distribution_account": {
"type": "DISTRIBUTION_ACCOUNT.STELLAR.DB_VAULT",
"status": "ACTIVE",
"address": "GCXAJ3XJ3VK3JFH3QMDFOSKM2NMMZBSO3VIT6EUPQWSDW2J74M23RRSL",
"circle_wallet_id": "1000646072"
},
"timezone_utc_offset": "+00:00",
"is_approval_required": true,
"receiver_invitation_resend_interval_days": 5,
"payment_cancellation_period_days": 5,
"privacy_policy_link": "https://stellar.org/privacy-policy",
"distribution_account_public_key": "GCXAJ3XJ3VK3JFH3QMDFOSKM2NMMZBSO3VIT6EUPQWSDW2J74M23RRSL",
"webhook_url": "https://example.org/sdp-events",
"reporting_enabled": false,
"receiver_registration_message_template": "You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.",
"otp_message_template": "{{.OTP}} is your {{.OrganizationName}} phone verification code."
}{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}Authorizations
Response
Returns organization details
The custom template used to send invitations to receivers. The default message isn't returned. In the message's content it's possible to add the following template variables: {{.OrganizationName}} which is the Organization Name configured and {{.RegistrationLink}} which is the link generated by SDP to send to the receiver (in case this is not present in the message, it's automatically appended at the end).
"You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register."
The custom OTP message template set to send OTP code to the receiver complete the registration flow. The default message isn't returned. In the message's content it's possible to add the following template variables: {{.OrganizationName}} which is the Organization Name configured and {{.OTP}} which is the OTP code to send to the receiver complete the registration flow (in case this is not present in the message, it's automatically appended at the end).
"{{.OTP}} is your {{.OrganizationName}} phone verification code."
curl --request GET \
--url https://api.example.com/organization \
--header 'Authorization: <api-key>'import requests
url = "https://api.example.com/organization"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.example.com/organization', 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/organization",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/organization"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/organization")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/organization")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"name": "Stellar Aid",
"logo_url": "https://stellar-disbursement-platform-backend-dev.stellar.org/organization/logo",
"distribution_account": {
"type": "DISTRIBUTION_ACCOUNT.STELLAR.DB_VAULT",
"status": "ACTIVE",
"address": "GCXAJ3XJ3VK3JFH3QMDFOSKM2NMMZBSO3VIT6EUPQWSDW2J74M23RRSL",
"circle_wallet_id": "1000646072"
},
"timezone_utc_offset": "+00:00",
"is_approval_required": true,
"receiver_invitation_resend_interval_days": 5,
"payment_cancellation_period_days": 5,
"privacy_policy_link": "https://stellar.org/privacy-policy",
"distribution_account_public_key": "GCXAJ3XJ3VK3JFH3QMDFOSKM2NMMZBSO3VIT6EUPQWSDW2J74M23RRSL",
"webhook_url": "https://example.org/sdp-events",
"reporting_enabled": false,
"receiver_registration_message_template": "You have a payment waiting for you from {{.OrganizationName}}. Click {{.RegistrationLink}} to register.",
"otp_message_template": "{{.OTP}} is your {{.OrganizationName}} phone verification code."
}{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}