> ## Documentation Index
> Fetch the complete documentation index at: https://docs.usertick.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Usertick runs surveys on websites, by link, by QR code and by email, and collects every response in one inbox with reports, dashboards and workflows. The REST API lives at https://app.usertick.com/api/public/v1 and uses Bearer API keys or OAuth access tokens; the JavaScript SDK is the @usertick/snippet package on npm.

# Edit a survey theme

> Changes a theme's name, some of its keys, or both. Every draft and archived survey on the theme takes the new look at once, so a theme that a live or paused survey of the organization uses, in what visitors see, in a variant or in its unpublished changes, is 409 PUB-018-002: a person edits it in Usertick, or a new theme is created from it. Send expectedVersion from the last read: a theme saved since is 409 PUB-018-003. A theme used by a survey outside the member's reach is 403 AUTHZ-007-001. On a plan without them, custom CSS in set is 403 THM-001-007 and a picture of the page in set 403 PUB-018-006; clearing them with null is always allowed. A theme that kept its custom CSS through a downgrade and that a website survey uses is 403 THM-002-003 until the CSS is cleared. Needs the member's permission to manage surveys. Recorded in the audit log as made through the credential.

Scopes: themes:write, surveys:read.



## OpenAPI

````yaml api-reference/openapi.json PATCH /survey-themes/{themeId}
openapi: 3.1.0
info:
  title: Usertick Public API
  version: 1.0.0
  description: >-
    The Usertick REST API v1: responses, surveys, metrics, contacts, email sends
    and webhook subscriptions of one organization.


    **Authentication.** Send an API key (Settings, Developers, API keys;
    utk_...) or an app's OAuth access token (uto_...) as Authorization: Bearer.
    X-Api-Key works for clients that cannot set Authorization. Each endpoint
    lists the scopes it needs. API keys work on Pro plans and up, and apps such
    as Zapier on every plan. AI assistants reach the API only through the
    Usertick MCP server (Starter and up), never with their token directly.


    **Format.** Plain JSON resources; times are RFC 3339 in UTC with
    milliseconds (2026-09-30T10:00:00.000Z). Lists are { data, nextCursor }:
    limit is 1 to 100 (default 25, out of range is 400), and nextCursor goes
    back as cursor until it is null. A page starts strictly after the last row
    of the page before, so a row deleted or renamed in between never ends a list
    early.


    **Errors.** Every error is { statusCode, success: false, code, message, data
    }, plus errors: [{ field, code, message }] for invalid fields. Switch on
    code (x-error-codes lists them all); messages may change. A path with no
    route answers 404 GEN-000-404, a method the route doesn't take 405
    GEN-000-405 and a body that is not JSON (multipart/form-data on a file
    upload) 415 GEN-000-415, in the same envelope.


    **Rate limits.** The plan sets the requests a minute, as token buckets: 300
    per credential and 1,500 per organization on Business, 120 and 600 on the
    other plans, and an Enterprise plan may set its own. GET /me returns the
    ones that apply. An answer to an authenticated request has
    X-RateLimit-Limit, -Remaining and -Reset (seconds until the budget is full)
    for the credential, and X-RateLimit-Org-* for the organization, except a 429
    over the credential's budget, which has the credential's only, and
    X-RateLimit-Window: 60s. Over a budget is 429 with Retry-After, the seconds
    the bucket takes to refill one request. A 401 carries no X-RateLimit
    headers, and neither does a 429 GEN-429-001 from the per-address limit
    (3,000 requests a minute per client address, checked before the credential).
    Calls from the Usertick MCP server skip the per-address limit, since every
    assistant arrives from its addresses; the per-credential and
    per-organization budgets still apply to them.


    **Idempotency.** Every POST, and the PATCH of a survey, dashboard or
    workflow draft or of a survey theme, takes an Idempotency-Key header: the
    same key and request within 24 hours get the first answer again. A refusal
    that depends on state (a 403, a 409 or a 429) and a server error are not
    kept, so the same request with the key runs again.


    **Survey drafts.** With surveys:draft an assistant or a script creates
    surveys as drafts, copies any survey into a draft, and edits a draft or the
    unpublished changes of a live or paused survey; a person publishes them in
    Usertick. With surveys:archive it archives surveys and restores archived
    ones as drafts.


    **Themes, folders and pictures.** With themes:write a script creates survey
    themes and edits those no live or paused survey uses; with surveys:organize
    it creates and renames survey folders, files surveys under them and moves
    draft surveys between sites; with media:write it uploads pictures to the
    media library. None of it changes what visitors see.


    **Contacts and email.** With contacts:read and contacts:write a script
    manages contacts, lists and their members, and erases a contact with every
    response of the person (POST /contacts/{contactId}/erase, with
    responses:delete). With email:read it reads the survey email sends; sending
    stays in Usertick.


    **Dashboards and workflows.** With dashboards:draft an assistant or a script
    creates and copies dashboards as drafts and edits their drafts; with
    workflows:draft it creates and copies workflows switched off and edits their
    drafts. A person publishes either one in Usertick. dashboards:read and
    workflows:read list and read them, and integrations:read lists what a
    workflow step can pick of a connected tool. With dashboards:share an app or
    an AI assistant shares a board its member owns with people in the
    organization, never outside it.


    **Exports.** With exports:create (and responses:read) a script starts CSV or
    Excel exports of a survey's Results or of a dashboard, the files the Export
    menu makes, and downloads them for 24 hours. Each file counts as one of the
    plan's exports a month.


    **Support tickets.** With support:read and support:write an app or an AI
    assistant opens support tickets for the member it signed in as, lists that
    member's tickets and replies on them, with files as on the Help page: each
    file is uploaded first, or copied from the media library with surveys:read,
    and named in the message, and every file of a thread downloads through a
    link that works for five minutes. A ticket belongs to a person, so an API
    key can't carry these scopes. Support tickets come with the paid plans.


    **Versioning.** Within /v1 changes are additive only: new endpoints, new
    optional parameters, new fields (ignore fields you do not know). Anything
    that will go away is announced at least six months ahead with Deprecation
    and Sunset headers on its answers.


    **Webhooks.** Every delivery is { id, type, createdAt, data }, signed per
    Standard Webhooks (see webhooks). data is the Response resource, with change
    on response.status_changed and response.classification_corrected; on
    theme.spiking it is the spike.


    Every answer carries X-Request-Id.
  contact:
    name: Usertick support
    url: https://usertick.com/support
