POSTapi.synup.com/api/v4/local-post-ideas/set-location-image-credits
Set location image credits
Sets the monthly image-generation credit limit for a location and whether image-credit metering is active. Returns the updated credit status.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Synup-Version | string | required | API version date (YYYY-MM-DD). |
Body
| Name | Type | Required | Description |
|---|---|---|---|
locationId | string | required | |
monthlyLimit | integer | optional | |
isActive | boolean | optional |
Request
Request
curl -X POST 'https://api.synup.com/api/v4/local-post-ideas/set-location-image-credits' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "TG9jYXRpb246MQ==",
"monthlyLimit": 100,
"isActive": true
}'const res = await fetch('https://api.synup.com/api/v4/local-post-ideas/set-location-image-credits', {
method: 'POST',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"locationId": "TG9jYXRpb246MQ==",
"monthlyLimit": 100,
"isActive": true
}),
});
const data = await res.json();import requests
res = requests.post(
"https://api.synup.com/api/v4/local-post-ideas/set-location-image-credits",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"locationId": "TG9jYXRpb246MQ==",
"monthlyLimit": 100,
"isActive": True
},
)
data = res.json()req, _ := http.NewRequest("POST", "https://api.synup.com/api/v4/local-post-ideas/set-location-image-credits", bytes.NewBufferString(payload))
req.Header.Set("Authorization", "API YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Responses
| Status | Description |
|---|---|
200 | Successful response |
401 | Unauthorized - Invalid or missing API key |
Example response (generated from the schema)
{
"data": {
"setLocationImageCredits": {
"locationId": "string",
"monthlyLimit": 0,
"isActive": true,
"usedThisMonth": 0,
"remainingThisMonth": 0,
"addonPurchased": 0,
"addonConsumed": 0,
"addonRemaining": 0
}
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.setLocationImageCredits | object | optional | |
data.setLocationImageCredits.locationId | string | optional | |
data.setLocationImageCredits.monthlyLimit | integer | optional | |
data.setLocationImageCredits.isActive | boolean | optional | |
data.setLocationImageCredits.usedThisMonth | integer | optional | |
data.setLocationImageCredits.remainingThisMonth | integer | optional | |
data.setLocationImageCredits.addonPurchased | integer | optional | |
data.setLocationImageCredits.addonConsumed | integer | optional | |
data.setLocationImageCredits.addonRemaining | integer | optional |