MapScale Docs
API ReferenceHealth and contract
← MapScale API
POST/v1/styles

Save a map style

Public operational checks and the OpenAPI document.

Sends this request to the live API and shows the real response.

Equivalent request
curl \
  -X POST \
  -H "X-MapScale-Key: $MAPSCALE_API_KEY" \
  "https://api.mapscale.io/v1/styles"
Response
Default response
{
  "status": "201",
  "contentType": "application/json",
  "description": "SavedStyle"
}

Request body

Required · application/json

Responses

201SavedStyleapplication/json
400Malformed JSON body.application/json
401mapscale/effect-api/UnauthorizedFailureapplication/json
403Publishable keys cannot manage styles. | mapscale/effect-api/ForbiddenFailureapplication/json
409The requested slug is already used by this account.application/json
422Invalid overlay, unknown dataset, overlay too large, or the account's style limit is reached.application/json
429mapscale/effect-api/RateLimitedFailureapplication/json
500The style could not be stored. | mapscale/effect-api/MiddlewareInternalFailureapplication/json
503mapscale/effect-api/UpstreamUnavailableFailureapplication/json

On this page

Analytics settings