Privacy preferences

Necessary features

Required for security and basic site functions.

Always on

Optional usage analytics

Allow PostHog usage analytics? Change your choice any time in the footer.

Also allow session replay on this public website

Replay shows public pages and interactions, with inputs and private content masked. App replay is a separate choice.

Requires analytics; website replay is off by default.

Browser analytics does not enable account analytics.

Search loads only when you use it. Browse all categories below.

Research and cited briefs

Save a Listening source to Research

Copy an eligible Listening result into Research with exact revision and expiry; no new acquisition or publishing. Requires agent:research.

POST /research-api/evidence/from-listening

Contract reviewed: · sha256:ab393e91e9b7f18a

Overview

Copy an eligible Listening result into Research with exact revision and expiry; no new acquisition or publishing. Requires agent:research.

A successful HTTP response can mean that a request was accepted rather than completed. For background work, save the returned ID and check the same operation until it finishes. A scheduled or accepted post is published only when the platform confirms it; a client timeout does not establish the result.

Authentication and permissions

Accepted credential classes
user_session, delegated_oauth, personal_access_token
Delegated capability
agent:research
Minimum workspace role
editor
Access scope
Resources this user is authorized to access
All-workspace consent required
No
Changes state
Yes
When the operation is complete
one committed exact authorized source evidence version; no source acquisition or model/provider action

A token can use only the rights held by its owner. Each request checks workspace membership, resource ownership, selected workspaces and granted capabilities. Core and full profiles change which tools are displayed; they do not grant access.

Request fields

Required means required inside its parent object and selected branch. A required child does not make an optional parent required. Rules and field names below are copied from the contract.

Request fields
Field / branchType / requiredConstraints
$objectRequired in parent
  • additionalProperties: false
workspace_idstringRequired in parent
  • 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|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
mutation_idstringRequired in parent
  • 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|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
listening_result_idstringRequired in parent
  • 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|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
expected_result_revisionintegerRequired in parent
  • maximum: 9007199254740991
  • exclusiveMinimum: 0
expected_source_checked_atstringRequired in parent
  • format: "date-time"
  • pattern: "^(?:(?:\\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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
Complete JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace_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|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "mutation_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|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "listening_result_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|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "expected_result_revision": {
      "type": "integer",
      "exclusiveMinimum": 0,
      "maximum": 9007199254740991
    },
    "expected_source_checked_at": {
      "type": "string",
      "pattern": "^(?:(?:\\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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
      "format": "date-time"
    }
  },
  "required": [
    "workspace_id",
    "mutation_id",
    "listening_result_id",
    "expected_result_revision",
    "expected_source_checked_at"
  ],
  "additionalProperties": false
}

Response and completion

Success HTTP statuses: 200. When the operation is complete: one committed exact authorized source evidence version; no source acquisition or model/provider action.

A successful HTTP response can mean that a request was accepted rather than completed. For background work, save the returned ID and check the same operation until it finishes. A scheduled or accepted post is published only when the platform confirms it; a client timeout does not establish the result.

Required means required inside its parent object and selected branch. A required child does not make an optional parent required. Rules and field names below are copied from the contract.

Response and completion
Field / branchType / requiredConstraints
$objectRequired in parent—
evidenceobjectRequired in parent—
evidence.idstringRequired in parent
  • 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|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
evidence.workspace_idstringRequired in parent
  • 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|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
evidence.revisionintegerRequired in parent
  • maximum: 9007199254740991
  • exclusiveMinimum: 0
evidence.titlestring | nullRequired in parent—
evidence.titleanyOf 1stringRequired in parent
  • minLength: 1
  • maxLength: 200
evidence.titleanyOf 2nullRequired in parent—
evidence.textstring | nullRequired in parent—
evidence.textanyOf 1stringRequired in parent
  • maxLength: 30000
evidence.textanyOf 2nullRequired in parent—
evidence.source_categorystringRequired in parent
  • enum: ["your_accounts","public_posts","team_notes"]
evidence.platformstring | nullRequired in parent—
evidence.platformanyOf 1stringRequired in parent
  • enum: ["threads","instagram","facebook","youtube","x","reddit","web"]
evidence.platformanyOf 2nullRequired in parent—
evidence.source_urlstring | nullRequired in parent—
evidence.source_urlanyOf 1stringRequired in parent
  • format: "uri"
  • maxLength: 2048
evidence.source_urlanyOf 2nullRequired in parent—
evidence.authorstring | nullRequired in parent—
evidence.authoranyOf 1stringRequired in parent
  • maxLength: 200
evidence.authoranyOf 2nullRequired in parent—
evidence.languagestring | nullRequired in parent—
evidence.languageanyOf 1stringRequired in parent
  • minLength: 1
  • maxLength: 35
evidence.languageanyOf 2nullRequired in parent—
evidence.published_atstring | nullRequired in parent—
evidence.published_atanyOf 1stringRequired in parent
  • format: "date-time"
  • pattern: "^(?:(?:\\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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
evidence.published_atanyOf 2nullRequired in parent—
evidence.retrieved_atstringRequired in parent
  • format: "date-time"
  • pattern: "^(?:(?:\\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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
evidence.valid_untilstring | nullRequired in parent—
evidence.valid_untilanyOf 1stringRequired in parent
  • format: "date-time"
  • pattern: "^(?:(?:\\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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
evidence.valid_untilanyOf 2nullRequired in parent—
evidence.availabilitystringRequired in parent
  • enum: ["available","removed","unavailable"]
