PATCH Update stakeholders

Base URL: https://server-url-from-token-page.endpoint. Version: 1.2.0.

PATCH /api/v1/public/stakeholders — Update stakeholders

Read/write token required

Update one or more stakeholders with an input array. Each row requires id and at least one changed field. Updates are partial: omit fields to preserve them. Supplied scalars replace values; supplied arrays replace the entire array, never append. Send [] to clear an array. To append, read the current array and send the complete merged array; concurrent edits can overwrite it. Required names and account website cannot be cleared. Account creation requires website; omit it on updates to preserve it. Domain remains derived from website. The roles array replaces all stakeholder roles. Account/deal reassignment is not supported. Optional contact/text fields can be cleared with an empty string. Targeting is derived from memberships in In use Audiences. Use Audience mutations to include or exclude accounts and stakeholders or change an Audience status. Entity writes cannot set membership, targeting dates, or actors. API retains deprecated input declarations only; those inputs are ignored. Returns counts, per-row failures and a bounded updatedSample. Rows commit independently; inspect failures before retrying only failed rows. No dry-run or filter-based mutation is performed by this tool.

Send the documented JSON object. Workspace scope comes exclusively from the bearer credential. Requires a read/write API credential. Check receipts before retrying a timed-out write.

JSON body fields

input (body, object[], required)

See the JSON schema for this field’s contract.

  • Minimum items: 1
roles (body, (Consensus | Entry | Sign-off | Risk-bearing | Trojan Horse | Gatekeeper | Champion | Expert | Silent veto)[], optional)

See the JSON schema for this field’s contract.

id (body, string, required)

See the JSON schema for this field’s contract.

trafficLight (body, Cold | Neutral | Against | For | null, optional)

See the JSON schema for this field’s contract.

isKeyStakeholder (body, boolean, optional)

See the JSON schema for this field’s contract.

firstName (body, string, optional)

See the JSON schema for this field’s contract.

  • Minimum length: 1
lastName (body, string, optional)

See the JSON schema for this field’s contract.

  • Minimum length: 1
position (body, string, optional)

See the JSON schema for this field’s contract.

linkedIn (body, string, optional)

See the JSON schema for this field’s contract.

avatar (body, string, optional)

See the JSON schema for this field’s contract.

email (body, string, optional)

See the JSON schema for this field’s contract.

phone (body, string, optional)

See the JSON schema for this field’s contract.

location (body, string, optional)

See the JSON schema for this field’s contract.

remarks (body, string, optional)

See the JSON schema for this field’s contract.

source (body, Research | Njord AI | Form | CRM | LinkedIn | File Import | API | MCP, optional)

See the JSON schema for this field’s contract.

uuid (body, string, optional)

See the JSON schema for this field’s contract.

