La recherche se charge uniquement lorsque vous l’utilisez. Parcourez toutes les catégories ci-dessous.

Commentaires et communauté

Soumettre une évaluation communautaire

Enregistrer une nouvelle version immuable d’évaluation pour un commentaire : action recommandée, reply_draft facultatif, priorité et confiance (au moins 0.9). N’envoie et ne prépare rien.

POST /community-engagement-api/reviews/submit

Contrat vérifié : · sha256:563d2d581da0ad29

Présentation

Enregistrer une nouvelle version immuable d’évaluation pour un commentaire : action recommandée, reply_draft facultatif, priorité et confiance (au moins 0.9). N’envoie et ne prépare rien.

Une réponse HTTP réussie peut signifier qu’une requête est acceptée plutôt que terminée. Pour le travail en arrière-plan, conservez l’identifiant renvoyé et suivez la même opération jusqu’à sa fin. Une publication programmée ou acceptée n’est publiée que lorsque la plateforme le confirme ; une expiration côté client ne détermine pas le résultat.

Authentification et autorisations

Types d’identifiants acceptés
user_session, delegated_oauth, personal_access_token
Capacité déléguée
agent:engage
Rôle minimal dans l’espace de travail
reviewer
Périmètre d’accès
Ressources auxquelles cet utilisateur est autorisé à accéder
Consentement pour tous les espaces requis
Non
Modifie l’état
Oui
Lorsque l’opération est terminée
synchronous_http_response

Un jeton ne peut utiliser que les droits de son propriétaire. Chaque requête vérifie l’appartenance à l’espace, la propriété des ressources, les espaces sélectionnés et les capacités accordées. Les profils core et full modifient les outils affichés ; ils n’accordent aucun accès.

Champs de requête

Requis signifie requis dans l’objet parent et la branche sélectionnée. Un enfant requis ne rend pas obligatoire un parent facultatif. Les règles et noms de champs ci-dessous proviennent du contrat.

Champs de requête
Champ / brancheType / requisContraintes
$objectRequis dans le parent
  • additionalProperties: false
workspace_idstringRequis dans le 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)$"
social_account_idstringRequis dans le 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)$"
social_post_idstringRequis dans le 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)$"
social_comment_idstringRequis dans le 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)$"
languagestringFacultatif / élément
  • minLength: 2
  • maxLength: 35
audience_persona_hintstringFacultatif / élément
  • minLength: 1
  • maxLength: 280
confidencenumberRequis dans le parent
  • minimum: 0.9
  • maximum: 1
provenanceobjectRequis dans le parent
  • additionalProperties: false
provenance.evidence_comment_observation_idsarrayRequis dans le parent
  • minItems: 1
  • maxItems: 20
provenance.evidence_comment_observation_ids[]stringFacultatif / élément
  • 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)$"
provenance.sourcestringRequis dans le parent
  • const: "upstream_agent"
provenance.source_modelstringFacultatif / élément
  • minLength: 1
  • maxLength: 160
provenance.evidence_notestringFacultatif / élément
  • minLength: 1
  • maxLength: 1000
priorityintegerRequis dans le parent
  • minimum: 1
  • maximum: 5
recommended_actionstringRequis dans le parent
  • enum: ["reply","hide","unhide","no_reply","dismiss"]
reply_draftstringFacultatif / élément
  • minLength: 1
  • maxLength: 2000
dispositionstringRequis dans le parent
  • enum: ["open","ready","dismissed","no_reply"]
assignee_user_idstringFacultatif / élément
  • 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)$"
idempotency_keystringRequis dans le 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)$"
JSON Schema complet
{
  "$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)$"
    },
    "social_account_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)$"
    },
    "social_post_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)$"
    },
    "social_comment_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)$"
    },
    "language": {
      "type": "string",
      "minLength": 2,
      "maxLength": 35
    },
    "audience_persona_hint": {
      "type": "string",
      "minLength": 1,
      "maxLength": 280
    },
    "confidence": {
      "type": "number",
      "minimum": 0.9,
      "maximum": 1
    },
    "provenance": {
      "type": "object",
      "properties": {
        "evidence_comment_observation_ids": {
          "minItems": 1,
          "maxItems": 20,
          "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|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
          }
        },
        "source": {
          "type": "string",
          "const": "upstream_agent"
        },
        "source_model": {
          "type": "string",
          "minLength": 1,
          "maxLength": 160
        },
        "evidence_note": {
          "type": "string",
          "minLength": 1,
          "maxLength": 1000
        }
      },
      "required": [
        "evidence_comment_observation_ids",
        "source"
      ],
      "additionalProperties": false
    },
    "priority": {
      "type": "integer",
      "minimum": 1,
      "maximum": 5
    },
    "recommended_action": {
      "type": "string",
      "enum": [
        "reply",
        "hide",
        "unhide",
        "no_reply",
        "dismiss"
      ]
    },
    "reply_draft": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2000
    },
    "disposition": {
      "type": "string",
      "enum": [
        "open",
        "ready",
        "dismissed",
        "no_reply"
      ]
    },
    "assignee_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|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "idempotency_key": {
      "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)$"
    }
  },
  "required": [
    "workspace_id",
    "social_account_id",
    "social_post_id",
    "social_comment_id",
    "confidence",
    "provenance",
    "priority",
    "recommended_action",
    "disposition",
    "idempotency_key"
  ],
  "additionalProperties": false
}

