Restivity Tags API

The tags API from Restivity — 3 operation(s) for tags.

GitHub OpenAPI

Operations 6

GET /tags List tags #
POST /tags Create a Tag #
GET /tags/{id} Fetch a Tag by id #
PATCH /tags/{id} Update a Tag #
DELETE /tags/{id} Soft-delete a Tag #
POST /tags/{id}/restore Restore a soft-deleted Tag #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/restivity-ai:restivity-ai-tags-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

restivity-ai-tags-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Restivity REST Tags API
  version: 1.0.0
  description: 'OAuth-protected CRUD over tasks, projects, pomodoro sessions, comments, tags, and the user profile. Paired with an MCP surface (see /api/mcp) that exposes the same capabilities as tools: through it an agent can read and change your tasks, projects, custom statuses, teams, focus sessions, comments, tags and profile, and read your earnings.'
  contact:
    name: Restivity
    url: https://restivity.ai
  license:
    name: Proprietary
    url: https://restivity.ai/legal
servers:
- url: https://restivity.ai/api/v1
  description: Production
tags:
- name: Tags
paths:
  /tags:
    get:
      operationId: tags.list
      summary: List tags
      description: 'Cursor-paginated list of the caller''s non-deleted tags. An unreadable `cursor` is refused with `invalid_cursor`: pass back the previous page''s `next_cursor` unchanged, or omit it for the first page.'
      tags:
      - Tags
      security:
      - oauth2:
        - tags:read
      parameters:
      - in: query
        name: cursor
        schema:
          description: 'Keyset cursor from the previous page''s `next_cursor`. Omit it (or pass "") for the first page. Pass the `next_cursor` back unchanged: it needs no encoding of its own. A cursor that cannot be read is refused with `invalid_cursor`: pass back the previous page''s `next_cursor` unchanged.'
          type: string
        description: 'Keyset cursor from the previous page''s `next_cursor`. Omit it (or pass "") for the first page. Pass the `next_cursor` back unchanged: it needs no encoding of its own. A cursor that cannot be read is refused with `invalid_cursor`: pass back the previous page''s `next_cursor` unchanged.'
      - in: query
        name: limit
        schema:
          default: 50
          type: integer
          minimum: 1
          maximum: 200
      - in: query
        name: sort_by
        schema:
          type: string
          enum:
          - name
      - in: query
        name: sort_order
        schema:
          type: string
          enum:
          - asc
          - desc
      responses:
        '200':
          description: Page of tags.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Tag'
                  next_cursor:
                    description: 'Opaque cursor for the next page. On REST it is URL-safe unpadded base64url: pass it back unchanged; it is safe in a URL as is. `null` when this is the last page.'
                    example: null
                    anyOf:
                    - type: string
                    - type: 'null'
                required:
                - data
                - next_cursor
                additionalProperties: false
        '400':
          description: Invalid request shape.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Missing or invalid access token.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Token lacks the required scope.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '422':
          description: Request body failed schema validation.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: Rate-limit exceeded for this tier.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    post:
      operationId: tags.create
      summary: Create a Tag
      tags:
      - Tags
      security:
      - oauth2:
        - tags:write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTagInput'
      responses:
        '201':
          description: The created Tag.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          description: Invalid request shape.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Missing or invalid access token.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Token lacks the required scope.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '409':
          description: '`name_taken`: You already have a tag of this name in this scope (your global tags, or one workspace). Names are compared without case and without surrounding spaces; nothing was written. Rename, or use the existing tag.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '422':
          description: Request body failed schema validation.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: Rate-limit exceeded for this tier.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /tags/{id}:
    get:
      operationId: tags.get
      summary: Fetch a Tag by id
      tags:
      - Tags
      security:
      - oauth2:
        - tags:read
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Unique Tag identifier.
      responses:
        '200':
          description: The Tag.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          description: Invalid request shape.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Missing or invalid access token.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Token lacks the required scope.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: No such Tag (or soft-deleted beyond the 30-day window).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '422':
          description: Request body failed schema validation.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: Rate-limit exceeded for this tier.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    patch:
      operationId: tags.update
      summary: Update a Tag
      description: 'Partial update: omitted fields are left untouched.'
      tags:
      - Tags
      security:
      - oauth2:
        - tags:write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Unique Tag identifier.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTagInput'
      responses:
        '200':
          description: The updated Tag.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag'
        '400':
          description: Invalid request shape.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Missing or invalid access token.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Token lacks the required scope.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: No such Tag.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '409':
          description: '`name_taken`: You already have a tag of this name in this scope (your global tags, or one workspace). Names are compared without case and without surrounding spaces; nothing was written. Rename, or use the existing tag.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '422':
          description: Request body failed schema validation.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: Rate-limit exceeded for this tier.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
    delete:
      operationId: tags.delete
      summary: Soft-delete a Tag
      description: Sets deleted_at=now(). Row is purged after 30 days by the agent-soft-deletes cron (see §D-6.8). Restore via POST /{id}/restore within the window.
      tags:
      - Tags
      security:
      - oauth2:
        - tags:delete
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Unique Tag identifier.
      responses:
        '204':
          description: Soft-deleted.
        '400':
          description: Invalid request shape.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Missing or invalid access token.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Token lacks the required scope.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: No such Tag.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '422':
          description: Request body failed schema validation.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: Rate-limit exceeded for this tier.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
  /tags/{id}/restore:
    post:
      operationId: tags.restore
      summary: Restore a soft-deleted Tag
      description: 'Clears deleted_at if the row was soft-deleted within the last 30 days. A row in the Trash for more than 30 days and not purged yet is 409 `restore_window_expired`: past the restore window, nobody can restore it, and nothing is written; a row not in the Trash (never deleted, or already purged) is 404. The Trash''s rule decides who (migration 330): the person who owns the row, the person who put it in the Trash, or an owner or admin of the company workspace; anyone else in the workspace is 403 `forbidden` (reason `trash_restore_forbidden`). A row an owner or admin restores outside their own read answers a `TrashRestoreReceipt` instead of the row.'
      tags:
      - Tags
      security:
      - oauth2:
        - tags:write
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Unique Tag identifier.
      responses:
        '200':
          description: The restored Tag, or, when the restored row stays outside the caller's read (a workspace owner or admin restoring a row of a team they are not in), a `TrashRestoreReceipt`.
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/Tag'
                - $ref: '#/components/schemas/TrashRestoreReceipt'
        '400':
          description: Invalid request shape.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '401':
          description: Missing or invalid access token.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '403':
          description: Token lacks the required scope.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '404':
          description: 'No such Tag in the caller''s Trash: never deleted, already purged, or not one the caller can see.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '409':
          description: '`restore_window_expired`. The tag has been in the Trash for more than 30 days and is not purged yet (the nightly purge deletes it for good): past the restore window, nobody can restore it. Nothing written. Or `name_taken`: You already have a tag of this name in this scope (your global tags, or one workspace). Names are compared without case and without surrounding spaces; nothing was written. Rename, or use the existing tag.'
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '422':
          description: Request body failed schema validation.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
        '429':
          description: Rate-limit exceeded for this tier.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetails'