JSON request body schema
{
  "type": "object",
  "properties": {
    "input": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "roles": {
            "nullable": true,
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "Consensus",
                "Entry",
                "Sign-off",
                "Risk-bearing",
                "Trojan Horse",
                "Gatekeeper",
                "Champion",
                "Expert",
                "Silent veto"
              ]
            }
          },
          "id": {
            "type": "string"
          },
          "trafficLight": {
            "nullable": true,
            "type": "string",
            "enum": [
              "Cold",
              "Neutral",
              "Against",
              "For",
              null
            ]
          },
          "isKeyStakeholder": {
            "nullable": true,
            "type": "boolean"
          },
          "firstName": {
            "type": "string",
            "minLength": 1
          },
          "lastName": {
            "type": "string",
            "minLength": 1
          },
          "position": {
            "type": "string",
            "nullable": true
          },
          "linkedIn": {
            "type": "string",
            "nullable": true
          },
          "avatar": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "phone": {
            "type": "string",
            "nullable": true
          },
          "location": {
            "type": "string",
            "nullable": true
          },
          "remarks": {
            "type": "string",
            "nullable": true
          },
          "source": {
            "type": "string",
            "enum": [
              "Research",
              "Njord AI",
              "Form",
              "CRM",
              "LinkedIn",
              "File Import",
              "API",
              "MCP"
            ]
          },
          "uuid": {
            "type": "string",
            "nullable": true
          }
        },
        "required": [
          "id"
        ],
        "additionalProperties": false
      },
      "minItems": 1
    }
  },
  "required": [
    "input"
  ],
  "additionalProperties": false
}
JSON response schema
{
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "ids",
        "filter"
      ],
      "description": "Whether the mutation scope came from explicit ids or a server-side filter."
    },
    "artifactBacked": {
      "type": "boolean",
      "description": "True when private uploaded ids selected the cohort; row numbers replace ids in every result sample and failure."
    },
    "dryRun": {
      "type": "boolean",
      "description": "True means preview/count only; false means a write was attempted."
    },
    "entityType": {
      "type": "string",
      "description": "Entity family targeted by this mutation.",
      "enum": [
        "stakeholder"
      ]
    },
    "updateMode": {
      "type": "string",
      "enum": [
        "uniform",
        "artifact_rows"
      ],
      "description": "Whether every entity receives one shared patch or row-aligned artifact values."
    },
    "matchedCount": {
      "type": "number",
      "description": "Total entities matching the requested scope before write execution."
    },
    "attemptedCount": {
      "type": "number",
      "description": "Entities the runtime attempted to update. In dryRun mode this is normally 0."
    },
    "succeededCount": {
      "type": "number",
      "description": "Entities successfully updated. In dryRun mode this is normally 0."
    },
    "failedCount": {
      "type": "number",
      "description": "Entities or uploaded rows that failed validation or write execution."
    },
    "validationFailureCount": {
      "type": "number",
      "description": "Dry-run count of invalid, duplicate, unmatched, or row-patch validation failures. If greater than 0, list every row from failures before discussing matchedSample."
    },
    "idValidationFailures": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "index": {
            "type": "number"
          },
          "rowNumber": {
            "type": "integer",
            "minimum": 1,
            "description": "One-based uploaded row number used instead of an entity id for private artifact-backed results."
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Human-readable entity name for the failed row when available."
          },
          "accountName": {
            "type": "string",
            "description": "Parent account name for failed stakeholder/deal rows when available."
          },
          "code": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "additionalProperties": false
      },
      "description": "Dry-run-only list of invalid, duplicate, or unmatched requested inputs. Artifact-backed results identify rows without returning uploaded ids."
    },
    "skippedCount": {
      "type": "number",
      "description": "Entities skipped by validation, safety limits, or no-op checks. In dryRun mode with explicit ids, this is the id-validation failure count, not the matched sample size."
    },
    "expectedCount": {
      "type": "number",
      "description": "User-confirmed expected matched count required for non-dry-run writes when supplied."
    },
    "maxCount": {
      "type": "number",
      "description": "Maximum allowed matched scope for this mutation request."
    },
    "matchedSample": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Entity id included only for non-artifact bounded samples."
          },
          "rowNumber": {
            "type": "integer",
            "minimum": 1,
            "description": "One-based uploaded row number used instead of ids for artifact-backed samples."
          },
          "name": {
            "type": "string",
            "description": "Human-readable entity name when available."
          },
          "accountId": {
            "type": "string",
            "description": "Parent account id for deal samples when available. Stakeholder samples intentionally avoid raw parent account ids; use accountName when available."
          },
          "accountName": {
            "type": "string",
            "description": "Parent account name for stakeholder/deal samples when available."
          }
        },
        "additionalProperties": false
      },
      "description": "Bounded preview sample of matching entities; not exhaustive. Do not present this sample when failures is non-empty unless the user asks for examples of valid rows."
    },
    "proposedSample": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "rowNumber": {
            "type": "integer",
            "minimum": 1
          },
          "entityName": {
            "type": "string"
          },
          "values": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "nullable": true,
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "number"
                    },
                    {
                      "type": "boolean"
                    }
                  ]
                },
                {
                  "type": "array",
                  "items": {
                    "nullable": true,
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "number"
                      },
                      {
                        "type": "boolean"
                      }
                    ]
                  }
                }
              ]
            }
          }
        },
        "required": [
          "rowNumber",
          "values"
        ],
        "additionalProperties": false
      },
      "description": "Bounded row-aligned proposed patches. Raw artifact ids stay server-side."
    },
    "proposedSampleLimit": {
      "type": "integer",
      "minimum": 1
    },
    "proposedSampleTruncated": {
      "type": "boolean"
    },
    "updatedSample": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Entity id included only for non-artifact bounded samples."
          },
          "rowNumber": {
            "type": "integer",
            "minimum": 1,
            "description": "One-based uploaded row number used instead of ids for artifact-backed samples."
          },
          "name": {
            "type": "string",
            "description": "Human-readable entity name when available."
          },
          "accountId": {
            "type": "string",
            "description": "Parent account id for deal samples when available. Stakeholder samples intentionally avoid raw parent account ids; use accountName when available."
          },
          "accountName": {
            "type": "string",
            "description": "Parent account name for stakeholder/deal samples when available."
          }
        },
        "additionalProperties": false
      },
      "description": "Bounded sample of updated entities for write mode; not exhaustive."
    },
    "updatedSampleLimit": {
      "type": "number",
      "description": "Maximum number of updated sample entities returned."
    },
    "updatedSampleTruncated": {
      "type": "boolean",
      "description": "Whether more updated entities exist beyond updatedSample."
    },
    "failures": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "index": {
            "type": "number"
          },
          "rowNumber": {
            "type": "integer",
            "minimum": 1,
            "description": "One-based uploaded row number used instead of an entity id for private artifact-backed results."
          },
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "description": "Human-readable entity name for the failed row when available."
          },
          "accountName": {
            "type": "string",
            "description": "Parent account name for failed stakeholder/deal rows when available."
          },
          "code": {
            "type": "string"
          },
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "additionalProperties": false
      },
      "description": "Per-entity or per-row failures. Artifact-backed results identify rows without returning uploaded ids. If non-empty, present these before matchedSample."
    }
  },
  "required": [
    "mode",
    "dryRun",
    "entityType",
    "matchedCount",
    "attemptedCount",
    "succeededCount",
    "failedCount",
    "skippedCount",
    "maxCount",
    "updatedSample",
    "updatedSampleLimit",
    "updatedSampleTruncated",
    "failures"
  ],
  "additionalProperties": false
}