Réponse et achèvement

Statuts HTTP de réussite : 200. Lorsque l’opération est terminée : synchronous_http_response.

Une réponse HTTP réussie peut signifier qu’une requête est acceptée plutôt que terminée. Pour le travail en arrière-plan, conservez l’identifiant renvoyé et suivez la même opération jusqu’à sa fin. Une publication programmée ou acceptée n’est publiée que lorsque la plateforme le confirme ; une expiration côté client ne détermine pas le résultat.

Requis signifie requis dans l’objet parent et la branche sélectionnée. Un enfant requis ne rend pas obligatoire un parent facultatif. Les règles et noms de champs ci-dessous proviennent du contrat.

Réponse et achèvement
Champ / brancheType / requisContraintes
$objectRequis dans le parent—
contract_versionstringRequis dans le parent
  • const: "community-engagement/v1"
reviewobjectRequis dans le parent—
review.idstringRequis dans le 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)$"
review.workspace_idstringRequis dans le 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)$"
review.social_account_idstringRequis dans le 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)$"
review.social_post_idstringRequis dans le 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)$"
review.social_comment_idstringRequis dans le 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)$"
review.platformstringRequis dans le parent
  • enum: ["facebook","instagram","threads","youtube"]
review.review_versionintegerRequis dans le parent
  • maximum: 9007199254740991
  • exclusiveMinimum: 0
review.languagestring | nullRequis dans le parent—
review.languageanyOf 1stringRequis dans le parent—
review.languageanyOf 2nullRequis dans le parent—
review.audience_persona_hintstring | nullRequis dans le parent—
review.audience_persona_hintanyOf 1stringRequis dans le parent—
review.audience_persona_hintanyOf 2nullRequis dans le parent—
review.confidencenumberRequis dans le parent
  • minimum: 0.9
  • maximum: 1
review.provenanceobjectRequis dans le parent—
review.provenance.evidence_comment_observation_idsarrayRequis dans le parent
  • minItems: 1
  • maxItems: 20
review.provenance.evidence_comment_observation_ids[]stringFacultatif / élément
  • 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)$"
review.provenance.sourcestringRequis dans le parent
  • const: "upstream_agent"
review.provenance.source_modelstringFacultatif / élément
  • minLength: 1
  • maxLength: 160
review.provenance.evidence_notestringFacultatif / élément
  • minLength: 1
  • maxLength: 1000
review.priorityintegerRequis dans le parent
  • minimum: 1
  • maximum: 5
review.recommended_actionstringRequis dans le parent
  • enum: ["reply","hide","unhide","no_reply","dismiss"]
review.reply_draftstring | nullRequis dans le parent—
review.reply_draftanyOf 1stringRequis dans le parent—
review.reply_draftanyOf 2nullRequis dans le parent—
review.dispositionstringRequis dans le parent
  • enum: ["open","ready","dismissed","no_reply"]
review.assignee_user_idstring | nullRequis dans le parent—
review.assignee_user_idanyOf 1stringRequis dans le 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)$"
review.assignee_user_idanyOf 2nullRequis dans le parent—
review.created_atstringRequis dans le 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)))$"
review.updated_atstringRequis dans le 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)))$"
JSON Schema complet
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contract_version": {
      "type": "string",
      "const": "community-engagement/v1"
    },
    "review": {
      "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)$"
        },
        "social_account_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)$"
        },
        "social_post_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)$"
        },
        "social_comment_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)$"
        },
        "platform": {
          "type": "string",
          "enum": [
            "facebook",
            "instagram",
            "threads",
            "youtube"
          ]
        },
        "review_version": {
          "type": "integer",
          "exclusiveMinimum": 0,
          "maximum": 9007199254740991
        },
        "language": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "audience_persona_hint": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "confidence": {
          "type": "number",
          "minimum": 0.9,
          "maximum": 1
        },
        "provenance": {
          "type": "object",
          "properties": {
            "evidence_comment_observation_ids": {
              "minItems": 1,
              "maxItems": 20,
              "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|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
              }
            },
            "source": {
              "type": "string",
              "const": "upstream_agent"
            },
            "source_model": {
              "type": "string",
              "minLength": 1,
              "maxLength": 160
            },
            "evidence_note": {
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            }
          },
          "required": [
            "evidence_comment_observation_ids",
            "source"
          ]
        },
        "priority": {
          "type": "integer",
          "minimum": 1,
          "maximum": 5
        },
        "recommended_action": {
          "type": "string",
          "enum": [
            "reply",
            "hide",
            "unhide",
            "no_reply",
            "dismiss"
          ]
        },
        "reply_draft": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        },
        "disposition": {
          "type": "string",
          "enum": [
            "open",
            "ready",
            "dismissed",
            "no_reply"
          ]
        },
        "assignee_user_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|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
            },
            {
              "type": "null"
            }
          ]
        },
        "created_at": {
          "type": "string",
          "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)))$"
        },
        "updated_at": {
          "type": "string",
          "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)))$"
        }
      },
      "required": [
        "id",
        "workspace_id",
        "social_account_id",
        "social_post_id",
        "social_comment_id",
        "platform",
        "review_version",
        "language",
        "audience_persona_hint",
        "confidence",
        "provenance",
        "priority",
        "recommended_action",
        "reply_draft",
        "disposition",
        "assignee_user_id",
        "created_at",
        "updated_at"
      ]
    }
  },
  "required": [
    "contract_version",
    "review"
  ]
}