servers:
  - url: https://app.usertick.com/api/public/v1
    description: Production
security:
  - bearerAuth: []
  - apiKeyHeader: []
tags:
  - name: Account
  - name: Responses
  - name: Surveys
  - name: Metrics
  - name: Exports
  - name: Contacts
  - name: Email
  - name: Dashboards
  - name: Workflows
  - name: Support
  - name: Webhooks
paths:
  /survey-themes/{themeId}:
    patch:
      tags:
        - Surveys
      summary: Edit a survey theme
      description: >-
        Changes a theme's name, some of its keys, or both. Every draft and
        archived survey on the theme takes the new look at once, so a theme that
        a live or paused survey of the organization uses, in what visitors see,
        in a variant or in its unpublished changes, is 409 PUB-018-002: a person
        edits it in Usertick, or a new theme is created from it. Send
        expectedVersion from the last read: a theme saved since is 409
        PUB-018-003. A theme used by a survey outside the member's reach is 403
        AUTHZ-007-001. On a plan without them, custom CSS in set is 403
        THM-001-007 and a picture of the page in set 403 PUB-018-006; clearing
        them with null is always allowed. A theme that kept its custom CSS
        through a downgrade and that a website survey uses is 403 THM-002-003
        until the CSS is cleared. Needs the member's permission to manage
        surveys. Recorded in the audit log as made through the credential.


        Scopes: themes:write, surveys:read.
      operationId: editSurveyTheme
      parameters:
        - name: themeId
          in: path
          description: A survey theme id.
          required: true
          schema:
            type: string
            format: uuid
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SurveyThemeEdit'
      responses:
        '200':
          description: The theme after the edit.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            X-RateLimit-Limit:
              $ref: '#/components/headers/XRateLimitLimit'
            X-RateLimit-Remaining:
              $ref: '#/components/headers/XRateLimitRemaining'
            X-RateLimit-Reset:
              $ref: '#/components/headers/XRateLimitReset'
            X-RateLimit-Org-Limit:
              $ref: '#/components/headers/XRateLimitOrgLimit'
            X-RateLimit-Org-Remaining:
              $ref: '#/components/headers/XRateLimitOrgRemaining'
            X-RateLimit-Org-Reset:
              $ref: '#/components/headers/XRateLimitOrgReset'
            X-RateLimit-Window:
              $ref: '#/components/headers/XRateLimitWindow'
            Idempotent-Replayed:
              $ref: '#/components/headers/IdempotentReplayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SurveyTheme'
        '400':
          description: >-
            The request isn't valid. Codes: GEN-000-003, PUB-001-004,
            PUB-001-006, PUB-018-005, THM-001-001, THM-001-002, THM-001-003,
            THM-001-005, THM-001-010, THM-001-011, SRV-009-039, PUB-002-001,
            THM-002-006.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            Idempotent-Replayed:
              $ref: '#/components/headers/IdempotentReplayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                GEN-000-003:
                  $ref: '#/components/examples/GEN-000-003'
                PUB-001-004:
                  $ref: '#/components/examples/PUB-001-004'
                PUB-001-006:
                  $ref: '#/components/examples/PUB-001-006'
                PUB-018-005:
                  $ref: '#/components/examples/PUB-018-005'
                THM-001-001:
                  $ref: '#/components/examples/THM-001-001'
                THM-001-002:
                  $ref: '#/components/examples/THM-001-002'
                THM-001-003:
                  $ref: '#/components/examples/THM-001-003'
                THM-001-005:
                  $ref: '#/components/examples/THM-001-005'
                THM-001-010:
                  $ref: '#/components/examples/THM-001-010'
                THM-001-011:
                  $ref: '#/components/examples/THM-001-011'
                SRV-009-039:
                  $ref: '#/components/examples/SRV-009-039'
                PUB-002-001:
                  $ref: '#/components/examples/PUB-002-001'
                THM-002-006:
                  $ref: '#/components/examples/THM-002-006'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            The request was refused. Codes: APK-004-004, APK-004-005,
            APK-004-008, APK-004-009, AUTHZ-001-002, AUTHZ-007-001, THM-001-007,
            THM-002-003, PUB-018-006.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                APK-004-004:
                  $ref: '#/components/examples/APK-004-004'
                APK-004-005:
                  $ref: '#/components/examples/APK-004-005'
                APK-004-008:
                  $ref: '#/components/examples/APK-004-008'
                APK-004-009:
                  $ref: '#/components/examples/APK-004-009'
                AUTHZ-001-002:
                  $ref: '#/components/examples/AUTHZ-001-002'
                AUTHZ-007-001:
                  $ref: '#/components/examples/AUTHZ-007-001'
                THM-001-007:
                  $ref: '#/components/examples/THM-001-007'
                THM-002-003:
                  $ref: '#/components/examples/THM-002-003'
                PUB-018-006:
                  $ref: '#/components/examples/PUB-018-006'
        '404':
          description: 'The resource couldn''t be found. Codes: PUB-018-001.'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            Idempotent-Replayed:
              $ref: '#/components/headers/IdempotentReplayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                PUB-018-001:
                  $ref: '#/components/examples/PUB-018-001'
        '409':
          description: >-
            The request conflicts with the current state. Codes: PUB-018-002,
            PUB-018-003, PUB-002-002, PUB-002-003.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                PUB-018-002:
                  $ref: '#/components/examples/PUB-018-002'
                PUB-018-003:
                  $ref: '#/components/examples/PUB-018-003'
                PUB-002-002:
                  $ref: '#/components/examples/PUB-002-002'
                PUB-002-003:
                  $ref: '#/components/examples/PUB-002-003'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedMediaType'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      description: >-
        Any 1 to 255 printable ASCII characters, without a space at either end.
        The answer to the first request with a key is kept for 24 hours per
        credential: the same request again gets it back (Idempotent-Replayed:
        true), another request with the key is 409 PUB-002-002, and while the
        first still runs 409 PUB-002-003. A server error is not kept, and a
        request that never answered frees its key after 2 minutes: a retry with
        the key then runs again.
      required: false
      schema:
        type: string
        maxLength: 255
  schemas:
    SurveyThemeEdit:
      type: object
      properties:
        expectedVersion:
          type: integer
          description: >-
            The theme's version as you read it. A theme saved since is 409
            PUB-018-003.
          minimum: 0
        name:
          type: string
          description: 1 to 120 characters.
          minLength: 1
          maxLength: 120
        set:
          $ref: '#/components/schemas/ThemeSet'
      required:
        - expectedVersion
      description: A name, a set or both.
      additionalProperties: false
      examples:
        - expectedVersion: 3
          set:
            general:
              buttonShape: pill
            dark:
              accentColor: null
    SurveyTheme:
      type: object
      properties:
        id:
          type: string
          description: What a survey draft's theme.themeId takes.
          format: uuid
        name:
          type: string
        definition:
          type: object
          description: >-
            The theme as stored: general, light, dark and page. A font is its
            stack and a drawn cover or pattern an address Usertick wrote.
          additionalProperties: true
        isDefault:
          type: boolean
          description: New blank surveys start with this theme.
        usedBy:
          type: integer
          description: The surveys that use it, archived ones left out.
        usedByLive:
          type: integer
          description: >-
            The live and paused surveys that use it, in what visitors see, in a
            variant or in their unpublished changes. Counted over the whole
            organization.
        editable:
          type: boolean
          description: 'True while usedByLive is 0: the API edits the theme only then.'
        version:
          type: integer
          description: What expectedVersion of an edit names.
        createdAt:
          type: string
          format: date-time
          examples:
            - '2026-09-30T10:00:00.000Z'
        updatedAt:
          type:
            - string
            - 'null'
          format: date-time
          examples:
            - '2026-09-30T10:00:00.000Z'
      required:
        - id
        - name
        - definition
        - isDefault
        - usedBy
        - usedByLive
        - editable
        - version
        - createdAt
        - updatedAt
      additionalProperties: false
    Error:
      type: object
      properties:
        statusCode:
          type: integer
          description: The HTTP status, again.
        success:
          type: boolean
          description: Always false.
        code:
          type: string
          description: >-
            What went wrong, stable across versions (see x-error-codes). For
            invalid fields, the first field's code.
          examples:
            - PUB-001-001
        message:
          type:
            - string
            - 'null'
          description: The code's message in English (US); null for a code without one.
        data:
          description: Extra context for some errors; null otherwise.
        kind:
          type: string
          description: >-
            plan when the organization's plan refuses the request; left out
            otherwise.
          enum:
            - plan
        errors:
          type: array
          items:
            $ref: '#/components/schemas/FieldError'
          description: >-
            Every invalid field, in the order of the request's parameters. Only
            on a 400 about fields.
      required:
        - statusCode
        - success
        - code
        - message
        - data
      description: >-
        Every error answer. Success answers are the plain resource or list
        instead.
      additionalProperties: false
      examples:
        - statusCode: 400
          success: false
          code: PUB-001-001
          message: The limit must be between 1 and 100.
          data: null
          errors:
            - field: limit
              code: PUB-001-001
              message: The limit must be between 1 and 100.
            - field: sort
              code: PUB-001-005
              message: The sort order must be asc or desc.
    ThemeSet:
      type: object
      properties:
        general:
          $ref: '#/components/schemas/ThemeGeneral'
        light:
          $ref: '#/components/schemas/ThemePalette'
        dark:
          $ref: '#/components/schemas/ThemePalette'
        page:
          oneOf:
            - $ref: '#/components/schemas/ThemePage'
            - type: 'null'
          description: null clears every setting of the hosted page.
      required: []
      description: >-
        The keys to change, merged onto the theme; every other key stays. A key
        that isn't listed here is 400 PUB-018-005 at its path
        (set.general.font), never dropped.
      additionalProperties: false
    FieldError:
      type: object
      properties:
        field:
          type: string
          description: >-
            The query parameter, or the body property (camelCase, dotted when
            nested).
        code:
          type: string
        message:
          type:
            - string
            - 'null'
      required:
        - field
        - code
        - message
      additionalProperties: false
    ThemeGeneral:
      type: object
      properties:
        fontFamily:
          type: string
          description: >-
            A font GET /survey-themes/capabilities lists, by its key, its name
            or its value.
          maxLength: 300
        headingFontFamily:
          type:
            - string
            - 'null'
          description: The titles' font; null follows fontFamily.
          maxLength: 300
        fontSize:
          type:
            - integer
            - 'null'
          description: The body text in pixels.
          minimum: 13
          maximum: 18
        titleSize:
          type:
            - integer
            - 'null'
          description: The titles in percent of their own size.
          minimum: 85
          maximum: 200
        headingWeight:
          type:
            - string
            - 'null'
          enum:
            - regular
            - medium
            - semibold
            - bold
            - null
        textAlign:
          type:
            - string
            - 'null'
          enum:
            - left
            - center
            - right
            - null
        borderRadius:
          oneOf:
            - type: integer
              minimum: 0
              maximum: 32
            - type: string
              pattern: ^[0-9]+(px)?$
          description: >-
            The card's corner. 0 to 32 pixels, as a number or as text ("12px");
            stored as text.
        width:
          oneOf:
            - type: integer
              minimum: 280
              maximum: 560
            - type: string
              pattern: ^[0-9]+(px)?$
          description: >-
            The website widget's width. 280 to 560 pixels, as a number or as
            text ("12px"); stored as text.
        buttonStyle:
          type:
            - string
            - 'null'
          enum:
            - filled
            - outline
            - soft
            - null
        buttonShape:
          type:
            - string
            - 'null'
          enum:
            - rounded
            - pill
            - square
            - null
        choiceStyle:
          type:
            - string
            - 'null'
          enum:
            - card
            - list
            - null
        inputStyle:
          type:
            - string
            - 'null'
          enum:
            - outline
            - filled
            - underline
            - null
        density:
          type:
            - integer
            - 'null'
          description: The room between questions in percent.
          minimum: 75
          maximum: 140
        shadow:
          type:
            - string
            - 'null'
          enum:
            - none
            - soft
            - strong
            - null
        accentBar:
          type:
            - boolean
            - 'null'
          description: The thin strip on the widget's top edge.
        colorScheme:
          type:
            - string
            - 'null'
          description: auto follows the visitor.
          enum:
            - auto
            - light
            - dark
            - null
        customCss:
          type:
            - string
            - 'null'
          description: >-
            CSS the website widget applies: at most 10 KB (UTF-8), and nothing
            in it may load from another address. Needs a plan with custom CSS.
          maxLength: 10240
      required: []
      description: The shape and the type to change. null clears a key that isn't required.
      additionalProperties: false
    ThemePalette:
      type: object
      properties:
        primaryColor:
          type: string
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        primaryHoverColor:
          type: string
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        backgroundColor:
          type: string
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        textColor:
          type: string
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        secondaryTextColor:
          type: string
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        borderColor:
          type: string
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        inputBackground:
          type: string
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        npsInactiveColor:
          type: string
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        starColor:
          type: string
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        npsActiveColor:
          type: string
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        successColor:
          type: string
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        errorColor:
          type: string
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        onPrimary:
          type:
            - string
            - 'null'
          description: The label on filled buttons.
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        accentColor:
          type:
            - string
            - 'null'
          description: Drawn covers, patterns and the top strip.
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        mutedSurface:
          type:
            - string
            - 'null'
          description: 'Quiet fills: tracks, drop zones, chips.'
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        launcherColor:
          type:
            - string
            - 'null'
          description: The side button.
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        backdropColor:
          type:
            - string
            - 'null'
          description: Behind a survey in the center of the page; takes alpha.
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        pageBackground:
          type:
            - string
            - 'null'
          description: The hosted page around the survey.
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        pageGradientTo:
          type:
            - string
            - 'null'
          description: The gradient's second color.
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        panelBackground:
          type:
            - string
            - 'null'
          description: The hosted page's title panel.
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
        panelText:
          type:
            - string
            - 'null'
          description: The text on the panel.
          pattern: ^#([0-9a-fA-F]{3}|[0-9a-fA-F]{4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$
      required: []
      description: >-
        One palette's colors to change. null clears a color that isn't required,
        which then follows another one (Auto in Usertick).
      additionalProperties: false
    ThemePage:
      type: object
      properties:
        backgroundType:
          type:
            - string
            - 'null'
          enum:
            - solid
            - gradient
            - image
            - null
        gradientAngle:
          type:
            - integer
            - 'null'
          minimum: 0
          maximum: 360
        imageUrl:
          type:
            - string
            - 'null'
          description: The background picture. The url of a picture GET /media lists.
          format: uri
        imageUrlDark:
          type:
            - string
            - 'null'
          description: >-
            The background picture for a dark viewer. The url of a picture GET
            /media lists.
          format: uri
        imageFit:
          type:
            - string
            - 'null'
          enum:
            - cover
            - contain
            - tile
            - null
        imagePosition:
          type:
            - string
            - 'null'
          enum:
            - center
            - top
            - bottom
            - left
            - right
            - null
        imageOverlay:
          type:
            - integer
            - 'null'
          description: Percent of the page color over the picture.
          minimum: 0
          maximum: 90
        imageBlur:
          type:
            - integer
            - 'null'
          description: Pixels.
          minimum: 0
          maximum: 20
        coverGraphic:
          type:
            - string
            - 'null'
          description: >-
            A cover Usertick draws in the theme's colors. It takes the place of
            coverImageUrl.
          enum:
            - blobs
            - waves
            - dots
            - lines
            - rings
            - mesh
            - null
        coverImageUrl:
          type:
            - string
            - 'null'
          description: >-
            The cover picture. It takes the place of coverGraphic. The url of a
            picture GET /media lists.
          format: uri
        backgroundPattern:
          type:
            - string
            - 'null'
          description: A pattern Usertick draws in the theme's colors.
          enum:
            - dots
            - grid
            - diagonal
            - crosses
            - waves
            - circles
            - triangles
            - confetti
            - null
        patternOpacity:
          type:
            - integer
            - 'null'
          description: Percent.
          minimum: 2
          maximum: 30
      required: []
      description: The hosted page's keys to change. null clears one.
      additionalProperties: false
  headers:
    XRequestId:
      description: >-
        This answer's id (req_ and 32 hex characters), also in the logs. Quote
        it to support.
      schema:
        type: string
    XRateLimitLimit:
      description: The credential's requests per minute.
      schema:
        type: integer
    XRateLimitRemaining:
      description: What is left of it now.
      schema:
        type: integer
    XRateLimitReset:
      description: >-
        Seconds until the credential's budget is full again (the bucket refills
        continuously).
      schema:
        type: integer
    XRateLimitOrgLimit:
      description: Every credential of the organization together, per minute.
      schema:
        type: integer
    XRateLimitOrgRemaining:
      description: What is left of the organization's budget.
      schema:
        type: integer
    XRateLimitOrgReset:
      description: Seconds until the organization's budget is full again.
      schema:
        type: integer
    XRateLimitWindow:
      description: >-
        The window both budgets count over: 60s, since they are requests per
        minute.
      schema:
        type: string
    IdempotentReplayed:
      description: >-
        true when this is the kept answer of an earlier request with the same
        Idempotency-Key.
      schema:
        type: string
    RetryAfter:
      description: >-
        Seconds to wait before trying again. On a 429 over a budget, the time
        the bucket takes to refill one request (1 second at 120 or 300 a
        minute); X-RateLimit-Reset says when the whole budget is back.
      schema:
        type: integer
  examples:
    GEN-000-003:
      summary: Some fields aren't valid. Check them and try again.
      value:
        statusCode: 400
        success: false
        code: GEN-000-003
        message: Some fields aren't valid. Check them and try again.
        data: null
    PUB-001-004:
      summary: This value isn't valid.
      value:
        statusCode: 400
        success: false
        code: PUB-001-004
        message: This value isn't valid.
        data: null
    PUB-001-006:
      summary: Send a JSON body that this endpoint accepts.
      value:
        statusCode: 400
        success: false
        code: PUB-001-006
        message: Send a JSON body that this endpoint accepts.
        data: null
    PUB-018-005:
      summary: >-
        This key isn't taken here. GET /survey-themes/capabilities lists every
        key a theme has, under general, colors (for light and dark) and page.
      value:
        statusCode: 400
        success: false
        code: PUB-018-005
        message: >-
          This key isn't taken here. GET /survey-themes/capabilities lists every
          key a theme has, under general, colors (for light and dark) and page.
        data: null
    THM-001-001:
      summary: Theme name is required.
      value:
        statusCode: 400
        success: false
        code: THM-001-001
        message: Theme name is required.
        data: null
    THM-001-002:
      summary: Theme name can't be empty.
      value:
        statusCode: 400
        success: false
        code: THM-001-002
        message: Theme name can't be empty.
        data: null
    THM-001-003:
      summary: Theme name is too long.
      value:
        statusCode: 400
        success: false
        code: THM-001-003
        message: Theme name is too long.
        data: null
    THM-001-005:
      summary: Theme definition is too large.
      value:
        statusCode: 400
        success: false
        code: THM-001-005
        message: Theme definition is too large.
        data: null
    THM-001-010:
      summary: >-
        A picture or video in the theme isn't from the media library. Pick it
        from the library and save again.
      value:
        statusCode: 400
        success: false
        code: THM-001-010
        message: >-
          A picture or video in the theme isn't from the media library. Pick it
          from the library and save again.
        data: null
    THM-001-011:
      summary: >-
        A theme color must be a hex value such as #ff3c00. Correct the color and
        save again.
      value:
        statusCode: 400
        success: false
        code: THM-001-011
        message: >-
          A theme color must be a hex value such as #ff3c00. Correct the color
          and save again.
        data: null
    SRV-009-039:
      summary: >-
        Custom CSS can be at most 10 KB and can't load anything from another
        address, so url(), src(), image-set(), expression() and @import aren't
        allowed. Remove them, then publish.
      value:
        statusCode: 400
        success: false
        code: SRV-009-039
        message: >-
          Custom CSS can be at most 10 KB and can't load anything from another
          address, so url(), src(), image-set(), expression() and @import aren't
          allowed. Remove them, then publish.
        data: null
    PUB-002-001:
      summary: >-
        Send an Idempotency-Key of 1 to 255 printable ASCII characters, without
        a space at either end.
      value:
        statusCode: 400
        success: false
        code: PUB-002-001
        message: >-
          Send an Idempotency-Key of 1 to 255 printable ASCII characters,
          without a space at either end.
        data: null
    THM-002-006:
      summary: >-
        This theme would make a survey that uses it, or the live surveys on its
        site, too large. Remove some of the theme's custom CSS, or stop using
        the theme on some surveys, then save again.
      value:
        statusCode: 400
        success: false
        code: THM-002-006
        message: >-
          This theme would make a survey that uses it, or the live surveys on
          its site, too large. Remove some of the theme's custom CSS, or stop
          using the theme on some surveys, then save again.
        data: null
    APK-004-004:
      summary: >-
        This API key or app doesn't have permission for this request. Grant it
        the required scope.
      value:
        statusCode: 403
        success: false
        code: APK-004-004
        message: >-
          This API key or app doesn't have permission for this request. Grant it
          the required scope.
        data: null
    APK-004-005:
      summary: >-
        Your plan doesn't include API keys. To use them, upgrade to Pro or
        higher.
      value:
        statusCode: 403
        success: false
        code: APK-004-005
        message: >-
          Your plan doesn't include API keys. To use them, upgrade to Pro or
          higher.
        data: null
    APK-004-008:
      summary: >-
        This organization's plan doesn't include apps that use the API, such as
        Zapier. To use them, contact Usertick sales to change the plan.
      value:
        statusCode: 403
        success: false
        code: APK-004-008
        message: >-
          This organization's plan doesn't include apps that use the API, such
          as Zapier. To use them, contact Usertick sales to change the plan.
        data: null
    APK-004-009:
      summary: >-
        This organization's plan doesn't include the MCP server. To use an AI
        assistant with Usertick, upgrade to Starter or higher.
      value:
        statusCode: 403
        success: false
        code: APK-004-009
        message: >-
          This organization's plan doesn't include the MCP server. To use an AI
          assistant with Usertick, upgrade to Starter or higher.
        data: null
    AUTHZ-001-002:
      summary: Your role doesn't have the required permission.
      value:
        statusCode: 403
        success: false
        code: AUTHZ-001-002
        message: Your role doesn't have the required permission.
        data: null
    AUTHZ-007-001:
      summary: Your role has access to selected surveys only, so this isn't available.
      value:
        statusCode: 403
        success: false
        code: AUTHZ-007-001
        message: >-
          Your role has access to selected surveys only, so this isn't
          available.
        data: null
    THM-001-007:
      summary: >-
        Custom CSS requires the Pro plan or higher. To save this theme, remove
        its custom CSS or upgrade.
      value:
        statusCode: 403
        success: false
        code: THM-001-007
        message: >-
          Custom CSS requires the Pro plan or higher. To save this theme, remove
          its custom CSS or upgrade.
        data: null
    THM-002-003:
      summary: >-
        Custom CSS requires the Pro plan or higher. To save this theme, remove
        its custom CSS or upgrade.
      value:
        statusCode: 403
        success: false
        code: THM-002-003
        message: >-
          Custom CSS requires the Pro plan or higher. To save this theme, remove
          its custom CSS or upgrade.
        data: null
    PUB-018-006:
      summary: >-
        The page's own pictures require the Starter plan or higher. To save this
        theme, upgrade, or leave the pictures out: in set, send null for
        imageUrl, imageUrlDark and coverImageUrl under page, or null for page to
        clear all of its settings.
      value:
        statusCode: 403
        success: false
        code: PUB-018-006
        message: >-
          The page's own pictures require the Starter plan or higher. To save
          this theme, upgrade, or leave the pictures out: in set, send null for
          imageUrl, imageUrlDark and coverImageUrl under page, or null for page
          to clear all of its settings.
        data: null
    PUB-018-001:
      summary: The survey theme couldn't be found.
      value:
        statusCode: 404
        success: false
        code: PUB-018-001
        message: The survey theme couldn't be found.
        data: null
    PUB-018-002:
      summary: >-
        A live or paused survey uses this theme, so the theme wasn't changed: an
        edit would reach visitors at once. Ask a person to edit it in the
        Usertick dashboard, or create a new theme from it.
      value:
        statusCode: 409
        success: false
        code: PUB-018-002
        message: >-
          A live or paused survey uses this theme, so the theme wasn't changed:
          an edit would reach visitors at once. Ask a person to edit it in the
          Usertick dashboard, or create a new theme from it.
        data: null
    PUB-018-003:
      summary: >-
        The theme changed after it was read. Read it again with GET
        /survey-themes/{themeId}, then send the changes with the new version.
      value:
        statusCode: 409
        success: false
        code: PUB-018-003
        message: >-
          The theme changed after it was read. Read it again with GET
          /survey-themes/{themeId}, then send the changes with the new version.
        data: null
    PUB-002-002:
      summary: >-
        This Idempotency-Key was used with a different request. Use a new key
        for a new request.
      value:
        statusCode: 409
        success: false
        code: PUB-002-002
        message: >-
          This Idempotency-Key was used with a different request. Use a new key
          for a new request.
        data: null
    PUB-002-003:
      summary: >-
        A request with this Idempotency-Key is still running. Try again in a
        moment.
      value:
        statusCode: 409
        success: false
        code: PUB-002-003
        message: >-
          A request with this Idempotency-Key is still running. Try again in a
          moment.
        data: null
    APK-004-001:
      summary: Send an API key or an access token in the Authorization header.
      value:
        statusCode: 401
        success: false
        code: APK-004-001
        message: Send an API key or an access token in the Authorization header.
        data: null
    APK-004-002:
      summary: >-
        The API key or access token is invalid, expired or revoked. Connect
        again with a valid one.
      value:
        statusCode: 401
        success: false
        code: APK-004-002
        message: >-
          The API key or access token is invalid, expired or revoked. Connect
          again with a valid one.
        data: null
    APK-004-007:
      summary: >-
        This credential is for another server. The MCP server takes only the
        access tokens an assistant gets when it signs in, and the REST API takes
        API keys and app tokens.
      value:
        statusCode: 401
        success: false
        code: APK-004-007
        message: >-
          This credential is for another server. The MCP server takes only the
          access tokens an assistant gets when it signs in, and the REST API
          takes API keys and app tokens.
        data: null
    GEN-000-413:
      summary: The request is too large. Send less data or a smaller file.
      value:
        statusCode: 413
        success: false
        code: GEN-000-413
        message: The request is too large. Send less data or a smaller file.
        data: null
    GEN-000-415:
      summary: >-
        The request body isn't JSON. Send it with Content-Type:
        application/json.
      value:
        statusCode: 415
        success: false
        code: GEN-000-415
        message: >-
          The request body isn't JSON. Send it with Content-Type:
          application/json.
        data: null
    APK-004-003:
      summary: This API key or app sent too many requests. Wait a minute and try again.
      value:
        statusCode: 429
        success: false
        code: APK-004-003
        message: >-
          This API key or app sent too many requests. Wait a minute and try
          again.
        data: null
    APK-004-006:
      summary: >-
        Your organization sent too many API requests. Wait a minute and try
        again.
      value:
        statusCode: 429
        success: false
        code: APK-004-006
        message: >-
          Your organization sent too many API requests. Wait a minute and try
          again.
        data: null
    GEN-429-001:
      summary: Too many requests were sent. Wait a minute and try again.
      value:
        statusCode: 429
        success: false
        code: GEN-429-001
        message: Too many requests were sent. Wait a minute and try again.
        data: null
  responses:
    Unauthorized:
      description: >-
        No credential, one that is invalid, expired or revoked, or a token an AI
        assistant got for the MCP server. Codes: APK-004-001, APK-004-002,
        APK-004-007.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            APK-004-001:
              $ref: '#/components/examples/APK-004-001'
            APK-004-002:
              $ref: '#/components/examples/APK-004-002'
            APK-004-007:
              $ref: '#/components/examples/APK-004-007'
    PayloadTooLarge:
      description: 'The body is over 64 KB. Codes: GEN-000-413.'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            GEN-000-413:
              $ref: '#/components/examples/GEN-000-413'
    UnsupportedMediaType:
      description: >-
        The body is not JSON: send it with Content-Type: application/json.
        Codes: GEN-000-415.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            GEN-000-415:
              $ref: '#/components/examples/GEN-000-415'
    TooManyRequests:
      description: >-
        Over the credential's or the organization's budget, or over the
        per-address limit that is checked before the credential (GEN-429-001,
        without X-RateLimit headers). Codes: APK-004-003, APK-004-006,
        GEN-429-001.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
        Retry-After:
          $ref: '#/components/headers/RetryAfter'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            APK-004-003:
              $ref: '#/components/examples/APK-004-003'
            APK-004-006:
              $ref: '#/components/examples/APK-004-006'
            GEN-429-001:
              $ref: '#/components/examples/GEN-429-001'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An API key (utk_live_...) or an app's OAuth access token (uto_...).
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-Api-Key
      description: The API key, for clients that cannot send Authorization.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.