Create a theme
Creates a theme of the token’s team. The body is the theme definition described in Themes. Needs the themes:write scope.
POST
https://api.responsly.com/v1/themes Example
Section titled “Example”curl -X POST https://api.responsly.com/v1/themes \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{"name": "Our brand", "font": "Open Sans", "colors": {"background": "#ffffff", "question": "#111111", "answer": "#333333", "button": "#0055ff"}, "background": false}'The response is 201 Created with the theme, in the same shape as Get a theme. Use its id with Set a form’s theme.
What is saved
Section titled “What is saved”- Only the keys of a theme definition are kept, each with a valid value. A missing or invalid value takes its default.
- A theme the form renderer cannot build, for example with a color it cannot read, is refused with
422, so it never breaks the forms that use it. - Custom CSS is set in the editor, not through the API.
Errors
Section titled “Errors”| Status | Meaning |
|---|---|
403 | The token lacks themes:write. |
422 | The theme cannot be used. The answer says why. |