Erreurs et nouvelles tentatives sûres

Vérifiez le statut HTTP et le corps de réponse. Une erreur de validation 400 peut contenir un ZodError ; les erreurs des gestionnaires utilisent les champs error, message et code. Conservez request_id ou x-request-id pour le diagnostic, sans identifiants secrets. Corrigez les erreurs d’accès 401/403 avant de réessayer et respectez Retry-After pour 429. Si une écriture est incertaine ou renvoie 5xx, lisez d’abord le résultat existant. Réutilisez une clé d’idempotence uniquement lorsque c’est pris en charge ; le comportement des nouvelles tentatives varie selon l’opération et ne garantit pas une diffusion exactement une fois.

Guide de dépannage

Exemples

Ces exemples utilisent des valeurs fictives vérifiées contre les schémas. Remplacez les identifiants par ceux que vous êtes autorisé à utiliser, les médias par des ressources prêtes et les dates par l’heure confirmée. Vérifiez l’éligibilité du compte avant toute écriture. Cette page n’envoie aucune requête API.

Définissez SOSOAPI_ACCESS_TOKEN sur votre serveur avec un identifiant accepté par cette opération et gardez-le hors du code navigateur. Pour un agent, utilisez sosoapi auth login pour vous connecter dans le navigateur et laissez la CLI actualiser ses identifiants.

request.json

{
  "workspace_id": "11111111-1111-4111-8111-111111111111",
  "social_account_id": "11111111-1111-4111-8111-111111111111",
  "social_post_id": "11111111-1111-4111-8111-111111111111",
  "social_comment_id": "11111111-1111-4111-8111-111111111111",
  "confidence": 0.9,
  "provenance": {
    "evidence_comment_observation_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "source": "upstream_agent"
  },
  "priority": 1,
  "recommended_action": "reply",
  "disposition": "open",
  "idempotency_key": "11111111-1111-4111-8111-111111111111",
  "reply_draft": "Thank you for the feedback. Our team will follow up."
}

cURL

curl --request POST \
  "https://gqeshlawtcexsapabaui.supabase.co/functions/v1/community-engagement-api/reviews/submit" \
  -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/community-engagement-api/reviews/submit", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer " + token },
  body: JSON.stringify({
  "workspace_id": "11111111-1111-4111-8111-111111111111",
  "social_account_id": "11111111-1111-4111-8111-111111111111",
  "social_post_id": "11111111-1111-4111-8111-111111111111",
  "social_comment_id": "11111111-1111-4111-8111-111111111111",
  "confidence": 0.9,
  "provenance": {
    "evidence_comment_observation_ids": [
      "11111111-1111-4111-8111-111111111111"
    ],
    "source": "upstream_agent"
  },
  "priority": 1,
  "recommended_action": "reply",
  "disposition": "open",
  "idempotency_key": "11111111-1111-4111-8111-111111111111",
  "reply_draft": "Thank you for the feedback. Our team will follow up."
})
});
const result = await response.json();
// Check response.ok, the operation-specific body and completion state before continuing.

CLI

npx sosoapi api post /community-engagement-api/reviews/submit < request.json

Exemple de réponse fictive

{
  "contract_version": "community-engagement/v1",
  "review": {
    "id": "11111111-1111-4111-8111-111111111111",
    "workspace_id": "11111111-1111-4111-8111-111111111111",
    "social_account_id": "11111111-1111-4111-8111-111111111111",
    "social_post_id": "11111111-1111-4111-8111-111111111111",
    "social_comment_id": "11111111-1111-4111-8111-111111111111",
    "platform": "facebook",
    "review_version": 1,
    "language": null,
    "audience_persona_hint": null,
    "confidence": 0.9,
    "provenance": {
      "evidence_comment_observation_ids": [
        "11111111-1111-4111-8111-111111111111"
      ],
      "source": "upstream_agent"
    },
    "priority": 1,
    "recommended_action": "reply",
    "reply_draft": null,
    "disposition": "open",
    "assignee_user_id": null,
    "created_at": "2099-01-15T09:00:00Z",
    "updated_at": "2099-01-15T09:00:00Z"
  }
}

MCP : sosoapi_submit_community_review