Responses

200: Operation receipt or read result. Arrays are returned under items; scalar and null results under value.
RateLimit-Policy (header, value, optional)

Response header

RateLimit-Limit (header, value, optional)

Response header

RateLimit-Remaining (header, value, optional)

Response header

RateLimit-Reset (header, value, optional)

Response header

400: Invalid operation input or record identifiers.
400 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
401: Bearer credential is missing, expired or invalid.
401 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
402: Insufficient research credits. Add credits before retrying.
402 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
403: Write access or resource permission is required.
403 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
404: Record is not available in the credential workspace.
404 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
405: Use the documented HTTP method.
405 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
409: Revision conflict or a record has dependencies. Refetch and reconcile links before retrying.
409 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
413: Request exceeds the permitted JSON body size.
413 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
429: Rate limit exceeded. Observe Retry-After.
RateLimit-Policy (header, value, optional)

Response header

RateLimit-Limit (header, value, optional)

Response header

RateLimit-Remaining (header, value, optional)

Response header

RateLimit-Reset (header, value, optional)

Response header

429 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
500: Internal server error.
500 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
503: Service temporarily unavailable. Observe Retry-After when present.
503 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}
504: Execution timed out. A write may have committed; check receipts or progress before retrying.
504 response schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "message": {
      "type": "string"
    },
    "code": {
      "type": "string"
    }
  },
  "required": [
    "message",
    "code"
  ]
}

Update stakeholders

curl -X PATCH "https://server-url-from-token-page.endpoint/api/v1/public/stakeholders" \
  -H "Authorization: Bearer $DOE_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "input": [
    {
      "id": "507f1f77bcf86cd799439011",
      "firstName": "Alex"
    }
  ]
}'
Response example
No response example is supplied. See the JSON response schema.