Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Resolve or reopen a comment

status: archived resolves a thread and open reopens it. Team admins also pass spam verdicts here: spam holds the thread, open releases a held one, and spamCommentId narrows a verdict to one held reply.

PATCH/v1/spaces/{spaceId}/comments/{threadId}
Authorization
AuthorizationBearer token · headerrequired

Better Auth session, OAuth access token, OAuth client-credentials token, or sfm_ Space machine credential.

Path parameters
spaceIdstringrequired
min length 1
threadIdstringrequired
min length 1
Request body
requiredapplication/json
statusstring
Allowed:openarchivedspam
spamCommentIdstring
min length 1
Responses
200

Response for status 200

$schemastring<uri>

Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.

dataobjectrequired
Show properties
idstringrequired
castThreadIdstringrequired
spaceIdstringrequired
versionIdstring | nullrequired
channelstring | nullrequired
pagePathstringrequired
max length 2048
urlstring | nullrequired
statusstringrequired

open, or archived for a resolved thread.

Allowed:openarchived
moderationStatestringrequired
Allowed:clearspam
heldCommentIdsstring[]required
unreadbooleanrequired

Whether an open thread has a message by someone else since you last read it. Resolved threads are never unread.

unreadCountintegerrequired

Messages by others since you last read the thread. Zero exactly when unread is false.

min 0 · max 9007199254740991
bodystring | nullrequired
authorobject | nullrequired
Show properties
Any of:
object
kindstring | nullrequired
idstring | nullrequired
profileIdstring | nullrequired
namestring | nullrequired
usernamestring | nullrequired
Show properties
Any of:
string
string
null
null
avatarUrlstring<uri> | nullrequired
Show properties
Any of:
string<uri>
string<uri>
null
null
colorstring | nullrequired
Show properties
Any of:
string
string
null
null
null
null
targetobjectrequired
mentionsstring[]required

Spacefast user ids this thread or reply @mentions.

reactionsobjectrequired
attachmentOriginstring<uri> | nullrequired
Show properties
Any of:
string<uri>
string<uri>
null
null
attachmentsobject[]required
Show properties
Array of object
idstringrequired
matches ^[a-f0-9]{32}$
namestringrequired
min length 1 · max length 160
contentTypestringrequired
min length 1 · max length 255
sizeintegerrequired
min 1 · max 5242880
kindstringrequired
Allowed:screenshotimagefile
cropobject
Show properties
xnumberrequired
ynumberrequired
widthnumberrequired
heightnumberrequired
urlstring | nullrequired
commentsobject[]required
Show properties
Array of object
attachmentsobject[]required
Show properties
Array of object
idstringrequired
matches ^[a-f0-9]{32}$
namestringrequired
min length 1 · max length 160
contentTypestringrequired
min length 1 · max length 255
sizeintegerrequired
min 1 · max 5242880
kindstringrequired
Allowed:screenshotimagefile
cropobject
Show properties
xnumberrequired
ynumberrequired
widthnumberrequired
heightnumberrequired
urlstring | nullrequired
mentionsstring[]required

Spacefast user ids this thread or reply @mentions.

permalinkstring | nullrequired
dashboardUrlstring<uri> | nullrequired

The thread in the dashboard, opened with the reader's own sign-in. Null without a team.

Show properties
Any of:
string<uri>
string<uri>
null
null
createdAtstring<date-time>required

When the thread started. Never changes.

matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
lastActivityAtstring<date-time>required

When the latest message was posted. Resolving, reopening and reactions don't move it.

matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$
updatedAtstring<date-time> | nullrequired

When anything on the thread last changed. Lists are ordered by it.

Show properties
Any of:
string<date-time>
string<date-time>
null
null
default

Problem details (RFC 9457). Any 4xx/5xx response is one application/problem+json document.

$schemastring<uri>

Canonical JSON Schema URL for this response body. The server also sends it in the Link: rel="describedby" response header.

typestringrequired

Problem type URI resolving to the error docs page. The server derives it mechanically from code against the docs origin.

titlestringrequired

Short human-readable summary of the problem type. The server derives it mechanically from code.

statusintegerrequired

HTTP status code of this response, repeated in the body.

min -9007199254740991 · max 9007199254740991
detailstringrequired

Human-readable failure explanation for this occurrence.

codestringrequired

Stable snake_case error code naming the failed public contract.

pointerstring

RFC 6901 JSON Pointer into the failing request field, for example "/files/37/path", on validation failures.

detailsobject

Machine-readable context for the error code.

fixstring

One sentence on what to do about this error code, the same text as the type page. Read it before retrying.

suggestionsstring[]

Actionable recovery steps safe to show in dashboards, SDKs, and CLI output.

nextstring[]

Copy-pasteable commands or API requests an agent can run next.

requestIdstringrequired

The request id to quote when contacting support.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH 'https://api.spacefast.com/v1/spaces/string/comments/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "status": "open",
  "spamCommentId": "string"
}'
Response
{
  "$schema": "http://example.com",
  "data": {
    "id": "string",
    "castThreadId": "string",
    "spaceId": "string",
    "versionId": "string",
    "channel": "string",
    "pagePath": "string",
    "url": "string",
    "status": "open",
    "moderationState": "clear",
    "heldCommentIds": [
      "string"
    ],
    "unread": true,
    "unreadCount": 0,
    "body": "string",
    "author": {
      "kind": "string",
      "id": "string",
      "profileId": "string",
      "name": "string",
      "username": "string",
      "avatarUrl": "http://example.com",
      "color": "string"
    },
    "target": {
      "property1": null,
      "property2": null
    },
    "mentions": [
      "string"
    ],
    "reactions": {
      "property1": {
        "count": 0,
        "actors": {
          "property1": {
            "name": "string"
          },
          "property2": {
            "name": "string"
          }
        }
      },
      "property2": {
        "count": 0,
        "actors": {
          "property1": {
            "name": "string"
          },
          "property2": {
            "name": "string"
          }
        }
      }
    },
    "attachmentOrigin": "http://example.com",
    "attachments": [
      {
        "id": "string",
        "name": "string",
        "contentType": "string",
        "size": 1,
        "kind": "screenshot",
        "crop": {
          "x": 0,
          "y": 0,
          "width": 0,
          "height": 0
        },
        "url": "string"
      }
    ],
    "comments": [
      {
        "attachments": [
          {
            "id": "string",
            "name": "string",
            "contentType": "string",
            "size": 1,
            "kind": "screenshot",
            "crop": {
              "x": 0,
              "y": 0,
              "width": 0,
              "height": 0
            },
            "url": "string"
          }
        ],
        "mentions": [
          "string"
        ],
        "property1": null,
        "property2": null
      }
    ],
    "permalink": "string",
    "dashboardUrl": "http://example.com",
    "createdAt": "2019-08-24T14:15:22Z",
    "lastActivityAt": "2019-08-24T14:15:22Z",
    "updatedAt": "2019-08-24T14:15:22Z"
  }
}

Was this page helpful?