CSS
CSS endpoints retrieve or replace a project's custom Play Mode stylesheet.
Endpoints
Get custom CSS # GET/api/v1/{hash}/css
/api/v1/{hash}/cssRequest
GET /api/v1/{hash}/csscurl --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:
{
"css": ""
}Update custom CSS # PATCH/api/v1/{hash}/css
/api/v1/{hash}/cssRequest
PATCH /api/v1/{hash}/csscurl --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.
{
"css": ".prototype-root { color: red; }"
}Request fields:
| Property | Required | Type | Description |
|---|---|---|---|
css | Yes | String | Complete 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:
{
"css": ".prototype-root { color: red; }"
}Common errors
| Status | Meaning |
|---|---|
400 | Invalid CSS payload. |
403 | Project access or permission denied. |
404 | Project not found. |