evidence.metricsobjectRequired in parent—
evidence.metrics.likesinteger | nullRequired in parent—
evidence.metrics.likesanyOf 1integerRequired in parent
  • minimum: 0
  • maximum: 9007199254740991
evidence.metrics.likesanyOf 2nullRequired in parent—
evidence.metrics.repliesinteger | nullRequired in parent—
evidence.metrics.repliesanyOf 1integerRequired in parent
  • minimum: 0
  • maximum: 9007199254740991
evidence.metrics.repliesanyOf 2nullRequired in parent—
evidence.metrics.repostsinteger | nullRequired in parent—
evidence.metrics.repostsanyOf 1integerRequired in parent
  • minimum: 0
  • maximum: 9007199254740991
evidence.metrics.repostsanyOf 2nullRequired in parent—
evidence.metrics.viewsinteger | nullRequired in parent—
evidence.metrics.viewsanyOf 1integerRequired in parent
  • minimum: 0
  • maximum: 9007199254740991
evidence.metrics.viewsanyOf 2nullRequired in parent—
Complete JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "evidence": {
      "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|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "workspace_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|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
        },
        "revision": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "title": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ]
        },
        "text": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 30000
            },
            {
              "type": "null"
            }
          ]
        },
        "source_category": {
          "type": "string",
          "enum": [
            "your_accounts",
            "public_posts",
            "team_notes"
          ]
        },
        "platform": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "threads",
                "instagram",
                "facebook",
                "youtube",
                "x",
                "reddit",
                "web"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "source_url": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048,
              "format": "uri"
            },
            {
              "type": "null"
            }
          ]
        },
        "author": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 200
            },
            {
              "type": "null"
            }
          ]
        },
        "language": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 35
            },
            {
              "type": "null"
            }
          ]
        },
        "published_at": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(?:(?:\\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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "retrieved_at": {
          "type": "string",
          "pattern": "^(?:(?:\\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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
          "format": "date-time"
        },
        "valid_until": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(?:(?:\\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|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ]
        },
        "availability": {
          "type": "string",
          "enum": [
            "available",
            "removed",
            "unavailable"
          ]
        },
        "metrics": {
          "type": "object",
          "properties": {
            "likes": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "replies": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "reposts": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            },
            "views": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "likes",
            "replies",
            "reposts",
            "views"
          ]
        }
      },
      "required": [
        "id",
        "workspace_id",
        "revision",
        "title",
        "text",
        "source_category",
        "platform",
        "source_url",
        "author",
        "language",
        "published_at",
        "retrieved_at",
        "valid_until",
        "availability",
        "metrics"
      ]
    }
  },
  "required": [
    "evidence"
  ]
}

Errors and safe retries

Check the HTTP status and response body. A 400 validation error may contain a ZodError; handler errors use error, message and code fields. Keep request_id or x-request-id for diagnosis, without credentials. Fix 401/403 access errors before retrying, and follow Retry-After for 429. If a write is uncertain or returns 5xx, read the existing result first. Reuse an idempotency key only where supported; retry behaviour varies by operation and does not guarantee exactly-once delivery.

Troubleshooting guide

Examples

These examples use fictional values checked against the schemas. Replace the IDs with ones you are authorized to use, the media with ready assets and the dates with your confirmed publishing time. Check the account’s eligibility before submitting a write. This page sends no API requests.

Set SOSOAPI_ACCESS_TOKEN on your server to a credential accepted by this operation, and keep it out of browser code. For an AI Agent, use sosoapi auth login to sign in through the browser and let the CLI refresh its credentials.

request.json

{
  "workspace_id": "11111111-1111-4111-8111-111111111111",
  "mutation_id": "11111111-1111-4111-8111-111111111111",
  "listening_result_id": "11111111-1111-4111-8111-111111111111",
  "expected_result_revision": 1,
  "expected_source_checked_at": "2099-01-15T09:00:00Z"
}

cURL

curl --request POST \
  "https://gqeshlawtcexsapabaui.supabase.co/functions/v1/research-api/evidence/from-listening" \
  -H "Authorization: Bearer $SOSOAPI_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @request.json

JavaScript

// Server-side JavaScript. Do not print tokens or credential-bearing responses.
const token = process.env.SOSOAPI_ACCESS_TOKEN;
if (!token) throw new Error("Set an accepted credential for this operation");
const response = await fetch("https://gqeshlawtcexsapabaui.supabase.co/functions/v1/research-api/evidence/from-listening", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer " + token },
  body: JSON.stringify({
  "workspace_id": "11111111-1111-4111-8111-111111111111",
  "mutation_id": "11111111-1111-4111-8111-111111111111",
  "listening_result_id": "11111111-1111-4111-8111-111111111111",
  "expected_result_revision": 1,
  "expected_source_checked_at": "2099-01-15T09:00:00Z"
})
});
const result = await response.json();
// Check response.ok, the operation-specific body and completion state before continuing.

CLI

npx sosoapi api post /research-api/evidence/from-listening < request.json

Synthetic response example

{
  "evidence": {
    "id": "11111111-1111-4111-8111-111111111111",
    "workspace_id": "11111111-1111-4111-8111-111111111111",
    "revision": 1,
    "title": null,
    "text": null,
    "source_category": "your_accounts",
    "platform": null,
    "source_url": null,
    "author": null,
    "language": null,
    "published_at": null,
    "retrieved_at": "2099-01-15T09:00:00Z",
    "valid_until": null,
    "availability": "available",
    "metrics": {
      "likes": null,
      "replies": null,
      "reposts": null,
      "views": null
    }
  }
}

MCP: sosoapi_research_evidence_from_listening