components:
  schemas:
    CreateTagInput:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 50
        color:
          default: '#3b82f6'
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
      required:
      - name
    TrashRestoreReceipt:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
        kind:
          type: string
          enum:
          - task
          - project
          - comment
          - tag
          - team
        restored:
          type: boolean
          const: true
        readable:
          type: boolean
          const: false
        title:
          type: string
        code:
          anyOf:
          - type: string
          - type: 'null'
        message:
          type: string
      required:
      - id
      - kind
      - restored
      - readable
      - title
      - code
      - message
      additionalProperties: false
    UpdateTagInput:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 50
        color:
          type: string
          pattern: ^#[0-9a-fA-F]{6}$
    Tag:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
        user_id:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
        name:
          type: string
        color:
          type: string
        usage_count:
          description: How many live tasks carry the tag. A task in the Trash is not counted.
          type: integer
          minimum: 0
          maximum: 9007199254740991
        deleted_at:
          anyOf:
          - type: string
          - type: 'null'
      required:
      - id
      - user_id
      - name
      - color
      - usage_count
      - deleted_at
      additionalProperties: false
    ProblemDetails:
      type: object
      properties:
        type:
          description: URI reference that identifies the problem type (RFC 9457 §3.1).
          example: https://restivity.ai/errors/insufficient_scope
          type: string
          format: uri
        title:
          description: Short, human-readable summary of the problem type.
          example: Insufficient scope
          type: string
        status:
          description: HTTP status code generated by the origin server.
          example: 403
          type: integer
          minimum: 400
          maximum: 599
        detail:
          description: Human-readable explanation specific to this occurrence.
          example: 'Missing required scope: tasks:write. Reconnect Restivity from your client to get this permission.'
          type: string
        instance:
          description: URI reference identifying the specific occurrence.
          example: /api/v1/tasks/8f3e-…
          type: string
        scope_required:
          description: When 403 insufficient_scope, the scope the caller would need.
          example: tasks:write
          type: string
        retry_after:
          description: When 429, seconds until the caller may retry (matches Retry-After header).
          example: 42
          type: integer
          minimum: 0
          maximum: 9007199254740991
        upgrade_url:
          description: When 403 upgrade_required, the URL where the account owner can upgrade the plan.
          example: https://restivity.ai/pricing
          type: string
          format: uri
        reason:
          description: 'A stable, machine-readable refinement of the problem. Today, on a 400 from a custom-status write: why the database refused the NAME: ''name_taken'' (the list already has a status of that name, compared without case and without surrounding whitespace), ''name_empty'' (blank), ''name_too_long''; and why a DELETE refused its replacement: ''replacement_is_status'' (the status itself), ''replacement_not_in_list'' (not a status of the same list), ''replacement_other_category'' (another category: tasks keep their to do / in progress / completed state), ''category_has_other_status'' (the base column was asked for while another status of the category exists); why a colour was refused: ''color_format'' (a colour is written as #RRGGBB, six hex digits); and why following a list again refused the mapping of the tasks: ''mapping_from_unknown'' (the mapping names a status that is not one of the list''s own), ''mapping_not_in_list'' (a destination that is not a status of the list followed again), ''mapping_crosses_category'' (a destination of another category), ''mapping_missing_for_status'' (an own status that holds tasks has no destination). On a 403 forbidden (migration 314), the rule that refused: ''project_create_forbidden'' (only an owner or admin of the team creates a project in it; outside every team, an owner or admin of the workspace), ''project_manage_forbidden'' (only an owner or admin of the project''s team edits, moves or deletes it; outside a team its creator or an owner or admin of the workspace does), ''project_destination_forbidden'' (a project moves only into a team you own or administer), ''task_move_out_of_team_forbidden'' (only an owner or admin of the team moves a task out of it), ''not_task_owner'' (only the task''s owner, or an owner or admin of its team, moves it to the Trash), ''not_series_owner'' (only the owner of a recurring series changes its rule or its type), ''comment_forbidden'' / ''comment_internal_forbidden'' / ''comment_trash_forbidden'' (a viewer comments, never internally, and does not move a comment to the Trash), ''comment_image_not_authors'' (a comment embeds only images its author uploaded: an image from another person''s comment-images folder is refused); on a restore or a delete for good (migration 330): ''trash_restore_forbidden'' (only the person who owns it, the person who put it in the Trash, or an owner or admin of the company workspace restores it), ''trash_purge_forbidden'' (in a company workspace only its owner or an admin deletes something for good). On a 409 move_not_undoable or sessions_frozen from POST /work-sessions/move/undo (migration 337), why the move cannot be undone: ''never_moved'', ''not_a_party'' (only the person who moved their own hours, or the owner or admin of the workspace they left who approved the move), ''already_undone'', ''moved_again'', ''origin_missing'', ''origin_closed_to_owner'', ''draft_invoice'', ''invoiced''. On the first-party desktop API''s workspace management writes (D-R.1072), the code the website''s workspace settings page answers for the same refusal (for example ''already_invited'', ''last_owner'', ''role_change_forbidden'', ''free_workspace_limit'', ''upgrade_required'', ''invites_paused'', ''invite_cooldown''): the closed list of src/lib/workspace/workspaceManagementRefusals.ts. On a 400 from the desktop app''s manual order (POST /api/desktop/tasks/{id}/move-between): ''rank_key_exhausted'' (the task was dropped into the same gap so many times that its order key passed its ceiling: reorder the list). On a 400 from a task write that names an assignee: ''assignee_not_member'' (a task is assigned only to its owner or to a member of its project).'
          example: name_taken
          type: string
        usage:
          description: 'When 409 replacement_required (a custom-status DELETE): how many tasks sit in the status, in how many projects (the tasks that need `replacement_status_id` or `to_base=true`). Projects the caller cannot see are counted, never named.'
          example:
            tasks: 3
            projects: 2
          type: object
          properties:
            tasks:
              type: integer
              minimum: 0
              maximum: 9007199254740991
            projects:
              type: integer
              minimum: 0
              maximum: 9007199254740991
          required:
          - tasks
          - projects
          additionalProperties: false
        series_change:
          description: 'AGF-391. On a refusal of `PATCH /tasks/{id}` that came AFTER the type change of a materialized series had landed (a field beside it refused by its own gate): the series WAS stopped / turned into a reminder, and these occurrences went to the Trash. The status and type are the refusing gate’s.'
          type: object
          properties:
            change:
              type: string
              enum:
              - to_reminder
              - stop_repeating
            trashed_occurrence_ids:
              type: array
              items:
                type: string
            kept_occurrence_ids:
              type: array
              items:
                type: string
            reminder_due_date:
              anyOf:
              - type: string
              - type: 'null'
          required:
          - change
          - trashed_occurrence_ids
          - kept_occurrence_ids
          - reminder_due_date
          additionalProperties: false
        session_ids:
          description: 'When 409 sessions_frozen (a move of work sessions): the sessions that are billed (on a draft invoice) or invoiced; they never move. Nothing was moved; send the move again without them.'
          example:
          - 8f3e2c1a-0b4d-4e5f-9a6b-7c8d9e0f1a2b
          type: array
          items:
            type: string
            format: uuid
            pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
        proposal:
          description: 'When 409 agent_inbox_missing (`POST /projects/agent-inbox` before the person chose an inbox): what the server proposes to the person, namely a name, the first free key (`AGF`, `AGF2`…; null when all are taken: the server then derives one from the name), or the id of a project of that name the workspace already has. Nothing in it is reserved; the person decides.'
          example:
            name: Agent findings
            prefix: AGF
            project_id: null
          type: object
          properties:
            name:
              type: string
            prefix:
              anyOf:
              - type: string
              - type: 'null'
            project_id:
              anyOf:
              - type: string
                format: uuid
                pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
              - type: 'null'
          required:
          - name
          - prefix
          - project_id
          additionalProperties: false
        agent_inbox:
          description: 'When 409 agent_inbox_exists on `POST /projects/{id}/restore`: the project that is the workspace’s agent inbox now. The project being restored was the inbox when it went to the Trash; a workspace has one, so nothing was restored: the person turns «Use as the agent inbox» off on this one first, then restores.'
          example:
            project_id: 8f3e2c1a-0b4d-4e5f-9a6b-7c8d9e0f1a2b
            name: Inbox AI
          type: object
          properties:
            project_id:
              type: string
              format: uuid
              pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
            name:
              type: string
          required:
          - project_id
          - name
          additionalProperties: false
        seat_count:
          description: 'D-R.1072. On the first-party desktop API only: when a workspace invitation is refused with 403 upgrade_required (the Free workspace holds every seat its plan allows), how many seats it holds. Nothing was sent.'
          example: 3
          type: integer
          minimum: 0
          maximum: 9007199254740991
        free_workspace_cap:
          description: 'D-R.1072. On the first-party desktop API only: when a company workspace creation is refused with 409 (`reason` free_workspace_limit), the block the database named: the caller’s free company workspace, why another is refused, and the workspaces that hold the cap (null and empty when the block could not be read).'
          type: object
          properties:
            existing_workspace_id:
              anyOf:
              - type: string
                format: uuid
                pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
              - type: 'null'
            reason:
              anyOf:
              - type: string
                enum:
                - needs_pro
                - at_max
                - pro_expired
              - type: 'null'
            workspaces:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$
                  name:
                    type: string
                required:
                - id
                - name
                additionalProperties: false
          required:
          - existing_workspace_id
          - reason
          - workspaces
          additionalProperties: false
      required:
      - type
      - title
      - status
      additionalProperties: false
  securitySchemes:
    oauth2:
      type: oauth2
      description: 'OAuth 2.1 authorization code with PKCE (S256). Use Dynamic Client Registration (RFC 7591) via POST /api/oauth/register, then drive the user through /oauth/authorize → /api/oauth/token. profile:delete is intentionally not offered: account removal is human-only.'
      flows:
        authorizationCode:
          authorizationUrl: https://restivity.ai/oauth/authorize
          tokenUrl: https://restivity.ai/api/oauth/token
          refreshUrl: https://restivity.ai/api/oauth/token
          scopes:
            tasks:read: 'Read tasks: list, get, full-text search and the today list.'
            tasks:write: Create, update and restore tasks, batch-update them, and change or skip the rule of a recurring series.
            tasks:delete: Soft-delete tasks (30-day retention).
            projects:read: Read projects and the status lists of projects, teams and workspaces.
            projects:write: Create, update and restore projects, use the agent inbox, change the status lists of projects, teams and workspaces, and reopen an archived team.
            projects:delete: Soft-delete projects.
            pomodoro:read: Read pomodoro / work-session history, and preview where a session can be moved.
            pomodoro:write: Start, update and restore pomodoro sessions, and move a session, decide a move request or undo a move.
            pomodoro:delete: Soft-delete pomodoro sessions.
            comments:read: Read task comments.
            comments:write: Create, edit and restore task comments.
            comments:delete: Soft-delete comments.
            tags:read: Read tags.
            tags:write: Create, rename and restore tags.
            tags:delete: Soft-delete tags.
            profile:read: Read the user profile.
            profile:write: Update whitelisted profile fields.
            earnings:read: Read earnings summaries (worked hours and amounts by project, client, and period).