Update approved mosque profile fields
curl --request PATCH \
--url https://api.pocketmusala.com/v1/mosques/{mosqueId}/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"communityName": "Downtown Mosque",
"address": "100 Main Street, Anytown, NY 10001",
"latitude": 40.7128,
"longitude": -74.006,
"timeZoneId": "America/New_York",
"status": "Open for daily prayers",
"message": "Weekly schedule refreshed by the mosque website.",
"donationLink": "https://downtown.example/donate"
}
'import requests
url = "https://api.pocketmusala.com/v1/mosques/{mosqueId}/profile"
payload = {
"communityName": "Downtown Mosque",
"address": "100 Main Street, Anytown, NY 10001",
"latitude": 40.7128,
"longitude": -74.006,
"timeZoneId": "America/New_York",
"status": "Open for daily prayers",
"message": "Weekly schedule refreshed by the mosque website.",
"donationLink": "https://downtown.example/donate"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
communityName: 'Downtown Mosque',
address: '100 Main Street, Anytown, NY 10001',
latitude: 40.7128,
longitude: -74.006,
timeZoneId: 'America/New_York',
status: 'Open for daily prayers',
message: 'Weekly schedule refreshed by the mosque website.',
donationLink: 'https://downtown.example/donate'
})
};
fetch('https://api.pocketmusala.com/v1/mosques/{mosqueId}/profile', 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.pocketmusala.com/v1/mosques/{mosqueId}/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'communityName' => 'Downtown Mosque',
'address' => '100 Main Street, Anytown, NY 10001',
'latitude' => 40.7128,
'longitude' => -74.006,
'timeZoneId' => 'America/New_York',
'status' => 'Open for daily prayers',
'message' => 'Weekly schedule refreshed by the mosque website.',
'donationLink' => 'https://downtown.example/donate'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.pocketmusala.com/v1/mosques/{mosqueId}/profile"
payload := strings.NewReader("{\n \"communityName\": \"Downtown Mosque\",\n \"address\": \"100 Main Street, Anytown, NY 10001\",\n \"latitude\": 40.7128,\n \"longitude\": -74.006,\n \"timeZoneId\": \"America/New_York\",\n \"status\": \"Open for daily prayers\",\n \"message\": \"Weekly schedule refreshed by the mosque website.\",\n \"donationLink\": \"https://downtown.example/donate\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.pocketmusala.com/v1/mosques/{mosqueId}/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"communityName\": \"Downtown Mosque\",\n \"address\": \"100 Main Street, Anytown, NY 10001\",\n \"latitude\": 40.7128,\n \"longitude\": -74.006,\n \"timeZoneId\": \"America/New_York\",\n \"status\": \"Open for daily prayers\",\n \"message\": \"Weekly schedule refreshed by the mosque website.\",\n \"donationLink\": \"https://downtown.example/donate\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pocketmusala.com/v1/mosques/{mosqueId}/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"communityName\": \"Downtown Mosque\",\n \"address\": \"100 Main Street, Anytown, NY 10001\",\n \"latitude\": 40.7128,\n \"longitude\": -74.006,\n \"timeZoneId\": \"America/New_York\",\n \"status\": \"Open for daily prayers\",\n \"message\": \"Weekly schedule refreshed by the mosque website.\",\n \"donationLink\": \"https://downtown.example/donate\"\n}"
response = http.request(request)
puts response.read_body{
"profile": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"communityName": "<string>",
"type": "Mosque",
"isOnlineOnly": true,
"verificationStatus": "<string>",
"entitlement": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"address": "<string>",
"latitude": 123,
"longitude": 123,
"timeZoneId": "America/New_York",
"status": "<string>",
"message": "<string>",
"donationLink": "<string>",
"prayerCalculationParameters": "<string>",
"thumbnail": "<string>",
"coverPhotos": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"troubleshooting": {
"code": "<string>",
"adminSummary": "<string>",
"developerSummary": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"troubleshooting": {
"code": "<string>",
"adminSummary": "<string>",
"developerSummary": "<string>"
}
}
}Profile
Update approved mosque profile fields
PATCH
/
v1
/
mosques
/
{mosqueId}
/
profile
Update approved mosque profile fields
curl --request PATCH \
--url https://api.pocketmusala.com/v1/mosques/{mosqueId}/profile \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"communityName": "Downtown Mosque",
"address": "100 Main Street, Anytown, NY 10001",
"latitude": 40.7128,
"longitude": -74.006,
"timeZoneId": "America/New_York",
"status": "Open for daily prayers",
"message": "Weekly schedule refreshed by the mosque website.",
"donationLink": "https://downtown.example/donate"
}
'import requests
url = "https://api.pocketmusala.com/v1/mosques/{mosqueId}/profile"
payload = {
"communityName": "Downtown Mosque",
"address": "100 Main Street, Anytown, NY 10001",
"latitude": 40.7128,
"longitude": -74.006,
"timeZoneId": "America/New_York",
"status": "Open for daily prayers",
"message": "Weekly schedule refreshed by the mosque website.",
"donationLink": "https://downtown.example/donate"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
communityName: 'Downtown Mosque',
address: '100 Main Street, Anytown, NY 10001',
latitude: 40.7128,
longitude: -74.006,
timeZoneId: 'America/New_York',
status: 'Open for daily prayers',
message: 'Weekly schedule refreshed by the mosque website.',
donationLink: 'https://downtown.example/donate'
})
};
fetch('https://api.pocketmusala.com/v1/mosques/{mosqueId}/profile', 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.pocketmusala.com/v1/mosques/{mosqueId}/profile",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'communityName' => 'Downtown Mosque',
'address' => '100 Main Street, Anytown, NY 10001',
'latitude' => 40.7128,
'longitude' => -74.006,
'timeZoneId' => 'America/New_York',
'status' => 'Open for daily prayers',
'message' => 'Weekly schedule refreshed by the mosque website.',
'donationLink' => 'https://downtown.example/donate'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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.pocketmusala.com/v1/mosques/{mosqueId}/profile"
payload := strings.NewReader("{\n \"communityName\": \"Downtown Mosque\",\n \"address\": \"100 Main Street, Anytown, NY 10001\",\n \"latitude\": 40.7128,\n \"longitude\": -74.006,\n \"timeZoneId\": \"America/New_York\",\n \"status\": \"Open for daily prayers\",\n \"message\": \"Weekly schedule refreshed by the mosque website.\",\n \"donationLink\": \"https://downtown.example/donate\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.pocketmusala.com/v1/mosques/{mosqueId}/profile")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"communityName\": \"Downtown Mosque\",\n \"address\": \"100 Main Street, Anytown, NY 10001\",\n \"latitude\": 40.7128,\n \"longitude\": -74.006,\n \"timeZoneId\": \"America/New_York\",\n \"status\": \"Open for daily prayers\",\n \"message\": \"Weekly schedule refreshed by the mosque website.\",\n \"donationLink\": \"https://downtown.example/donate\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pocketmusala.com/v1/mosques/{mosqueId}/profile")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"communityName\": \"Downtown Mosque\",\n \"address\": \"100 Main Street, Anytown, NY 10001\",\n \"latitude\": 40.7128,\n \"longitude\": -74.006,\n \"timeZoneId\": \"America/New_York\",\n \"status\": \"Open for daily prayers\",\n \"message\": \"Weekly schedule refreshed by the mosque website.\",\n \"donationLink\": \"https://downtown.example/donate\"\n}"
response = http.request(request)
puts response.read_body{
"profile": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"communityName": "<string>",
"type": "Mosque",
"isOnlineOnly": true,
"verificationStatus": "<string>",
"entitlement": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"address": "<string>",
"latitude": 123,
"longitude": 123,
"timeZoneId": "America/New_York",
"status": "<string>",
"message": "<string>",
"donationLink": "<string>",
"prayerCalculationParameters": "<string>",
"thumbnail": "<string>",
"coverPhotos": [
"<string>"
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"troubleshooting": {
"code": "<string>",
"adminSummary": "<string>",
"developerSummary": "<string>"
}
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"requestId": "<string>",
"troubleshooting": {
"code": "<string>",
"adminSummary": "<string>",
"developerSummary": "<string>"
}
}
}Authorizations
PocketMusala Developer API key from the authenticated portal.
Headers
Partner-generated request id used for logs and support.
Minimum string length:
1Path Parameters
Body
application/json
Response
Updated mosque profile.
Show child attributes
Show child attributes
⌘I