WyrdOS
Open App

Evidence Proposals

API endpoints for evidence proposals

List evidence proposals

GET /api/v1/evidence-proposals

Parameters

NameInTypeRequiredDescription
statusqueryNo
entityTypequeryNo
entityIdquerystringNo
organisationIdquerystringNo
limitqueryintegerNo

Example request

curl -X GET \
"https://<your-wyrdos-api-host>/api/v1/evidence-proposals?status=<status>&entityType=<entityType>&entityId=<entityId>&organisationId=<organisationId>&limit=<limit>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": [
    {
      "_id": "item_abc123",
      "organisationId": "org_abc123",
      "entityType": "principle",
      "entityId": "item_abc123",
      "type": "artifact",
      "title": "Launch readiness",
      "summary": "Track onboarding work for the beta launch.",
      "sourceType": "url",
      "sourceName": "Launch readiness",
      "sourceLabel": "Launch plan",
      "sourceUrl": "https://example.com/launch-plan",
      "observedAt": 1782828000000,
      "confidence": "medium",
      "status": "pending",
      "proposedBy": "Launch readiness",
      "proposedByType": "user",
      "reason": "Adds source-backed evidence for the goal.",
      "evidenceId": "item_abc123",
      "approvedBy": "Launch readiness",
      "approvedAt": 1782828000000,
      "rejectedBy": "Launch readiness",
      "rejectedAt": 1782828000000,
      "createdAt": 1782828000000,
      "updatedAt": 1782828000000
    }
  ]
}

Other statuses: 400, 401, 403.

Response body type

{ data: EvidenceProposal[] }


Create candidate evidence proposal

POST /api/v1/evidence-proposals

Example request

curl -X POST \
"https://<your-wyrdos-api-host>/api/v1/evidence-proposals" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"entityType":"principle","entityId":"item_abc123","type":"artifact","title":"Launch readiness","summary":"Track onboarding work for the beta launch.","sourceType":"url","sourceName":"Launch readiness","sourceLabel":"Launch plan","sourceUrl":"https://example.com/launch-plan","observedAt":1782828000000,"confidence":"medium","reason":"Adds source-backed evidence for the goal."}'

Example response

Status: 200

{
  "data": {
    "id": "item_abc123"
  }
}

Other statuses: 400, 401, 403.

Response body type

{ data: object }


Get evidence proposal

GET /api/v1/evidence-proposals/{id}

Parameters

NameInTypeRequiredDescription
idpathstringYes
organisationIdquerystringNo

Example request

curl -X GET \
"https://<your-wyrdos-api-host>/api/v1/evidence-proposals/<id>?organisationId=<organisationId>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": {
    "_id": "item_abc123",
    "organisationId": "org_abc123",
    "entityType": "principle",
    "entityId": "item_abc123",
    "type": "artifact",
    "title": "Launch readiness",
    "summary": "Track onboarding work for the beta launch.",
    "sourceType": "url",
    "sourceName": "Launch readiness",
    "sourceLabel": "Launch plan",
    "sourceUrl": "https://example.com/launch-plan",
    "observedAt": 1782828000000,
    "confidence": "medium",
    "status": "pending",
    "proposedBy": "Launch readiness",
    "proposedByType": "user",
    "reason": "Adds source-backed evidence for the goal.",
    "evidenceId": "item_abc123",
    "approvedBy": "Launch readiness",
    "approvedAt": 1782828000000,
    "rejectedBy": "Launch readiness",
    "rejectedAt": 1782828000000,
    "createdAt": 1782828000000,
    "updatedAt": 1782828000000
  }
}

Other statuses: 401, 403, 404.

Response body type

{ data: EvidenceProposal }


Approve evidence proposal and create evidence

POST /api/v1/evidence-proposals/{id}/approve

Parameters

NameInTypeRequiredDescription
idpathstringYes
organisationIdquerystringNo

Example request

curl -X POST \
"https://<your-wyrdos-api-host>/api/v1/evidence-proposals/<id>/approve?organisationId=<organisationId>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": {
    "_id": "item_abc123",
    "organisationId": "org_abc123",
    "entityType": "principle",
    "entityId": "item_abc123",
    "type": "artifact",
    "title": "Launch readiness",
    "summary": "Track onboarding work for the beta launch.",
    "sourceType": "url",
    "sourceName": "Launch readiness",
    "sourceLabel": "Launch plan",
    "sourceUrl": "https://example.com/launch-plan",
    "observedAt": 1782828000000,
    "confidence": "medium",
    "status": "pending",
    "proposedBy": "Launch readiness",
    "proposedByType": "user",
    "reason": "Adds source-backed evidence for the goal.",
    "evidenceId": "item_abc123",
    "approvedBy": "Launch readiness",
    "approvedAt": 1782828000000,
    "rejectedBy": "Launch readiness",
    "rejectedAt": 1782828000000,
    "createdAt": 1782828000000,
    "updatedAt": 1782828000000
  }
}

Other statuses: 401, 403, 404.

Response body type

{ data: EvidenceProposal }


Reject evidence proposal

POST /api/v1/evidence-proposals/{id}/reject

Parameters

NameInTypeRequiredDescription
idpathstringYes
organisationIdquerystringNo

Example request

curl -X POST \
"https://<your-wyrdos-api-host>/api/v1/evidence-proposals/<id>/reject?organisationId=<organisationId>" \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json"

Example response

Status: 200

{
  "data": {
    "_id": "item_abc123",
    "organisationId": "org_abc123",
    "entityType": "principle",
    "entityId": "item_abc123",
    "type": "artifact",
    "title": "Launch readiness",
    "summary": "Track onboarding work for the beta launch.",
    "sourceType": "url",
    "sourceName": "Launch readiness",
    "sourceLabel": "Launch plan",
    "sourceUrl": "https://example.com/launch-plan",
    "observedAt": 1782828000000,
    "confidence": "medium",
    "status": "pending",
    "proposedBy": "Launch readiness",
    "proposedByType": "user",
    "reason": "Adds source-backed evidence for the goal.",
    "evidenceId": "item_abc123",
    "approvedBy": "Launch readiness",
    "approvedAt": 1782828000000,
    "rejectedBy": "Launch readiness",
    "rejectedAt": 1782828000000,
    "createdAt": 1782828000000,
    "updatedAt": 1782828000000
  }
}

Other statuses: 401, 403, 404.

Response body type

{ data: EvidenceProposal }