Skip to content

CSS

CSS endpoints retrieve or replace a project's custom Play Mode stylesheet.

Endpoints

Get custom CSS # GET/api/v1/{hash}/css

Request

http
GET /api/v1/{hash}/css
bash
curl --request GET \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  "https://arcweave.com/api/v1/PROJECT_HASH/css"

Response

Returns 200 OK.

This endpoint returns only the custom CSS saved for the project. It does not include Arcweave's built-in Play Mode stylesheet. If no custom CSS has been set, css is an empty string:

json
{
  "css": ""
}

Update custom CSS # PATCH/api/v1/{hash}/css

Request

http
PATCH /api/v1/{hash}/css
bash
curl --request PATCH \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data @payload.json \
  "https://arcweave.com/api/v1/PROJECT_HASH/css"

This endpoint replaces the project's complete custom CSS string. It does not parse the stylesheet or add, modify, or remove individual CSS rules.

To change a single rule, first retrieve the current stylesheet with GET /api/v1/{hash}/css, modify it in your integration, and send the full updated stylesheet in the PATCH request.

json
{
  "css": ".prototype-root { color: red; }"
}

Request fields:

PropertyRequiredTypeDescription
cssYesStringComplete replacement stylesheet. Use an empty string to clear it.

css must be present and must be a string. An empty string is valid and clears the custom CSS. Unknown root fields are rejected.

Response

Returns 200 OK with the complete saved custom stylesheet:

json
{
  "css": ".prototype-root { color: red; }"
}

Common errors

StatusMeaning
400Invalid CSS payload.
403Project access or permission denied.
404Project not found.