Request

Validates a site name to ensure it meets the required criteria. The validations applied to the site name:

  • Is a string and can't be null.
  • Is unique.
  • The length of the name is a maximum of 50 characters.
  • Can't start or end with a space.
  • Can't start with a dash.
  • Can include Latin alphanumeric characters, spaces and dashes.
Security
Bearer
Query
environmentIdstring

The identifier of the environment

Example:environmentId=main
Bodyrequired

The site name to validate.

namestring or null

The name of the site to validate. Example value: skate-park

Example:"skate-park"
curl -i -X POST \
  'https://xmapps-api.sitecorecloud.io/api/v1/sites/name/validate?environmentId=main' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "skate-park"
  }'

Responses

Success

Bodyapplication/json
isValidboolean

Whether the name is valid.

messagestring or null

Details about the request.

Response
{ "isValid": true, "message": "string" }