Update Organization Profile
Updates the organization profile details. Only account owners have permission to do this. Note: both fields are optional but at least one should be sent in the request. It is not necessary to set the header Content-Type for this request. It is set automatically by the HTTP client.
curl --request PATCH \
--url https://api.example.com/organization \
--header 'Authorization: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form logo=@example-file \
--form 'data=<string>'import requests
url = "https://api.example.com/organization"
files = { "logo": ("example-file", open("example-file", "rb")) }
payload = { "data": "<string>" }
headers = {"Authorization": "<api-key>"}
response = requests.patch(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('logo', '<string>');
form.append('data', '<string>');
const options = {method: 'PATCH', headers: {Authorization: '<api-key>'}};
options.body = form;
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 => "PATCH",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"logo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: multipart/form-data"
],
]);
$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.example.com/organization"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"logo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.example.com/organization")
.header("Authorization", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"logo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.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::Patch.new(url)
request["Authorization"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"logo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"message": "organization profile updated successfully"
}{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}{
"error": "Forbidden"
}Authorizations
Authorization header containing an SDP JWT (ES256) or an SDP_ API key.
Body
The logo of the organization, file type must be png or jpeg.
A JSON string that contains the details to update. Every key is optional; only the keys you send are changed.
organization_name(string): the new name of the organization, up to 64 characters.timezone_utc_offset(string): the new timezone offset of the organization.is_approval_required(boolean): whether the approval workflow is enabled or not.is_link_shortener_enabled(boolean): whether registration links sent to receivers are shortened.is_memo_tracing_enabled(boolean): whether payments carry a tracing memo.receiver_registration_message_template(string): the message template sent to the receivers inviting them to registration. Up to 255 characters, and it cannot contain HTML, JS or CSS. Sending this field empty sets thedefaultvalue for it.otp_message_template(string): the message template sent to the receivers sending the OTP to complete the registration flow. Sending this field empty sets thedefaultvalue for it.privacy_policy_link(string): a URL to the organization privacy policy. Sending it empty clears it.webhook_url(string): an https URL the SDP delivers outbox events to. Owner only; sending it empty clears it.receiver_invitation_resend_interval_days(number): how often an unregistered receiver is re-invited. Sending 0 clears it.payment_cancellation_period_days(number): how long a READY payment waits before it is canceled automatically. Sending 0 clears it.mfa_disabled(boolean): whether multi-factor authentication is turned off for dashboard sign-in.captcha_disabled(boolean): whether reCAPTCHA is turned off.receiver_invitations_disabled(boolean): whether receiver invitation messages are suppressed.
For example:
{"organization_name": "NewOrgName", "timezone_utc_offset": "+02:00", "is_approval_required": true, "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."}
Response
OK
curl --request PATCH \
--url https://api.example.com/organization \
--header 'Authorization: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form logo=@example-file \
--form 'data=<string>'import requests
url = "https://api.example.com/organization"
files = { "logo": ("example-file", open("example-file", "rb")) }
payload = { "data": "<string>" }
headers = {"Authorization": "<api-key>"}
response = requests.patch(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('logo', '<string>');
form.append('data', '<string>');
const options = {method: 'PATCH', headers: {Authorization: '<api-key>'}};
options.body = form;
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 => "PATCH",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"logo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: multipart/form-data"
],
]);
$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.example.com/organization"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"logo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("PATCH", url, payload)
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.patch("https://api.example.com/organization")
.header("Authorization", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"logo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001--")
.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::Patch.new(url)
request["Authorization"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"logo\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"data\"\r\n\r\n<string>\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"message": "organization profile updated successfully"
}{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}{
"error": "Forbidden"
}